Skip to content

restack-regenerates-generated-files/1: The generated setting in repos config, generated_file_patterns and the doctor check - #986

Merged
bwmatson merged 3 commits into
mainfrom
spec/restack-regenerates-generated-files/1
Nov 17, 2026
Merged

bwmatson merged 3 commits into
mainfrom
spec/restack-regenerates-generated-files/1

Conversation

@bwmatson

Copy link
Copy Markdown
Owner

Start here

Already verified by the pipeline

  • Tests were committed first and seen to fail first.
  • unit-test result: passed
  • Review took 2 review rounds

Review tier: light — the planned estimate is light

Why

This pull request builds part of change restack-regenerates-generated-files; this is the change's reason.

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). 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 of report-views-usage-and-coverage/4 hit this and failed with No such file or directory on 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

Adds a per-repo generated setting to abk.yaml that declares build output (the paths it covers, the command that rebuilds it, and the directory to run it in), and teaches the size rule and the doctor about it.

  • A repo in abk.yaml can list generated entries, each with paths, a command and an optional cwd that defaults to the repository root.
  • An entry with no paths or no command is refused at load time, naming the entry. So is a cwd or path pattern that is absolute or leaves the repository.
  • The paths of each generated entry count as generated files for the size rule, beside the existing limits and lock-file patterns.
  • abk doctor lists each generated entry. It warns when a pattern matches no tracked file (judged with the same matcher the size rule uses) and when the entry's command cannot be found.

Based on main, with nothing unmerged beneath it — ready to merge whenever the checks look right.

Unit restack-regenerates-generated-files/1 of change restack-regenerates-generated-files, task group(s) 1.
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:

  • is_generated also matches a pattern against the file's basename alone, so a generated entry like *.js makes the doctor (and the size rule) treat every tracked .js anywhere as covered. That is consistent with the size rule today, but the docs for the generated setting should say that a slash-free pattern matches by file name anywhere in the repository.

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 auto and policy allowed; a person merges any other, after checking
the stack order above.

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/1
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/1
… and the doctor check (review round 1)

Unit: restack-regenerates-generated-files/1
@bwmatson bwmatson added change-restack-regenerates-generated-files The change this pull request belongs to checking In review, but its checks are still running review-light Review asks for a light look from a person in-review Built and waiting for human review and removed checking In review, but its checks are still running labels Nov 17, 2026
@bwmatson
bwmatson added this pull request to stack #990 November 17, 2026 10:23
@bwmatson
bwmatson merged commit fb6f902 into main Nov 17, 2026
5 checks passed
@bwmatson bwmatson added settling Merged; waiting for its checks to complete and removed in-review Built and waiting for human review settling Merged; waiting for its checks to complete labels Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change-restack-regenerates-generated-files The change this pull request belongs to review-light Review asks for a light look from a person

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant