Skip to content

feat(stage): ask a person to confirm a lowered approval level - #138

Merged
cabljac merged 1 commit into
gate/03-approval-gatefrom
gate/04-weakening-guard
Oct 19, 2026
Merged

cabljac merged 1 commit into
gate/03-approval-gatefrom
gate/04-weakening-guard

Conversation

@cabljac

@cabljac cabljac commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

An agent with write access to the mirror could lower approval and then stage. Stage now compares the mirror's level with this clone's memory of the last level it saw (venfork/approval.json in the git common dir, never pushed). A lower level needs a person at a terminal. --yes never answers this confirm; with --json, --no-input or no TTY, stage stops with reason gate-weakened before the rebuild. An equal or higher level is recorded silently, so lower-then-raise is not flagged. A missing memory (a fresh clone) records the level without asking. A memory that exists but cannot be read counts as two-person.

The first version also scanned venfork-config history. Review showed filler commits, merges and hand-made commits all hid a lowering, so the user chose to drop the scan. The docs say plainly that a fresh clone does not know an earlier level, and recommend branch protection on venfork-config.

Tests, red first: tests/integration/approval-guard.test.ts. bun run verify exits 0. Counts: unit 1283 to 1283, integration 500 to 510.

Not verified: e2e tiers and live GitHub. No test pins exit 130 when the confirm is cancelled.

An agent with write access to the mirror could lower `approval` and then
stage. Stage compares the mirror's approval level only with this clone's
memory of the last level it saw (venfork/approval.json in the git common
dir, never pushed). It does not read venfork-config history. A lower
level needs a person to confirm at a terminal; an equal or higher level
is recorded silently. A missing memory (fresh clone) records the level
without a confirm. A memory that exists but cannot be read counts as
two-person.

--yes never answers this confirm, and with --json, --no-input or no TTY
stage stops with ApprovalError reason gate-weakened before the rebuild
(details.weakened is { from, to, unreadable? }). --dry-run reports it as
result.weakened and writes no memory. The guard is a convenience, not
protection: a fresh clone does not know an earlier level, so the docs
recommend branch protection on venfork-config.
@cabljac
cabljac force-pushed the gate/04-weakening-guard branch from 4d5b253 to 86df6b5 Compare October 19, 2026 17:26
@cabljac
cabljac marked this pull request as ready for review October 19, 2026 17:29
@cabljac
cabljac added this pull request to stack #142 October 19, 2026 17:29
@cabljac
cabljac merged commit cb41f24 into main Oct 19, 2026
4 checks passed
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