Skip to content

sminos bridge: the backstop that turns a misplaced bridge off cannot see devcloud's guard where sminos is seated by managed settings (Claude Code 2.1.328 and later) #579

Closed

Description

@SSFSKIM

What happens

loadedGuard (sminos/hooks/mods/bridge.tsx) decides whether devcloud's secrets guard is loaded by reading devcloud's marker: $.state.get({ plugin: 'devcloud', key: 'secrets-guard' }), which devcloud's loaded module answers through its own state.get hook.

Claude Code 2.1.328 added a rule to the hook declarations (under Tier): "A person's hooks don't hear a call an organization's mod makes", an organization's mods being the plugins its managed settings seat in prepend or append. Probed on 2.1.329 in the test kit by the CI session while fixing #569: a prepend or append plugin's read of the marker passes devcloud's hook (devcloud loads in the user tier) and gets { value: undefined, version: 0 }; a user-tier plugin's read still gets the marker.

So where managed settings seat sminos in prepend (a devcloud host), the marker always reads not live. loadedGuard falls to the cua leg or to no guard, and the verdict is unguarded, or rests on cua's link.

What is lost

Not the bridge, which stays on, and not the placement itself: prependPlugins still seats sminos outside the guards. What is lost is the backstop of bridge-place.tsx: a bridge that did end up inside devcloud's guard on such a host would no longer turn itself off, and would post a call's input after the guard restored the secret bytes into it.

Not known

  • Whether the engine counts prependPlugins from the user settings (no managed settings) as the organization's. If it does, the same holds on every machine.
  • Whether a real session behaves as the test kit's stand-in does.

Why the tests do not show it

sminos/tests/mods/bridge-harness.ts answers the marker itself.

Directions

  • Judge devcloud's presence by something the tier rule does not hide. Its link in next.trace proves a guard beneath; the missing piece is proof of a guard loaded and outside, which the marker gave.
  • Or read the settings' intent for devcloud as the cua leg does (enabledPlugins), with that leg's known weakness (intent, not what is loaded).
  • Or have devcloud publish its presence in a form an organization's mod can read.

Whatever is chosen, a test that runs the read from the prepend tier, so the harness cannot answer for the engine.

Related: #569 (the same engine change, devcloud's side, fixed in #578).

Activity

  1. SSFSKIM commented on Nov 20, 2026

    @SSFSKIM
    OwnerAuthor

    The Macs are not in the devcloud host's state. Probed with the real engine (Claude Code 2.1.329, headless, a throwaway HOME with no managed settings, two plugins from a directory marketplace: owner, which answers a state.get of its own key from a hook, and reader, which reads that key in its session.start hook).

    user settings reader loads in reader's read
    no prependPlugins user the owner's answer
    "prependPlugins": ["reader@probe"] prepend (debug log: prependPlugins from user settings: reader@probe, tier prepend; owner/user beneath it in next.trace) the owner's answer

    So a plugin a person lists in prependPlugins is not the organization's for the rule "a person's hooks don't hear a call an organization's mod makes": its call still reaches a user-tier plugin's hooks. On the Macs sminos's read of devcloud's marker still gets the marker.

    Not probed with the real engine: managed settings (the devcloud host's case). That rests on the engine's declarations and on the test kit, where a prepend or append inline plugin's read gets { value: undefined, version: 0 }. The probe is at ~/.local/share/ci-opt/tier-probe on the MacBook (mk/ the marketplace, debug-user.log, debug-prepend.log).

    Sminos-Session: CI-opt#a45b97a3 (doperpowers on macbook)

  2. SSFSKIM commented on Nov 21, 2026

    @SSFSKIM
    OwnerAuthor

    Measured on the real engine under real managed settings (Claude Code 2.1.330, Linux container, managed settings at the system path, two probe plugins from a marketplace the managed settings declare: owner, which answers a state.get of its own key from a hook, and reader, which reads that key). Every row ran twice in fresh containers and agreed.

    managed settings seat user settings tiers the engine logged reader's read of the owner's key beneath the reader
    reader in prependPlugins owner enabled reader prepend, owner user the host's {version: 0}, no value; the log says the owner's hook was skipped because the organization's plugin raised the call owner (user), engine
    reader in appendPlugins owner enabled reader append, owner user the same engine only; the owner's own trace has the reader beneath it
    reader in prependPlugins owner enabled and listed in the user's prependPlugins the user's list is ignored ("set by managed policy"); owner user the same owner (user), engine
    reader in prependPlugins, owner enabled by the managed settings too none both prepend, the owner after the listed reader the owner's answer owner (prepend), engine

    What else it showed:

    • A marketplace declared as a directory source earns the organization's tier, listed or only enabled, although the declarations speak of a remote source. A git source behaves the same once installed.
    • The organization's hooks hear a person's call and can answer it, from prepend and from append; next.origin names the caller's plugin and tier.
    • $.settings.read({ source: 'policy' }) returns the managed file as written, and { source: 'user' } the user's, an ignored prependPlugins included.
    • Nothing hands a module its own tier directly, but a hook of the plugin hears a $ call another hook of the same plugin makes, and next.origin.tier there is the plugin's own tier (prepend and append both read back correctly).

    What follows for the bridge:

    • Seated by managed settings in prepend, the bridge is outside everything a person installs by the engine's own order, since a person's plugins are all in user there. The marker being hidden costs nothing in that seat. One case in today's code is wrong there all the same: with the marker hidden, loadedGuard falls to the cua leg, so where the user settings enable cua and cua's link is not beneath (enabled and not loaded), the verdict is off although devcloud's guard is beneath.
    • Seated by managed settings in append, the bridge is inside every guard a person installs and cannot see devcloud's: that is the seat in which today's code answers unguarded and stays on.

    Not measured: a plugin the organization requires in user (a hosted session's case), a copy whose hash does not match, an interactive start.

    Sminos-Session: channel-dev#222553cd (doperpowers on macbook)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions