Repository navigation
docs(adr): ADR-0066 D4 cites isSameOriginApiTarget by symbol anchor, and the requiredPermissions docblock drops its door clause - #27965
Conversation
…requiredPermissions docblock drops its door clause Since the server half landed, the action door dispatches a same-origin `type: 'api'` action, so the docblock's "the door still refuses `type: 'api'`" clause is false and goes. Its console clause stays until step 3 lands. ADR-0066 D4's bare `isSameOriginApiTarget` citation becomes the symbol anchor held by check:adr-symbol-anchors. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4d1LtiXudcBaRgY2xRg
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 168 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 510bb6c38b02f541462074cef35b143897a7192e && git checkout 510bb6c38b02f541462074cef35b143897a7192e
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin bacb3e6a0ff6e8bfdeade49d6830e34fb5522589 701d54993ffd1e89db86dfb21d385bc933e0c8ad && git checkout -B drift-repro bacb3e6a0ff6e8bfdeade49d6830e34fb5522589 && git merge --no-ff 701d54993ffd1e89db86dfb21d385bc933e0c8ad
node scripts/docs-audit/affected-docs.mjs --json bacb3e6a0ff6e8bfdeade49d6830e34fb5522589 |
|
domain:skills#2 · os-elon-musk · session_016WV4d1QkPVVzNz3FJqb2iS Contract-review-claim: session_016WV4d1QkPVVzNz3FJqb2iS · head 701d549 · 2026-10-30T05:33Z |
|
domain:skills#2 · os-elon-musk · session_016WV4d1QkPVVzNz3FJqb2iS Contract reviewServed-tier: Inputs: ① Derived judgments
② Semver levelNo release. ③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS Must-fix: none. Should-fix:
|
|
domain:skills#2 · os-elon-musk · session_016WV4d1QkPVVzNz3FJqb2iS 维护者速读
席位意见:ACCEPT。契约复核 PASS,没有 must-fix。should-fix 1:ADR-0066 的 Status 行仍是现在时("The server half lands under #27506"),转到 #27694 第二遍,与删控制台子句一起改,因此本 PR 写 席位核对
|
Requested by Elon · project thread
Part of #27694
Clause-②: no
Metadata-protocol: none
维护者速读
isSameOriginApiTarget的裸名引用改成符号锚packages/runtime/src/action-execution.ts#isSameOriginApiTarget,由check:adr-symbol-anchors守住;同时删掉那句「符号上 main 后由 docs(adr): after the api-action door lands, rewrite ADR-0066 D4's isSameOriginApiTarget citation into a symbol anchor and drop the requiredPermissions docblock's "Landing" door clause #27694 改写」的待办。requiredPermissions文档注释的「Landing」段删掉「门禁仍拒收type: 'api'」这一条款,控制台条款保留。type: 'api'action is dispatched through the action doors, so its packaged-action switch holds (#27506) #27649 已合并,平台动作门禁现在会派发同源type: 'api'动作。随@objectstack/spec的.d.ts发出去的注释还说门禁拒收,这对作者和 agent 是错话;ADR 用裸名引用,代码改名也没有门禁会发现。.describe()、不改代码、不发布(skip-changeset);回滚即 revert 这一个提交。packages/spec/src/ui/action.zod.ts的requiredPermissions注释末段(Landing 段),再看docs/adr/0066-unified-authorization-model.mdD4 第二段的那处引用。pnpm check:adr-symbol-anchors,预期 exit 0,计数为 611 个符号锚(585 个声明锚),比 main 上的 610 多一个,多出的就是这条锚,此后符号改名或挪走会转红。packages/spec/src,落地为 Tier H,由受管批准人批准。What changes
Two files, +5 / −7, on base
ca54eaca.docs/adr/0066-unified-authorization-model.md, D4 "Scope of the server half". The same-origin definition cited the predicate by bare name, "as the server card'sisSameOriginApiTargetjudges it", followed by a parenthetical that scheduled this very rewrite ("once the symbol is onmain, card docs(adr): after the api-action door lands, rewrite ADR-0066 D4's isSameOriginApiTarget citation into a symbol anchor and drop the requiredPermissions docblock's "Landing" door clause #27694 rewrites this citation into a symbol anchor…"). The citation is now the symbol anchorpackages/runtime/src/action-execution.ts#isSameOriginApiTarget, and the scheduling clause is gone. The rest of the parenthetical stays: "PR fix(runtime)!: a same-origintype: 'api'action is dispatched through the action doors, so its packaged-action switch holds (#27506) #27649; the door holds the interpolated path to the same test before it forwards".packages/spec/src/ui/action.zod.ts, therequiredPermissionsdocblock, paragraph "Landing, as of 2026-10-29". The door clause goes: "Until it lands the door still refusestype: 'api'(isHeadlessInvokableActionadmitsscript,flowand the declarative update only)". It is false since fix(runtime)!: a same-origintype: 'api'action is dispatched through the action doors, so its packaged-action switch holds (#27506) #27649. The paragraph now says the server half (step 2, Packaged action activation: switching off an api-type packaged action (Ban User) does not stop it, because the activation consult runs only at action dispatch #27506) is onmain(fix(runtime)!: a same-origintype: 'api'action is dispatched through the action doors, so its packaged-action switch holds (#27506) #27649). The console clause stays, because Console: send a same-origintype: 'api'action click throughPOST /actions/:object/:actioninstead of fetching itstargetdirectly (ruling on #27506, step 3 of 3) #27611 is still open: "Until step 3 (Console: send a same-origintype: 'api'action click throughPOST /actions/:object/:actioninstead of fetching itstargetdirectly (ruling on #27506, step 3 of 3) #27611) lands the console fetchestargetdirectly; card docs(adr): after the api-action door lands, rewrite ADR-0066 D4's isSameOriginApiTarget citation into a symbol anchor and drop the requiredPermissions docblock's "Landing" door clause #27694 removes this paragraph when it does."No
.describe()changes, no code, no generated file.Why
main.isHeadlessInvokableActionadmitstype: 'api'whenisSameOriginApiTarget(action?.target)holds, andheadlessActionTypeErroranswersnullfor a same-origin api action. Both are inpackages/runtime/src/action-execution.ts, and fix(runtime)!: a same-origintype: 'api'action is dispatched through the action doors, so its packaged-action switch holds (#27506) #27649 (481ade61c, an ancestor of the base) put them there. The docblock ships in@objectstack/spec's.d.ts, so authors and agents were told the door refuses a call it now runs.apiHandlerinui/packages/app-shell/src/hooks/useConsoleActionRuntime.tsxstillauthFetches the resolvedtarget, and Console: send a same-origintype: 'api'action click throughPOST /actions/:object/:actioninstead of fetching itstargetdirectly (ruling on #27506, step 3 of 3) #27611 is open.isSameOriginApiTargetreturnsfalsefor a non-string, for a string shorter than 2, for one not starting with/, and when the second character is/or a backslash. That is the ADR's "starts with exactly one/and goes on past it (/alone,//hostand/\hostare not)". The forward re-tests the interpolated path (if (!isSameOriginApiTarget(path))inbuildApiActionRequest, which assembles the request the forward sends), which is "the door holds the interpolated path to the same test before it forwards".Deviations from the dispatch order
targetdirectly"), where "it" was the server half. Deleting the door half alone would leave "Until it [the server half] lands the console fetchestargetdirectly". That is false: the server half has landed and the console still fetches. The last sentence scheduled two removals, and one of them is this PR. So the paragraph keeps the console clause, ties it to step 3, and keeps the pointer to docs(adr): after the api-action door lands, rewrite ADR-0066 D4's isSameOriginApiTarget citation into a symbol anchor and drop the requiredPermissions docblock's "Landing" door clause #27694 for the second pass. The date "as of 2026-10-29" is kept: fix(runtime)!: a same-origintype: 'api'action is dispatched through the action doors, so its packaged-action switch holds (#27506) #27649 merged 2026-10-29T21:32Z, so every statement in the paragraph was already true on that date.path#symbolanchors after the [finding] ADR line anchors intosql-driver.tshave rotted — 4 of 4 sampled resolve to unrelated code, and the ADRs read as if they still point at the mechanism they name #13556 line→symbol migration, and only one carries an "Anchor note" (ADR-0113). That note exists because its re-anchoring dropped to file level and the row it anchors is stale. ADR-0097's and ADR-0099's dated notes record changes of meaning. This rewrite changes no meaning. It also carries out a step the 2026-10-29 amendment itself scheduled, under the paragraph's existing "api clause amended 2026-10-29, Ruling-ref: 6499781492" label. So it follows the no-note precedent of the anchor migration.Acceptance notes
These go stale with #27649 but are outside this card's file surface or its ruling, so they are left as is:
type: 'api'action is dispatched through the action doors, so its packaged-action switch holds (#27506) #27649).type: 'api'… so no agent can invoke atype: 'api'action today". It is a dated record and its condition ("until step 2 lands") is spent. It is not edited: an amendment note is a record of its date. Carrier: docs(adr): after the api-action door lands, rewrite ADR-0066 D4's isSameOriginApiTarget citation into a symbol anchor and drop the requiredPermissions docblock's "Landing" door clause #27694's second pass, which the maintainer can widen if wanted.Verification
All readings are on head
701d5499(baseca54eaca).dispatch-gates: 74 derived families, 74 exit 0
node scripts/pm/dispatch-gates.mjs --commandswas run with no paths, on the committed diff against merge baseca54eaca. It derives 74 families, and all 74 were run with exit codes captured before any pipe. Prerequisites werepnpm install --frozen-lockfile --ignore-scriptsandturbo run build --filter=@objectstack/spec --filter=@objectstack/formula --filter=@objectstack/lint. Two families first exited 3 (PREREQUISITE NOT MET:check:dual-build-cjs-loads,check:lean-entry-closure, both needing built dist outside spec). After a whole-treeturbo run build(lock VERDICT command-exit 0), both exited 0: 113 published require entry points across 70 packages load, and the objectql/core admitted set holds exactly.check:dts-closure,check:sourcemap-no-sources-contentandcheck:published-fileswere re-run over the whole built tree: exit 0, 115 / 108 / 74 packages swept.--ran:74 derived famil(ies) accounted for — 74 run, 0 NOT-MEASURED. Re-derived after the run, the list was identical.The ADR gates in the list:
check:adr-symbol-anchors,check:adr-anchors,check:adr-index,check-adr-links.mjs(+--self-test),check-adr-0087-registration.mjs, all exit 0.check:adr-symbol-anchorscounts 611 symbol anchors (585 declaration) and 2161 file-level on this head, against 610 (584) and 2162 onca54eaca. The bare-path citation ofaction-execution.tsbecame a declaration anchor, so the new anchor is in the gated population. Spec-docblock gates:check:spec-docblock-symbol-anchors,check:docs,check:api-surface,check:authorable-surface, all exit 0.check:nul-bytesexit 0.@objectstack/spec typecheck and tests
pnpm --filter @objectstack/spec run typecheck: lock VERDICT command-exit 0.pnpm --filter @objectstack/spec run test:Test Files 756 passed (756),Tests 22481 passed | 1 todo (22482), lock VERDICT command-exit 0.git merge-treeagainstorigin/mainbacb3e6ais clean, and no commit since the base touched either file.--tieranswers MANDATORYclaude-fable-5-1fordocs/adr/**. The claim records the proactive low-headroom downgrade, compensated by the contract-tier review. Changed lines: 12 (+5 / −7), under the 3000 threshold.Contract review owed: governed
docs/adr/**andpackages/spec/src/**, atCONTRACT_REVIEW_TIER. That review also answers the Clause-② path leg onpackages/spec/src/**. Landing is Tier H.Human Minimum
packages/specholds no runtime logic. (a JSDoc comment only)pnpm lintpasses (prose only; the full run is CI's).main, one pull request..describe()and no code, soskip-changeset. Both declaration lines are above.packages/spectouched: nothing to regenerate. The change is a JSDoc comment. After the spec build and all 74 gate runs, the tree was clean (git statusempty), andcheck:docsexited 0.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code