Repository navigation
test(dogfood): packaged-action-disabled-dispatch-live picks a not-done task and reads its own ledger row - #27066
Conversation
…e task and reads its own ledger row
beforeAll took `showcase_task?$top=1` with no filter or order; the showcase
seed carries done tasks, so the first row could already be done and
acceptance[0]'s `after.done === false` failed while the door had refused
correctly. Pick `{ done: false }` ordered by id and assert the precondition
in setup, before any switch flips. acceptance[5] now reads the Mark Done
ledger row itself before the reboot instead of a variable acceptance[0]
assigns, so it no longer cascades as `undefined`.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYnxoqB6x8ynuZJhzXk
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
席位核对 — ACCEPT · domain:devx#2 · head
|
Fixes #26952
Clause-②: no
Metadata-protocol: none
维护者速读
ACTION_DISABLED、零写入)原样保留;回滚即 revert 本 PR。packages/qa/dogfood/test/packaged-action-disabled-dispatch-live.dogfood.test.ts的beforeAll取任务一段和 acceptance[5] 开头。pnpm --filter @objectstack/dogfood exec vitest run test/packaged-action-disabled-dispatch-live.dogfood.test.ts,预期 8/8 通过。What changes
packages/qa/dogfood/test/packaged-action-disabled-dispatch-live.dogfood.test.ts, test-only:beforeAlltookGET /data/showcase_task?$top=1with no filter and no order. The showcase seed carriesdone: truetasks (examples/app-showcase/src/data/seed/index.ts, the first seeded task is one), so the first row could already be done. It now reads$filter={"done":false}&$orderby=id&$top=1. That is the JSON$filterand$orderbyspelling other dogfood files already use against this data door, for exampleactivity-withheld-update.dogfood.test.ts. The setup then assertsdone === falseon the picked row before any switch flips, so a bad pick failsbeforeAllwith the sentencesetup: task ID was picked as not done, not as acceptance[0].markDoneRowIdis gone. acceptance[5] reads theshowcase_mark_doneledger row itself before the reboot, asserting it exists with the messageacceptance[0] disables showcase_mark_done; this clause re-reads the ledger row it wrote, and then pins that the same row id survives the cold boot and the re-enable. acceptance[0] still asserts that exactly one ledger row exists.Unchanged: both 409
ACTION_DISABLEDanswers, the engine sentence, the{done, progress, updated_at}before/after equality, andafter.done === false. No skip, no retry, no quarantine.Why
Six main push reds since 21:56Z on
Dogfood Regression Gate (3/3)were this file, with the same two clauses each time: acceptance[0]expected true to be falseand the acceptance[5] cascadeexpected '…' to be undefined.Acceptance notes
Siblings that take
?$top=1from a seeded object (read onorigin/maincb8988ee14). None asserts on the picked row's state, so none has this defect, and none is changed:api-key-owner-revoke:/data/showcase_task?$top=1is an auth probe. Only the status (200, or 403API_KEY_REVOKED) is read.bearer-lane-password-change: two auth probes (403PASSWORD_RESET_REQUIRED, then 200). Status only.data-request-shape-live: the row is a handle. It PATCHestitleand readsupdated_atas a version token. The task's only validation is thestatusstate machine, which a title PATCH never touches, so a done row behaves the same.identity-admin-fields-org-peer: no$top=1. The seat's grep matched$top=100.internal-field-data-door-positions: an api-key auth probe. Status 200 only.permission-set-assignment-window:door()returns the status only.rest-config-contract-live: the row id is a mount probe handle.expectMountedreads the routing answer, not the row.comment-thread-parent-pairandactivity-withheld-row-predicateread.totalunder a filter.activity-withheld-updatepages with a filter and$orderby=timestamp asc.master-detail-batch-atomicandrelated-list-server-paging-and-gateuse$top=10or more.skip-changeset:
@objectstack/dogfood(packages/qa/dogfood/package.json) is"private": trueand declares nofiles[]. There is nopackages/qa/package.json. Nothing underdogfood/test/**ships.CI note:
dispatch-gatesreports thatDogfood Regression Gatedoes not run onpull_requestormerge_group. Its first CI run on this change is the main push battery after the merge, so the local runs below are this PR's evidence for the file.Verification
Head
aaaa7f96, built withpnpm turbo run build --filter=@objectstack/dogfood(exit 0). Each run used the dogfood package's own vitest config (|isolated|project), the same config CI's shard uses, as a single file.Reproduction on the ORIGINAL file: done-first state forced, acceptance[0] and [5] fail exactly as on main
A scratch copy, not committed, of the
origin/mainfile PATCHes the unordered?$top=1task to{ done: true, progress: 100 }right after sign-in:The FIXED file against the same done-first state: green
The same injection applied to this PR's file:
The filter is really applied: a second variant forces the id-ordered first task (
$orderby=id&$top=1, unfiltered) to done. The fixed pick still skips it and stays green:The committed file, 3 consecutive runs
Typecheck, lint, derived gates
pnpm --filter @objectstack/dogfood typecheck: exit 0. The tsconfiginclude: ["test/**/*"]covers the file.eslint --no-inline-configon the file: exit 0.node scripts/pm/dispatch-gates.mjs --commands: 51 commands derived and 51 run. 49 exited 0 and 2 exited 3 (PREREQUISITE NOT MET, so NOT MEASURED):check-plugin-teardown-shape --self-testneeds an unshallow clone for its pinned positive control, and grades only the checker.check:dual-build-cjs-loadsneeds dist for packages outside the dogfood closure.--ranreconciliation:51 derived famil(ies) accounted for — 49 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3).Generated by Claude Code