Repository navigation
docs(skills): a clashing flow function name leaves the later package's functions and hooks unbound, not refused at install - #33668
Conversation
…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>
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb Contract reviewServed-tier: Inputs read: card #33569 (body, triage, claim, os-dev-report), PR #33668 (body, 2 files, net diff against merge base ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Attempts to break it: a second bind route that would let the throw escape (the two other Findings: no must-fix, no should-fix.
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: 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 |
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb 维护者速读
席位核对Verdict: ACCEPT, held for the maintainer · head
|
…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>
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步骤要么因找不到函数而失败,要么(依赖了先持有的包时)悄悄跑了别人的函数。skills/objectstack-automation/SKILL.md第 263–279 行。git diff origin/main -- skills/objectstack-automation/SKILL.md,应只见第 3 条这一段与其后outputVariable一句的改动。skills/**),席位的达档契约复审 PASS 记录在案后,请合并。What changes
Item 3 of "Valid-but-silently-wrong" in
skills/objectstack-automation/SKILL.md. Old text: "Packages of twonamespaces each run their ownnormalize_phone(one namespace, or none: refused at install; a boot warnsBare-name conflict at boot)." New text: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@ 7f0e38apackages/objectql/src/registry.ts:5520-5523(bareNameHoldersOtherThanwithincomingNamespace: a holder of another namespace is no conflict);packages/core/src/package-scoped-resolution.ts:753(step 1, the caller package's own item)Bare-name conflict at bootclaimBareNameFunctionsonly records (registry.ts:5517, the throw is insideif (this.bareNameHoldersSealed)); the AppPlugin binds instart()(packages/runtime/src/app-plugin.ts:1413, call at:1865) and the seal runs later atkernel:bootstrapped(packages/objectql/src/plugin.ts:1372-1383), wheresealBareNameHoldersAtColdBootlogsbareNameColdBootWarning(registry.ts:3044, text opens "Bare-name conflict at boot" at:2957)BareNameConflictError(registry.ts:5530) frombindHooksToEngine(packages/objectql/src/hook-binder.ts:221);bindAppArtifactHandlerscatches 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: AppPluginstart()(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)registerFunction(hook-binder.ts:221before:236) and ahead of the hook half (:249onward), so the throw leaves both empty for that owner group, the non-clashing names included. Pinned bypackages/objectql/src/registry-bare-name-one-holder-request-family.test.ts:586-602(beta_only_fnstays unregistered)Failed to bind declarative hooks)app-artifact-handlers.ts:442,logger.errordependenciesclosure refusesoutside-closureas 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)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:
400 FLOW_FAILED,error.details.innerRefusalnaming each holder" becomes "a flow door'sinnerRefusalnames each holder". Home:skills/objectstack-api/SKILL.md:356-365teaches the flow door's400 FLOW_FAILEDanderror.details.innerRefusal, naming ascriptnode's function-name refusal.defineStack({ functions })is cut; the example sits right under it.config.outputVariableexposes that value as a flow variable, and a later declarative node persists it" becomes "a later declarative node persists itsoutputVariable"; the example under it showsoutputVariable: 'ai'read asai.ai_category. The eval that expectsoutputVariable(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
packages/objectql/src/hook-binder.ts:214-216still says the function bind refusal "stays until the trailing backstop child (ADR-0150 D9) narrows it", which has narrowed (bareNameHoldersOtherThanwith 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.check-skills-token-ratchetexit 0 (6861 / 6861);check-skill-line-ratchetexit 0.dispatch-gates --commands), run on head 08401f6 afterturbo run build --filter=@objectstack/formula --filter=@objectstack/lintunder 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'sdist; 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
Generated by Claude Code