Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3ade421
F6b: scan for an earlier fix from the last clear check's base
mchwang Oct 12, 2026
4a3d23e
F6b: one-click merge job with a required-check wait
mchwang Oct 12, 2026
7cc6ab2
Stop the job's guarded merge on shutdown; end cancelled at every step
mchwang Oct 12, 2026
79b7fd5
Test the readiness hand-off for real; stop jobs as shutdown begins
mchwang Oct 12, 2026
e9575aa
Scan from the PR's own pre-PR check; settle a job from its attempt first
mchwang Oct 12, 2026
ffb995e
Settle a restarted job from its attempt; offer merge for a base conflict
mchwang Oct 12, 2026
922007f
Let a merge-blocked task start an amended plan; fix cancel test setups
mchwang Oct 12, 2026
def4b0a
Block job and task together; decide a job only from its own attempt
mchwang Oct 12, 2026
19d5abc
Scan from where the pre-PR check stopped; document the 250-commit limit
mchwang Oct 12, 2026
18fc568
Address Copilot: continuous scan, replayed refusals, strict wait, focus
mchwang Oct 12, 2026
727f279
Keep saved merge refusals out of the task's latest job
mchwang Oct 12, 2026
db189ae
Admit issue trust before a merge job starts; correct two doc claims
mchwang Oct 12, 2026
841e395
Say exactly when shutdown stops a merge job's preparation
mchwang Oct 12, 2026
fc57d20
Correct the task status the merge-handoff doc gives for queued and fa…
mchwang Oct 12, 2026
76c81f2
Test that a retried job's queue leaves the task approved, merge blocked
mchwang Oct 12, 2026
368495c
Keep the Merge button focused when a merge-job click is refused; qual…
mchwang Oct 12, 2026
9e0ee39
Draw an aria-disabled Merge button as inactive
mchwang Oct 12, 2026
1234091
Update only the merge control when a merge job ends
mchwang Oct 12, 2026
ab74aec
Scan for an earlier fix from the task's first clear check, whichever …
mchwang Oct 12, 2026
be4f391
Scan from the first opening into the current base branch
mchwang Oct 12, 2026
f6eb190
Scan from the task's original base when the first opening's check did…
mchwang Oct 12, 2026
887f0cd
Explain correctly why the already-fixed scan covers a rebase's commits
mchwang Oct 12, 2026
7302d68
Reflow the already-fixed range comment
mchwang Oct 12, 2026
b3ba376
Block a task only with its still-running job, and test the shared tra…
mchwang Oct 12, 2026
4ea8724
Test a queued attempt at startup and a failed GitHub read while waiting
mchwang Oct 12, 2026
3293278
Test that shutdown awaits a merge job before the store closes
mchwang Oct 12, 2026
2e3e860
Test that closing the merge job waits for it to settle
mchwang Oct 12, 2026
777c9b5
Name the pre-v19 fallback in the guarded-merge scan description
mchwang Oct 12, 2026
0180256
Address Copilot: block only while readiness holds; shutdown answers 503
mchwang Oct 12, 2026
7180aad
Fail the job when GitHub refuses a changed head; answer 503 when shut…
mchwang Oct 12, 2026
cbacd19
Name the shutdown reload test for what it checks
mchwang Oct 12, 2026
2c5ccc3
Merge F6a (f3bc3e1, with main 22e76a8) into F6b
mchwang Oct 12, 2026
1b81ee9
Address Copilot: closed tasks never offered, refusals bound to their …
mchwang Oct 12, 2026
7604a79
Name the review-change case in the merge-handoff shutdown row
mchwang Oct 12, 2026
d61da98
Merge F6a (57b7ccb) into F6b
mchwang Oct 12, 2026
8b36586
Test admission guards; say a retry after a refused merge and a rebase…
mchwang Oct 12, 2026
1874e6a
Merge F6a (749a977) into F6b
mchwang Oct 12, 2026
ad00767
Test the retry after a refused merge and a rebase through real prepar…
mchwang Oct 12, 2026
8c3b171
Word the replacement-review blocker by its cause
mchwang Oct 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ Writing standard: plain language, ISO 24495-1:2023
- **In use:** plan and linking library, SQLite store, review screen, plan display/import/authoring screen, Ask (questions to a Claude agent), guarded merge with merge-queue support, ranked Issues screen, agent isolation boundary, and the single-runner lock.
- **In use for a non-demo review with a `github` block:** planning. `/api/plan/suggestions` and `/api/plan/drafts` ask Claude, through lane D, for suggestion cards or a whole next plan revision (#117, #124). Nothing becomes a revision until you apply it.
- **In use with an opt-in `runner` block in `review.json`:** the whole loop after planning. `start` and `resume` on `/api/runner` run a task's plan item by item with a Claude agent (#91). They require current plan-item approvals, bind both the task state and review version, recheck approvals before each later item, and refuse when a completed prefix no longer ends at the task's current head (#107). After an out-of-scope pause, an approved amended plan can reconcile the completed prefix and resume only the unfinished suffix (#88, PR #134). When a run ends, codeboost publishes the task's pull request, a draft if the task needs a person (#103). `prepare-merge` refreshes the published PR's exact base/head, rebases through the durable F3/F4 path, recomputes attribution and approvals, pushes a rewritten head whose review is still clear over exactly the PR head it rewrote, and runs allowlisted `cmd:` checks in a credential-free read-only container bound to the resulting head (#22). Approve & merge merges that pull request (#121). Cancelling a task closes its pull requests (#111). These are API actions; the screen has no buttons for them yet.
- **Partly built for pre-merge automation:** the trusted local rebase engine records one-to-one commit mappings, verifies the resulting checkout byte for byte, owns its subprocesses durably, and recovers interrupted work (#22, PR #136). Its production conflict path gives a sandboxed agent only the bounded conflict files and imports only audited results for both foreign and plan-owned commits (PRs #138, #140 and #144). `prepare-merge` now invokes that path after current pull-request base/head reads, refreshes attribution and approvals, pushes the rewritten head behind a durable push marker (F6a), and runs exact-head `cmd:` checks; required-check refresh, the already-fixed rerun, and the one-click guarded merge handoff remain for F6b.
- **Not built:** screens for the runner actions, the required-check refresh and one-click merge handoff (F6b), review rounds, and the Queue and Learning screens.
- **Partly built for pre-merge automation:** the trusted local rebase engine records one-to-one commit mappings, verifies the resulting checkout byte for byte, owns its subprocesses durably, and recovers interrupted work (#22, PR #136). Its production conflict path gives a sandboxed agent only the bounded conflict files and imports only audited results for both foreign and plan-owned commits (PRs #138, #140 and #144). `prepare-merge` now invokes that path after current pull-request base/head reads, refreshes attribution and approvals, pushes the rewritten head behind a durable push marker (F6a), and runs exact-head `cmd:` checks. With a runner, Approve & merge runs one merge job that prepares, waits up to 30 minutes for GitHub's required checks, and hands the exact pair to the guarded merge, whose already-fixed check now covers every base commit after the task's original base (F6b, `docs/implementation/merge-handoff.md`).
- **Not built:** screens for the runner actions, the merge job's full step list and Cancel button, review rounds, and the Queue and Learning screens.

## Terms used

Expand Down Expand Up @@ -357,7 +357,7 @@ The diagram shows the designed transitions. With the `runner` block, running, ne

### Stored data

All state is in one SQLite file, opened with WAL and full synchronization. Each write takes an immediate write lock. The schema version is `PRAGMA user_version`, and migrations run in explicit steps (version 18 today); an unknown version fails.
All state is in one SQLite file, opened with WAL and full synchronization. Each write takes an immediate write lock. The schema version is `PRAGMA user_version`, and migrations run in explicit steps (version 19 today); an unknown version fails.

| Group | Tables | Notes |
|---|---|---|
Expand Down Expand Up @@ -410,7 +410,7 @@ These are the decisions that shape the structure. The full list, with the reason
| C, K | Guarded merge, merge queue | Done |
| D | Agent isolation boundary | Done. Since the isolation gate: bounded diff export (#76), task-change inspection and the runner's commit as a bounded `git bundle` (#66, PRs #85 and #90), owner-scoped recovery for Ask (#95), the plan schema for Claude (#97), gitlink mounts and the pre-launch tree check (#81, #99, PR #100), and Codex refused in every phase (#93, PR #106). The runner-contract follow-ups (#51) are closed: the last one tests export and removal through a recovery handle after a real restart (PR #109). |
| E | Planning library and suggestions | Done. E4 (PR #45) added the acceptance fixtures and recorded Claude output that replays through validation and the Store. |
| F | Runner | Merged: F1 (lifecycle store, coordinator, shutdown wiring, startup recovery and the lock, planning API, feedback events, and stops that wait for their commit: #53, #74, #57, #59, #60, #96); F2a–F2b (execute prompts, audit, per-item execution, real workspace, durable safety findings: #67, #68, #92, #94, #128); F2d (already-fixed check, PR opening, branch pusher, production publishing, closing PRs on cancel: #84, #101, #110, #115, #116, #119, #123); production wiring and `start`/`resume` (#91, PRs #102, #105); planning through lane D (#117, #124, PRs #118, #120, #125); merging the task's own PR (#121, PR #126); start/resume approval, review-version, recovery and completed-prefix guards (#107, PR #130); continuation after a scope pause (#88, PR #134); the F3 durable trusted local-rebase foundation (#22, PR #136); the F4 foreign-conflict engine plus production sandbox adapter (#22, PRs #138 and #140); and sandboxed owned-commit conflict resolution (#22, PR #144). F5 (PR #149) added current base/head refresh, rebase admission, post-rebase attribution and approval refresh, and head-bound `cmd:` execution. This branch adds F6a: the durable push of the rewritten head. F6b owns fresh required-check refresh, the already-fixed rerun, and the one-click exact-pair guarded-merge handoff; F6c owns common CI. |
| F | Runner | Merged: F1 (lifecycle store, coordinator, shutdown wiring, startup recovery and the lock, planning API, feedback events, and stops that wait for their commit: #53, #74, #57, #59, #60, #96); F2a–F2b (execute prompts, audit, per-item execution, real workspace, durable safety findings: #67, #68, #92, #94, #128); F2d (already-fixed check, PR opening, branch pusher, production publishing, closing PRs on cancel: #84, #101, #110, #115, #116, #119, #123); production wiring and `start`/`resume` (#91, PRs #102, #105); planning through lane D (#117, #124, PRs #118, #120, #125); merging the task's own PR (#121, PR #126); start/resume approval, review-version, recovery and completed-prefix guards (#107, PR #130); continuation after a scope pause (#88, PR #134); the F3 durable trusted local-rebase foundation (#22, PR #136); the F4 foreign-conflict engine plus production sandbox adapter (#22, PRs #138 and #140); and sandboxed owned-commit conflict resolution (#22, PR #144). F5 (PR #149) added current base/head refresh, rebase admission, post-rebase attribution and approval refresh, and head-bound `cmd:` execution. F6a (PR #153) added the durable push of the rewritten head. This branch adds F6b: the one-click merge job (preparation, the required-check wait, the exact-pair guarded merge) and an already-fixed scan covering every base commit after the task's original base; F6c owns common CI. |
| Hardening | Allowlisted subprocess environments | Done: every Git command (#82, #83) and every `gh` runner (#84, #86). |
| Tests | Test suite reliability | Done. The full suite runs ordinary tests first and Docker-backed files serially; CI and the real-Docker gate passed on PR #132 (#129). |
| G | Planning screen | Done (#145). The screen displays/imports the current plan, requests and renders a next-revision draft or suggestion cards, and applies results with revision-bound exact ambiguous replay. G4 composes the browser with the production planning setup, D-backed provider boundary, F endpoints and SQLite persistence; focused adapter, recorded-output and exact-head real-Docker planning suites cover the lower boundary. |
Expand All @@ -419,7 +419,7 @@ These are the decisions that shape the structure. The full list, with the reason

## Known limits

- `prepare-merge` invokes the trusted rebase and sandboxed conflict machinery, refreshes the review, pushes the rewritten head, and runs head-bound `cmd:` checks. Until F6b of #22 lands, it does not wait for fresh required checks, rerun the already-fixed check, or hand the exact pair to guarded merge; a person clicks Merge once GitHub's checks on the pushed head pass.
- With a runner, Approve & merge runs one merge job in the background: preparation, a wait of up to 30 minutes for GitHub's required checks, then the guarded merge. A failing or slow check, or GitHub's refusal, leaves the task approved, merge blocked; the browser shows only the job's current step, not the design's full step list, and has no Cancel button for the job yet (cancel the task instead).
- Linking is line-based. It cannot see an unrelated edit inside a declared file; only the review agent and you can catch that.
- The container's guarantees are those of Docker. The agent can always reach its own vendor account.
- `cmd:` acceptance checks run during `prepare-merge`, and their passing evidence is bound to the exact reviewed head. A plan item without current passing evidence still blocks merging.
Expand Down
Loading
Loading