fix(build): refresh the dependency manifest after #733 - #749
Conversation
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>
|
@nnunley when you get a moment — could you take a look? It is two files: To be clear about the cause, this is not a defect in #733. It edits #747 has the broader thread, including the bit I would value your read on most: whether No rush on those two. This one is just to get |
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>
mainis red at 1ef26f9.check-generated-manifestreports three outputs stale and bothgenerated-artifactsandbuildfail: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
make check-generatedpasses after it, includingcore_compiled.lgbbundle lockstep andcore_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 generatere-run: #727 and #692 are both in that window. #683 also editsscripts/generate.lgand 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.