Repository navigation
fix(seed): price the active pipeline so the demo kanban is draggable - #1961
Merged
Merged
Conversation
…1902) Nine of the ten open seeded deals sat at or above LARGE_DEAL_AMOUNT, so each was born into opportunity_approval_on_create and locked by its approval node; on a fresh database only one open kanban card could move. Re-scope the line items of the seven curated active-pipeline deals so each derives an amount under $100K. Two open deals keep exhibiting the approval flow, one per tier: Acme Platform Upgrade (manager review) and Wayne Enterprise License (manager + director). The Globex quote follows its deal's new lines (tax re-derived at the 8% the other quotes bill). A seed-row pin in seed-consistency names the two deals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X8U3asekbiC7yWoEPWR4Dg
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
os-warren
marked this pull request as ready for review
September 25, 2026 14:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1902
What
Re-price the seeded active pipeline (ruling B, comment 5826849592) so that exactly two open deals sit at or above
LARGE_DEAL_AMOUNT(100,000) and every other open deal is under it. The approval flow and both threshold constants are untouched.HIGH_VALUE_DEAL_AMOUNT)Why these two: one per approval tier, and they are the two deals whose amounts other seed prose already quotes, so they stay as they are. The Acme account description says "$150K platform upgrade", and the Wayne
in_approvalcontract carriescontract_value: 1200000. Keeping them means neither of those needs a second edit.Re-scoped under the line (the source of truth is
OPPORTUNITY_LINES;dealValue()still derivesamountandexpected_revenue):Line descriptions were rewritten to fit the new scope. For example, Globex is now one shared tenant serving all six sites, so the seeded "six-site rollout" demo activity still reads true. Vertex Enterprise Rollout is now "phase one", and its record description says so. It keeps a
discount: 20line, so "the deepest discount HotCRM seeds anywhere is 20%" (_thresholds.ts,quote.object.ts,quote-discount-ceiling.test.ts) stays true and non-vacuous.Consumers checked
src/revenue/data/revenue.seed.ts: the Globex Manufacturing Suite Proposal quote clones its deal's lines. Updated the tax to 7,220 (8% of the post-discount subtotal, the rate every non-Acme quote bills) and the description (it no longer includes implementation services). Its quote line items follow automatically throughQUOTE_LINES. The Acme, Wayne and Initech quotes and the Wayne contract are unchanged, because their deals are unchanged.test/seed-consistency.test.ts: the rollup, expected-revenue and quote-total checks re-derive from the seed and stayed green. Added one seed-row pin: the two over-the-line open deals by name and tier, and every active stage keeps a card under the line.content/**,src/docs/**): I searched for the seven deal names and their amounts and found no hits outside the seeds. Every$100K/$500Kin the docs is a threshold, not a seeded figure.src/sales/data/forecast.seed.ts: the forecast rows are hand-authored snapshot figures and are not derived from opportunity amounts, so I left them unchanged (see Acceptance notes).actual_revenue/num_*: the derived block counts won deals only, and all re-priced deals are open, so nothing changed.Measured on a fresh database (
objectstack start, empty.objectstack/data)PATCH stageon Northwind Grid Modernization returnedRECORD_LOCKED.PATCH 200, and the API read-back showsstage: qualification.PATCH 409 RECORD_LOCKED, the toast showed "locked while an approval is in progress", and the stage stayedproposal.Gates (all at 521de4e)
pnpm validate0 ·typecheck0 ·lint0 ·lint:i18n-gate0 ·hygiene0 ·hygiene:tokens0 ·build0 ·test0 (173 files, 3716 passed, 1 skipped).Token ratchet: every measured line is identical before (1551914) and after. Only the excluded bucket moved (
src/*/data, outside the ratchet by ruling): about 96,270 before and about 96,254 after.Ablation of the new pin:
ablation-replaceraised Lattice Student Success Platform from 2 to 7 SMB tenants (126,000). The pin went red (expected [ …(3) ] to deeply equal [ …(2) ], 1 failed / 39 passed). The file was restored, with blob equal to HEAD andgit diff HEADempty.Acceptance notes
(opportunity, product), so line items for products a deal no longer carries would stay behind, and approval requests already open stay open. The changeset says to usepnpm demo:reset. I did not measure the existing-database path.pipeline_amount: 760000) is a positional, hand-typed demo figure. It never tracked the seeded open pipeline (about 3.8M before), and it does not now (about 2.02M after). It is noted here and not changed, because it is outside this card.Generated by Claude Code