Repository navigation
test(flows): name the lead_assignment SLA test for what it asserts, drop the inert crm_task walk - #1787
Merged
Conversation
…rop the inert crm_task walk `lead_assignment` authors no `create_record` node, so the walk over `h.store.crm_task` inside "sends every SLA task to the lead owner, never a dot-walked manager" inspected zero rows on every input. Measured: with the walk's assertion inverted so any inspected row would fail it, the test stayed green; the same ablation on the notification walk reds, so that one is live. The flow is unchanged. The walk is deleted rather than turned into an assertion that the app does nothing, and the title now states what the surviving assertion checks — no field of either branch's alert renders as the literal string "undefined". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PpRjGNnwyo2J1rrmekxB1W
… the ablation record The pinned @objectstack packages are 17.3.0 (package.json and the installed @objectstack/spec both read 17.3.0); the changeset said 17.2.0. Six flow mutations were run, not five. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PpRjGNnwyo2J1rrmekxB1W
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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 #1775
Ruled by the director seat, decision batch #91 (comment 5583975407), option A:
lead_assignmentwas never meant to create a task, so the test title is what is wrong. Test-only,Clause-②: no, nothing undersrc/.What changed
test/flow-record-change.test.ts— a rename and a deletion, nothing else:h.store.crm_taskin thelead_assignmentSLA test, together with the block comment that existed only to explain it.sends every SLA task to the lead owner, never a dot-walked managertorenders both SLA branch alerts with no field left as the literal "undefined".Plus
.changeset/sla-alert-test-names-what-it-pins.md. The flow file is untouched — option B (acreate_recordnode) was refused as capability expansion decided by a test title.The card's premise, re-measured on this branch
The card was written against
5b2ecdd; this branch is based on9371173, so everything was re-located rather than inherited. The test is attest/flow-record-change.test.ts:271.The walk really was inert. Its assertion was inverted so that any row it inspected would fail it:
On-disk proof
086a5072 -> 63c9f21c, thenTests 1 passed | 43 skipped (44),VERDICT command-exit 0. It inspects zero rows, on both ratings. Restored to086a5072,git diff HEADempty.What survives is live. The same ablation applied to the surviving notification walk (
.not.toContain('undefined')becomes.toContain('__LIVENESS_ABLATION__'), blobf69c68c3 -> 82606b01) goes red:Tests 1 failed | 43 passed (44), naming the renamed test. So that walk inspects a real row — one per rating — and its payload is{"to":["rep1"],…}, the lead owner. Restored, blob back tof69c68c3,git diff HEADempty.Deviation from the ruling's parenthetical — measured, and worth a maintainer's eye
The ruling asked for the title to name "the
next_followup_datestamp and the owner-addressed alert". Measured on this branch, this test pins neither of those two things, so taking that phrase literally would have re-created the defect the card exists to remove. The title states the assertion instead. Every leg below mutatedsrc/flows/lead-assignment.flow.tstemporarily, proved the mutation reached disk by blob hash, ran the file, then restored it and re-proved the blob — the flow file is byte-identical tomainin this PR.next_followup_daterenamed on bothupdate_recordnodeslead_assignment stamps the SLA on an integration-written lead— a different test in this file, which seeds acrm_leadrow and reads the stamp back{record.owner_id}becomes{record.owner_id.manager_id}notifynode fails outright and emits nothing, so this test's walk has no row to inspect{record.owner.manager_id}{record.manager_id}notify_hot'stitleTwo readings follow. First, the stamp is pinned, but by a different test, so this title must not claim it. Second, on the pinned engine (17.3.0 — read from package.json and the installed @objectstack/spec) an unresolvable recipient no longer silently interpolates to
undefined— the node fails loudly and the branch tests catch it — so the dot-walk the old title named is caught, just not here. This test asserts only that no field of the emitted notification renders as the literal stringundefined; it does not assert who the recipient is. The new title says exactly that and no more.Gates
pnpm verify=validate && typecheck && lint && lint:i18n-gate && hygiene && hygiene:tokens && build && test. Exit code captured before any pipe: 0 (VERDICT command-exit 0, held 139s), re-run on the final head4b7cb757after the last commit so the reading is not from an older tree.Test Files 164 passed (164)·Tests 3439 passed | 1 skipped (3440)✓ source hygiene clean·✓ source token ratchet cleanCounts, before and after, measured from real runs of the changed file:
*.test.tsfiles intest/test/flow-record-change.test.tsexpect(sites in that fileThe deleted walk shows up as one fewer assertion site, not as a smaller file or test count — no
it,describeor gate was added or removed.Line budget: NOT APPLICABLE. The ratchet gate names its own surface:
Source token ratchet — authored surface: src/**/*.ts minus src/translations, src/data. This PR touchestest/and.changeset/only, neither of which is inside it; the gate printed✓ source token ratchet clean.Changeset
Empty frontmatter — the sanctioned "this PR releases nothing" declaration that
.github/workflows/changeset-check.ymldocuments, on par with theskip-changesetlabel, and the form the two most recent test-only PRs in this repo used. Nothing undersrc/moved, so no object, field, view, label, page, hook or translation string reaches a user; a versioned entry would announce a release that does not exist. A changeset file rather than the label because the file also carries the measurement intoCHANGELOG.md-adjacent history and needs no label write to stay green.验收备注
noted, not filed:the surviving assertion's failure message still readsnotification dot-walked a lookup, which names the bug class the check was written for rather than what it now catches. Renaming it is a second rename inside the same test; the ruling authorises theittitle, so it is left alone. Successor: epic Epic: bring this repo's test farm back under the 2026-08-31 ruling — platform-first,os lint --strictfirst, then retire the local re-implementations by family #1579's test-farm sweep, which ownstest/**and last landed in this exact file via PR test: make three green assertions inspect what they claim (#1772) #1774.noted, not filed:through the six mutations tabled above, nothing made the surviving assertion red — it inspects real rows but its named failure mode is not reachable by breaking the flow's recipients or templates on 17.3.0. That is not established unfalsifiability (six probes is not a proof, and the assertion covers every payload field,severityandchannelsincluded), which is why no card is opened on a claim this bounded. Handed to the PM: if epic Epic: bring this repo's test farm back under the 2026-08-31 ruling — platform-first,os lint --strictfirst, then retire the local re-implementations by family #1579 wants it, the six legs and their logs are reproducible from this PR's description. Same successor as above.Generated by Claude Code