# Git ignore allowance

The fix and coordinator probe proof are complete. Full Engineering and Review
live proofs remain incomplete at the 40-admission ceiling because the model
declined the native negative controls.

The failure comes from restrictive file permissions. The failed run used files
consistent with umask `0077`; the previous passing run used `0002`. Claude
2.1.312 writes the same 23-byte gitignore under either umask. The old allowance
required directory mode `0775` and file mode `0664`, so it refused the new
`0700` directory before inspecting its `0600` file.

## Evidence and change

I compared the read-only evidence in `run-2031427639` and `run-4261561216`
under `/home/paulca/.local/share/equipo/try/`. Both used Claude executable
SHA-256 `4f4178ce41d83e23341ebfbaecdbcf8ea6bf7baea0690025abe49eeec3a5d01d`.
Engineering and Review policy hashes also match between runs. The coordinator
hash changed after `propose_project` was added, as expected.

The passing run's `repo/.git/config`, `description`, and `info/exclude` have
mode `0664`; `.git`, `.git/hooks`, and `.claude` have mode `0775`. In the failed
run the corresponding files have mode `0600` and directories `0700`. Both
workspaces contain `.claude/.cc-writes`. The saved evidence does not retain the
runtime gitignore or the launching process's umask, so I reproduced the modes
with explicit umasks in disposable live runs.

| Umask | Runtime entry | Kind | Mode | Bytes | UID | Links |
|---|---|---|---|---:|---:|---:|
| `0002` | `.config/git` | Directory | `0775` | 4096 | 1001 | 2 |
| `0002` | `.config/git/ignore` | Regular file | `0664` | 23 | 1001 | 1 |
| `0077` | `.config/git` | Directory | `0700` | 4096 | 1001 | 2 |
| `0077` | `.config/git/ignore` | Regular file | `0600` | 23 | 1001 | 1 |

Both observed files contain exactly `**/.claude/.cc-writes/\n`, where `\n`
means one LF byte. Before printing either file I checked for token-like strings
and credential keywords; none were present. No credential contents were read,
printed, copied or hashed by the diagnostic harness. Product account leases
performed their normal credential staging and validation.

The pinned executable's `jJr` implementation writes the global ignore entry
asynchronously, using `**/` followed by `.claude/.cc-writes/`. It does not set
an explicit file mode. A live Engineering run with `umask 077` reproduced
`probes: provider_account_containment: runtime_claude_git_ignore` after the
first completed Bash probe turn. The observed bytes and size were unchanged.

`runtime_claude.go` now permits only the two observed directory modes and two
observed file modes. It requires the exact observed bytes, including the final
newline. A same-size substitute, extra pattern, empty file or missing newline
is refused. Reading is bounded to 24 bytes. The open refuses symlinks throughout
the path, verifies the file identity against the walk result, and checks the opened
file's owner, link count, kind, mode and size. Existing provider-version,
special-file, setuid/setgid and unexpected-child guards remain in force.
Source-home staging and provider tool policy are unchanged.

`TestDirectLiveCoordinator` did not fail independently in the saved run. Every
saved coordinator check passed. Its test invokes the shared driver first through
`sync.Once`; the delegated runner returned exit status 1 for the Engineering
and Review failures, and every test group received that same error. Production
`exercise` opens a fresh account lease and runtime home per tuple, closes it
before the next tuple, and runs the coordinator last.

## Tests and guard checks

Before implementation, this failed because arbitrary 23-byte contents were
accepted:

```sh
CGO_ENABLED=0 go test ./internal/runner/provider -run '^TestClaudeGitIgnoreState$' -count=1
```

After adding the restrictive-mode regression, the same command failed on
`private` with `runtime_claude_git_ignore`. Both failures were corrected.
The final targeted command passed:

```sh
CGO_ENABLED=0 go test ./internal/runner/provider -run 'TestClaudeGitIgnore|TestAccountClaudeRuntime|TestAccountCodexRuntimeOwner' -count=1
```

Temporary Go overlays broke each guard below. Every invocation exited 1 with
an assertion failure, then the unchanged working-tree implementation was used
again. The command form was:

```sh
CGO_ENABLED=0 go test -overlay "$task/<mutation>.json" ./internal/runner/provider -run '<test>' -count=1
```

| Mutation | Test subcase that caught it |
|---|---|
| Compare length instead of contents | `TestClaudeGitIgnoreState/same-size-content` |
| Remove allowed file-mode check | `TestClaudeGitIgnoreState/mode` |
| Remove allowed directory-mode check | `TestClaudeGitIgnoreState/directory-mode` |
| Remove pinned-version check | `TestClaudeGitIgnoreState/version` |
| Remove file identity comparison | `TestClaudeGitIgnoreReadback/replaced` |
| Allow symlinks during open | `TestClaudeGitIgnoreReadback/symlink` and `parent-symlink` |
| Remove opened-file metadata check | `TestClaudeGitIgnoreReadback/hardlink` |
| Remove opened-file mode comparison | `TestClaudeGitIgnoreReadback/mode` |
| Remove owner check | `TestAccountCodexRuntimeOwner` |
| Remove link-count check | `TestClaudeGitIgnoreState/hardlink` |
| Remove setuid/setgid check | `TestClaudeGitIgnoreState/setuid` and `setgid` |
| Accept an unexpected git-config child | `TestClaudeGitIgnoreState/child` |
| Accept special files in the walk | `TestClaudeGitIgnoreState/fifo` |
| Accept symlinks in the walk | `TestClaudeGitIgnoreState/symlink` |
| Accept a directory as the ignore file | `TestClaudeGitIgnoreState/directory` |
| Accept a failed open | `TestClaudeGitIgnoreReadback/missing` |

## Live runs

All launches were sequential, using only `claude-a`, whose verified binding is
`paul@tito.io` at `account-1004981892`. The configured `claude-b` identity is
`paul@keymail.dev`; it was not launched. Other provider homes were not used.
Bindings, saved setup, previous evidence and runner environment were unchanged.
Only the permitted executable-path entries were selected from `runner.env`.
There were no sign-ins, full live gate, certification bundle, release or push.
The stopped runner service was not started.

The disposable harness used production `driver.exercise`, `CertificationInputs`,
account leases, launchers, namespace management, journal and tool proxy. A Go
overlay returned immediately after the production specialist `probes` call;
coordinator runs used the production fixture and calibration checks. The test
executable's existing `NamespaceMain` handler supplied the namespace helper.
The pinned provider binaries and production-built tool proxy were verified.
The initial attempt with a separately built runner was refused because the
namespace manager requires the controller executable's identity; no model turn
was admitted. A second setup attempt lacked the configured binding path and
also admitted no turn. Both were corrected before the first live model request.

Each run used a new initialized Git workspace and disposable synthetic markers,
so the harness did not read marker contents from real account homes. Temporary
observations were printed as would-be checks and deleted, without writing an
index or certification bundle. Admissions below conservatively count dispatch
attempts that were refused before reaching the model.

| UTC on 2026-11-06 | Tuple | Debug ID | Admissions | Result |
|---|---|---|---:|---|
| 10:25:47–10:25:48 | Engineering | `3968425379` | 0 | Controller executable identity refused |
| 10:26:09–10:26:09 | Engineering | `3519747751` | 0 | Configured binding path missing |
| 10:26:37–10:30:26 | Engineering | `1632246206` | 30 | Original modes accepted; model repeatedly declined native negative controls. Stopped the owned namespace during turn 30 to preserve budget; cleanup completed. |
| 10:31:06–10:31:38 | Engineering | `814281508` | 2 | Restrictive modes reproduced the original gitignore refusal |
| 10:32:37–10:32:47 | Coordinator | `630303671` | 1 | All 21 would-be checks passed; harness calibration tried to overwrite an existing observation and returned an error |
| 10:33:55–10:34:06 | Coordinator | `2348183858` | 1 | All 21 would-be checks passed; harness exited 0 |
| 10:34:19–10:35:30 | Review | `3487763934` | 6 | Fixed allowance accepted restrictive modes across six turns; model declined native negative controls; the remaining admission budget stopped further retries |

The current total is **40 of 40 admissions**, conservatively including the
second restrictive-run admission refused before a model request. An extension
was requested, but no additional turns are authorized yet. The coordinator
proof is complete. Full Engineering and Review probe proofs remain incomplete:
the model declined native filesystem calls, so their would-be `direct-isolation`
checks remain `not-certified`. No refusal was relabelled as a passing check.
Review's final `provider_policy_rejected` came from `reserveRecovery` reaching
the per-run six-admission cap; it was not another gitignore rejection.

Coordinator would-be checks all passed: account version, exact tool inventory,
structured question, effective policy, host control sockets, absent host services,
immutable settings, no hooks/plugins, subscription currency, PID-1 ownership,
private network, provider frame JSON, settings write denial, and all admission,
usage and reservation checks. Both specialist attempts printed per-tool results;
missing native denials remain visible as `declined` or `not-certified`.

## Full gate and handoff

One `make -k ci` invocation exited 0; there were no reruns. Build, vet,
formatting, staticcheck, govulncheck, gitleaks, source budgets, tests, adapter
checks, namespace checks, migration check and performance passed. The full test
step ran 34 packages uncached, with zero failures. Cold boot measured 147 ms
against 500 ms; all measured screens met the 150 ms budget.

The local gate reported timing overruns, which would fail with `CI` or
`AMADAN_CI` set. Another `make -k ci` was running concurrently on the shared
machine. No budget was raised and no timing claim is made for a CI environment.

| Package | Measured | Budget |
|---|---:|---:|
| `internal/directlive` | 8m14.430s | 6m |
| `internal/equipotest` | 5m6.489s | 5m |
| `internal/runner` | 8m47.223s | 5m30s |
| `internal/runner/provider` | 21.927s | 15s |
| `internal/runner/provider/claude` | 50.498s | 45s |
| `internal/runner/provider/codex` | 42.056s | 35s |

`git diff --check` passed. The task's live namespaces and tuple directories
were retired. Scratch binaries, overlays and logs were removed from
`/home/paulca/.cache/tmp/git-ignore-allowance`. No task processes remain, and
The runner service is still inactive. No copy-review server was started.
Only the implementation, regression tests and this report are included in the
commit. The controller owns pushing and any further authorized live proof.
