Commit Graph

42 Commits

Author SHA1 Message Date
Peter Steinberger
68ac905ce3 feat(tooling): close three agent pre-flight and landing gaps (#115333)
* fix(tooling): check changed exports for dead code

* fix(tooling): name mismatched PR wrapper components

* feat(tooling): repin PR review artifacts

* fix(tooling): scope dead-export detection to source files

Matching only the top-level tree let a docs file under src/ carrying `export`
in a code sample set the flag. That mattered because the flag also short-
circuited changedCheckRequiresRemote above its docsOnly guard, so a docs-only
change could be dragged onto the heavy remote route and made to run knip.

Scope detection to the source extensions knip actually reads, and drop the
routing branch entirely: any file that can now trigger detection already
enables a non-docs lane, which the existing final clause routes remotely. The
branch was dead for every real source change and wrong for the docs case.

* refactor(tooling): round-trip the repinned review JSON

Preserving byte-exact formatting required a hand-rolled JSON scanner: string
escape handling, container nesting, and span splicing, for a file that lives in
gitignored .local/ and is only ever read back through JSON.parse.

repin already parses the artifact to validate it, so assign the two identity
fields and re-serialize. JSON.parse/stringify keeps insertion order, which is
the only formatting property worth holding. Drops four helpers.

* fix(tooling): select the dead-export scan by path, not changed lines

Inspecting changed lines for an `export` token has two false negatives that
defeat the purpose. Barrels export through multiline `export { ... }` lists, so
removing a symbol changes a line carrying no `export` token. Worse, the failure
that motivated this scan was an import-only edit: it orphaned a re-export in a
barrel the diff never touched, which no changed-line rule can see.

Select by path instead: any changed production source file under src/,
extensions/, ui/, or packages/. This also removes the merge-base dependency, so
a shallow checkout or unrelated history can no longer silently skip the scan.

Those paths already enable a non-docs lane, so the run already routes remotely
and knip's cost lands on the box already doing the heavy work.
OPENCLAW_CHECK_CHANGED_SKIP_DEADCODE=1 still opts out.

* Revert "feat(tooling): repin PR review artifacts"

The repin subcommand defeats the property the identity pin exists to enforce.
It rewrites the pinned PR number and head SHA while keeping every
recommendation, finding, and Markdown conclusion, so a completed
"READY FOR /prepare-pr" verdict authored against one revision can be relabelled
as covering another and then pass validation. The test added alongside it
restamped PR #7 as PR #42 and asserted validation succeeded, which is exactly
the substitution the fail-closed gate was built to stop.

Re-authoring a review after the head moves is friction on purpose: the code the
verdict describes may no longer be the code being landed. A safe version has to
prove the reviewed content is equivalent across the move, which is a design
decision about what equivalence means, not a convenience wrapper.

Reverts 5d89a704d9 and its follow-up c6304eb539.

* docs(tooling): note why the wrapper diagnostic reads HEAD blobs

Two reviewers independently read the new component comparison as inspecting
committed state while the refusal was triggered by working-tree files. The
uncommitted-wrapper guard above already exits for any staged or unstaged edit to
these three paths, so HEAD matches the working tree by the time this runs. State
the invariant at the site instead of letting a third reader re-derive it.

* fix(tooling): cover jsx in the dead-export source selector

The hand-written extension alternation matched .tsx but not .jsx, so a JSX
source change would skip a scan that knip does apply to it. Use the
`[cm]?[jt]sx?` selector the lint lanes in check-changed.mjs already use, which
covers both and is shorter, and pin the extension coverage in tests.
2026-07-28 14:15:46 -04:00
Peter Steinberger
6125edfb76 fix(pr): require ripgrep consistently (#114809) 2026-07-27 20:23:25 -04:00
Peter Steinberger
e879ce7e0e feat(pr): support pinned auto-merge landings (#114702)
* feat(pr): add pinned auto-merge mode

* test(ci): remove duplicate codex prewarm route
2026-07-27 16:12:05 -04:00
Peter Steinberger
104128dd32 chore(pr): dev-wrapper opt-in — advisory subcommands may dogfood modified wrappers (#111656)
* chore(pr): dev-wrapper opt-in — advisory subcommands may dogfood modified wrappers

* fix(pr): hermetic dev-wrapper test fixture and type narrowing
2026-07-19 22:58:15 -07:00
Peter Steinberger
84e54ab264 chore(pr): landing-UX — aggregated validation, lock classes, ci-dispatch, committer guard (#111287)
* chore(pr): landing-UX — aggregate artifact validation, lock classes, ci-dispatch, committer worktree guard

* fix(pr): CI lane cleanup for landing-ux — lint causes, hermetic tests, private helpers

* chore(deadcode): register pr-lib CLI entries in knip config
2026-07-19 02:09:55 -07:00
Peter Steinberger
8a66398b2b fix(release): harden validation orchestration (#106873)
* fix(release): harden validation orchestration

* fix(ci): repair release gate regressions

* docs(agents): record PR review guard mode

* test(ci): stabilize release gate coverage

* refactor(agents): remove session factory test export
2026-07-13 17:53:10 -07:00
Peter Steinberger
d0152d71b4 improve(tooling): unblock scripts/pr landings and clarify crabbox fast failures (#104658)
* improve(pr): trust origin/main-matching wrappers when the canonical checkout is parked elsewhere

* improve(crabbox): hint at lease expiry when reused-lease runs fail fast

* fix(pr): pin the wrapper trust anchor to the remote-tracking ref
2026-07-11 12:47:07 -07:00
Vincent Koc
358d4cd4cc fix(pr): reject stale canonical wrapper code 2026-07-10 22:24:36 -07:00
Vincent Koc
90ad9251df fix(pr): support rebase landings 2026-07-10 17:47:32 -07:00
Vincent Koc
89bb79f6ae fix(pr): allow merge-commit landings 2026-07-10 17:47:32 -07:00
Peter Steinberger
ea6aa1dc75 fix(pr): prevent same-PR operations from overlapping (#103669)
* fix(pr): serialize operations per pull request

* fix(pr): tighten supervisor error handling
2026-07-10 13:34:03 +01:00
Vincent Koc
f13a10c798 fix(scripts): run gh without terminal formatting 2026-06-22 18:44:21 +08:00
Vincent Koc
abb6f04e0c ci(release): harden release controls
One-time maintainer-authorized bootstrap merge for the release-gate verifier policy. Exact hosted CI and all supporting workflow gates passed on 66133de419.
2026-06-18 03:11:20 +08:00
BunsDev
7bd533a80e Revert "chore(maint): make PR changelog edits release-only (#92607)"
This reverts commit 4640baa299.
2026-06-13 03:10:10 -05:00
Val Alexander
4640baa299 chore(maint): make PR changelog edits release-only (#92607) 2026-06-13 02:57:08 -05:00
Gustavo Madeira Santana
31a4b45db0 Maintainer: split PR workflow script modules 2026-03-30 20:28:32 -04:00
Gustavo Madeira Santana
fa2e051bb6 Maintainer: tighten PR workflow script
Reduce prep and merge friction in the PR wrapper by keeping rebases explicit, reusing doc-only gate results, and making review output terminal-first.

Also add clearer baseline-noise guidance for unrelated local gate failures plus worktree listing and cleanup helpers.
2026-03-30 19:48:46 -04:00
huntharo
4262abe05d test: lower prepare unit-fast batch target 2026-03-27 00:12:49 -04:00
Vincent Koc
63e09f8267 chore(changelog): remove fragment workflow drift 2026-03-18 12:26:56 -07:00
Josh Lehman
52e2a7747a Revert "feat: add --no-test flag to prepare-gates"
This reverts commit ee6bdb3bab.
2026-03-12 16:37:50 -07:00
Josh Lehman
ee6bdb3bab feat: add --no-test flag to prepare-gates
Allows skipping the full test suite during prepare phase.
Testing is deferred to the dedicated Test phase in the pipeline.
2026-03-12 16:22:37 -07:00
Peter Steinberger
1ec1f0f1f2 refactor: scope prep push results to env artifacts 2026-03-08 16:22:52 +00:00
Peter Steinberger
fa00b1d0ca refactor: dedupe prep branch push flow 2026-03-08 16:22:52 +00:00
Peter Steinberger
032778fb2e refactor: avoid checkout during prep head verification 2026-03-08 16:22:52 +00:00
Peter Steinberger
eba9dcc67a Refactor release hardening follow-ups (#39959)
* build: fail fast on stale host-env swift policy

* build: sync generated host env swift policy

* build: guard bundled extension root dependency gaps

* refactor: centralize provider capability quirks

* test: table-drive provider regression coverage

* fix: block merge when prep branch has unpushed commits

* refactor: simplify models config merge preservation
2026-03-08 14:49:58 +00:00
Peter Steinberger
9856d8432d chore(scripts): remove changelog fragment workflow helpers 2026-03-08 00:24:49 +00:00
Peter Steinberger
efdff9c738 fix(scripts): enforce changelog.md and post clickable SHA links 2026-03-08 00:23:45 +00:00
Shakker
60849f3335 chore(pr): enforce changelog placement and reduce merge sync churn 2026-03-05 06:37:53 +00:00
Shakker
5d5fa0dac8 fix(pr): make review claim step required 2026-03-05 04:53:32 +00:00
Shakker
4cc293d084 fix(review): enforce behavioral sweep validation 2026-03-04 18:49:36 +00:00
Shakker
b02a07655d fix: harden pr review artifact validation 2026-03-03 21:14:37 +00:00
Josh Lehman
3a8133d587 fix(scripts/pr): SSH-first prhead remote with GraphQL fallback for fork PRs (#32126)
Co-authored-by: Shakker <shakkerdroid@gmail.com>
2026-03-03 02:46:01 +00:00
Shakker
46d9605ef8 merge-pr: use short squash merge banner 2026-02-27 21:41:24 +00:00
Peter Steinberger
ecb2053fdd chore(pr): guard against dropped changelog refs 2026-02-26 13:19:25 +01:00
Peter Steinberger
e915b4c64a refactor: unify monitor abort lifecycle handling 2026-02-26 04:36:25 +01:00
Gustavo Madeira Santana
b228c06bbd chore: polish PR review skills 2026-02-18 22:24:41 -05:00
Gustavo Madeira Santana
42eaee8b7e chore: fix root_dir resolution/stale scripts during PR review 2026-02-13 15:09:39 -05:00
Gustavo Madeira Santana
04a1ed5e53 chore: make changelog mandatory in PR skills 2026-02-12 18:08:02 -05:00
Gustavo Madeira Santana
49188caf94 chore(pr-skills): suppress output for successful commands (pnpm install/build/test/etc) to lower context usage 2026-02-12 15:10:23 -05:00
Gustavo Madeira Santana
1123357c62 chore: refining review PR additional prompts 2026-02-12 14:55:07 -05:00
Gustavo Madeira Santana
940ce424c8 chore: make review mode switching idempotent 2026-02-11 14:09:16 -05:00
Gustavo Madeira Santana
72fbfaa755 chore: making PR review chores deterministic + less token hungry 2026-02-11 13:21:00 -05:00