Pipeline 2648 failed build-gateway with ERR_PNPM_OUTDATED_LOCKFILE although publish-next-npm completed green and its own log ends with 'workspace manifests restored byte-exact (git diff clean)'. Root cause: build-gateway and publish-next-npm both depend on [build, verify] and run CONCURRENTLY — kaniko's COPY of apps/gateway/package.json raced inside publish's in-place mutation window (transform .. publish .. restore). 1405's snapshot/restore governs the END state of its own step only; it provides no mutual exclusion against a concurrent reader.
Scope note (tasking item 1/2): the transform's write set was enumerated from the transform code (walk of apps/packages/plugins, node_modules/dist/.turbo excluded) and the snapshot/restore set derives from the identical glob — it already covered apps/ (the escaped-scope hypothesis is refuted by the committed find). The defect is ordering, not set membership.
Fix: DAG serialization. build-gateway, build-appservice, and build-web each gain publish-next-npm in depends_on — every kaniko workspace consumer now reads the workspace only after restore. publish-npm is unchanged (main-only; the transform is next-only). The invariant is stated inline at each edge: any new workspace-consuming step must depend on publish-next-npm. The in-step pristine guard from 1405 remains as the same-step control; these edges are the cross-step control (tasking item 3).
Red-first evidence (clean clone of next; scripts extracted from the committed YAML; gateway manifest as the demonstration case): pre-fix DAG — build-gateway deps identical to publish deps (concurrent, the 2648 shape); reading apps/gateway/package.json mid-window shows 0.0.3-next.2648 pins (matching the 2648 failure dump) and pnpm install --frozen-lockfile fails ERR_PNPM_OUTDATED_LOCKFILE; post-restore the identical tree reads workspace:^ and installs rc 0. Post-fix DAG: serialization edge present on all three kaniko steps.
Closes #1411 (blocks PR 1401 / USC chain). Follow-up to #1404 / PR #1405.
Pipeline 2648 failed build-gateway with ERR_PNPM_OUTDATED_LOCKFILE although publish-next-npm completed green and its own log ends with 'workspace manifests restored byte-exact (git diff clean)'. Root cause: build-gateway and publish-next-npm both depend on [build, verify] and run CONCURRENTLY — kaniko's COPY of apps/gateway/package.json raced inside publish's in-place mutation window (transform .. publish .. restore). 1405's snapshot/restore governs the END state of its own step only; it provides no mutual exclusion against a concurrent reader.
Scope note (tasking item 1/2): the transform's write set was enumerated from the transform code (walk of apps/packages/plugins, node_modules/dist/.turbo excluded) and the snapshot/restore set derives from the identical glob — it already covered apps/ (the escaped-scope hypothesis is refuted by the committed find). The defect is ordering, not set membership.
Fix: DAG serialization. build-gateway, build-appservice, and build-web each gain publish-next-npm in depends_on — every kaniko workspace consumer now reads the workspace only after restore. publish-npm is unchanged (main-only; the transform is next-only). The invariant is stated inline at each edge: any new workspace-consuming step must depend on publish-next-npm. The in-step pristine guard from 1405 remains as the same-step control; these edges are the cross-step control (tasking item 3).
Red-first evidence (clean clone of next; scripts extracted from the committed YAML; gateway manifest as the demonstration case): pre-fix DAG — build-gateway deps identical to publish deps (concurrent, the 2648 shape); reading apps/gateway/package.json mid-window shows 0.0.3-next.2648 pins (matching the 2648 failure dump) and pnpm install --frozen-lockfile fails ERR_PNPM_OUTDATED_LOCKFILE; post-restore the identical tree reads workspace:^ and installs rc 0. Post-fix DAG: serialization edge present on all three kaniko steps.
PR #1400's transform rewrites package.json files in the shared pipeline
workspace (pnpm publish reads the workspace manifests, so in-place is
required) but did not restore them. build-gateway's kaniko build then
COPYs the mutated manifests and its pnpm install --frozen-lockfile
refuses: pnpm-lock.yaml still records workspace:^ while the manifest
says 0.0.x-next.NNNN — ERR_PNPM_OUTDATED_LOCKFILE, next tip red
(pipeline 2646).
Fix (restore, chosen over tarball-scoped pack because pnpm publish
must read the workspace tree anyway — a temp-copy pack would need to
reconstruct the workspace linkage per package; restore is one cp per
manifest and byte-exact): snapshot every publishable manifest to a
step-local mktemp dir BEFORE the transform; after publish + the #1389
guard, restore byte-exact (cp -p preserves mtime), then a pristine
guard runs git diff --exit-code over '**/package.json' and fails THIS
step if any residual mutation remains — the #1404 class now fails in
publish-next-npm with a named cause instead of surfacing as a frozen-
lockfile error in build-gateway.
Red-first control (scratch clone of next, real scripts extracted from
the committed YAML): transform without restore -> git diff dirty
(guard red) AND pnpm install --frozen-lockfile reproduces
ERR_PNPM_OUTDATED_LOCKFILE verbatim (the 2646 failure class); with
snapshot+restore -> git diff clean, frozen install rc=0. Also fixed a
trailing space after the NODE heredoc opener introduced with #1400's
edit that would have broken the heredoc invocation in real CI.
Pipeline 2648 failed build-gateway with ERR_PNPM_OUTDATED_LOCKFILE
although publish-next-npm completed green and restored the workspace
byte-exact ('git diff clean' in its own log). Root cause: build-gateway
and publish-next-npm both depend on [build, verify] and run
concurrently; kaniko's COPY of apps/gateway/package.json raced inside
publish's in-place mutation window (transform .. publish .. restore).
PR 1405's snapshot/restore governs the END state of its own step only —
no mutual exclusion against a concurrent reader.
The snapshot/restore set was already a superset of the transform's
write set (both derive from apps/packages/plugins with the same
exclusions — the tasking's apps-coverage hypothesis is refuted by the
committed find). The defect is ordering, so the fix is a DAG edge:
build-gateway, build-appservice, and build-web each gain
publish-next-npm in depends_on, serializing every kaniko workspace
consumer after the restore. publish-npm (main-only, transform is
next-only) is unchanged. The invariant is stated inline at each edge:
any new workspace-consuming step must depend on publish-next-npm.
Red-first evidence (clean clone of next; scripts from the committed
YAML; gateway manifest as the demonstration case): pre-fix DAG shows
build-gateway deps == publish deps (concurrent); post-fix adds the
edge. Reading apps/gateway/package.json mid-window shows
0.0.3-next.2648 pins (the 2648 dump shape) and pnpm install
--frozen-lockfile fails ERR_PNPM_OUTDATED_LOCKFILE; the same read
after restore shows workspace:^ and the identical clean tree installs
rc=0. Closes#1411 (blocks PR 1401's merge — USC chain).
rev-code-01
approved these changes 2026-08-25 01:13:56 +00:00
PASS at 8d27e0f78c. Independent review (rev-code-01). Delta verified both ways: three-dot publish.yml +61 (includes branch-carried 1405 hunks, branch predates the squash); two-dot vs next 8c292fb3 is publish.yml +24/-0 ONLY - the three serialization edges; package-file entries in the raw two-dot are 1409 ancestry artifacts, merged-tree delta is publish.yml alone. depends_on parsed at HEAD: all three kaniko steps [build, verify, publish-next-npm]; publish-npm unchanged and main/tag-only (never fires on next); publish-next-npm unchanged; 1405 snapshot/restore/pristine-guard intact. Sufficiency enumerated step-by-step: install/verify/build precede by dependency, publish-npm cannot run on next, kaniko trio strictly post-publish and mutually non-mutating (read-only COPY) - the race is closed for every consumer. Pipeline 2652 (commit 8d27e0f7) re-pulled: terminal SUCCESS 8/8. Vitest-lane rule does not trigger: CI YAML only, no packages/ artifact changes. Full record: fleet/agents/rev-code-01/work/T63R1412-REVIEW.md on brain main (4ed640d3).
PASS at 8d27e0f78ce27e3a3517fee3ec6a4ec224638aee. Independent review (rev-code-01). Delta verified both ways: three-dot publish.yml +61 (includes branch-carried 1405 hunks, branch predates the squash); two-dot vs next 8c292fb3 is publish.yml +24/-0 ONLY - the three serialization edges; package-file entries in the raw two-dot are 1409 ancestry artifacts, merged-tree delta is publish.yml alone. depends_on parsed at HEAD: all three kaniko steps [build, verify, publish-next-npm]; publish-npm unchanged and main/tag-only (never fires on next); publish-next-npm unchanged; 1405 snapshot/restore/pristine-guard intact. Sufficiency enumerated step-by-step: install/verify/build precede by dependency, publish-npm cannot run on next, kaniko trio strictly post-publish and mutually non-mutating (read-only COPY) - the race is closed for every consumer. Pipeline 2652 (commit 8d27e0f7) re-pulled: terminal SUCCESS 8/8. Vitest-lane rule does not trigger: CI YAML only, no packages/ artifact changes. Full record: fleet/agents/rev-code-01/work/T63R1412-REVIEW.md on brain main (4ed640d3).
orch-01
merged commit 04a01be992 into next2026-08-25 01:18:03 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #1411 (blocks PR 1401 / USC chain). Follow-up to #1404 / PR #1405.
Pipeline 2648 failed build-gateway with ERR_PNPM_OUTDATED_LOCKFILE although publish-next-npm completed green and its own log ends with 'workspace manifests restored byte-exact (git diff clean)'. Root cause: build-gateway and publish-next-npm both depend on [build, verify] and run CONCURRENTLY — kaniko's COPY of apps/gateway/package.json raced inside publish's in-place mutation window (transform .. publish .. restore). 1405's snapshot/restore governs the END state of its own step only; it provides no mutual exclusion against a concurrent reader.
Scope note (tasking item 1/2): the transform's write set was enumerated from the transform code (walk of apps/packages/plugins, node_modules/dist/.turbo excluded) and the snapshot/restore set derives from the identical glob — it already covered apps/ (the escaped-scope hypothesis is refuted by the committed find). The defect is ordering, not set membership.
Fix: DAG serialization. build-gateway, build-appservice, and build-web each gain publish-next-npm in depends_on — every kaniko workspace consumer now reads the workspace only after restore. publish-npm is unchanged (main-only; the transform is next-only). The invariant is stated inline at each edge: any new workspace-consuming step must depend on publish-next-npm. The in-step pristine guard from 1405 remains as the same-step control; these edges are the cross-step control (tasking item 3).
Red-first evidence (clean clone of next; scripts extracted from the committed YAML; gateway manifest as the demonstration case): pre-fix DAG — build-gateway deps identical to publish deps (concurrent, the 2648 shape); reading apps/gateway/package.json mid-window shows 0.0.3-next.2648 pins (matching the 2648 failure dump) and pnpm install --frozen-lockfile fails ERR_PNPM_OUTDATED_LOCKFILE; post-restore the identical tree reads workspace:^ and installs rc 0. Post-fix DAG: serialization edge present on all three kaniko steps.
Pipeline 2648 failed build-gateway with ERR_PNPM_OUTDATED_LOCKFILE although publish-next-npm completed green and restored the workspace byte-exact ('git diff clean' in its own log). Root cause: build-gateway and publish-next-npm both depend on [build, verify] and run concurrently; kaniko's COPY of apps/gateway/package.json raced inside publish's in-place mutation window (transform .. publish .. restore). PR 1405's snapshot/restore governs the END state of its own step only — no mutual exclusion against a concurrent reader. The snapshot/restore set was already a superset of the transform's write set (both derive from apps/packages/plugins with the same exclusions — the tasking's apps-coverage hypothesis is refuted by the committed find). The defect is ordering, so the fix is a DAG edge: build-gateway, build-appservice, and build-web each gain publish-next-npm in depends_on, serializing every kaniko workspace consumer after the restore. publish-npm (main-only, transform is next-only) is unchanged. The invariant is stated inline at each edge: any new workspace-consuming step must depend on publish-next-npm. Red-first evidence (clean clone of next; scripts from the committed YAML; gateway manifest as the demonstration case): pre-fix DAG shows build-gateway deps == publish deps (concurrent); post-fix adds the edge. Reading apps/gateway/package.json mid-window shows 0.0.3-next.2648 pins (the 2648 dump shape) and pnpm install --frozen-lockfile fails ERR_PNPM_OUTDATED_LOCKFILE; the same read after restore shows workspace:^ and the identical clean tree installs rc=0. Closes #1411 (blocks PR 1401's merge — USC chain).PASS at
8d27e0f78c. Independent review (rev-code-01). Delta verified both ways: three-dot publish.yml +61 (includes branch-carried 1405 hunks, branch predates the squash); two-dot vs next8c292fb3is publish.yml +24/-0 ONLY - the three serialization edges; package-file entries in the raw two-dot are 1409 ancestry artifacts, merged-tree delta is publish.yml alone. depends_on parsed at HEAD: all three kaniko steps [build, verify, publish-next-npm]; publish-npm unchanged and main/tag-only (never fires on next); publish-next-npm unchanged; 1405 snapshot/restore/pristine-guard intact. Sufficiency enumerated step-by-step: install/verify/build precede by dependency, publish-npm cannot run on next, kaniko trio strictly post-publish and mutually non-mutating (read-only COPY) - the race is closed for every consumer. Pipeline 2652 (commit8d27e0f7) re-pulled: terminal SUCCESS 8/8. Vitest-lane rule does not trigger: CI YAML only, no packages/ artifact changes. Full record: fleet/agents/rev-code-01/work/T63R1412-REVIEW.md on brain main (4ed640d3).