Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
4e73944
chore(porch): 1951 init spir
waleedkadous Nov 23, 2026
74cdab6
[Spec 1951] Initial specification draft
waleedkadous Nov 23, 2026
93da5f3
chore(porch): 1951 specify build-complete
waleedkadous Nov 23, 2026
3e1f34e
[Spec 1951] Specification with multi-agent review
waleedkadous Nov 23, 2026
19aff4a
chore(porch): 1951 spec-approval gate-requested
waleedkadous Nov 23, 2026
b128907
chore(porch): 1951 spec-approval gate-approved
waleedkadous Nov 23, 2026
8f5c5f4
chore(porch): 1951 plan phase-transition
waleedkadous Nov 23, 2026
d35fed1
chore(porch): 1951 acknowledge context refresh
waleedkadous Nov 23, 2026
9fbc237
[Spec 1951] Initial implementation plan
waleedkadous Nov 23, 2026
c3fb8e6
chore(porch): 1951 plan build-complete
waleedkadous Nov 23, 2026
cbc82c0
[Spec 1951] Thread log: plan phase
waleedkadous Nov 23, 2026
d213afd
[Spec 1951] Plan with multi-agent review
waleedkadous Nov 23, 2026
97ceaa5
chore(porch): 1951 plan-approval gate-requested
waleedkadous Nov 23, 2026
f33a34c
[Spec 1951] Thread log: plan review
waleedkadous Nov 23, 2026
c619dc2
chore(porch): 1951 plan-approval gate-approved
waleedkadous Nov 23, 2026
beb8f4f
[Spec 1951] Final approved plan (main-36: cleanup uses shared scaffol…
waleedkadous Nov 23, 2026
b6c4ba8
chore(porch): 1951 implement phase-transition
waleedkadous Nov 23, 2026
d119eaa
[Spec 1951] Plan: forge verdict follows mergeable only; reviewDecisio…
waleedkadous Nov 23, 2026
01565e6
[Spec 1951][Phase: forge_read_concepts] feat: forge read concepts for…
waleedkadous Nov 23, 2026
1e135c6
[Spec 1951][Phase: forge_read_concepts] test: gitea pr-view shape car…
waleedkadous Nov 23, 2026
bb2ad27
[Spec 1951] Thread log: Phase 1
waleedkadous Nov 23, 2026
233372f
chore(porch): 1951 implement build-complete
waleedkadous Nov 23, 2026
0448553
[Spec 1951][Phase: forge_read_concepts] fix: review follow-ups — gitl…
waleedkadous Nov 23, 2026
6bc4b18
chore(porch): 1951 advance plan phase → readonly_core
waleedkadous Nov 23, 2026
2a3c23d
chore(porch): 1951 acknowledge context refresh
waleedkadous Nov 23, 2026
7f4dd48
[Spec 1951] Thread log: Phase 1 review
waleedkadous Nov 23, 2026
66b6921
[Spec 1951][Phase: readonly_core] feat: read-only runner, allow-list,…
waleedkadous Nov 23, 2026
9081d43
[Spec 1951] Thread log: Phase 2 built
waleedkadous Nov 23, 2026
89fc6a2
chore(porch): 1951 implement build-complete
waleedkadous Nov 23, 2026
91007fa
[Spec 1951] Commit spec and plan iteration-1 rebuttals
waleedkadous Nov 23, 2026
5dea9be
[Spec 1951][Phase: readonly_core] fix: review iteration 1 — closed st…
waleedkadous Nov 23, 2026
08fd449
chore(porch): 1951 implement re-iter (iter 2)
waleedkadous Nov 23, 2026
9983468
chore(porch): 1951 implement build-complete
waleedkadous Nov 23, 2026
93a87a4
[Spec 1951][Phase: readonly_core] fix: review iteration 2 — closed pe…
waleedkadous Nov 23, 2026
e21d4bb
chore(porch): 1951 implement re-iter (iter 3)
waleedkadous Nov 24, 2026
dcabaaf
[Spec 1951] Thread log: Phase 2 review rounds
waleedkadous Nov 24, 2026
da7f7f1
chore(porch): 1951 implement build-complete
waleedkadous Nov 24, 2026
aa7e34f
[Spec 1951][Phase: readonly_core] fix: review iteration 3 — stub chec…
waleedkadous Nov 24, 2026
c42251e
[Spec 1951][Phase: readonly_core] fix: ext:: refusal case uses no /tm…
waleedkadous Nov 24, 2026
8c9715a
chore(porch): 1951 implement force-advance (safety ceiling reached at…
waleedkadous Nov 24, 2026
360d0eb
chore(porch): 1951 advance plan phase → check_pr_mechanics
waleedkadous Nov 24, 2026
6a03300
[Spec 1951] Thread log: Phase 2 round 3 and force-advance
waleedkadous Nov 24, 2026
ea09967
[Spec 1951] Thread log: unreviewed-commits order
waleedkadous Nov 24, 2026
7eeec98
chore(porch): 1951 acknowledge context refresh
waleedkadous Nov 24, 2026
5bef2f5
[Spec 1951][Phase: check_pr_mechanics] feat: codev check pr — merge m…
waleedkadous Nov 24, 2026
7862069
chore(porch): 1951 implement build-complete
waleedkadous Nov 24, 2026
a1bd59d
chore(porch): 1951 advance plan phase → check_pr_forge
waleedkadous Nov 24, 2026
ac72f4a
[Spec 1951] Thread log: architect's Phase 3 verification on PR #1957
waleedkadous Nov 24, 2026
899e8e9
chore(porch): 1951 acknowledge context refresh
waleedkadous Nov 24, 2026
410d5ec
[Spec 1951][Phase: check_pr_forge] feat: codev check pr — state, forg…
waleedkadous Nov 24, 2026
8bf2a02
chore(porch): 1951 implement build-complete
waleedkadous Nov 24, 2026
e1cece6
[Spec 1951][Phase: check_pr_forge] fix: review iteration 1 — name wha…
waleedkadous Nov 24, 2026
1e29917
chore(porch): 1951 implement re-iter (iter 2)
waleedkadous Nov 24, 2026
82190ef
[Spec 1951] Thread log: architect keeps the mergeable-only forge verdict
waleedkadous Nov 24, 2026
45e4af3
chore(porch): 1951 implement build-complete
waleedkadous Nov 24, 2026
b357fe2
chore(porch): 1951 advance plan phase → check_deploy
waleedkadous Nov 24, 2026
2b59076
[Spec 1951] Thread log: Phase 4 review round 2, both approve
waleedkadous Nov 24, 2026
86a23cc
chore(porch): 1951 acknowledge context refresh
waleedkadous Nov 24, 2026
073790d
[Spec 1951][Phase: check_deploy] feat: codev check deploy — merged, o…
waleedkadous Nov 24, 2026
53f7e65
[Spec 1951] Thread log: Phase 5 check_deploy built, live runs
waleedkadous Nov 24, 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
943 changes: 943 additions & 0 deletions codev/plans/1951-read-only-pr-check-for-archite.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Phase check_pr_forge — iteration 1 rebuttal

Reviews: codex REQUEST_CHANGES (one key issue), claude APPROVE (six non-blocking comments).

## codex — "an omitted `mergeStateStatus` is reported as ok"

**Disagree with the requested change; changed the output so the gap is visible.**

The request is to make `forge` `not run` whenever `mergeStateStatus` is absent. That would reverse a
decision the plan records as the architect's: "`forge`, per the architect's decision: the verdict
follows `mergeable` only … `mergeStateStatus` is context." The `forge` check's verdict depends on
`mergeable` alone; when `mergeable` is absent the check is `not run`
(`pr-view did not return mergeable`), as Scenario 24 requires and the tests show. `mergeStateStatus`
only colours the line.

It would also break a forge the project supports. The gitea preset (Phase 1, approved) returns
`mergeable` from Gitea's boolean and has no merge-state field to return, so it omits
`mergeStateStatus` (forge-contracts.ts documents both fields as optional). Requiring it would leave
`forge` `not run` on every Gitea PR, for a field the verdict does not use.

What was wrong is that the absence was silent: the line read just `MERGEABLE`. It now reads
`MERGEABLE (merge state not reported)` (and `CONFLICTING (merge state not reported)`), and
`details.mergeStateStatus` is `null`. Tests: two cases in `pr-parsers.test.ts`, and a Scenario 24
integration case in `check-pr-forge.test.ts` (pr-view without `mergeStateStatus`, as the gitea preset).

The architect has been told of this point.

## claude (APPROVE) — the comments

1. **A local git failure inside `checks` was exit 2.** Changed. `findCodeCommit` now returns a
`failed` result with `failureReason(...)`, and `checks` is `not run: git diff-tree failed: …` (or
`git rev-list failed: …`) while the other ten checks are still reported, as `attribution` and
`trial-merge` do. Test: a spawn that fails `diff-tree` gives exit 1, `checks` not run by name,
`trial-merge` ok, no lookups. `countRange` inside `head` (Phase 3 code, on commits already known
to be local) is left as it is: a failing `rev-list --count` there means a broken repository.
2. **`code === head` by object identity.** Changed to `code?.sha === head.sha`.
3. **The new argv forms were not in the shared form table.** Added
`rev-list --first-parent --parents --max-count=11 <sha> --not <sha>` and the two-revision
`diff-tree … --no-renames <parent> <sha>` to `git-forms.ts`, so both the runner's allow-list and
the stub accept them in `allow-list.test.ts` / `stub-bin.test.ts`.
4. **A walk past the branch point.** Settled with the fixture the reviewer proposed: a porch-only
branch with main merged in, then a porch commit, and a green run on main's new commit. C is the
merge commit (merges are never porch-only), the lookups are `[head, merge]`, and main's commit
is never asked for. The walk is `rev-list <head> --not <merge-base>`, which excludes everything
reachable from the merge-base.
5. **An origin tip that is not local drops to `info`.** Unchanged: the fold-in, as the architect
scoped it, decides "origin past the forge head" only when the origin tip object is local, and
`check pr` fetches nothing it does not need. Recorded for the review.
6. **Extra `details` keys** (`references`, `relation`, …): additive, documented. No change.

## Not changed, recorded for the review (architect)

- An ok `state` line is not printed; the header shows `OPEN` and the JSON has the check (the same
rule as an ok `head`, matching the spec's own sample).
- The ten-commit edge: the walk allows 10 porch-only commits; the lookups stay at 10, with C always
among them.
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Plan 1951 — iteration 1 response

I accepted every point from both reviewers. Each one was checked against the code before I
changed the plan. The revised plan is commit d213afdc3.

## Codex (REQUEST_CHANGES)

1. **The `findWorkspaceRoot()` assumption was wrong.** Confirmed: both implementations return a
builder worktree's own root (`lib/skeleton.ts:32`; `agent-farm/utils/config.ts`, #407).
Fix: a new `roots.ts` gets `mainRoot` (the first entry of `git worktree list --porcelain`)
and `checkoutRoot` (`rev-parse --show-toplevel`) from git, through the runner.
- Config loads from `mainRoot`, and builder ids resolve under `<mainRoot>/.builders/<id>`.
- New tests run each command from inside a builder worktree (Phases 2, 3 and 6).
2. **The allow-list was not read-only enough.** Fix: it is now a closed grammar per subcommand,
where every flag and positional must be permitted.
- `diff`, `log` and `show` must carry `--no-ext-diff --no-textconv`.
- `cat-file` drops `--textconv` and `--filters`.
- `ls-remote` and `fetch` refuse `--upload-pack`.
- `GIT_TERMINAL_PROMPT=0` is set for every call.
- Refusal tests cover `--output`, `--ext-diff`, `--textconv`, `--filters`, `--upload-pack`,
`--exec` and unknown flags for *every* allowed subcommand.
- The merge-driver trust boundary is stated: drivers come only from the user's own git
config, never from the PR.
3. **The porch-only algorithm was inconsistent.** Fix: Phase 4 now gives an exact algorithm.
1. Head's result `H` is always kept.
2. Stop there if head is C, or if head is porch-only and `H` all passed.
3. Otherwise walk `head^1` down to C, taking the first commit whose runs are non-empty and
all complete.
4. Failing that, take the first commit with any runs.
- The total is at most 10 lookups.
- The display rules and the `running` / `failed` / `none` qualifiers are tied to it.
- Pending head with green code and pending head with failed code are explicit tests.
4. **`check deploy` did not fetch the run's `headSha`.** Fix: the `headSha` is validated as a SHA,
then `ensureCommits(headSha)` runs. A failed fetch or an old git gives `deploy-run: not run`.
There are acceptance and snapshot tests for it.
5. **The structural test was too shallow.** A transitive scan cannot work as stated, because
`lib/config.ts` transitively imports `platform.js` and `harness.js`, and those modules import
process code even though `loadConfig` spawns nothing. Fix: an **audited-imports** test.
- Every import in `commands/check/` outside `runner.ts` must be on an explicit list kept in
the test: sibling modules, `node:path`, the named read-only `node:fs` functions,
`lib/config.js`, and the pure scaffold and keep-list modules.
- Adding an import means extending the list with a reason.
- At run time, the stub-`PATH` recorders see every `git` and `gh` invocation the process
makes, from any module.
- #1954's `keep-files.ts` spawns git, so its pure definitions move into a new
`keep-list.ts`, which is what `check worktree` imports.

## Claude (COMMENT)

1. **`findWorkspaceRoot()`.** Same as Codex 1. The attribution-hit live run now uses a scratch
clone with its own `.codev/config.local.json`. No config of the user's is touched.
2. **The empty-pathspec trap.** Empty include lists short-circuit without running git. An
empty exclude list omits the pathspec. Acceptance tests are in Phases 2 and 6.
3. **`exitOverride()` and `--help`.** `commander.helpDisplayed` and `commander.version` now exit
0. Acceptance tests cover `codev check --help` and `codev check pr --help`.
4. **The gitlab `pr-view.sh` shape.** It is rewritten to capture before piping (#1645) and to
declare `# forge-executable: glab` (#1455). A test checks that doctor reports `glab`.
5. **Dependency labels.** `worktree` and `deploy` now depend on Phase 3 (`index.ts`).
`summarizeRuns()` moved into `report.ts` (Phase 2), so `deploy` does not import from
`porch-only.ts`.
6. **Phase 3 was too large.** Split as suggested: **Phase 3** holds the merge mechanics (CLI
wiring, `head`, `attribution`, `trial-merge`, `watched`, `overlap`, `size`, `to-read`, and
race detection). **Phase 4** holds the forge-fed checks (`state`, `forge`, `checks` with the
porch-only walk, and `linked-issue`). There are seven phases now.
7. **Concept-count touchpoints.** `forge.test.ts` and `doctor.test.ts` are now named in Phase 1.
8. **`commit-checks` call volume.** The `actions/runs` join is dropped. That leaves two GETs per
commit, and `workflow` is omitted since the contract makes it optional. `statusCheckRollup`
only covers head, while the walk needs earlier commits and the merge commit, so
`commit-checks` stays as one uniform path.
9. **Smaller notes.**
- `-C` paths are validated.
- "Invalid output" is derived from `data === null && error === null`.
- The `HAS_HOOKS` decision and the deliberate `UNSTABLE` double report are stated.
- The diff range is pinned to merge-base → head.
- The Windows dispatch adds `-f filter=commands/check`.

The "REPOSITORY MOVED" note on both reviews came from my own commit (cbc82c02a, a thread-log
entry) made while the reviews ran. The plan file was unchanged by it.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Phase 2 (readonly_core): iteration 1 response

Both reviewers asked for changes. Every point is accepted except one minor point, which Phase 4 covers. All changes are in the commit after `91007fac9`.

## Codex

**1. The stub `git` does not keep a closed grammar of its own.**
Accepted. `helpers/stub-bin.ts` now parses the global options and the subcommand itself, independently of the runner's allow-list:
- `-c` accepts only `gc.auto=0` and `maintenance.auto=false`, and only on `fetch`.
- `symbolic-ref` accepts only its read form: one ref, plus `--short`, `-q` and `--quiet`. So `symbolic-ref HEAD refs/heads/x` is now refused.
- `fetch` requires both housekeeping overrides, plus `--no-write-fetch-head`, `--refmap=`, `--no-tags` and `--no-recurse-submodules`. It must fetch from `origin`, and every other positional must be a full 40-hex SHA.
- `config` accepts only `--get <key>`. `worktree` accepts only `list --porcelain`. `merge-tree` must carry `--write-tree`. `status` needs `--no-optional-locks`.
- The file-writing and program-running flags are refused on every subcommand.

New self-test, `__tests__/stub-bin.test.ts` (POSIX):
- Every read form the commands use passes through to the real git with no violation.
- Every write form, 25 of them, exits 99, is recorded, and leaves the repository snapshot unchanged.
- The `gh` stub answers reads from fixtures and refuses `pr merge`, `pr comment`, `api -X POST` and `api -f`.

The read forms and the write forms now live in `helpers/git-forms.ts`. The allow-list test and the stub test share those cases, but the two grammars remain separate code.

**2. `isRefName()` accepts a component ending in `.lock`, such as `foo.lock/bar`.**
Accepted. The check now applies to every path component. There are tests for `foo.lock/bar`, `a/b.lock/c`, and a `check.deploy.branch` of `release.lock/x` (exit 2, key and file named).

## Claude

**1. The fetch rule does not require `--no-tags`.**
Accepted. The allow-list now requires `--no-tags` and `--no-recurse-submodules` on `fetch`, and the stub does too. A probe with git 2.50 found that a SHA-only fetch with `--refmap=` does not auto-follow tags, because auto-follow needs a stored ref. So today the risk is theoretical. Requiring the flags makes the guarantee independent of that git behaviour.

**2. No test exercises the tag case.**
Accepted, in two ways:
- The ref-neutral fetch test now pushes a lightweight tag and an annotated tag on origin, both pointing at the fetched commit. The snapshot must still be identical afterwards, so no `refs/tags/*` may appear.
- Because the runner refuses a fetch without `--no-tags`, deleting the flag from `ensureCommits` now fails that test.

**3. `snapshotRepoState` reads `FETCH_HEAD` only under `--git-common-dir`.**
Accepted. The snapshot now reads `FETCH_HEAD` from both the worktree's git dir and the common dir. A new test runs `ensureCommits` from a linked worktree and requires that worktree's snapshot, both `FETCH_HEAD` locations included, to be identical before and after.

**4. Minor points.**
- *The error wording "glob strings" is reused for `attribution` and `skip`.* Fixed. The messages now name what each array holds: `regex strings`, `check ids` or `glob strings`. There is a test.
- *`config --get-regexp` is permitted, but its positional pattern rejects regex metacharacters.* Fixed by removing `--get-regexp`. No command uses it, and the list is meant to be exactly what the commands use. `config` now requires `--get`.
- *`check.flag` is not validated against `check.watch`.* No change in this phase. The spec defines `flag` as "a subset of what you watch". Globs cannot be checked statically for containment, so Phase 4 applies the meaning instead: a flagged file is a watched file, one that `watch` matched, that also matches `flag`. A flag glob outside the watch list therefore has no effect. `CheckSettings.flag` now documents this, and Phase 4's tests will cover it.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Phase 2 (readonly_core): iteration 2 response

Both reviewers asked for changes, and every point is accepted. The changes are in the commit after `08fd44979`.

## Codex

**1. The stub `git` accepts valid forms outside the allow-list, such as `git log <sha>` or `git diff <sha> <sha>` without the mandatory guards.**
Accepted. The stub's grammar is now closed for each subcommand. Each one has its own list of permitted flags, and every option before `--` must be on that list. `log`, `show`, `diff` and `diff-tree` must carry both `--no-ext-diff` and `--no-textconv`, and `version` takes no arguments. Globbing is off in the stub (`set -f`), so its flag lists are never expanded against files.

The grammar is still separate code from the runner's allow-list, written in `sh`.

A new shared list, `OFF_GRAMMAR_FORMS` in `helpers/git-forms.ts`, holds invocations that are read-only in themselves but fall outside the grammar:
- the four diff-family commands without their guards;
- `rev-list --all`, `cat-file --batch`, `ls-files --stage`, `rev-parse --git-path` and `version --build-options`.

Both the allow-list test and the stub self-test now require each of these to be refused. So a regression that drops a guard is caught by either layer.

**2. The stub `gh` misses joined write-flag forms.**
Accepted. `gh api` now refuses any argument that begins with `--method`, `--field`, `--raw-field` or `--input`. It also refuses any single-dash argument containing `X`, `f` or `F`. That covers `-XPOST`, `-ftitle=x`, `-Fbody=@f` and short clusters such as `-iX POST`.

The self-test covers all twelve write forms: `pr merge`, `pr comment`, `-X POST`, `-f`, `--method=POST`, `-XPOST`, `-iX POST`, `--field=…`, `-f…`, `-F…`, `--raw-field=…` and `--input=…`. It also checks that the read-only `api --paginate … --jq …` form the forge scripts use still gets through.

## Claude

**1. `settings.test.ts` and `roots.test.ts` read the developer's real `~/.codev/config.json`.**
Accepted. A new helper, `helpers/fake-home.ts`, points both `HOME` and `USERPROFILE` at an empty temp directory for each test, as `src/__tests__/config.test.ts` does. The settings, roots and runner tests use it. The runner test is included because it also loads forge configuration through the same layers.

A new settings test writes `check.*` into the fake `~/.codev/config.json`. It confirms that the file is read as a layer, and that a bad value there is reported naming that file.

**2. `diff-tree` is exempt from the forced `--no-ext-diff --no-textconv` (minor).**
Accepted. `diff-tree` now requires both flags in the allow-list and in the stub, like `diff`, `log` and `show`. The shared read form carries them, and the unguarded form is refused by both layers.

**3. `remoteDefaultBranch` returns an unvalidated branch name supplied by the remote (minor).**
Accepted. A name that fails `isRefName` now returns `{ ok: false, reason: "origin's HEAD names an invalid branch \"…\"" }`, instead of failing later as a runner refusal. A test injects such a reply.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Phase 2 (readonly_core): iteration 3 response

Claude approved. Codex asked for one change, which is accepted. The architect approved the fix before it was made, and asked for an audit of every similar form in the stub. Everything here is in the test helpers, except a one-line guard in `git-facts.ts`.

## Codex

**The stub `git` checks `ls-remote`'s flags but not its remote or ref arguments.**
Accepted. The stub's `ls-remote` now requires `origin` as its first argument. Every argument after it must be `HEAD` or a `refs/…` name containing neither `::` nor `..`. Four shared cases were added to `OFF_GRAMMAR_FORMS`:
- another remote;
- an `ext::sh -c …` transport;
- a path to another repository;
- `origin` with an `ext::` ref.

Both layers refuse all four: `allow-list.test.ts` includes the list, and so does `stub-bin.test.ts`. The `ext::` case uses `sh -c true`, because the repository's `/tmp` residue check (`scripts/tmp-residue-check.mjs`) refuses a literal `/tmp` path in a test file.

## Audit requested by the architect: other forms with checked flags but unchecked arguments

Every subcommand the stub accepts was read for arguments that name a repository, a URL or a file system path:

| Form | Before | Now |
|---|---|---|
| `ls-remote` | remote and refs unchecked | `origin` only, then `HEAD` or `refs/…` names (above) |
| `fetch` | already checked: remote must be `origin`, every other argument a full 40-hex SHA | unchanged |
| global `-C <dir>` | already checked: absolute path, in both layers. It selects a local checkout that `codev check` itself named, such as a builder worktree; it is not a remote. | unchanged |
| `diff`, `log`, `show`, `diff-tree`, `merge-tree`, `merge-base`, `rev-list`, `rev-parse`, `cat-file` | **same gap: revision arguments were unchecked.** `git diff --no-ext-diff --no-textconv /etc/hosts /etc/passwd`, or `../a ../b`, runs as an implicit `--no-index` diff of files outside the repository. That is a read, but of arbitrary paths, and the runner already refuses it. | Each argument before `--` must look like a revision. Absolute paths, `../` paths, `:` (and so `::`) and backslashes are refused. Both cases were added to the shared refusals. |
| `ls-files`, `status` | positional pathspecs before `--` were unchecked (they are confined to the repository) | no arguments before `--`, as in the runner; shared refusal cases added |
| `for-each-ref` | patterns unchecked | `refs/…` patterns only, as in the runner; shared refusal case added |
| `config` | already exactly `--get <key>`, with no file option | unchanged |
| `worktree`, `symbolic-ref`, `version` | already exact forms | unchanged |

Pathspecs after `--` stay unchecked by design. git confines them to the repository, and `:(top,glob)` magic is how the commands use them.

## Claude (APPROVE, non-blocking notes)

- **`liveTip`'s branch argument is not pre-validated.** Taken, as the architect asked: one line. An invalid name now returns `{ ok: false, reason: 'invalid branch name "…"' }` without running git. A test uses a spawn spy.
- **Empty versus invalid forge output.** Left for Phase 6, as the note says.
- **Strictness about unknown `check.*` keys, the set-size test in the fetch globals rule, and optional askpass hardening.** Left as they are. None names a defect in this phase.
- Refusing unknown keys is deliberate: a typo such as `wacth` exits 2 rather than silently doing nothing.
- The fetch rule compares set sizes, but the set can only ever contain the two permitted overrides, so equal size means both are present.
- `GIT_TERMINAL_PROMPT=0` already keeps a prompt from waiting for input.
Loading
Loading