Repository navigation
Commit b4698f7
docs(skills): a clashing flow function name leaves the later package's functions and hooks unbound, not refused at install (#33668)
<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XVyJcsmnrrm8h24VEcqmdWB)_
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
`namespace`s 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 `namespace`s 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.
<details><summary>46 gates, each with its exit code</summary>
```text
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
```
</details>
- Every family CI runs beyond the derived list: read off this PR's
check-runs.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01FEkQ5mpzgKr4dbZVjCqjSv)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent d4e3dcc commit b4698f7
2 files changed
Lines changed: 23 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
275 | 276 | | |
276 | 277 | | |
277 | | - | |
278 | | - | |
279 | | - | |
| 278 | + | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| |||
0 commit comments