Skip to content

docs(skills): a clashing flow function name leaves the later package's functions and hooks unbound, not refused at install - #33668

Merged
os-zhuang merged 1 commit into
mainfrom
claude/project-thread-vmehq6
Nov 15, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/project-thread-vmehq6

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread

Fixes #33569

Clause-②: no
Metadata-protocol: none

Signed: domain:skills#1 · os-project-manager · session_01FEkQ5mpzgKr4dbZVjCqjSv

维护者速读

  • 改了什么:objectstack-automation 技能「Valid-but-silently-wrong」第 3 条里,把「同一命名空间(或无命名空间)的第二个包声明同名流程函数会在安装时被拒」改成实际行为:启动时两包都已持有则告警 Bare-name conflict at boot;启动后再装的包照样装上,但它的绑定整体失败(error 日志 Failed to bind declarative hooks),它的所有函数和钩子都不生效,不冲突的那些也一样。补救办法不变:改名,或换一个命名空间。
  • 为什么改:旧说法让作者以为会被响亮拒绝;实际是装上了却静默不工作,流程的 script 步骤要么因找不到函数而失败,要么(依赖了先持有的包时)悄悄跑了别人的函数。
  • 风险与回滚:只改技能文字与一个 patch changeset,不碰 schema、运行时与 eval;回滚即还原本 PR。文件 token 仍在上限内(6861 / 6861),靠在同文件里缩短两处重复说明付账,未抬上限。
  • 先看:skills/objectstack-automation/SKILL.md 第 263–279 行。
  • 两分钟验证:git diff origin/main -- skills/objectstack-automation/SKILL.md,应只见第 3 条这一段与其后 outputVariable 一句的改动。
  • 需要你做的:受管面 Tier H(skills/**),席位的达档契约复审 PASS 记录在案后,请合并。

What changes

Item 3 of "Valid-but-silently-wrong" in skills/objectstack-automation/SKILL.md. Old text: "Packages of two namespaces each run their own normalize_phone (one namespace, or none: refused at install; a boot warns Bare-name conflict at boot)." New text:

Packages of two namespaces each run their own normalize_phone. One namespace (or none): both held at boot warn Bare-name conflict at boot; a later one installs but binds NONE of its functions or hooks (error Failed to bind declarative hooks): rename, or another namespace.

This is should-fix F1 of the at-tier retro review of merged PR #33396 (record 6886826237), with nit F3 folded in: the old parenthesis merged two moments, a pair both held at the boot and a new holder bound after it. The new sentence gives each its own clause.

Each claim, read on main @ 7f0e38a

Claim Code
Two namespaces each run their own (unchanged) packages/objectql/src/registry.ts:5520-5523 (bareNameHoldersOtherThan with incomingNamespace: a holder of another namespace is no conflict); packages/core/src/package-scoped-resolution.ts:753 (step 1, the caller package's own item)
Both held at boot: the boot warns Bare-name conflict at boot Before the seal claimBareNameFunctions only records (registry.ts:5517, the throw is inside if (this.bareNameHoldersSealed)); the AppPlugin binds in start() (packages/runtime/src/app-plugin.ts:1413, call at :1865) and the seal runs later at kernel:bootstrapped (packages/objectql/src/plugin.ts:1372-1383), where sealBareNameHoldersAtColdBoot logs bareNameColdBootWarning (registry.ts:3044, text opens "Bare-name conflict at boot" at :2957)
A later one installs The bind after the seal throws BareNameConflictError (registry.ts:5530) from bindHooksToEngine (packages/objectql/src/hook-binder.ts:221); bindAppArtifactHandlers catches it per owner group and logs it (packages/runtime/src/app-artifact-handlers.ts:415-443, "Never throws" at :89), so neither caller sees a throw: AppPlugin start() (app-plugin.ts:1865) and the install-local plugin, which binds an installed package on install (packages/cloud-connection/src/marketplace-install-local-plugin.ts:6611-6615)
...but binds NONE of its functions or hooks The claim runs ahead of every registerFunction (hook-binder.ts:221 before :236) and ahead of the hook half (:249 onward), so the throw leaves both empty for that owner group, the non-clashing names included. Pinned by packages/objectql/src/registry-bare-name-one-holder-request-family.test.ts:586-602 (beta_only_fn stays unregistered)
(error Failed to bind declarative hooks) app-artifact-handlers.ts:442, logger.error
What the author then sees (not written into the sentence; it follows from it and the next sentence) Its flows read the clashing name as a package holding none: one holder only outside the dependencies closure refuses outside-closure as a guard (package-scoped-resolution.ts:769-774), a holder inside the closure runs that package's function (step 2, :756-767). A non-clashing name has no holder at all and fails as unregistered (packages/services/service-automation/src/builtin/screen-nodes.ts:663-668)
Remedy: rename, or another namespace Rename: the boot warning's own remedy (registry.ts:2960-2961) and the card. Another namespace: two holders of different declared namespaces never meet, so the bind is not refused (registry.ts:5520-5523)

Token budget, paid in place

The file sat at 6859 of 6861 (priced bytes 27435). The rewrite costs +129 bytes, paid in the same file:

  • The flow door clause "a flow door answers 400 FLOW_FAILED, error.details.innerRefusal naming each holder" becomes "a flow door's innerRefusal names each holder". Home: skills/objectstack-api/SKILL.md:356-365 teaches the flow door's 400 FLOW_FAILED and error.details.innerRefusal, naming a script node's function-name refusal.
  • "(registered under no package)" becomes "ownerless", the word the file already uses for the same idea (§ Assignment rules).
  • "(below)" after defineStack({ functions }) is cut; the example sits right under it.
  • The pure-compute paragraph's "config.outputVariable exposes that value as a flow variable, and a later declarative node persists it" becomes "a later declarative node persists its outputVariable"; the example under it shows outputVariable: 'ai' read as ai.ai_category. The eval that expects outputVariable (flows-triggers-approvals) is still served by that example.

Result: 27444 priced bytes, 6861 of 6861, headroom 0. Ceiling not moved. Lines: 463 before, 463 after. Package total of all SKILL.md files: unchanged in lines; tokens +2 (the file's headroom).

Tests

Skill wording only: no package is touched, so no package test or typecheck is owed and no ablation applies. The claims are read against the code and the pinning test named above.

Acceptance notes

  • Code-side texts that use the same loose wording belong to the objectql owner and are NOT edited here (order ruling): packages/objectql/src/hook-binder.ts:214-216 still says the function bind refusal "stays until the trailing backstop child (ADR-0150 D9) narrows it", which has narrowed (bareNameHoldersOtherThan with the namespace); bareNameColdBootWarning (packages/objectql/src/registry.ts:2959-2960) says "a further package declaring the name is refused at install", which for a function is the bind failure above. The seat files a card.
  • .changeset/32522-skills-automation-function-name-per-namespace.md, still unreleased, carries the old "refused at install" sentence. It is not edited here (outside this card's surface); this PR's changeset states the correction, so both entries ship in the same release notes.

Verification

  • dispatch-gates --tier: MANDATORY claude-fable-5-2 (skills/**, clause ①, no one-line exit). This thread ran on an opus-tier model; the at-tier review is the seat's.
  • check-governed-merges.mjs --branch claude/project-thread-vmehq6: exit 3, GOVERNED, landing tier H, skills/** ×1; +23 / -13 over 2 files, under the human-merge threshold.
  • Ratchets on head 08401f6: check-skills-token-ratchet exit 0 (6861 / 6861); check-skill-line-ratchet exit 0.
  • Derived gates (dispatch-gates --commands), run on head 08401f6 after turbo run build --filter=@objectstack/formula --filter=@objectstack/lint under the verify lock (VERDICT command-exit 0): 46 derived, 44 exit 0, 2 exit 3 NOT MEASURED (check:dual-build-cjs-loads, check:lean-entry-closure: they read every package's dist; no package is touched, CI runs them). dispatch-gates --ran: 46 accounted for, 44 run, 2 NOT-MEASURED, 0 UNRUN.
46 gates, each with its exit code
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-doc-route-spelling.mjs --advisory :: exit 0
node scripts/check-doc-route-spelling.mjs --self-test :: exit 0
node scripts/check-dts-emitted.mjs --self-test :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-skills-token-ratchet.mjs :: exit 0
node scripts/check-skills-token-ratchet.mjs --self-test :: exit 0
node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0
node scripts/ci/snapshot-next.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --filter @objectstack/lint run check:doc-formula-expressions :: exit 0
pnpm --filter @objectstack/spec run check:skill-docs :: exit 0
pnpm check:agent-test-spelling :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:corpus-claim-drift :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:doc-authoring :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:dts-closure :: exit 0
pnpm check:dual-build-cjs-loads :: exit 3
pnpm check:gitlink-declared :: exit 0
pnpm check:lean-entry-closure :: exit 3
pnpm check:merge-driver :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:pm-governed-merges :: exit 0
pnpm check:pm-skill-id-lint :: exit 0
pnpm check:published-files :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:role-word :: exit 0
pnpm check:skill-compatibility :: exit 0
pnpm check:skill-frame-sync :: exit 0
pnpm check:skill-identifier-liveness :: exit 0
pnpm check:skill-links :: exit 0
pnpm check:sourcemap-no-sources-content :: exit 0
pnpm check:watch-hint-literal :: exit 0
  • Every family CI runs beyond the derived list: read off this PR's check-runs.

Generated by Claude Code

…s functions and hooks unbound, not refused at install

The automation skill said a second package holding a function name of the
same namespace (or of none) is refused at install. No install door judges a
function: the hook binder's bind refuses it, the runtime binder logs
"Failed to bind declarative hooks" at error, and the package installs with
none of that owner's functions or hooks bound. Say so, keep the remedy, and
separate the boot-time warning from the later bind. Paid in place: the flow
door answer (home: objectstack-api) and the outputVariable gloss shortened.

Claude-Session: https://claude.ai/code/session_01FEkQ5mpzgKr4dbZVjCqjSv
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 08401f6aadc452a1bba675a1de69b94d729b1fd7
Local-runs: none
Scope: skills/objectstack-automation/SKILL.md + none

Inputs read: card #33569 (body, triage, claim, os-dev-report), PR #33668 (body, 2 files, net diff against merge base 7f0e38a2), the check-runs on the head, and the cited code on main e9884e19 (read, not reviewed). main has moved past the merge base only in two eval JSON files of this skill; SKILL.md and every cited code file are unchanged there.

① Derived judgments

  • Accept sets, schemas, runtime behaviour: none changed. The diff is 13 lines of one skill file and one new changeset. Right.
  • Public surface: the published text of @objectstack/skills changes in item 3 of "Valid-but-silently-wrong". Right, and it is the change the card orders.
  • Token ceiling: the PR pays in place (6861 of 6861 claimed, ceiling and line count unmoved). The verdict on that is the token-ratchet and line-ratchet check-runs, not the PR body.
  • Check-runs on the head at review time: 41 runs, 14 success, 16 skipped, 0 failed, 11 still in progress (Test Core 1/8 and 2/8, Live E2E UI, Type Check consumer gates, source gates, debt ledger and workspace, Lint repo and tooling gates, Lint CI release and engine gates, Lint ESLint, Lint docs and code guards). Completed green include Check PR Size, Governed Surface Queue Guard, PR-body guards, the three scoped Lint runs, Dogfood Regression Gate. This record judges the design; the adopting seat reads the 11 pending runs to green before it lets the record carry a merge. A red one among them is a gate FAIL this record does not cover.

② Semver level

'@objectstack/skills': patch matches what the diff publishes: a wording correction of a skill, no schema, no accept set. Clause-②: no and Metadata-protocol: none stand on both the PR body and the changeset, and are right: nothing an author could write before is refused now, nothing is narrowed.

③ Boundary flags

  • open_questions: empty.
  • Deviation, model tier (dev ran below the mandated tier): answered by this at-tier review.
  • Deviation, token payment touching four passages outside the sentence: judged in ④ (N2, N3); accepted.
  • Deviation, what the author sees is not written into the sentence: accepted. It follows from "binds NONE" plus the next sentence, and the code agrees: a non-clashing name of the unbound package has no holder and the script node fails "no function named ... is registered" (screen-nodes.ts L661-668); the clashing name resolves as for a package holding none (runs a dependency's function, or the guard refusal).
  • Deviations on the PR signature line and the commit trailer: process, the seat's; no contract effect.
  • Out-of-scope findings (stale hook-binder.ts L214-216 note; bareNameColdBootWarning saying "refused at install" for a function, registry.ts L2959-2960): confirmed as described on main, correctly left unedited, carrier is the seat. Note the second one is the runtime text an operator reads in the very warning the skill now cites, so it now disagrees with the skill; the follow-up card should not be dropped.
  • Old changeset .changeset/32522-...: see N1.

④ Design judgment

skills/objectstack-automation/SKILL.md, the new sentence, claim by claim against main:

  • "Packages of two namespaces each run their own" (unchanged): holds. claimBareNameFunctions passes incomingNamespace; namespacedHoldersMeet returns false only when both are declared and differ.
  • "One namespace (or none)": holds. A package declaring no namespace meets every holder (namespace-prefix.ts L224).
  • "both held at boot warn Bare-name conflict at boot": holds. Before the seal claimBareNameFunctions only records (the throw sits inside if (this.bareNameHoldersSealed)); the seal runs at kernel:bootstrapped and sealBareNameHoldersAtColdBoot logs bareNameColdBootWarning under BARE_NAME_COLD_BOOT_MODE = 'warn'. Both packages stay bound.
  • "a later one installs": holds. After the seal the claim throws BareNameConflictError inside bindHooksToEngine; bindAppArtifactHandlers catches per owner group (L414-444, "Never throws"), and both callers that bind a package (AppPlugin start, install-local bindArtifactHandlers) see no throw. No install door judges a function.
  • "but binds NONE of its functions or hooks": holds. The claim runs ahead of every registerFunction and ahead of the hook loop in the same call, so the owner group's non-clashing functions and all its hooks (body hooks included) are left out. Pinned by registry-bare-name-one-holder-request-family.test.ts ("registers nothing", beta_only_fn undefined). Correctly limited to functions and hooks: the action half still binds.
  • "(error Failed to bind declarative hooks)": holds, logger.error at app-artifact-handlers.ts L442, exact string.
  • "rename, or another namespace": rename always works; see N4 for the edge of the second remedy.
  • F3: done. The pair held at boot and the holder arriving after boot are two clauses with two different outcomes, each true.

Attempts to break it: a second bind route that would let the throw escape (the two other bindHooks callers bind under metadata-service with no functions, so they never reach the claim); a package of several owner groups (the catch is per group, and "its" reads per package for the one-group case the sentence addresses); the eval prompts (no eval of this skill cites FLOW_FAILED, innerRefusal, normalize_phone or the boot warning; the outputVariable evals are served by the example and by item 2). None breaks the sentence.

Findings: no must-fix, no should-fix.

  • N1 (nit, changeset prose). The new changeset states the correction of the unreleased 32522-skills-automation-function-name-per-namespace entry instead of editing it. Acceptable, and the dev was right not to touch a file outside the claimed surface, but it is the weaker choice: both entries land in one release, so the changelog will print "the later bind is refused at install" and, a few lines away, its retraction. An unreleased changeset is still a draft; amending that one clause (to "the later bind fails and the package's functions and hooks stay unbound") is the cleaner result. Recommended as a one-line follow-up by the seat; not a condition of this PASS.
  • N2 (nit). "ownerless" replaces "(registered under no package)". In context ("the platform's ownerless function in every flow's reach", in a paragraph about packages) it reads the same, and the code's own word is "owner-less (platform) function". But the file's two other uses (Assignment rules, L342 and L350) mean a record with no owner, a different thing, so the word now carries two senses in one file. No rule is lost because "the platform's" already carries the meaning.
  • N3 (nit). The flow door clause lost 400 FLOW_FAILED and the error.details. path, and the skill has no pointer to objectstack-api, where L356-365 teach both and name a script node's function-name refusal. An agent holding only this skill still learns the name innerRefusal and the in-flow $error.code, which is what a flow author needs; the wire shape is the API skill's subject. No authoring rule lost. The outputVariable gloss and "(below)" cuts lose nothing: the example and item 2 show both.
  • N4 (nit). "another namespace" helps only when both packages end up declaring different namespaces; if the earlier holder declares none, it meets every namespace and only the rename works. The sentence's lead "One namespace (or none)" makes this recoverable. Also unstated: the unbound state lasts until the next cold boot, where the pair is "held at boot", both bind and the warning appears. Neither changes what the author should do.
  • N5 (nit, changeset prose). The changeset body says "two restatements are shortened"; the diff shortens four passages (the PR body lists all four).

Nits only: the round ends here. Any nit fix outside the prose faces moves the head and this record no longer covers it.

Implemented-by: claude/project-thread-vmehq6
Reviewed-by: session_01FEkQ5pjSPT7ui2EUcunaVb

VERDICT: PASS

Adopted by the seat 2026-11-15T05:28Z · isolated sub-agent at CONTRACT_REVIEW_TIER (served model verified by the seat) · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb

维护者速读

席位核对

Verdict: ACCEPT, held for the maintainer · head 08401f6aadc452a1bba675a1de69b94d729b1fd7 · card #33569 · report 6889728081 · at-tier contract review 6889762627 (PASS on this head, CONTRACT_REVIEW_TIER, served model verified by the seat; Ruling-ref for the in-seat review: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb option A).

  • Shape: draft → main, Fixes #33569. skills/objectstack-automation/SKILL.md and one changeset (@objectstack/skills patch), +23/-13. GOVERNED, Tier H (skills/**). Clause-②: no; Metadata-protocol: none.
  • Judgment: each claim checked against main: before the seal claimBareNameFunctions only records and the boot logs Bare-name conflict at boot; after it, the claim throws inside bindHooksToEngine, bindAppArtifactHandlers catches it per owner group and logs Failed to bind declarative hooks at error, the claim runs ahead of every registerFunction and hook, and actions still bind. F3 closed: the boot pair and a later holder are two clauses.
  • Gates: 46 derived, 44 exit 0, 2 NOT MEASURED locally (check:dual-build-cjs-loads, check:lean-entry-closure); token ratchet 6861 of 6861. Check-runs on the head: 44, 28 success, 16 skipped, none failing or pending.
  • Accepted deviations (nits): N1 the correction is stated in a new changeset rather than amending the unreleased .changeset/32522 entry; N2 "ownerless" now has two senses in the file; N3 the flow door clause no longer names 400 FLOW_FAILED (taught in objectstack-api); N4 the remedy and the unbound state's lifetime (until the next cold boot) are terse; N5 the changeset says two passages were shortened, the diff shortens four.
  • Follow-up: objectql: hook-binder and the bare-name cold-boot warning still say a clashing function name is refused; the bind fails and the owner group stays unbound #33670 (objectql: hook-binder.ts stale ADR-0150 D9 comment and bareNameColdBootWarning still saying "refused at install" for a function; owning lane).
  • Landing: Tier H. The seat does not flip this PR ready or enqueue it. It needs the maintainer's merge, or an authorised APPROVED review after which the seat lands it.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 15, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 15, 2026 05:43
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit b4698f7 Nov 15, 2026
50 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-vmehq6 branch November 15, 2026 06:20
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…udges each on a same-head at-tier PASS record (objectstack-ai#33711)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1X5SKzXRHQWjMHXgyfyiaqkP)_

Fixes objectstack-ai#33603

Clause-②: no
Metadata-protocol: none

domain:skills#1 · os-project-manager · session_01FEkQ5kXwEA8abP4hMhtodW

## 维护者速读

- 改了什么:合后审计 `check-governed-merges.mjs` 现在对每个 skills 合并,用队列守卫自己的 arm
读法和记录读法再读一遍落地提交。按守卫自己的顺序判:合并前有授权批准或授权入队的,算维护者的合并,留在维护者清单并写明谁放行;其余 arm 判为
Tier S 的合并单独列出,每条再查同 head、达档、PASS、出自守卫信任的作者、合并前已存在且未再编辑的复核记录,且该 PR
确实以这个提交落地(`merge_commit_sha`),缺了就标 ⛔ BREACH。另外修了 objectstack-ai#33616 评审留下的三处:校验器比对
`advisorModel`、拒收把复核交给子代理的转录,post-stamped 对校验器自测的 spawn 加超时并转出子进程的失败行。
- 为什么改:AGENTS.md 第 14 条把合后审计定为座位落地的补偿控制,但它按路径分类,arm 落地看起来和「Tier H
无批准」一模一样(卡 objectstack-ai#33603,评审 6886787995 N3);objectstack-ai#33616 的复核记录把校验器残项挂到本卡。
- 风险与回滚:只动三个 `scripts/pm/` 工具文件,审计仍是只报告;读不到时记 NOT MEASURED、整轮
INCOMPLETE(退出 2),不会把未读的合并报成干净。校验器更严:复核会话里调用过 Agent / Task / Workflow /
SendMessage 的转录现在被拒,要传子代理自己的输出。回滚即还原本 PR。
- 先看:`scripts/pm/check-governed-merges.mjs` 的
`readArmLanding`(新,读法全部来自队列守卫)和 `renderReport`
的分列;`scripts/pm/verify-review-tier.mjs` 的 `SUB_AGENT_TOOLS` 判断。
- 两分钟验证:`node scripts/pm/check-governed-merges.mjs --since-ref
objectstack=b937b75f --repos objectstack`,预期 objectstack-ai#33668、objectstack-ai#33555、objectstack-ai#33632 三条
skills 合并都留在维护者清单,各带一行「cleared by an authorized enqueue (os-zhuang)」;没有
BREACH。
- 需要你做的:定合后审计的周期执行人(本 PR 建议:定时 workflow,由席位立卡交你,见下文 Owner);本 PR
本身无,席位落地。

## What changes

**Part 1, the audit (`scripts/pm/check-governed-merges.mjs`).**

- `readArmLanding` reads every skills landing in the sweep again with
the queue guard's own readers on the landed commit (the commit the merge
group judged): `decomposeGovernedWork`, `readLowRiskTier` (the
register's `lowRiskArmVerdict`), `landsOnLowRiskArm`, then
`recordAuthorTrusted`, `recordVerdict` and `lowRiskRecordVerdict`. One
reader: no predicate is restated here; the guard is imported lazily
(`loadArmReaders`, `ARM_READER_EXPORTS`), and a missing export or failed
load is NOT MEASURED.
- Five states. `pass`: the arm reads Tier S and a same-head record that
stands at the tier and reads PASS exists. `breach`: the arm reads Tier S
and no such record exists. `cleared`: the arm reads Tier S, and an
authorized approval or enqueue cleared it first. `tier-h`: the arm reads
H (its reasons are printed under the row), or the landing crosses the
3,000-line human-merge line. `not-measured`: the pull, the timeline or a
comment thread could not be read.
- The legs run in the guard's own order (`entrySatisfied`): an
authorized approval (`authorizedApprovalVerdict` on `makeReviewReader`),
then an authorized enqueue (`enqueuerFromTimeline`,
`authorizedEnqueueVerdict` on the timeline already fetched), then the
record. A landing cleared by either of the first two is `cleared`: the
maintainer's merge, kept on the maintainer's list with who cleared it,
never a BREACH.
- Each leg reads only what existed before the landing. Reviews and
timeline events count strictly before `merged_at`: on a queue merge the
`removed_from_merge_queue` event shares the merge's instant (measured on
objectstack-ai#33555, objectstack-ai#33632 and objectstack-ai#33616), so the post-merge timeline would always read
the enqueuer as undetermined. Comments count only from an author the
guard trusts (`recordAuthorTrusted` on `recognisers.trustedAuthors`, the
objectstack-ai#33687 binding: the relay's identity and `GOVERNED_APPROVERS`), and only
when created and last edited (`updated_at`) at or before the landing. So
a record any commenter posted cannot excuse a landing, an untrusted row
cannot shadow a trusted one, and a record written or edited after the
landing cannot excuse it; a BREACH whose only record was edited after
the landing names that comment.
- The record's head is tied to the landed commit: the attribution read
now carries `merge_commit_sha`, and a pull GitHub says is not merged (no
`merged_at`) or merged as another commit is a BREACH with that reason,
never `pass`. A failed attribution read is NOT MEASURED. Reads ride the
channel that attributed the row (`makePullReader`, `makeTimelineReader`,
`makeCommentReader`), and each one counts in the API lookup total.
- The report lists arm landings (`pass` and `breach`) apart, after the
maintainer's list, under their own contract lines; the head counts them
and their breaches. `cleared`, `tier-h` and `not-measured` rows stay on
the maintainer's list with an arm cell. A `not-measured` row makes the
sweep INCOMPLETE (exit 2) and the banner names it. `--json` carries the
reading as `entries[].arm`.
- Neither dispatch awaits at module scope any more (`main().then`,
`selfTest().then`): the guard imports this file at module scope, so an
awaiting dispatch deadlocks the lazy import (exit 13). The two comments
that said the lazy door is shut here were corrected.
- The register header's arm section says what the sweep now does and its
limit: it reads the record, not the run that wrote it. At the seat's
request, the line that called the relay's review plan path-only now says
the plan is not path-only from objectstack-ai#33540: `governedReviewPlan`
(`scripts/pm/fleet-write/execute.mjs`) reads the arm with its readers.
objectstack-ai#33686 has since merged, so the line holds on main.

**Part 2, the owner.** Proposed below; no workflow and no rule line in
this PR.

**Part 3, the verifier residuals (PR objectstack-ai#33616's records 6888257144 N5 and
6888534276 N7 and N10).**

| Residual | Verdict | Where |
|:--|:--|:--|
| `advisorModel` not compared | Fixed. Present and not null, it must
equal the tier. Measured present on every assistant entry of a real
session transcript, equal to the served model. |
`verify-review-tier.mjs`, 2 pin rows |
| A model value with a context suffix refuses an at-tier run | Closed.
Fails closed by design, and measured unreachable here: a session
configured with `[1m]` records `message.model`, `requestedModel`,
`advisorModel` and the identity attachment without the suffix (129
turns). Accepting a suffix would widen the accept set on an unseen
shape. The header says so. | header only |
| A nested sub-agent's transcript is not followed | Fixed by refusing
instead of following: an assistant turn that calls `Agent`, `Task`,
`Workflow` or `SendMessage` (`SUB_AGENT_TOOLS`) refuses, naming the tool
and asking for the transcript of the agent that ran the review, one that
called no other agent (a seat that reviewed in-seat beside unrelated
agents passes the review's own sub-agent file). Following would need the
child's file, which the transcript does not name. |
`verify-review-tier.mjs`, 3 pin rows |
| A delegating session passing its own transcript passes whatever served
its sub-agent | Fixed by the same refusal (a session that spawned its
reviewer is refused). | 1 pin row |
| A cleanly truncated transcript prefix passes | Closed. No honest run
writes a prefix: the record is the final turn's text, so a prefix
without that turn is a copy the seat cut, the dishonest route the card
leaves to the audit. A completeness test would rest on `stop_reason`,
which this session cannot measure for a sub-agent output; a wrong guess
would refuse every at-tier record. Named in the header's boundary. |
header only |
| The verifier self-test spawn has no timeout and hides the child's
failure lines | Fixed. `timeout: 120000`, and `childRunDetail` puts the
timeout or signal, the exit and the child's own failing case lines into
the case's detail. | `post-stamped.mjs`, 1 pin row |
| A raw relay `comment` / `comment_edit` op is not judged for tier | Not
here: it lives in `scripts/pm/fleet-write/` (the relay's door), outside
this card's file surface and on the same files as objectstack-ai#33540. Belongs on its
own card. | report |

## Owner of the weekly audit

Proposed owner: **a scheduled workflow**, filed by the seat for the
maintainer (this PR adds none). Reasons:

- The audit is the compensating control for seat landings, and the
skills seat lands most of the arm's PRs. A seat patrol would have the
audited party run its own audit.
- A workflow runs whether or not a seat is staffed; seats go off duty
and a patrol stops with them.
- It needs only an objectstack checkout with history, `--repos
objectstack`, a topological `--since-ref` from the last run's printed
tip (or `--since 8d` for overlap), and a read token. A ⛔ BREACH or
`not-measured` row can be surfaced in the job summary; making the job
red on `entries[].arm.state === 'breach'` would be a reader of `--json`,
not a change here.

The interim, until the workflow lands: the skills seat's patrol runs
`node scripts/pm/check-governed-merges.mjs --since 8d --repos
objectstack` weekly and posts the arm section to the seat post. That
line does not fit
`.claude/skills/pm-dispatch/references/lanes/skills.md`: 35 lines
against a ceiling of 35, headroom 0 (`check-skill-line-ratchet`), so it
is reported here and not added.

## Tests

- `node scripts/pm/check-governed-merges.mjs --self-test`: 728
assertions. New battery `⚖️ objectstack-ai#33603: ...` (38 cases, floor 38; roster
floor 37 to 38). It loads the REAL guard through `loadArmReaders` and
drives `readArmLanding` with fake fetchers and a fake git: pass on the
PR thread and on the card; breach for no record, a FAIL record, a record
on another head, a record below the tier, an unsigned record, a record
from an untrusted author, a record posted after the landing, a record
edited after it (the reason names the edited comment), a pull merged as
another commit and a pull closed unmerged; an untrusted FAIL after a
trusted PASS does not shadow it (and a trusted one does); cleared for an
authorized approval and an authorized enqueue on the measured
queue-merge timeline, with controls that a seat-account enqueue, a
post-landing approval and an unauthorized approval clear nothing; tier-h
for a `security` label, `Clause-②: yes`, a path outside the allowlist in
the same commit and an oversized landing; not-measured for an unread
pull, review list, timeline, comment thread or merge, and for readers
that did not load; null without a catalog row or a PR number; the
report's head count, its apart section and a cleared row staying on the
maintainer's list; the INCOMPLETE banner; and a structural pin that
neither dispatch awaits at module scope.
- `node scripts/pm/verify-review-tier.mjs --self-test`: 27 cases across
6 batteries (new battery: advisor, sub-agent spawn, and the refusal's
advice naming the reviewing agent).
- `node scripts/pm/post-stamped.mjs --self-test`: 787 cases across 29
batteries (record-tier battery floor 15 to 16).
- A live sweep on this head, read-only, from `b937b75f`: 8 governed
merges. The three skills landings, objectstack-ai#33668, objectstack-ai#33555 and objectstack-ai#33632, read Tier
S on the arm and were each enqueued by `os-zhuang` before the merge, so
each is `cleared` and stays on the maintainer's list; nothing is listed
apart and nothing is a BREACH; exit 0. (Before the review fix, objectstack-ai#33555
and objectstack-ai#33632 were listed apart as PASS.)

<details><summary>Ablations, each restored and `git diff` checked empty:
the first five on the first commit, the next six on the first review-fix
commit, the last two on the second</summary>

```text
the merge-time filter on comment rows removed      -> ✗ a-PASS-record-posted-AFTER-the-landing-is-a-BREACH
the apart filter in renderReport removed           -> ✗ arm-landings-are-listed-AFTER-the-maintainers-list-never-in-it
any non-unreadable record read as pass             -> ✗ no-record / FAIL-record / record-on-another-head is a BREACH
the sub-agent spawn refusal disabled               -> ✗ 3 verifier cases (nested reviewer, delegating session, other tool names)
the advisorModel comparison disabled               -> ✗ an advisor model off the tier refuses
the authorized-approval leg disabled               -> ✗ 1 case (an approval before the landing clears it)
the authorized-enqueue leg disabled                -> ✗ 1 case (an enqueue clears it)
timeline events counted AT merged_at, not before   -> ✗ 1 case (the measured queue-merge timeline)
the merge_commit_sha tie disabled                  -> ✗ 1 case (a pull merged as another commit)
the not-merged check disabled                      -> ✗ 1 case (a pull closed unmerged)
the updated_at filter disabled                     -> ✗ 1 case (a record edited after the landing)
the author binding disabled                        -> ✗ the untrusted-author cases
the edited-after note disabled                     -> ✗ 1 case (the BREACH names the edited comment)
```

</details>

## Acceptance notes

- An arm landing the maintainer's account enqueued is the maintainer's
merge by the guard's own reading, whoever prepared it; the sweep follows
that reading and does not second-guess it.
- The record's existence is all the audit adds; it cannot tell a record
from the run that served it (the verifier's boundary). Body and labels
are read as they are now; a removed `security` label is still caught by
the timeline.
- The arm reads today's register, so a skills landing from before the
arm existed (objectstack-ai#33632 landed 05:14Z, the arm at 05:57Z) is listed apart
when it qualifies. It had its PASS record, so it is not a breach.
- `contract-review.md`'s rule line on session evidence (「卡线程或席内复核」) does
not yet say that a session which spawned or messaged a sub-agent is
refused; the refusal text says what to pass. Carrier: the skills seat
(the file is at its 63-line ceiling).
- Raw relay `comment` / `comment_edit` ops not judged for tier: carrier,
the skills seat, as its own card (relay files).

## Verification

Gate list `dispatch-gates --commands` on this diff: 35 families, all run
locally; results below. `dispatch-gates --tier`: no path-derived mandate
(floor sonnet, default opus, ceiling fable); 449 changed lines, under
3,000. `check-governed-merges --branch claude/project-thread-sgww6y`:
NOT governed (0 of 3 paths on the register).

On head c48e9f1 (rebased on main `48e69596`, which carries objectstack-ai#33686 and
objectstack-ai#33687), every derived family ran and exited 0: `dispatch-gates --ran`
reconciles 35 derived, 35 run, 0 NOT-MEASURED. One gate went red on the
first pass of the first round and was fixed in its own commit:
`check:pm-dispatch-gates` refused a helper named like a compound
self-test (`childSelfTestDetail`, not in `COMPOUND_ANCHOR_LEDGER`); it
is now `childRunDetail`.

---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5kXwEA8abP4hMhtodW)_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01FEkQ5kXwEA8abP4hMhtodW

<!-- signed: domain:skills#1 · os-project-manager ·
session_01FEkQ5kXwEA8abP4hMhtodW -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
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 pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

skills(objectstack-automation): a clashing bare function name is not "refused at install"; the bind fails and the whole owner group stays unbound

3 participants