Repository navigation
restack-regenerates-generated-files/3: Regenerate and commit generated files after a restack, the generated_files hold cause, and docs - #994
Merged
Conversation
The tests come first and fail until the implementation. A unit that edits `agent-assessment/web` also commits the build output (`src/server/web/assets/*-<hash>.js`, `src/server/web/index.html`, `src/report/template.html`). Unit: restack-regenerates-generated-files/3
With this in, the tests of the previous commit pass. A unit that edits `agent-assessment/web` also commits the build output (`src/server/web/assets/*-<hash>.js`, `src/server/web/index.html`, `src/report/template.html`). Unit: restack-regenerates-generated-files/3
The tests come first and fail until the implementation. Unit: restack-regenerates-generated-files/3
With this in, the tests of the previous commit pass. A unit that edits `agent-assessment/web` also commits the build output (`src/server/web/assets/*-<hash>.js`, `src/server/web/index.html`, `src/report/template.html`). Unit: restack-regenerates-generated-files/3
…ated_files hold cause, and docs (checks, round 1) Unit: restack-regenerates-generated-files/3
…ated_files hold cause, and docs (review round 1) Unit: restack-regenerates-generated-files/3
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.
Start here
Already verified by the pipeline
Review tier:
full— the reviewer classified it fullWhy
This pull request builds part of change restack-regenerates-generated-files; this is the change's reason.
A unit that edits
agent-assessment/webalso commits the build output (src/server/web/assets/*-<hash>.js,src/server/web/index.html,src/report/template.html). The asset names carry a content hash, so any two units that rebuild them conflict on every file: renamed on both sides, deleted by one and added by the other, or both deleted. The restack ofreport-views-usage-and-coverage/4hit this and failed withNo such file or directoryon a path both sides had deleted, because the conflict han… The full reason is in
openspec/changes/restack-regenerates-generated-files/proposal.md.What this pull request does
After a restack, the pipeline rebuilds and commits the generated files a unit touched. A failing rebuild puts the branch back where it was and holds the unit under a new
generated_filescause.generatedentry whose paths the unit's commits touched runs its command in itscwd. The changes under that entry's paths are committed as onechore:commit.is_generatedrule, so a slash-free pattern matches the file name anywhere in the repository.generated_files. The command's trimmed output goes in the note, built by one shared helper.generatedrebuild and the new hold cause.Based on
main, with nothing unmerged beneath it — ready to merge whenever the checks look right.Unit
restack-regenerates-generated-files/3of change restack-regenerates-generated-files, task group(s) 3, 4.Spec:
openspec/changes/restack-regenerates-generated-files/in the planning repo.Assumptions
This unit assumes nothing unmerged: everything it builds on is already in
main.Verification
This is a unit-test unit: everything it needs is fakes, fixtures or throwaway containers, so GitHub Actions runs the whole of it. No e2e-test run was required.
Left for later
Approved, with these recorded rather than blocking:
build_restackholds a unit undergenerated_files, it returnsRestackOutcome.DEFERRED, whose definition at events.py:162 says 'the move could not run now (a pause, a busy checkout): retry later'. A held unit is not retried. It waits for a person.generatedcomment block says 'its changes are committed' and gives no bound on how long the command may run. The code now commits only the changes under the entry's paths, and stops the command after COMMAND_TIMEOUT_SECONDS (900 s) with agenerated_fileshold.How this was built
Tests were committed first and seen to fail before any implementation existed; the commit order is checked mechanically; lint, formatting and types pass at the tip.
Opened by the spec-driven pipeline. The build agent never merges. The pipeline merges only
a unit review classified
autoand policy allowed; a person merges any other, after checkingthe stack order above.