architect: vault blast-radius tiers #9
No reviewers
Labels
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto-ops#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "architect/vault-blast-radius-tiers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
{"title": "architect: vault blast-radius tiers", "body": "## What this enables\n\nAfter this sprint, vault operations are classified by blast radius:\n- Auto-approve (low): docs, feature-branch file edits \u2014 no human gate\n- Async review (medium): CI config, Dockerfile changes \u2014 human reviews but agent continues\n- Hard block (high): production deploys, secrets rotation, agent self-modification \u2014 same as today\n\nThe dev loop stops stalling on routine vault requests. Agents move autonomously through 80%+ of vault requests while preserving the safety contract on irreversible operations.\n\n## Complexity and risks\n\n~14 files (7 new, 7 modified). ~60% gluecode wiring existing vault infrastructure, ~40% greenfield (classification engine, policy file format). Estimated 4-5 sub-issues.\n\nPrimary risk: the branch-protection/admin-token interaction. Auto-approve means the dispatcher merges without human approval, but branch protection currently requires 1 approval. The dispatcher needs admin access or branch protection must become tier-aware.\n\nSee sprints/vault-blast-radius-tiers.md for full pitch.\n\n## Recommendation\n\nWorth it. Vault redesign (#73-#77) is done and stale in prerequisites.md. Blast-radius tiers are the natural next step \u2014 the main reason agents cannot operate continuously is that every vault action blocks on human availability.\n\n---\nReply
ACCEPTto proceed with design questions, orREJECT: <reason>to decline.", "head": "architect/vault-blast-radius-tiers", "base": "main"}i don't like the requirement that the vault runner needs an forgejo admin token. on the other side the dispatcher has access to all encrypted secrets anyway. we need to find a way to have a secure setup, where things can not be broken easily, but that is for later. good design otherwise.
ACCEPT
New commits pushed, approval review dismissed automatically according to repository settings
Thanks for the ACCEPT. I dug through the codebase —
dispatcher.sh(1005 lines),lib/vault.sh,lib/branch-protection.sh,vault/vault-env.sh— and identified three design forks before implementation can begin. The sprint spec has been updated with full options and proposed sub-issues per path.Three questions to resolve:
Q1: Auto-approve merge mechanism (critical)
Branch protection on ops repo:
required_approvals: 1,admin_enforced: true. For low-tier vault PRs the dispatcher must merge without a human approval. How?A. Skip PR entirely for low-tier — vault-bot commits directly to
vault/actions/on main usingFORGE_ADMIN_TOKEN(already in vault env). No PR, no audit trail per execution.B. Dispatcher self-approves — vault-bot creates PR as today, then posts APPROVED review + merges using its own token. Requires granting vault-bot Forgejo admin role. Full PR audit trail.
C. Tier-aware branch protection — create a Forgejo protection rule for
vault/*branches withrequired_approvals: 0. Main protection unchanged. vault-bot merges its own low-tier PRs. (Needs verification that Forgejo supportsvault/*glob patterns.)D. Dedicated auto-approve bot — separate
vault-auto-botaccount with admin role that auto-approves low-tier PRs. Cleanest trust separation; most setup overhead.Q2: Policy storage format
Where does the formula → tier mapping live?
A.
vault/policy.tomlin disinto repo. classify.sh reads at runtime. Policy changes require a disinto PR.B.
blast_radiusfield in eachformulas/*.toml. Co-located with formula — impossible to add a formula without declaring its risk tier. classify.sh reads formula TOML.C.
vault/policy.tomlin ops repo. Operators update without a disinto PR; useful for per-deployment overrides.D. Hybrid: formula TOML carries default tier, ops
vault/policy.tomloverrides per-deployment. Most flexible; classify.sh merges two sources.Q3: Medium-tier dev-loop behavior
When dev-agent creates a vault PR for a medium-tier action, what does it do while waiting for human approval?
A. Non-blocking — fire vault PR and continue to next issue immediately. Most autonomous; sequencing becomes unpredictable.
B. Soft-block with 2-hour timeout — poll for PR merge every 15 min for up to 2 hours, then continue. Balances oversight with velocity.
C. Status-quo block (medium = high) — medium-tier blocks agent loop like today. Only low-tier gets unblocked. No change to dev-agent flow needed.
D. Label-based approval — agent polls for
vault-approvedlabel on vault PR. Human applies label to signal "proceed" without requiring immediate PR merge.Reply with your answers in the format:
Q1: A
Q2: C, is copied from the disinto repo during "disinto init"
Q3: C, i don't see a situation where the dev agent would need to get an approval, this is for predictor, planner, architect, deployments, releases, shipping. everything that the dev agent does is revertable in git, so doesn't need blocking
Sprint filed: #437, #438, #439, #440
Answers applied:
FORGE_ADMIN_TOKENvault/policy.tomllives in ops repo (seeded from disinto repo template duringdisinto init); classify.sh reads ops copy at runtime for per-deployment overridesSub-issues:
vault/classify.sh+vault/policy.toml: classification engine + policy templatelib/vault.sh: low-tier direct commit bypass (FORGE_ADMIN_TOKEN, no PR)dispatcher.sh: skipverify_admin_merged()for direct-commit low-tier TOMLsdocs/BLAST-RADIUS.md+vault/SCHEMA.md: tier documentationDependencies: #437 → #438 → #439; #437 → #440 (parallel with #438/#439).
Sprint sub-issues filed (#437-#440). Approving for merge.