Skip to content

bridge: a permission is raised with its call as the bridge's tool.call saw it, never the engine's restored input (7.189.3) - #276

Merged
SSFSKIM merged 4 commits into
mainfrom
bridge-raise-handle-form
Oct 19, 2026
Merged

SSFSKIM merged 4 commits into
mainfrom
bridge-raise-handle-form

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 19, 2026

Copy link
Copy Markdown
Owner

The leak

The engine's tool.check and classic.PermissionRequest come after every tool.call hook beneath the bridge. devcloud's secrets guard restores its handles ([secret:KEY] and the like) to their values in its tool.call hook, before next, and the check's input is pinned, so both the check and the dialog's PermissionRequest hold the restored call. The bridge kept that input (state.checks) and raised it (raisedFields), so a prompt for a call whose handle the guard restored carried the secret to the desk hub, where the pending table kept it. This happens whatever the hook-module order is.

The fix

  • The bridge's tool.call hook keeps each running call's input as it was handed it (Call.shown).
  • Its tool.check hook records that input beside the engine's (Check.shown). The engine's input still pairs the PermissionRequest, and it stays on the machine.
  • A permission is raised with the bridge's own view. An allow hands no input back (engineDecision), so the engine runs its own form.
  • A permission for a call the bridge did not see stays with the terminal, and a debug log line says so. Previously such a prompt was raised under a minted id carrying the engine's input.
  • A question is still raised as the engine gave it. The ask mod widens its dialog's questions beneath the bridge, and no guard restores values into a question.

The digest needs no change. The hub hashes the raised it was sent. The daemon's check_digest hashes the input served by the bridge child's GET /requests/<id>, which is that same raised event (sminos_bridge.request_info). So both sides hash the handle form. tests/sminos/test_rpcs.py::test_e_a_decision_is_bound_to_the_request_still_pending already pins that a digest over any other input is refused.

What the hub receives, by order

  • doperpowers seated outside devcloud (prependPlugins): the bridge's tool.call e is what the model wrote, so the raise, a resync's pending, and the call's tool events carry the handle. The result comes back after the guard has scrubbed it.
  • doperpowers inside devcloud (today's order: cua, devcloud, to-human, doperpowers): the bridge is handed the call already restored. Its raise therefore carries the value, as its tool call event and its result already do. The fix cannot close this order. Seating doperpowers outside devcloud is the only fix for it, and the owner applies that in settings.

Tests

  • tests/mods/bridge.test.ts has a fake guard composed beneath and outside the bridge's tool.call, with the engine's check and PermissionRequest beneath both.
  • Guard beneath the bridge: everything posted carries the handle and never the value, the engine decides and runs the restored call, and the allow carries no input.
  • Guard outside the bridge: the raise carries the value, the same as the call event does.
  • The permission tests now open their call through the bridge's tool.call, as the engine does. A new helper, called, keeps the call running until the test ends it or the turn is aborted.
  • With the fix reverted (the raise uses e.tool_input), the guard-beneath test and the "did not see" test fail.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)

SSFSKIM added a commit that referenced this pull request Oct 19, 2026
… question's raise pinned; DX5 and tech debt

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
@SSFSKIM

SSFSKIM commented Oct 19, 2026

Copy link
Copy Markdown
Owner Author

Review (doperpowers:reviewer-medium, run on opus): changes requested for one P2 finding only; the leak fix itself was confirmed. The reviewer found no path that posts the restored input, the digest consistent end to end, and no regressions.

  • P2, deferred to docs/doperpowers/TECH-DEBT.md: with doperpowers prepended, a settings PreToolUse updatedInput rewrite would run beneath the bridge, so the desk would draw and digest the model's call while an allow runs the rewritten one. No such rewriter sits beneath the bridge on the owner's machines today. Closing it needs either a rewritten flag carried through the daemon and hub, or matching the guard's handle grammar.
  • P3 fixes, in 654e82f:
    • The test's fake guard now answers the way devcloud's does: { result } with no text when it scrubbed something.
    • A question dialog's raised input is pinned to the engine's widened questions.
    • The DX5 raised row now describes the new behaviour, and a decision entry records it.
  • Also logged as tech debt: with doperpowers outside devcloud, the bridge's tool result event carries no text for a result the guard scrubbed. Nothing leaks, but the desk shows that result empty.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)

…l saw it, never the engine's restored input (7.189.2)

The engine's tool.check and classic.PermissionRequest come after every
tool.call hook beneath the bridge, where devcloud's secrets guard restores
its handles to their values (the check's input is pinned). The bridge kept
that input for its raise, so a prompt for a call with a restored handle
carried the secret to the desk hub, whose pending table kept it.

The bridge's own tool.call hook now keeps each running call's input as it
was handed it, the check records it beside the engine's input (which still
pairs the PermissionRequest), and a permission is raised with it. With
doperpowers seated outside devcloud (prependPlugins) that is the handle
form; the engine's form stays on the machine, since an allow hands no input
back. The digest needs no change: the hub and the daemon's check both hash
the input the raise carried. A permission for a call the bridge did not see
is left to the terminal; a question is still raised as the engine gave it
(the ask mod widens its dialog beneath the bridge). Seated inside the guard,
the bridge is handed the restored call, and raises it as its call event
already carries it.

Tests: a fake guard composed beneath and outside the bridge's tool.call,
with the engine's check and PermissionRequest beneath both; the permission
tests now open their call through the bridge's tool.call.

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
… question's raise pinned; DX5 and tech debt

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
@SSFSKIM
SSFSKIM force-pushed the bridge-raise-handle-form branch from 654e82f to 8a534bb Compare October 19, 2026 16:43
@SSFSKIM SSFSKIM changed the title bridge: a permission is raised with its call as the bridge's tool.call saw it, never the engine's restored input (7.189.1) bridge: a permission is raised with its call as the bridge's tool.call saw it, never the engine's restored input (7.189.2) Oct 19, 2026
…ise-handle-form; bump to 7.189.2

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
…orm; bump to 7.189.3

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
@SSFSKIM SSFSKIM changed the title bridge: a permission is raised with its call as the bridge's tool.call saw it, never the engine's restored input (7.189.2) bridge: a permission is raised with its call as the bridge's tool.call saw it, never the engine's restored input (7.189.3) Oct 19, 2026
@SSFSKIM
SSFSKIM merged commit 02ef424 into main Oct 19, 2026
8 checks passed
SSFSKIM added a commit that referenced this pull request Oct 19, 2026
…s-guide-roster; bump to 7.189.4

Conflicts only where both sides edited one line: CLAUDE.md's hooks/ row and
hooks.json's description (main's compact-offer figures, with the roster
clause kept), and the version manifests (main's side, devcloud 0.4.3 with
it, then bump-version.sh to 7.189.4).

Sminos-Session: smns-erb-71#b4948247 (doperpowers on macbook)
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