fix: dispatcher.sh: handle direct-commit low-tier vault actions (#439) #455
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#455
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-439"
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?
Fixes #439
Changes
AI Review
Summary
This PR connects the low-tier direct-commit path (introduced in #438) to the dispatcher. Without it, the dispatcher would reject every low-tier action because
verify_admin_mergedfinds no PR for files committed directly to ops main. The three-part fix is coherent:dispatch_mode = "direct"to the TOML before committing it to ops mainget_dispatch_mode()reads the field;launch_runner()skips admin merge verification for direct-mode actionsdispatch_modeto the allowlist so validation doesn't reject itBackward compatibility is preserved — files without the field default to
"pr"mode.Findings
medium
lib/vault.sh:179/vault/vault-env.sh:76:dispatch_modeis now a validated known field, meaning an agent can includedispatch_mode = "direct"in the TOML content it passes tovault_request(). For medium/high-tier actions the originaltoml_contentis written to the branch as-is (notdirect_toml), so if an agent embeds this field, the dispatcher will skipverify_admin_mergedfor that action — even though it arrived via a PR. The safety net is that an admin must still merge the PR, but the dispatcher-level check is a second line of defense. A defense-in-depth improvement: inlaunch_runner(), ifdispatch_mode = "direct"butVAULT_TIER != "low", log an error and reject. This would be a clean follow-up issue.minor
docker/edge/dispatcher.sh:306: The updated doc comment claimsvalidate_actionsetsVAULT_DISPATCH_MODE, but neithervalidate_action()nor the underlyingvalidate_vault_action()exports that variable. The dispatch mode is read separately viaget_dispatch_mode(). The comment should dropVAULT_DISPATCH_MODEfrom the "Sets:" line.No issues found
vault.sh(line 179) correctly covers both$tmp_tomland$direct_toml— the second trap supercedes the first as intended.get_dispatch_mode()defaults to"pr"for unknown/missing values, so any unrecognised mode falls through to the admin verification path safely.Verdict
APPROVE — Fix is correct and complete; two minor concerns flagged below, neither blocking
Reviewed at
605fc13| AGENTS.mdAI Review: APPROVE — Fix is correct and complete; two minor concerns flagged below, neither blocking