feat(architecture): wire approve-architecture consumption (transition to PR 3/6) - #297
Merged
Merged
Conversation
hzcheng
force-pushed
the
agent-pivot/arch-approval-transition
branch
from
August 19, 2026 10:17
2ce8e1a to
5766249
Compare
added 2 commits
August 19, 2026 18:24
… to PR 3/6)
The harness simplification decision (docs/architecture/
harness-simplification-decision.md) replaces Architecture Change record
machine authorization with owner architecture approval, but the merged
gates never consumed it:
- the merge-approval gate evaluated only 'approve <sha>' and base
records, so a relaxing change that may not add records (ADR: no new
records during the window) could never be authorized;
- the quality lane's architecture change gate demanded
'approve-architecture <sha>' but nothing consumed the comment;
- the trusted kernel could not materialize the PR head (the
pull_request_target checkout fetches only the base ref) and never
received the approval flag;
- the architecture-approval job diffed the base against itself and
always passed vacuously.
Changes:
- mergeApprovals: add the ARCHITECTURE_APPROVAL_PATTERN binding form and
findArchitectureApprovalComment; standard approval never substitutes.
- checkArchitectureChange: classifyArchitectureChange accepts
{ architectureApproved }; an approved relaxing/re-partition change is
authorized without a base record. The CLI consumes
ARCHITECTURE_APPROVED=true (developer feedback only; the merge gate
re-verifies from the default branch).
- changeImpactContext and run-merge-approval-gate: thread the owner
approval verdict into the declaration evaluation.
- run-trusted-kernel: look up the owner's approve-architecture comment
bound to the exact head SHA via the GitHub API (fail-closed).
- trusted-kernel workflow: fetch the PR head before evaluating; pass
PR_NUMBER/GITHUB_TOKEN; declare read permissions.
- run-architecture-approval-gate: diff base against the fetched PR head
SHA instead of HEAD (the checkout is the base branch).
- verify workflow: the quality lane detects the owner approval comment
and exports ARCHITECTURE_APPROVED (job-scoped issues:read).
- Skill harvest: fixing-regressions-with-ci now requires identifying
which side of the PR supplies a failing check's code before editing.
Skill-Harvest: updated .skills/fixing-regressions-with-ci
hzcheng
force-pushed
the
agent-pivot/arch-approval-transition
branch
from
August 19, 2026 10:25
5766249 to
6cc7fca
Compare
Owner
Author
|
approve 6cc7fca |
This was referenced Aug 19, 2026
hzcheng
pushed a commit
that referenced
this pull request
Aug 19, 2026
…ics (PR 3/6) Net -846 lines. The trusted kernel has taken over. - Delete scripts/run-guard-mutation-parity.js - Remove guardSemantics from the record schema and delta flags - checkArchitectureChange.js: no record matching; a relaxing or re-partition classification is authorized only by the owner's approve-architecture <full-head-sha> comment (consumption wired in the transition PR #297) - describeArchitectureChange.js: diff reporter only - run-trusted-kernel.js: materialize the head via git ls-tree + git show (no symmetric diff against unfetched objects); consume the owner's approve-architecture comment from the GitHub API (fail-closed) - trustedKernel.js: drop the deleted parity script from protected paths - Remove parity from tests, protected paths, and release packaging
hzcheng
pushed a commit
that referenced
this pull request
Aug 19, 2026
…ics (PR 3/6) Net -846 lines. The trusted kernel has taken over. - Delete scripts/run-guard-mutation-parity.js - Remove guardSemantics from the record schema and delta flags - checkArchitectureChange.js: no record matching; a relaxing or re-partition classification is authorized only by the owner's approve-architecture <full-head-sha> comment (consumption wired in the transition PR #297) - describeArchitectureChange.js: diff reporter only - run-trusted-kernel.js: materialize the head via git ls-tree + git show (no symmetric diff against unfetched objects); consume the owner's approve-architecture comment from the GitHub API (fail-closed) - trustedKernel.js: drop the deleted parity script from protected paths - Remove parity from tests, protected paths, and release packaging
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.
Summary
Transition PR for the Harness Simplification program (between PR 2/6 and PR 3/6). The decision record (docs/architecture/harness-simplification-decision.md) replaced Architecture Change record machine authorization with owner architecture approval (
approve-architecture <full-head-sha>), but the merged gates never consumed it. This wires the consumption path so PR 3/6 (which deletes the record machinery and therefore cannot be authorized by a record) can be evaluated and merged.Root causes fixed:
approve <sha>and base records — a relaxing change that may not add records (ADR: no new records during the window) could never be authorized. The gate now detects the owner'sapprove-architecture <full-head-sha>comment and threads the verdict into the declaration evaluation.approve-architecture <sha>but nothing consumed the comment. The classifier now accepts anarchitectureApprovedverdict; the verify workflow detects the owner comment and exportsARCHITECTURE_APPROVED(PR-lane feedback only — the merge gate re-verifies from the default branch).pull_request_targetcheckout fetches only the base ref, so bothgit checkout <sha>andgit diff base...headfailed) and never received the approval flag. The workflow now fetches the PR head first; the kernel looks up the owner's approval comment via the GitHub API (fail-closed).git diff origin/main HEADwhere HEAD is the base checkout) and always passed vacuously. It now diffs the base against the fetched PR head SHA.Skill harvest
Updated
.skills/fixing-regressions-with-ci: when a CI check fails, first identify which side of the PR supplies the check's code —pull_requestchecks run PR-head files,pull_request_targetchecks (merge-approval gate, trusted kernel) run default-branch files, so a PR-head edit cannot change a default-branch check until it merges. This is the lesson from PR #296's repeated CI failures.Known red check (bootstrap)
trusted-kernelwill fail on this PR: the check runs the default branch's kernel, which cannot yet fetch the PR head (this PR is the fix). After this PR merges, the kernel on main becomes functional and evaluates PR #296 with the approval consumption above.Change impact declaration