Repository navigation
test(ci): pin the dsh-schedule task row a part handoff rewrites (#1257) - #1273
Conversation
`moveSchedules` moves a task across a part handoff by rewriting one row of
DSH's schedule storage: it runs the write in `service.serialize(...)`, reads
the table through `(await service.getDomain()).table('tasks')` and puts
`{ ...task, sessionId: toId }` back (#1245). Both members are `private` in
dsh-schedule's typings and the row belongs to a storage domain declared
inside the package, so a rename does not throw anywhere a test can see: the
outer `catch` turns it into one `rt.warn`, the task stays on the part being
archived, and the board silently stops waking it.
`check-dsh-task-shape.mjs` pins that surface against the real package, and
`flybot-tests` runs it right after `Install DSH` — the step a DSH upgrade
changes — so a rename is a red job instead of a quiet warning. It fails, not
skips, when the package or a member is gone: a skip is not a pin.
Scope line: the domain handle itself stays unpinned. `table(name)` lives on
dsh-storage-domain's DomainImpl, which that package does not export, and
opening a real domain needs the storage facility plus a backend; the table is
pinned where it is declared instead (`scheduleDomain.tables.tasks`).
Docs-not-needed: `.github/` belongs to no subsystem doc in
docs/subsystems/, and the path this pins is already written down in
docs/subsystems/core-host.md (Part move, #1245).
|
Verdict: PASS at 65fe284 Two files, It is a pin, not a tautology. It loads the package the way a profile does ( It pins what Ran: Red proof — one knife re-run by me against a copy of the installed package with a harness rebuilt around it (the rest of Repository checks at the tip: Checkpoint is self-consistent with this head: Two notes, neither blocking: no changelog fragment, which is the documented rule for a CI pin a user cannot see; and the pin does not open a real domain handle (stated above). |
|
Checkpoint |
Fixes #1257
Owner: Dev
Written-by: Dev
Reviewer: Reviewer
Base:
4095e1359a5a023c8e5d8ffb7ac7f8ff484f7c31— the parent of this branch's one commit, and currentmainwhen it was cut (read fromgit/ref/heads/mainat 10:27Z). An earlier cut of the same branch sat on98528d9f; it was superseded, not rebased, and.github/is byte-identical between the two bases (diff -rqon the whole subtree: no differences), so the diff below is the same two files either way.Tip SHA: 65fe284
What changed
moveSchedules(core/src/host/schedules.js:555-575) moves a task across a part handoff by rewriting one row of DSH's schedule storage: it runs the write insideservice.serialize(...), reads the table through(await service.getDomain()).table('tasks')and puts{ ...task, sessionId: toId }back. Both members areprivatein dsh-schedule's own typings (lib/types/index.d.ts:125private getDomain;,:151private serialize;), and the row belongs to a storage domain declared inside the package. So when DSH renames either member or changes the row, nothing throws where a test can see it: the outercatchturns it into onert.warn, the task stays on the part being archived, and the board silently stops waking it.#1249addedgetDomain/serializeto the in-memory fakes inschedules.test.jsandpart-archive.test.js, so the behaviour tests stay green through exactly that failure.Before: nothing ran against the real package, so a DSH upgrade that moved this surface produced no red anywhere.
After:
.github/scripts/check-dsh-task-shape.mjsasserts the surface against the real package, andflybot-testsruns it directly afterInstall DSH— the step a DSH upgrade changes — for the PR gate and for everymainpush.ScheduleService.prototype.getDomainand.serializeare functions.scheduleDomain.tables.tasks.valueSchemaaccepts the rowmoveScheduleswrites,{ sessionId, record, status, deliveryHistory }, and accepts{ ...row, sessionId: 'session-to' }— the exact handoff write — coming back moved.id,title,kind,scheduledAt(the four membersmoveSchedulesreads offtask.record).sessioninstead ofsessionId, orstatus: 'archived'instead of one of the declaredactive|inactive, must be refused.ScheduleService,scheduleDomain,createAtScheduleRecord— no zod internals and no fake of the package.It fails, it does not skip (acceptance 2): no harness, or the package not installed in it, exits 1 with the one line that fixes it (
npm run harnessincore/, orDSH_HARNESS). Every failure names what moved and repeats the standing instruction:getDomain/serializeare private ondsh-schedule0.2.x, re-confirmmoveSchedules' path when DSH is upgraded, because a rename does not throw — it leaves every moved task behind onert.warn.Scope line, so it is not read as an omission: the domain handle stays unpinned.
table(name)lives ondsh-storage-domain'sDomainImpl, which that package does not export, and opening a real domain means bringing up the storage facility plus a backend. So the table name is pinned where it is declared (scheduleDomain.tables.tasks) and the row is pinned by the schema that would refuse it, rather than by a hand-written in-memory backend. A fake there would be ~30 more lines that go red on unrelated storage refactors — which is the shape that let#1249's fakes stay green.No changelog fragment:
changelog.d/README.mdsays a change users cannot see needs none, and this is a CI pin on a developer surface.Red without the source change
There is no source change to revert here — the thing under review is the pin, and the "source" it pins is the package. So each knife mutates the real
@deepseek-ai/dsh-schedule0.2.1-rc.2 copy the check resolves and re-runs it; every one exits 1.getDomainrenamed tostorageDomainOf:dsh-schedule task row: FAIL — @deepseek-ai/dsh-schedule@0.2.1-rc.2 from …/pkg/lib/index.js/- ScheduleService.prototype.getDomain is not a functionserialize(work)renamed toenqueue(work):- ScheduleService.prototype.serialize is not a functionsessionIdrenamed tosession:- the task row {sessionId, record, status, deliveryHistory} is refused by the schema: session Invalid input: expected string, received undefined; Unrecognized key: "sessionId"statusrenamed tostate:- the task row {sessionId, record, status, deliveryHistory} is refused by the schema: Unrecognized key: "status"dsh-schedule task row: FAIL — @deepseek-ai/dsh-schedule is not installed in the harness at /data/red/v5/harness (runnpm run harnessin core/ or set DSH_HARNESS)— exit 1, not a skip.Each run also prints the pin's standing note (
getDomain/serializeare private on 0.2.x, re-confirm on upgrade) and the real version it read, so a red names the version whose shape moved.Verification at the tip
Tip SHA:
65fe284c6c47debf7efc38ff94cd74dfb68e5b7fRan:
ok — @deepseek-ai/dsh-schedule@0.2.1-rc.2(this host),ok — @deepseek-ai/dsh-schedule@0.2.0-rc.2(the CI harness pin incore/dev/harness/package.json— so this is not a gate that reds itself),ok — @deepseek-ai/dsh-schedule@0.2.1-alpha.1(the nightly compat leg).exit=1, run against mutated copies of the real package.node .github/scripts/testing-layers.mjs --check→testing-layers: every test file and every workflow is classified(403 test file(s) in 16 workflow(s), no new test file or workflow added).node .github/scripts/changelog.mjs check→changelog: 5 fragment(s) in changelog.d/ are well formed.node .github/scripts/check-mojibake.mjs --check→mojibake: ok — 0 occurrences of U+FFFD in 1083 text file(s).node .github/scripts/check-empty-catch.mjs --check→ exit 0.cd core && node scripts/check-arch-docs.mjs→arch-docs: OK (2 changed file(s))—.github/is owned by no subsystem doc, so no doc change is due (and the path itself is already written down indocs/subsystems/core-host.md, Part move,#1245).node --test ".github/scripts/*.test.mjs"→# tests 508/# pass 508/# fail 0/# skipped 0— this is the suite that readsflybot-tests/action.ymlitself (fetch-base.test.mjs, 3/3), so the added step does not disturb it.node scripts/ds-bot-patches.mjs check— three lines, unchanged by this PR:ok ds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (tree 5834c00, v0.1.5)/ok 10 patches apply cleanly in order/ok core/ equals ds-bot/ + patches/ds-bot/.js-yamlreads 15 steps, the new step is 4th, right afterInstall DSH.Not run (and why):
core's suite,plugins/*,interop,live-e2e: no file any of them reads changed — this PR touches only.github/.oxlintlikewise lintscore/(core/scripts/lint.mjs) and does not cover.github/scripts, so there is nothing new for it to say.Files in this diff (2)
.github/scripts/check-dsh-task-shape.mjs.github/actions/flybot-tests/action.ymlInstall DSHCheckpoint
{ "pr": 1273, "claim": "Dev", "issue": 1257, "summary": "A new CI check pins the DeepSeek Harness schedule task row that a part handoff rewrites. moveSchedules writes that row through two private members and a storage-domain shape, so a DSH rename produces one rt.warn and leaves every moved task on the part being archived, with no red anywhere. check-dsh-task-shape.mjs asserts that surface against the real package and flybot-tests runs it after Install DSH, failing rather than skipping when the package or a member is gone. It is green on 0.2.1-rc.2, the CI harness pin 0.2.0-rc.2 and 0.2.1-alpha.1, and each of five module mutations turns it red.", "files": [".github/scripts/check-dsh-task-shape.mjs", ".github/actions/flybot-tests/action.yml"], "checks": { "ran": "the pin on 0.2.1-rc.2 / 0.2.0-rc.2 / 0.2.1-alpha.1 (green), five module knives (red), testing-layers, changelog, mojibake, empty-catch, arch-docs, .github/scripts/*.test.mjs 508/508, ds-bot-patches check", "result": "green", "at": "65fe284c6c47debf7efc38ff94cd74dfb68e5b7f" }, "next": "none — ready for review" }