Repository navigation
test(lint): pin delete_package as an accepted platform tool name - #31219
Merged
Merged
Conversation
A skill naming the build agent's package removal resolves; the plural, registered by nobody, is still reported. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5m4G8BbYuRmH2Ts8G4
Contributor
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
Contributor
Author
|
domain:devx#3 · os-project-manager · session_01FEkQ5njkh3xbcDN6EtSfw7 席位核对Verdict: ACCEPT · head
Generated by Claude Code |
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 Leehom · project thread
Fixes #31040
Clause-②: no
Metadata-protocol: none
维护者速读
packages/lint/src/validate-ai-tool-references.test.ts新增一条用例(+18 行,仅测试):技能里写delete_package不被报为虚构工具;写近似名delete_packages仍被报出。delete_package加进平台工具名单时没补这条固定用例(其合约复审 6693733275 的 should-fix);以往每次加名字都配一条(PLATFORM_TOOLS_BY_PACKAGE['service-ai-studio'] is missing five registered tools, so a skill naming any of them reads as fictional to validate/lint #16512、spec: PLATFORM_TOOLS_BY_PACKAGE['service-ai'] lists read_package_doc and search_package_docs, the two package-doc tools cloud#3335 adds to the Ask agent #27002、记录写入那对)。@objectstack/lint发布的files[]只含dist/README/CHANGELOG,不发布任何东西;回滚即还原本 PR。packages/lint/src/validate-ai-tool-references.test.ts新用例「resolves the service-ai-studio package removal」(紧随记录写入那对之后)。pnpm --filter @objectstack/lint exec vitest run src/validate-ai-tool-references.test.ts,预期 23 条全绿;从 spec 名单删掉delete_package并重建 spec,预期恰好这一条变红。What changes
One test case in
packages/lint/src/validate-ai-tool-references.test.ts, placed after the record-write pair and shaped like the #16512 / #27002 pins:delete_packageresolves (no findings);delete_packages, registered by nobody, is still reported: exactly one finding, atskills[0].tools[1], namingdelete_packages. Without the control the pin could not fail on a universe widened until everything resolves.No change to the registry (
packages/spec/src/system/constants/platform-tool-names.ts) or to the rule.Tests
ce48acb1: Test Files 1 passed, Tests 23 passed (23).pnpm --filter @objectstack/lint test: Test Files 197 passed (197), Tests 8338 passed, 5 skipped; VERDICT command-exit 0.pnpm --filter @objectstack/lint typecheck(tsc --noEmit && check:test-typecheck): VERDICT command-exit 0, test layer held at its 2 pinned debt signatures (unchanged).Ablation: the pin fails when delete_package leaves the registry
The lint suite reads
@objectstack/specfromdist/(no vitest alias), so each leg rebuilt spec and proved the state ofdist/before reading the run.node scripts/ablation-replace.mjs --file packages/spec/src/system/constants/platform-tool-names.ts --anchor " 'delete_package',\n" --delete): anchor 1 -> 0, blob66cd0267ea06->1ed8917b09d8;pnpm --filter @objectstack/spec buildexit 0;ablation-dist-preflight.mjs @objectstack/spec '"delete_package",' --absent --source-marker="'delete_package',": marker absent from all 594 built files, exit 0. Run:× resolves the service-ai-studio package removal,AssertionError: expected [ { severity: 'warning', …(5) } ] to deeply equal []; Tests 1 failed, 22 passed (23); exit 1.66cd0267ea06),git diff HEADempty; spec rebuilt exit 0; preflight (present mode): marker present in 2 built files, tree clean against HEAD, exit 0. Run: Tests 23 passed (23), exit 0.Acceptance notes
delete_packageleaves the registry": measured above (red on exactly the new case, every other case green).skip-changeset:@objectstack/lintfiles[]is["dist", "README.md", "CHANGELOG.md"]; a*.test.tsundersrc/ships nothing.Verification
Gate union derived by
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(50 families for this diff), run on headce48acb1, reconciled with--ran: "50 derived famil(ies) accounted for — 48 run, 2 NOT-MEASURED".pnpm --filter '@objectstack/lint^...' build, VERDICT command-exit 0).pnpm check:docs-transcript-driftfirst answered exit 3 (it readspackages/lint/dist, not yet built); afterpnpm --filter @objectstack/lint buildit ran exit 0.pnpm check:dual-build-cjs-loads, reason: exit 3 PREREQUISITE NOT MET, it loads every package's builtdist/and only the lint closure was built.pnpm check:lean-entry-closure, reason: exit 3 PREREQUISITE NOT MET, it readspackages/objectql/dist, outside the lint closure. CI'sLint & Repo Gatesruns both on a full build.node scripts/check-plugin-teardown-shape.mjs --self-testneededgit fetch --depth=1 origin 621a4876for its pinned fixture on this shallow clone, then exit 0.pnpm lintscoped: the package has nolintscript, so the root eslint ran on it (node --stack-size=4000 node_modules/eslint/bin/eslint.js packages/lint --no-inline-config), exit 0.skip-changeset:@objectstack/lintfiles[]shipsdist,README.mdandCHANGELOG.mdonly; the diff is onesrc/*.test.ts.Generated by Claude Code