Skip to content

Every operation is on the dashboard or names why not, and the reach census gates it - #315

Merged
zlareb1 merged 25 commits into
mainfrom
feat/op-surfaces-gate
Nov 7, 2026
Merged

zlareb1 merged 25 commits into
mainfrom
feat/op-surfaces-gate

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Improvement

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

The reach census now knows the dashboard: every operation either has a dashboard call site or is named in server/operations/dashboard.py, with the reason it has none or as pending a control, and a unit test fails on an operation with neither. code.index_status reports the new dashboard reach kind.

Why

Every operation is served over HTTP and is in both generated SDKs, and MCP reaches every operation its hidden roster does not keep for people. The dashboard had no such rule: 199 of 355 operations had no control, and nothing said which of them a person needs. The reach census counted a dashboard call as a plugin_hook, so it could not tell the two apart either.

The rule this adds: an operation a person needs (to administer, review, inspect, configure, or delete with a confirmation) has a dashboard control; an operation only an agent or a client program calls is named with the reason. The 119 named today fall into an agent's own step, a code or tracker question an agent asks, a call from a client program (plugin hook, bot, CI job, import or sync script), a chat client's saved-message feature, or another operation the dashboard uses for the same thing. The 80 a person needs whose control is not built yet sit in DASHBOARD_PENDING, which may only shrink (the test holds its ceiling): the follow-up PRs add the controls by page and drop each op from it.

Scope and risk

  • server/operations/reach.py: a dashboard kind, from a quoted "/v1/<op>" call site in frontend/src (tests and test helpers aside; a test directory is skipped in every scanned tree). A bare operation name there (an audit label, a comment) is not a call. plugin_hook now scans integrations/ only.
  • scripts/codegen/op_reach_census.py: the scan and dashboard_violations, part of --check. The scan drops TypeScript comments with one regex that keeps escaped characters (a regex literal's \/) and strings (a ' or " string ends at its line, so JSX text's apostrophe is code).
  • server/operations/dashboard.py: the reasons and the pending set.
  • tests/unit/test_op_surfaces.py: an op only an agent calls (an agent step, a code or tracker question) is one an agent token may call; a loom_op call for each op off the hidden roster is rewritten to a tool call that resolves to that op, a hidden op answers OP_NOT_ON_MCP, and a read-only connection routes reads only; each dashboard_violations message has a case (the real registry's check is the census --check, test_op_reach_census.py); an op kept off MCP is never given an agent-only reason; every op a refusal names is one an agent can call; every op a reason names is on the dashboard; the pending set only shrinks. NOT_IN_DASHBOARD refuses an op named twice when it is built. Both SDKs carrying every op stays test_sdk_parity.py's.
  • server/transport/mcp_op.py: a refusal for an op kept off MCP names the dashboard only when the dashboard calls the op; one it does not call answers that it needs the user or an operator, and the refusal's error says the op is not on MCP. memory.unlock's says only the user unlocks, memory.search_trace's names loom_search with explain=true, erasure.status's names erasure.list, code.context_packs's names code.context_pack with pr_number, and the ops a client program calls (code.outcome, code.coverage.watch / unwatch, code.scip_ingest / scip_status, ui.vitals) name the op to call instead or say nothing is to be done. Tests hold the dashboard wording to dashboard reach, and every op a reason names to the dashboard calling it.
  • server/memory/domain/lock.py, server/memory/app/lock.py: the 423 LOCKED message and memory.lock's loosen refusal say only the user can unlock, without naming a dashboard control (the memory drawer PR adds one and names it again).
  • frontend/src/lib/canCall.ts drops the task.updates entry, which gated no call; frontend/src/api/tracker.ts has a comment naming the new reach kind.
  • The regenerated manifest moves every dashboard-only op from plugin_hook to dashboard. Four experimental ops whose only static reach was a bare name in frontend/src (an audit label, or a canCall entry that gated no call) become http_only: memory.cross_promote, namespace.snapshot, namespace.restore and task.updates (its tasks MCP toolset is not a reach kind). No stable op lost its reach.

Compatibility, rollout and rollback

  • Wire: refusal text. The OP_NOT_ON_MCP refusal's error now reads "<op> exists but is not callable on this MCP connection", and its instead changes for the ops above (code.context_packs included) and for the hidden ops the dashboard does not call. The 423 LOCKED message and memory.lock's loosen refusal no longer name a dashboard control. The op_reach map of code.index_status carries dashboard for ops the dashboard calls, and no longer carry plugin_hook for an op only the dashboard names; memory.cross_promote, namespace.snapshot, namespace.restore and task.updates now report http_only. The reach kinds count the core, atomic and all MCP listings only, so an experimental op on a curated roster alone (task.updates on tasks, as task.pull and task.heartbeat already are) reports http_only though an agent on that roster calls it. No op, field or default changed.
  • Operator steps: none.
  • Rollback: revert; the manifest is generated.

Tests

  • python scripts/codegen/op_reach_census.py --check: ok.
  • CI on the head runs the full unit suite; the merge waits for it green.
  • Run locally on the head: tests/unit/test_op_surfaces.py, test_op_reach_census.py, test_code_index_status_catalogue.py, every unit file naming a hidden-op refusal or a memory lock, test_public_copy.py, test_doc_links.py, test_agent_instructions.py.
  • make lint and make typecheck: ok. Frontend: npx vitest run src/lib/canCall passes; CI runs tsc, vitest and the build.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): Claude Code. I checked each reason in dashboard.py against the dashboard source and the op's handler.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • make format-check, make lint, make typecheck and make test-unit pass; the integration suite passes if server behaviour changed.
  • Generated files are regenerated in this PR, not by hand.
  • Docs under docs/ describe the system as it now is, and this description names any operator steps and wire changes.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers.
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.

🤖 Generated with Claude Code

@zlareb1
zlareb1 force-pushed the feat/op-surfaces-gate branch 2 times, most recently from dbdc418 to 2d56622 Compare November 7, 2026 07:43
zlareb1 and others added 25 commits November 7, 2026 08:56
The reach census learns a `dashboard` kind: a quoted "/v1/<op>" call site in
frontend/src, tests and test helpers aside. `plugin_hook` now means the
integrations only, so a dashboard read no longer counts as a plugin hook.

server/operations/dashboard.py names, per op the dashboard does not call,
why: an agent's own step, a code or tracker question an agent asks, a call
from a client program, or the other op the dashboard uses for it. The ops a
person needs whose control is not built yet sit in DASHBOARD_PENDING, which
only shrinks. tests/unit/test_op_surfaces.py checks every surface: HTTP
serves every op, MCP reaches every op its hidden roster does not keep for
people, both SDKs carry every op, and every op is on the dashboard or says
why not.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…omments skipped

- test_op_surfaces checks the ops loom_op's catalog names against the
  registry less the hidden roster, and pins DASHBOARD_PENDING as a set.
- The dashboard scan drops comments before it looks for a quoted path, and
  only the dashboard scan skips src/test.
- Reasons corrected: task.updates and namespace.validate are agent steps,
  memory.import and memory.cross_promote name their callers, memory.agents_list
  is pending, and the code and tracker reasons say what the pages answer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ps code in strings

- test_op_surfaces sends a loom_op call per op through mcp_op.route and checks
  the rewrite, the hidden refusal and the read-only rule; each
  dashboard_violations message has a case; the pending set test is a pinned
  equality.
- The comment stripper drops comment lines, JSX comments and a trailing //,
  so a "/*" inside a string no longer swallows the code after it.
- The search.query reason names the page that searches each plane, and the
  unused task.updates canCall entry goes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
… drops is tested

- The call-site comment in op_reach_census.py uses "/v1/<op>": the example
  scan read it as memory.pin's.
- The comment-stripping fixture quotes the path in every case, and the
  regex's comment names the two shapes it still reads as code.
- dashboard_violations checks names against the registry; each message has an
  exact-output case over patched sets. The MCP test checks the rewritten tool
  resolves to the op. PENDING_PINNED is the pinned set's name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
- An op kept off MCP with no alternative of its own tells the agent to ask the
  user in the dashboard; a test now holds that to the dashboard calling it or
  its control being pending.
- The ops a client program calls (memory.outcome, code.outcome, the coverage
  watch, the SCIP upload) and memory.search_trace get a refusal that says what
  is true: the op to call instead, or that nothing is to be done.
- DASHBOARD_PENDING has a ceiling set (PENDING_AT_MOST) it may only shrink
  under; the census-source test scans the census file alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ls it

- An op kept off MCP with no control on the dashboard answers that it needs
  the user or an operator, not "do it in the dashboard"; memory.unlock's says
  only the user unlocks; memory.search_trace's names loom_search with
  explain=true; ui.vitals's says nothing is to be called.
- Tests: a refusal mentioning the dashboard needs dashboard reach; every op a
  reason names is on the dashboard; the pending set is pinned both ways. The
  scan tests live in test_op_reach_census.py, and dashboard_violations checks
  names against the ops it is given.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…son's review

- The 423 LOCKED message and memory.lock's loosen refusal say only the user
  can unlock, without a dashboard control that does not exist.
- memory.outcome (a person validating or contradicting one memory) moves to
  DASHBOARD_PENDING; memory.cross_promote's reason says who makes it.
- The scan strips a `//` unless a URL's `:` or a quote comes right before it.
- The docs name the census --check as the gate for a missing reason.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…efusal branch is tested

- _without_comments walks the source, keeps quoted strings and drops // and
  /* */ comments, so a trailing block comment no longer counts as a call site.
- hidden_refusal's operator branch has a test; the refusal error says the op is
  not on MCP; memory.outcome's alternative names memory_keys, and
  code.coverage.unwatch says nothing is to be called.
- memory.cross_promote (an admin's copy) is pending, not exempt. The reason
  groups use dict.fromkeys. The docs, reach.py and the loom-change checklist
  say an op without a call site is named with a reason or pending.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…ings

- A regex literal's `\/` is kept as code, and a `'` or `"` string ends at its
  line, so JSX text's apostrophe no longer swallows the comments after it; both
  cases are in the scan fixture.
- The operator-refusal test checks the rule for every hidden op with no
  alternative of its own, so a control landing later leaves it true.
- The scan's constants are grouped; a comment names the reach kind the refusal
  reads.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
- erasure.status's refusal names erasure.list; memory.unlock's reads as one
  instruction; hidden_refusal's docstring says what the refusal carries.
- DASHBOARD_PENDING is held to a set it may not outgrow (PENDING_AT_MOST).
  The operator-refusal test checks the text an agent gets, not the branch.
- Docstrings: the census gate is test_op_reach_census.py; the `test`
  directory exclusion is the dashboard's helpers; template literals span
  lines; plugin_hook is an integration.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…is pinned

- memory.outcome is a person's review: its refusal no longer offers
  memory.outcome_run as the same write, and takes the operator default.
- DASHBOARD_PENDING is pinned both ways (PENDING_PINNED); every dotted name in
  a reason must be an op the dashboard calls.
- The docs name the census entry rule as it is; docstrings reflowed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…d no admin

- test_op_transport_contract already posts every op over HTTP; the route-path
  test goes and the docstring points there.
- An AGENT_STEP op is one an agent token may call (writer at most).
- dashboard_violations names its flag `called`; two paragraphs rewrapped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…er group sorted

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…s an agent can call

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…scan fixture tests the quote anchor

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…names are checked

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…shboard wording is tested both ways

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
…g set only shrinks

- dashboard.py and the guide name the sixth group of reasons.
- DASHBOARD_PENDING is held to PENDING_AT_MOST, so a control PR edits only
  dashboard.py.
- One plugin directory, no loop; dashboard_violations' flag is `named`;
  code.coverage.watch's refusal says it is a bot's watch.
- catalogue_facets' docstring names code.index_status only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: zlareb1 <[email protected]>
@zlareb1
zlareb1 force-pushed the feat/op-surfaces-gate branch from 04089d5 to 9e674ef Compare November 7, 2026 08:57
@zlareb1
zlareb1 merged commit afa392d into main Nov 7, 2026
38 checks passed
@zlareb1
zlareb1 deleted the feat/op-surfaces-gate branch November 7, 2026 09:28
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