fix(reliability): apply the relay-field policy to the packaged driver too - #4710
Merged
Conversation
… too Ring 2 has never passed. It was added on 2026-07-30 (0f68fe6, #4606), after that day's last green release run, and every release since — five nightlies plus v0.7.0-rc.33 — has failed on all three OS legs with `streamShape golden mismatch (11); diverges from kernel`. Nothing was wrong with the packaged backend. `ws-server.ts` already had `stripRelayOnlyFields`: the WS relay backfills run identity onto frames the kernel actor emits bare, so the driver cancels that enrichment before recording and the two surfaces stay comparable. `protocol/messages.ts` specifies this — job_id is "Stamped downstream by the relay ... not by the kernel actor", and generation_complete is emitted by the actor as "a BARE event" with job_id and index "stamped DOWNSTREAM by the relay". `packaged.ts` is the same kind of relay and never got the rule. It records raw frames, so Ring 2 diffed a relay stream against a bare oracle and failed on exactly the fields the protocol says only the relay carries. A rule only one of two relay surfaces applies is not a policy, it is a discrepancy, so the sets move to `relay-fields.ts` and both drivers import them. The packaged driver also drops `sdk_execution_target` — sent once per socket at upgrade time by the production Fastify plugin, before any workflow exists, so the oracle has nothing to compare it against. Deliberately not changed: the journey manifest still declares only ["kernel", "ws-server"]. `PackagedDriver` has no `supports()`, so listing "packaged" would make a bare `nodetool reliability run` fail whenever no bundle is staged (compare.ts records an unstaged run as ok: false). Refs run 30927453380
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.
Ring 2 has never passed. It was added on 2026-07-30 (0f68fe6, #4606) — after that day's last green release run — and every release since has failed on all three OS legs with
streamShape golden mismatch (11); diverges from kernel. Five nightlies plusv0.7.0-rc.33.Nothing was wrong with the packaged backend.
ws-server.tsalready hadstripRelayOnlyFields: the WS relay backfills run identity onto frames the kernel actor emits bare, so the driver cancels that enrichment before recording and the two surfaces stay comparable frame-for-frame.packages/protocol/src/messages.tsspecifies this —job_idis "Stamped downstream by the relay ... not by the kernel actor", andgeneration_completeis emitted by the actor as "a BARE event" withjob_idandindex"stamped DOWNSTREAM by the relay".packaged.tsis the same kind of relay and never got the rule. It recorded raw frames, so Ring 2 diffed a relay stream against a bare oracle and failed on exactly the fields the protocol says only the relay carries.A rule that only one of two relay surfaces applies is not a policy, it is a discrepancy — so the sets move to
relay-fields.tsand both drivers import them. The packaged driver also dropssdk_execution_target, sent once per socket at upgrade time by the production Fastify plugin before any workflow exists, so the oracle has nothing to compare it against.Proof
Same commit (
1de83a616), same job, same runners:✗ packaged — streamShape golden mismatch (11) — diverges from kernel✓ packaged: completed—verdict: OKRing 1 goes from 5 failing journeys to 4. The one that changed is the packaged journey;
ws-server's ownlinear-text-pipelinestill passes, so moving the sets regressed nothing.The four remaining Ring 1 failures are pre-existing and untouched here:
mid-run-cancel-node,mid-run-cancel-streaming,provider-failure-mid-stream(Database not initialized),ws-transport-faults.Deliberately not changed
The journey manifest still declares only
["kernel", "ws-server"].PackagedDriverhas nosupports(), so listing"packaged"would make a barenodetool reliability run linear-text-pipelinefail whenever no bundle is staged —compare.tsrecords an unstaged run asok: false.Not verified locally
npm run lintandnpm run typecheckwere not run — no workingnode_moduleson the machine this was authored on. CI is the first thing to type-check it; the Ring 1 dispatch above did build and run the harness.