Skip to content

fix(build): refresh the dependency manifest after #733 - #749

Merged
mparrett merged 1 commit into
mainfrom
fix/manifest-refresh-after-733
Aug 17, 2026
Merged

fix(build): refresh the dependency manifest after #733#749
mparrett merged 1 commit into
mainfrom
fix/manifest-refresh-after-733

Conversation

@mparrett

Copy link
Copy Markdown
Collaborator

main is red at 1ef26f9. check-generated-manifest reports three outputs stale and both generated-artifacts and build fail:

pkg/ir/op_generated.go
pkg/rt/core/ir/data/generated.lg
pkg/rt/ir_bridge_generated.go
ERROR: dependency manifest stale or check errored — run 'make generate'.

The run before it, a9936cd (#741), was green.

Cause

#733 edits scripts/generate.lg, which #641's manifest declares as the generator for those three outputs, so its recorded hash no longer matches the tree.

#733's own checks were green when it merged because they last ran against a pre-#641 base, and GitHub does not re-run a PR when its base moves. The badge outlived the base it was measured on. This is not a defect in #733 — the same trap is armed for every branch that predates #641 and touches a declared input.

Fix

make generate. Only the manifest and its digest change; no generated output content moves, which is the expected shape when the inputs are restaged but the outputs were already in lockstep.

Verification

  • Reproduced at 1ef26f9 in a clean worktree before the change.
  • make check-generated passes after it, including core_compiled.lgb bundle lockstep and core_go_lowered/ native dispatch under -tags gogen_ir.

Fallout worth knowing

Branches rebased onto main between #641 and this fix regenerated against the broken manifest and will need make generate re-run: #727 and #692 are both in that window. #683 also edits scripts/generate.lg and currently shows green from a stale base, so it is the same trap as #733 and should be re-run before it is merged rather than after.

#747 tracks the underlying gap. The gate does its job, but only after the merge: nothing forces a re-run between approval and merge, so a green badge over a moved base is exactly what let this land.

main is red at 1ef26f9: check-generated-manifest reports pkg/ir/op_generated.go,
pkg/rt/core/ir/data/generated.lg and pkg/rt/ir_bridge_generated.go stale, failing
both generated-artifacts and build.

#733 edits scripts/generate.lg, which #641's manifest declares as the generator
for those three outputs, so its recorded hash no longer matches. #733's own
checks were green because they last ran against a pre-#641 base and GitHub does
not re-run a PR when its base moves, so the badge outlived the base it was
measured on.

`make generate` changes only the manifest and its digest — no generated output
content moves — and `make check-generated` then passes, including bundle
lockstep and native dispatch under -tags gogen_ir.

Refs #747.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@mparrett
mparrett requested a review from nnunley August 17, 2026 00:04
@mparrett

Copy link
Copy Markdown
Collaborator Author

@nnunley when you get a moment — could you take a look? main is red right now and this is the fix, so I'd rather not merge it on my own approval.

It is two files: make generate restages generated.manifest and its digest. No generated output content moves, which is the shape you would expect when the inputs are restaged but the outputs were already in lockstep. All 14 checks are green.

To be clear about the cause, this is not a defect in #733. It edits scripts/generate.lg, which #641's manifest declares as the generator for op_generated.go, core/ir/data/generated.lg and ir_bridge_generated.go, so its recorded hash stopped matching the tree. #733's own checks were green because they last ran against a pre-#641 base, and GitHub does not re-run a PR when its base moves — so the badge outlived the base it was measured on. The same trap is armed for every branch that predates #641 and touches a declared input; #733 just got there first. #683 edits the same file and is sitting on green from a stale base right now.

#747 has the broader thread, including the bit I would value your read on most: whether generated.manifest should get its own merge driver at all, given it carries output-readiness records and a driver regenerating it mid-merge could assert outputs are ready that were never rebuilt. That felt like your call rather than a patch from me. #748 is only the narrow half — making Compute parse before it hashes, so the sums driver can no longer mint a clean digest over a manifest still holding conflict markers.

No rush on those two. This one is just to get main green again.

@mparrett
mparrett merged commit bf5da91 into main Aug 17, 2026
19 checks passed
@mparrett
mparrett deleted the fix/manifest-refresh-after-733 branch August 17, 2026 00:21
mparrett added a commit that referenced this pull request Aug 20, 2026
Editing any file declared as a generator input in pkg/rt/generated.manifest
restages core_compiled.lgb, core_go_lowered/ and zz_primitives_generated.go,
because #641 records a SHA-256 per input rather than comparing output content.
Nothing local caught the omission — no hook ran check-generated at any stage —
and no server-side operation can refresh the manifest, since a rebase, a merge
driver and the stack UI all lack a generator. The gap cost main two outages
(#749 and #750 were hand-written repairs) and three rebase-and-regenerate
cycles on the #698/#699/#717 stack, where every branch stayed red through two
rounds of restacking.

Add check-generated as a pre-push hook. It is a hash comparison against the
tree with no regeneration and no build, so it costs ~1.3s — the cheapest hook
in the file, against go-test, the compat suite and the ir-stress ratchet
already at that stage. always_run is set because a declared input can be a .go
or a .lg file, so a types filter would miss half the sources.

Drop the -stale flag from make check-generated-manifest so the target runs the
digest check too, a gap @nooga caught in review. Under -stale the target listed
outputs whose recorded input hashes no longer matched the tree and stopped,
never comparing generated.sums against generated.manifest, so a wrongly-merged
digest passed silently — the #747 case this target is relied on to catch. It
also inverted the parity the hook's note promises, blocking a git contributor
where a jj contributor running the Makefile target was not. The unflagged mode
is a superset: stale inputs still exit 1 identically, and a digest mismatch now
exits 1 as well.

Verified with prek: the hook passes on a clean tree, and a committed edit to
pkg/rt/os.go fails it with the message naming the three stale outputs and
`make generate`. The failure only reproduces when the edit is committed — prek
stashes unstaged changes before running hooks, so an uncommitted probe passes
vacuously.

Refs #641, #747, #751.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants