Skip to content

feat: Allow for this run — run-scoped approval; supervised run finishes the pipeline with far fewer approvals - #43

Merged
linhdmn merged 2 commits into
mainfrom
feat/approval-allow-for-run
Oct 6, 2026
Merged

linhdmn merged 2 commits into
mainfrom
feat/approval-allow-for-run

Conversation

@linhdmn

@linhdmn linhdmn commented Oct 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds a run-scoped "Allow for this run" approval for file tools, so a supervised run no longer asks again for every edit.
  • A supervised run now finishes the pipeline with far fewer approvals.

Test plan

  • tsc --noEmit clean
  • unit suite: 808 pass, 0 fail (rebased onto main v0.3.3)
  • bash .githooks/pre-commit --all exits 0

A run that writes a dozen files asked a dozen times, with only Allow once
and Reject on offer. Add a third decision on write/edit asks raised by a
gatePolicies rule: one click releases that ask, the other pending asks for
the same tool in the same run, and later asks for it.

Scoped so it cannot become allow-always: per run (agent id), per tool, in
memory only, policy asks only (a critical-signal ask still reaches a human),
and never bash. The server re-checks the ask, so a forged request for a bash
ask is a 400 and grants nothing. The option is read by id, not by its
borrowed allow-always kind.

The standalone dashboard page serves a legacy assets/dashboard.js that the
current build no longer produces, so it gets the server behaviour but not the
button; the in-app Feature Loop page (client.js) does.
…vals

Found by driving a real run through the web UI under gateMode: ask.

The loop never left research. The pipeline's sandbox descriptor was attached
only under YOLO, so every phase gate, the "you stopped early" nudge and ship
returned at "no sandbox" with nothing in the log. It now attaches in every
mode; the containment root stays YOLO-only.

Ship committed nothing under ask (writes were only recorded under YOLO) yet
reported "committed". Requested writes are now recorded, and ship stages only
paths that exist. A repository with no remote is a local project, not a failed
push: ship commits, records the verified sha, and the gate accepts it. A
configured remote that rejects the push still blocks.

The test gate passed an exit 0 from a runner that ran nothing ("[no test
files]"), so ship committed without tests. It now fails that.

A run that reached `done` was recorded as `blocked`, because the pre-step guard
refuses the step after it; the outcome is now goal-met.

Approvals: 24 clicks in the first three minutes of research, almost all
harmless. todo_write / web_search / web_fetch are built-in reads (spec still
overrides; other unknown tools stay irreversible). A strictly read-only bash
runs unprompted under ask (src/shell-readonly.ts: no redirect, substitution,
variable, ~, .., absolute path outside the run, secret file, find -exec,
sort -o, git -c ...), and so do the pieces of the configured verify command.
`deny` mode is unchanged.

Approval card: shows the call (command / path / task) in its own block, drops
the model-facing boilerplate and the "brief unavailable" note, and the
"Approval required" label is readable on a light theme.

Not included: CHANGELOG and the workers files, which carry unrelated edits.
@linhdmn
linhdmn merged commit 59c77bb into main Oct 6, 2026
3 checks passed
@linhdmn
linhdmn deleted the feat/approval-allow-for-run branch October 6, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant