Skip to content

fix(runtime): an addressed /automation/:ns/:name/(runs|trigger) under an unserved verb answers the automation domain, as its bare path does - #33926

Merged
objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/area-A5b-33026
Nov 15, 2026
Merged

objectstack-fleet[bot] merged 6 commits into
mainfrom
claude/area-A5b-33026

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steedos · project thread
Fixes #33026
Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:独立服务器上,带命名空间地址的 /automation/:ns/:name/runs、/automation/:ns/:name/trigger、/automation/trigger/:ns/:name 收到不支持的方法时,改由自动化领域回答(与不带地址的同一路由一致),不再由传输层回答。
  • 为什么改:同一路由因写法不同返回两种错误信封、两种 Allow;匿名调用者在带地址写法上拿到 405(暴露路由形状)而不是 401。
  • 风险与回滚:只在调度器里多声明三条「领域决定所有方法」的路由;已服务的方法照旧;回滚即还原该 PR。
  • 先看:packages/runtime/src/dispatcher-plugin.ts 新增的三行声明;automation-every-verb.hono.integration.test.ts 的新行与命名空间假数据。
  • 两分钟验证:pnpm --filter @objectstack/runtime exec vitest run src/automation-every-verb.hono.integration.test.ts,预期 57/57 通过。
  • 需要你做的:无,席位落地。

What changes

  • registerAutomationRoutes (packages/runtime/src/dispatcher-plugin.ts) declares three more patterns through domainDecidesEveryVerb (runtime(dispatcher): on the standalone server an anonymous non-POST to /api/v1/actions gets the adapter's 405 instead of the v18 401 floor — registerActionRoutes mounts POST only (the #23909 / #24024 gap, for /actions) #24228's mechanism): GET /automation/:ns/:name/runs, POST /automation/:ns/:name/trigger, POST /automation/trigger/:ns/:name. These are the addressed shapes (ADR-0150 D5) of the bare rows that were already declared. A verb the router cannot route on them now reaches dispatch(), so the anonymous floor answers 401 and the domain's automationRouteAllow answers 405 with Allow: GET / Allow: POST in the dispatcher's envelope.
  • Measured before the change, on a real Hono socket at 1e65a389: DELETE /api/v1/automation/crm/send_digest/runs answered 405, Allow: GET, HEAD, with an error.details envelope, for a signed-in and an anonymous caller alike. The bare DELETE /api/v1/automation/send_digest/runs answered the domain's 405 Allow: GET (signed in) and 401 (anonymous). The domain itself was never at fault: dispatched directly, the addressed shapes already answer its 405 (automation-addressed-route.test.ts). The gap was only the transport declaration. No edit to runtime/src/domains/automation.ts.

Tests

automation-every-verb.hono.integration.test.ts (both prefixes):

  • Added rows: DELETE / POST / PUT on /automation/crm/send_digest/runs, GET on /automation/crm/send_digest/trigger and GET on /automation/trigger/crm/send_digest. Each row has an anonymous 401 case and a signed-in domain 405 case.
  • Added controls: a served POST on both addressed triggers runs the flow; GET and DELETE on /automation/no_such_ns/send_digest/runs answer the dispatcher's 404 ROUTE_NOT_FOUND.
  • crm is installed through an ObjectQL registry double answering the holder table the address reads.
Ablation, one per declaration (scripts/ablation-replace.mjs, each restored to the HEAD blob with git diff HEAD empty)
  • Without :ns/:name/runs: Tests 14 failed | 43 passed (57). The failures are every addressed /runs row on both prefixes, plus the no-namespace DELETE control.
  • Without :ns/:name/trigger: Tests 4 failed | 53 passed (57). The failures are the anonymous and signed-in GET on /automation/crm/send_digest/trigger, on both prefixes.
  • Without trigger/:ns/:name: Tests 4 failed | 53 passed (57). The failures are the anonymous and signed-in GET on /automation/trigger/crm/send_digest, on both prefixes.

Acceptance notes

  • Same behaviour on a createHonoApp host (catch-all): it already handed every verb to dispatch(). No change there.

Verification

Readings at 9bdd492b, the head before the last origin/main merge. That merge brought no change to the three files here.

  • pnpm --filter @objectstack/runtime typecheck: exit 0.
  • pnpm --filter @objectstack/runtime test: Test Files 603 passed (603) / Tests 10934 passed | 19 skipped.
  • Direct dependents exercising the dispatcher on Hono: @objectstack/http-conformance test, Test Files 20 passed / Tests 292 passed. @objectstack/client package-addressing.test.ts, 83 passed.
  • automation-every-verb.hono.integration.test.ts: 57 passed (57).
  • eslint on both touched .ts files: exit 0.
  • dispatch-gates --commands: 67 run, reconciled with --ran (67 derived, 67 run). 65 exit 0. Two NOT MEASURED on prerequisites: check:dual-build-cjs-loads needs a full pnpm build; check:type-check-debt's inner build never got the lock.

Final head 39826829 (merge of origin/main, which carries #33721 and #33844 in packages/runtime): the scoped re-check (closure build, runtime typecheck, the every-verb, addressed-route, contract-mounts, clone-mount and route-ledger suites) is NOT MEASURED. The shared verify lock was held by another worktree's run for over 27 minutes. CI's Test Core runs the package on this head.


Generated by Claude Code

🤖 Generated with Claude Code

…not judged at the automation save doors

A getKnownChannels() list with any member that is not { id: string } is now
an unreadable registry (not judged), like a reader that throws or answers no
list; dropping such members left a roster that refused every channel. The
notify-channel-unknown-refused semantic entry now names every not-judged
case and the paths a refusal names. Data text only in packages/spec.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
The fold is split: that fix now lives on its own branch, and this branch
carries only the addressed automation route declarations.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/runtime, touching 8 documentable anchor(s).

5 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/api/client-sdk.mdx (via automation.execute (sdk, the route ledger binds it to POST /automation/:ns/:name/trigger), automation.listRuns (sdk, the route ledger binds it to GET /automation/:ns/:name/runs), automation.trigger (sdk, the route ledger binds it to POST /automation/trigger/:ns/:name), listRuns (sdk, the bare tail of client method automation.listRuns, bound to GET /automation/:ns/:name/runs), /automation/:ns/:name/trigger (route, a path literal in createDispatcherPlugin), /automation/trigger/:ns/:name (route, a path literal in createDispatcherPlugin))
  • content/docs/automation/flows.mdx (via automation.execute (sdk, the route ledger binds it to POST /automation/:ns/:name/trigger), listRuns (sdk, the bare tail of client method automation.listRuns, bound to GET /automation/:ns/:name/runs))
  • content/docs/deployment/production-readiness.mdx (via createDispatcherPlugin (symbol, a top-level function))
  • content/docs/plugins/packages.mdx (via createDispatcherPlugin (symbol, a top-level function))
  • content/docs/ui/actions.mdx (via automation.execute (sdk, the route ledger binds it to POST /automation/:ns/:name/trigger))

⛔ 3 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v17/17-0.mdx (via listRuns (sdk, the bare tail of client method automation.listRuns, bound to GET /automation/:ns/:name/runs))
  • content/docs/releases/v17/17-3.mdx (via automation.trigger (sdk, the route ledger binds it to POST /automation/trigger/:ns/:name))
  • content/docs/releases/v18/18-2.mdx (via automation.listRuns (sdk, the route ledger binds it to GET /automation/:ns/:name/runs), listRuns (sdk, the bare tail of client method automation.listRuns, bound to GET /automation/:ns/:name/runs))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 30 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 895783a1e864e0fe629c56b3c6315771ca87bf87 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from cd4012f47443d158ccc55c6456dfa5232312f589 — the merge of head 398268290209d2cec7309faa94c8b2221b9a2551 into base 895783a1e864e0fe629c56b3c6315771ca87bf87, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin cd4012f47443d158ccc55c6456dfa5232312f589 && git checkout cd4012f47443d158ccc55c6456dfa5232312f589
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 895783a1e864e0fe629c56b3c6315771ca87bf87 398268290209d2cec7309faa94c8b2221b9a2551 && git checkout -B drift-repro 895783a1e864e0fe629c56b3c6315771ca87bf87 && git merge --no-ff 398268290209d2cec7309faa94c8b2221b9a2551

node scripts/docs-audit/affected-docs.mjs --json 895783a1e864e0fe629c56b3c6315771ca87bf87

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 895783a1e864e0fe629c56b3c6315771ca87bf87 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3

Request: review · area S6 · review-c · head 398268290209d2cec7309faa94c8b2221b9a2551 · posted at 2026-11-15T14:27Z

Fixes #33026. Clause-②: no, Metadata-protocol: none. Premise corrected (claim 6893552783 restated): the fix is three domainDecidesEveryVerb declarations in dispatcher-plugin.ts, not the automation domain. Net +73 / -0 over 3 files (a revert pair of the split-off #32733 commit sits in history; the merge is squash). Dev report 6896073107 on #33026.


Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x

Review claim · head 3982682 · 2026-11-15T14:28Z (review-c, S6)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x

Review — PASS

Head-sha: 398268290209d2cec7309faa94c8b2221b9a2551
Reviewer: review-c (areas S5 + S6) · read 2026-11-15T14:29Z
Implemented-by: claude/area-A5b-33026 (S6 session_01QsR2jUZKdq3PK2Sab53cT3) · Reviewed-by: session_01QsR2jRMKz5NhWVrE4E1U5x

Read at the head: the net diff against its merge base (3 files, +73/-0; the 42667cd1/36d24369 pair nets to zero and the merge is a squash), card #33026 in full, and dispatcher-plugin.ts around the declarations (domainDecidesEveryVerb, the fallback seam, addressedAutomationRoutes).

  1. Premise and fix. The card's mechanism holds on main: only the two-segment /automation patterns and :name/runs were declared, so the three addressed mounts fell through to the transport's 405. The three new declarations name exactly the registered addressed mounts, with the same verb and spelling: get /automation/:ns/:name/runs, post /automation/:ns/:name/trigger, post /automation/trigger/:ns/:name. A declaration only feeds the fallback seam, which receives a request only after the router could not route it (resolveMountedRoute decides membership). So no served route is shadowed, and the CONTROLs (served POST on both trigger shapes still runs) pin that.
  2. Scope complete. The other addressed mounts (toggle, clone, runs/:runId…, connector connection) have bare counterparts that are not declared either, so there is no bare/addressed split left for them. The card names exactly these three.
  3. Pins. The five new rows reproduce the card's steps 2–3 (DELETE/POST/PUT on /runs, GET on both triggers) through the Hono socket, and each reads the door off the body (the dispatcher envelope, not the transport's details). The no-namespace CONTROL pins the 404 the changeset names. Ablations are in the reports (14/4/4 red, one per declaration).
  4. Clause-② no / Metadata-protocol none: right. No accept-set or schema moves. A refused request is still refused; only which door answers changes (the domain's 405/401 in place of the transport's 405). The anonymous caller now gets 401 ahead of 405, the same as the bare path. Patch changeset on @objectstack/runtime. Each sentence was checked against the diff and the card: the bare answer (405, Allow: GET, 401 anonymous), the addressed answer before (Allow: GET, HEAD, error.details), the list of verbs, the answer after (Allow: GET for /runs, Allow: POST for both triggers), "A served verb on an address … unchanged", and the no-namespace 404. All true.
  5. Gates not judged. At review time 14 succeeded, 16 were skipped and 18 were in progress, with none red. The scoped re-check on the merge head is NOT MEASURED (verify-lock timeout), as the report says; CI's check-runs stand in for it. Landing needs every check green on this head.

No must-fix, no should-fix.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3

席位核对

ACCEPT · area S6 lands PR #33926 at head 398268290209d2cec7309faa94c8b2221b9a2551 · 2026-11-15T14:51Z


Generated by Claude Code

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

Labels

documentation Improvements or additions to documentation size/s tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

1 participant