You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f7bf5b1
Browse filesBrowse the repository at this point in the historyBrowse files
fix(adapters): pin opencode tool permissions and back the resume declaration
The opencode row declared unsupported resume and dangerous mode, and the
adapter matched it: spawn was a fixed `opencode run -m <model> --format json
<prompt>` with no permission configuration at all. A worker therefore
inherited whatever the operator's own opencode config resolved to, so two
operators running the same plan got different agent behaviour, and a
permission resolving to `ask` blocks a headless run until the timeout
watchdog kills it (upstream anomalyco/opencode#36762) - surfacing as a
timeout rather than a blocked permission.
Both axes now describe flags the adapter passes:
- Every spawn carries an explicit OPENCODE_PERMISSION policy derived from
the declared dangerous-mode strategy - escalated alongside `--auto` when
it permits unattended action, a deny policy when it does not. It is
applied after the environment allow-list so the pinned policy is what the
worker sees rather than the host's. Neither direction resolves to `ask`.
- `--continue` re-enters the prior session on a continuation retry, which
the per-task worktree makes unambiguous, and the adapter opts into the
continuation path so the warm retry `checkpoint_retry_capability` derives
from the resume axis is backed by something real.
Command construction moves into `_build_command` so the argv is assertable
without mocking subprocess; the matrix row, the capability profile and the
pinned contract move together.
The event channel deliberately stays `text-signals`. The CLI does emit
NDJSON under `--format json`, but nothing consumes it yet, and declaring a
channel no parser reads would claim a surface that does not exist.
Consuming it is the remaining half of sipyourdrink-ltd#3676.
Partial implementation of sipyourdrink-ltd#3676.
Copy file name to clipboardExpand all lines: docs/release-notes/unreleased.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ rather than as its own attribution is exempted by hand there, with the reason.
14
14
15
15
- Volunteer tasks enforce `allowed_paths`, re-run the project's gates, and assemble the signed receipt (#4033). `finish_volunteer_task` takes the patch a run produced plus the project's manifest and returns either a `SignedResultBundle` or a `VolunteerRefusal` — never a bundle marked failed, because a signed bundle is a claim the work is acceptable and one that says otherwise in a boolean field is a misreading away from being treated as a pass. Scope is enforced before any gate subprocess starts, and a glob match is not the whole check: the same filesystem containment barrier the rest of the project uses refuses a path that is not repository-relative (`docs/../src/x.py` is a spelling `docs/**` matches) and a path that resolves out of the worktree through a symlinked component, and only then are the project's globs consulted through the one matcher shared with credential scoping. Matching stays case-sensitive on every platform, so a scope written for `src/` cannot be satisfied by `SRC/` on a case-insensitive filesystem. Gates run as argv under one wall-clock budget shared across them rather than one budget each, stop at the first failure, and take an environment built from the sandbox profile rather than inherited from the donor's shell. A passing run's bundle carries the manifest's own digest as `manifest_sha256` and the profile's digest as its sandbox identifier, continuing the manifest → profile → receipt chain, and its worker identity is derived from the signing key so the bundle cannot name one worker while the signature is by another. Refusals carry stable, append-only reason codes. Part of #3869. Docs: [`docs/reference/volunteer-manifest.md`](../reference/volunteer-manifest.md).
16
16
- One answer to "which paths does this diff touch" (`bernstein.core.diff_paths`). The Tier-3 auto-heal cordon and volunteer scope enforcement both fail open on a path an extractor misses, so the extraction moved out of `autofix/tier3.py` into a shared module alongside `path_scope`, and gained the shapes it was missing: a content-preserving rename or copy, a mode change, and a binary file each touch a file while printing no hunk at all, and were previously invisible to the cordon. Quoted non-ASCII paths are decoded rather than handed to a matcher as escape sequences, and an ambiguous `diff --git` header contributes every candidate split — the extractor over-approximates on purpose, since a spurious path costs a readable refusal and a missing one costs an unchallenged write. `bernstein.core.autofix.tier3.extract_paths_from_unified_diff` still resolves for existing callers.
17
+
- The OpenCode adapter pins its own tool permissions and can re-enter a prior session (#3676). The contract row for `opencode` read `unsupported | unsupported` on resume and dangerous mode, and the adapter matched it: the spawn was a fixed `opencode run -m <model> --format json <prompt>` with no permission configuration at all, so a worker inherited whatever the operator's personal `opencode` config resolved to and two operators running the same plan got different agent behaviour. Both axes now describe flags the adapter passes. Every spawn carries an explicit `OPENCODE_PERMISSION` policy derived from the declared dangerous-mode strategy — escalated alongside `--auto` when it permits unattended action, tightened to a deny policy when it does not — applied after the environment allow-list so the pinned policy is what the worker sees rather than the host's. Neither policy resolves to `ask`, which would hang a headless run indefinitely against upstream `anomalyco/opencode#36762` and surface as a timeout rather than a blocked permission. `--continue` re-enters the prior session on a continuation retry, which the per-task worktree makes unambiguous, and the adapter opts into the continuation path so the warm retry the resume axis already derives is backed by something real. The event channel deliberately stays `text-signals`: the CLI does emit NDJSON under `--format json`, but nothing consumes it yet, and consuming it is the remaining half of #3676.
18
+
17
19
## Security
18
20
19
21
- The agent task-scope gate no longer depends on how FastAPI happens to store
0 commit comments