chat: implement the sandbox dangerous-command authority (dashboard and Telegram approvals are both unwired) #1574

Closed
opened 2026-10-27 13:40:56 +00:00 by sam · 0 comments
Owner

/rollback and /stop approvals cannot work in ANY process, because the authority
they depend on has no production implementation.

EVIDENCE (all verified by hand at 8d3925a8, not inferred)

  • internal/webui/dangerous.go:47 NewDangerousService(authority) has ZERO
    production callers: rg --glob '!*_test.go' returns only the definition.
  • internal/webui/api_chat.go:614,631,653 guard on chat.Dangerous == nil and
    answer 501 Not Implemented with body "dangerous sandbox actions are not
    configured".
  • internal/app/archied/telegram_setup.go:132 assigns tg.Dangerous = s.Dangerous,
    but NO production construction of telegramSetup ever sets Dangerous. The only
    two non-test literals are bootstrap.go (setupGateways) and
    gateway_runtime.go:62 (setupGatewayChat), and both omit it.
  • git log -S 'Dangerous:' -- internal/app/ returns NOTHING: the field has never
    been supplied in any commit.
  • Therefore no implementation of messaging.DangerousCommandAuthority exists
    anywhere -- only webDangerousStub / dangerousStub in tests, no
    var _ messaging.DangerousCommandAuthority assertion, and no [dangerous]
    config key.
  • gateway.Router.Dangerous does not exist: it was deliberately removed in
    881b2c80 ("delete unwired Router.Dangerous approval path") because all four
    production Router constructions left it nil.

WHY THIS IS NOT A WIRING FIX
Wiring webui.NewDangerousService(nil) would yield a byte-identical 501 --
internal/webui/dangerous.go enabled() returns that same error for a nil
authority -- so it would be a no-op dressed as a fix. The missing piece is the
capability: a sandbox checkpoint/rollback authority owning checkpoints, pending
actions and decisions.

WHAT IT NEEDS
A decision on where the authority lives (it owns sandbox checkpoints/rollback,
so the container or daemon package is the natural owner) and how it crosses the
UI-service boundary. internal/app/archieui/compose.go:44-47 records that
Events/Curators/Workflows and friends have "no contract exists for these yet"
pending archie-core-8cda.5.3; dangerous actions are in the same class.

SCOPE NOTE
This is larger than the finding that surfaced it. .local/issue-tracker webui-1
framed it as "webui.DangerousService is never constructed" (a webui wiring
defect); the real gap is the absent authority, which leaves BOTH the dashboard
and Telegram's /rollback + /stop approval paths unwired.

Close reason

Obsolete: the dangerous-command authority no longer exists in the tree.


Imported from beads archie-core-sod1 · GitHub #939 · type feature · priority P2 · created 2026-09-18 · closed 2026-10-10

/rollback and /stop approvals cannot work in ANY process, because the authority they depend on has no production implementation. EVIDENCE (all verified by hand at 8d3925a8, not inferred) - internal/webui/dangerous.go:47 NewDangerousService(authority) has ZERO production callers: rg --glob '!*_test.go' returns only the definition. - internal/webui/api_chat.go:614,631,653 guard on chat.Dangerous == nil and answer 501 Not Implemented with body "dangerous sandbox actions are not configured". - internal/app/archied/telegram_setup.go:132 assigns tg.Dangerous = s.Dangerous, but NO production construction of telegramSetup ever sets Dangerous. The only two non-test literals are bootstrap.go (setupGateways) and gateway_runtime.go:62 (setupGatewayChat), and both omit it. - git log -S 'Dangerous:' -- internal/app/ returns NOTHING: the field has never been supplied in any commit. - Therefore no implementation of messaging.DangerousCommandAuthority exists anywhere -- only webDangerousStub / dangerousStub in tests, no `var _ messaging.DangerousCommandAuthority` assertion, and no [dangerous] config key. - gateway.Router.Dangerous does not exist: it was deliberately removed in 881b2c80 ("delete unwired Router.Dangerous approval path") because all four production Router constructions left it nil. WHY THIS IS NOT A WIRING FIX Wiring webui.NewDangerousService(nil) would yield a byte-identical 501 -- internal/webui/dangerous.go enabled() returns that same error for a nil authority -- so it would be a no-op dressed as a fix. The missing piece is the capability: a sandbox checkpoint/rollback authority owning checkpoints, pending actions and decisions. WHAT IT NEEDS A decision on where the authority lives (it owns sandbox checkpoints/rollback, so the container or daemon package is the natural owner) and how it crosses the UI-service boundary. internal/app/archieui/compose.go:44-47 records that Events/Curators/Workflows and friends have "no contract exists for these yet" pending archie-core-8cda.5.3; dangerous actions are in the same class. SCOPE NOTE This is larger than the finding that surfaced it. .local/issue-tracker webui-1 framed it as "webui.DangerousService is never constructed" (a webui wiring defect); the real gap is the absent authority, which leaves BOTH the dashboard and Telegram's /rollback + /stop approval paths unwired. ### Close reason Obsolete: the dangerous-command authority no longer exists in the tree. --- _Imported from beads `archie-core-sod1` · GitHub #939 · type feature · priority P2 · created 2026-09-18 · closed 2026-10-10_
sam added the mediumfeature labels 2026-10-27 13:40:56 +00:00
sam self-assigned this 2026-10-27 13:40:56 +00:00
sam closed this issue 2026-10-27 13:40:56 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: sam/archie#1574