Repository navigation
docs(skills): teach how a subflow or map child flow name resolves from the calling package - #31805
Merged
Merged
Conversation
…over token ceiling) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUQCDpd3cGtfPGtY3N
… the remainder Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUQCDpd3cGtfPGtY3N
Contributor
Author
|
domain:skills#2 · zhuangjianguo · session_01QsR2jT34CXs5fCn3BDirZw 维护者速读
席位核对Head-sha:
|
os-zhuang
marked this pull request as ready for review
November 9, 2026 08:09
os-zhuang
enabled auto-merge
November 9, 2026 08:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steedos · project thread
Fixes #31741
Clause-②: no
Metadata-protocol: none
维护者速读
subflow/map两行补上子流程名的解析规则:软件包里的流程先找本包的流程,再找它声明依赖(加sys)里唯一的持有者;否则运行到该节点时失败,并列出全部候选。另加一条 eval 用例,要求声明对子流程所在包的依赖。os validate、一运行就失败的流程。skills/objectstack-automation/SKILL.md的subflow行;scripts/check-skills-token-ratchet.mjs中该文件的上限行。node scripts/check-skills-token-ratchet.mjs,预期该文件 6568 tokens、headroom 0、退出码 0。skills/**)。What changes
skills/objectstack-automation/SKILL.md: thesubflowrow (58 -> 571 B) teaches how a bareconfig.flowNameresolves from the calling flow's package and the three run-time refusals; themaprow (160 -> 228 B) points at it and says a refused name fails the node at the first item.skills/objectstack-automation/evals/flows-triggers-approvals.json: case id 20. The expected output declaresdependencies: { 'acme.crm': … }onacme.billing;must_containneedsdependenciesand'acme.crm',must_not_containrejectsdependencies: {}and package-qualified names, so the undeclared form fails.scripts/check-skills-token-ratchet.mjs: the file's row 6527 -> 6568, pinned at the measurement..changeset/31741-automation-subflow-name-resolution.md:'@objectstack/skills': patch.Where each taught fact comes from (merged code on
main):packages/core/src/package-scoped-resolution.tsresolvePackageScopedHolders(step 1 own, step 2 closure, step 3outside-closure; package-less callers throughresolveEnvironmentWide), the closure beingdependenciestransitively plus everysyspackage. The automation plugin asks it throughresolvePackageScopedName(packages/services/service-automation/src/plugin.tsflowNameResolver).PackageScopedRefusalReason:ambiguous-in-closure,ambiguous-in-environment,outside-closure.engine.tsexecuteanswers{ success: false, error: refusal.message }; thesubflownode rewrites it assubflow 'X' failed: …, themapnode asmap 'ID': item N (subflow 'X') failed: …and stops the batch.registerFlowrefuses arming a name two packages hold (flowNameRefusal(name, null)), so it is never armed.subflow/mapflowNameagainst the closure.ambiguous-*reasons: install and package registration refuse a second package holder of a flow name (packages/objectql/src/bare-name-one-holder.ts), so only a clash older than that refusal reaches them (the E1 PR's red-line-2 tests build one by hand).Token budget
Standing ruling, verbatim and untranslated: 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). Priced bytes 26108 -> 26272: the rows add 581 B, nine restatement cuts remove 417 B, and the remaining 164 B (41 tokens) move the ceiling 6527 -> 6568, pinned at the measurement. The cuts, each with its survivor:
screenrow's "never hand-roll a button label or step counter intofields": the same cell's "Next / Submit and Step N of M are not authored".scriptexample's "function returns values → outputVariable → update_record persists" comment: the prose sentence above it.scriptinputs: Valid-but-silently-wrong Add metamodel interfaces for ObjectQL/ObjectUI contract #1, which listsscriptinputs.*as a value slot.readonlyinstead": objectstack-data'sreadonlybullet ("not by removingreadonly").looprow's sample envelope: Add metamodel interfaces for ObjectQL/ObjectUI contract #1's{ dialect: 'cel', source: '…' }.references/_index.md("Read them directly fromnode_modules").ctx.api": the hookrunAsparagraph ("that hook'sctx.apidata operations").Bundle readings (SKILL.md files, whole file):
skills/objectstack-automation/SKILL.md452 -> 447 lines, 26128 -> 26292 B; all publishedSKILL.mdfiles 4601 -> 4596 lines.Tests
Docs and eval only; no package code changes.
node scripts/check-skills-token-ratchet.mjsexit 0 and--self-testexit 0.Acceptance notes
packages/rest/src/meta-state-route-doc-spelling.test.ts, is neither touched nor counted as a cut. The two PRs share this file's token ceiling, so whichever lands second mergesmainand re-measures it.Verification
Derived gates (dispatch-gates --commands, 64 families)
d53255d5: 64 derived, 64 run, every recorded exit 0;dispatch-gates --ran:64 run, 0 NOT-MEASURED.check:dual-build-cjs-loadsfirst exited 3 (prerequisite) and was re-run green after a fullturbo run build(VERDICT command-exit 0).main(7 commits, none touching these files) ataf704f79: the derivation is byte-identical; the ratchet families re-run on the new head:check-skills-token-ratchetand its--self-test,check:skill-docs,check-empty-changeset,check-changeset-no-major, all exit 0.check-changeset-no-major,check-adr-0087-registration,check-closing-keyword-parity,check-partof-closing-keyword, all exit 0.Generated by Claude Code