fix(cli): drop the never-loaded oclif.plugins entries and correct the text that says os plugins works - #21306
Conversation
…pendencies `oclif.plugins` named @oclif/plugin-help and @oclif/plugin-plugins, but both sat in devDependencies and oclif's core-plugin loader matches those names only against `dependencies`, so neither ever loaded. Remove the array and the two devDependencies; the lockfile regeneration drops exactly their two subtrees (14 entries, 0 added, no surviving resolution changed). Claude-Session: https://claude.ai/code/session_018gA1pE6eJtwHhqx72G8U9X Co-authored-by: Claude <noreply@anthropic.com>
The README, the plugins docs callout, the bin entry's auto-transpile note, the doctor comment, the platform checklist and the plugin-surface test all described `oclif.plugins` or an `os plugins` command group. Restate each to the new fact: no `oclif.plugins`, no plugin manager, `os --help` is the help entry, and a CLI extension loads through an `os` distribution that lists it in both `oclif.plugins` and `dependencies`. The test now pins that state instead of the dead array. Adds the patch changeset. Claude-Session: https://claude.ai/code/session_018gA1pE6eJtwHhqx72G8U9X Co-authored-by: Claude <noreply@anthropic.com>
…op-dead-oclif-plugins
…op-dead-oclif-plugins
…op-dead-oclif-plugins
📓 Docs Drift CheckThis PR changes 1 package(s): 9 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 2 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 26 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 41bc43f7c37ebe067058dfd357bf604f9731b5be && git checkout 41bc43f7c37ebe067058dfd357bf604f9731b5be
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 393ae878d3d52fe843c56b4621c004b934dcf853 a1e72918c3e9cf7764709af152072dcda2d250f6 && git checkout -B drift-repro 393ae878d3d52fe843c56b4621c004b934dcf853 && git merge --no-ff a1e72918c3e9cf7764709af152072dcda2d250f6
node scripts/docs-audit/affected-docs.mjs --json 393ae878d3d52fe843c56b4621c004b934dcf853
|
Review: ACCEPT, PR #21306 (head
|
Contract reviewServed-tier: Read at 2026-10-02T04:12Z from the inputs alone: card #21285 (body, the Claim comment, the os-dev report), PR #21306 (body, 10-file list, the two PR comments, and the three-dot net diff against ① Derived judgmentsEvery accept-set and public-surface change the diff implies, each named right or wrong:
Check-runs on the head (latest run per name, all concluded; ② Semver level
The PR body's declaration line reads ③ Boundary flags
Implemented-by: VERDICT: PASS |
Fixes #21285
Clause-②: no
What this does
packages/cli/package.jsonlisted@oclif/plugin-helpand@oclif/plugin-pluginsunderoclif.plugins, but both were onlydevDependencies. oclif loads anoclif.pluginsentry only when the same name is independencies, so neither ever loaded. This PR:oclif.pluginsarray (no otheroclifkey changes);devDependencies(no consumer remains, see H1) and regeneratespnpm-lock.yamlwithpnpm install --lockfile-only;os pluginsworks (per-site table below);test/plugin-commands.test.tsso it pins the new state instead of the dead array;.changeset/21285-drop-dead-oclif-plugins.md(patch,@objectstack/cli).Maintainer ruling (verbatim):
packages/spec/**is untouched. That includescli-extension.zod.tsand its generated pagecontent/docs/references/kernel/cli-extension.mdx, which still sayos plugins install. The spec-lane card #21286 carries them, and it remains open.Behaviour: nothing an operator sees changes
Reading script:
node packages/cli/bin/run.jswithNODE_ENVunset andOCLIF_COLUMNS=120, run from an empty directory. Each run's stdout, stderr and exit code were captured. The runs:--help,help,plugins,plugins install @acme/plugin-marketplaceandfrobnicate;TOPIC --helpfor each of the 32 root-level topics;@oclif/coreConfig.loaddump: loaded plugins, all 65 command ids and all 75 topics.That is 114 files per reading.
748b24072, unmodifiedos --help: 12 topics + 22 commands.help,pluginsandplugins installexit 2 withcommand ... not found. Plugins loaded:@objectstack/clionly.dependencies(mutation throughscripts/ablation-replace.mjs, restore proven: blob == HEAD,git diff HEADempty)os helpexits 0.os pluginsexits 0 ("No plugins installed."). The command table gainshelpand 10plugins:*ids (65 to 76). The root help gains thepluginstopic and thehelpandpluginscommands. So the reading catches a real difference.cc13e2532(array and devDependencies removed, lockfile regenerated) anda593c8c62(CLI rebuilt)diff -ragainst before: empty, all 114 files, same sha256 over the concatenation (338e1f0f...5c6f38)3c8442fc0anda1e72918c(after merging main)17.5.0to17.6.0. Those come from main's Version Packages merge, not from this diff.Hypotheses
git grepfindsplugin-helpandplugin-pluginsonly in these places:devDependenciesblock;bin/run.js,doctor.tsanddoctor-deprecation-hint-commands.test.ts;No import,
require, script, fixture or other importer names them. In the lockfile, only thepackages/cliimporter referenced them.748b24072and5a9292e6f), with the same result:@oclif/plugin-help@7.0.2,@oclif/plugin-plugins@7.0.3,hosted-git-info@7.0.2,isexe@3.1.5,lru-cache@10.4.3,npm@11.21.0,npm-package-arg@11.0.3,npm-run-path@5.3.0,object-treeify@4.0.1,path-key@4.0.0,proc-log@4.2.0,validate-npm-package-name@5.0.1,which@4.0.0andyarn@1.22.22.isexe3.1.5,lru-cache10.4.3,path-key4.0.0 andwhich4.0.0. The versions every other consumer resolves are unchanged.dependenciescount): holds.@oclif/core5.1.2lib/config/plugin-loader.jsloadCorePluginscallsfindMatchingDependencies(rootPlugin.pjson.dependencies ?? {}, corePlugins). Measured three ways:@acme/plugin-marketplacelisted inoclif.pluginsplusdependencies,marketplace:searchloads and runs. Moved todevDependencies, nothing loads.plugins install/uninstall/update/link/...in space and colon forms, every@oclif/plugin-*, andos|objectstack plugins|help. Every hit is accounted for in the table below. The widened spellings found only three things beyond the card's sites:bin/run.js:87(theplugins linksentence, covered with the run.js site), the phrase "ObjectStack plugins" (prose, not a command), and oneCHANGELOG.mdline.@oclif/core5.1.2Config.load:@acme/plugin-marketplacein bothoclif.pluginsanddependenciesloadsmarketplace:searchand runs it;@objectstack/cliand the extension that way loads 66 commands (this CLI's 65 plusmarketplace:search);Per-site conclusions
packages/cli/package.jsonoclif.plugins+ 2devDependenciespnpm-lock.yamlcontent/docs/plugins/index.mdxStep 3 callout (lines 400-408)plugin-pluginssits in devDependencies") became false. It now says: no plugin manager;os plugins ...andos helpare not commands;os --helpis the help entry; the distribution route, kept because H4 holds; and the loader'sdependencies-only rule.os --help"os --help(H4 fixture).packages/cli/README.md### os plugins (oclif)### os plugins and os help (not commands): no plugin manager; each exits 2; useos --help; link to the plugin-system section.packages/cli/README.md## oclif Plugin System(intro, step 3, "Install and use", comparison row)os plugins installis gone. Step 3 and the example load through anosdistribution listing the plugin inoclif.plugins+dependencies.packages/cli/bin/run.js:84-97oclif.plugins, no@oclif/plugin-pluginsdependency" instead of the devDependencies placement. The 34-entry count is re-measured (12 topics + 22 commands).packages/cli/src/commands/doctor.ts:2377-2380oclif.plugins)".packages/cli/src/commands/doctor-deprecation-hint-commands.test.ts:15packages/cli/test/plugin-commands.test.tsoclif.pluginsis undefined, and no@oclif/plugin-*package appears in any dependency field. The command-discovery and bin pins are kept. The guard is not deleted (reverse verification below).docs/qa/platform-checklist/areas/cli.json:658(cli.flag-command-error-ux)pnpm check:platform-checklistis green.packages/spec/src/kernel/cli-extension.zod.ts:18andcontent/docs/references/kernel/cli-extension.mdx:21packages/cli/CHANGELOG.md:1362(the "plugins linked TypeScript plugin ...@oclif/plugin-pluginssits indevDependencies" entry)content/docs/ai/skills.mdx,api/error-handling-server.mdx,plugins/development.mdx,packages/core/src/types.ts,packages/types/README.md,skills/objectstack-platform/references/plugin-hooks.md), rootCHANGELOG.md:1367os pluginscommand.Tests and gates (final head
a1e72918cunless noted)Gates:
node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commandsata1e72918cderives 106 commands. All 106 were run with each exit code captured before any pipe, and all 106 exit 0.--ranreconciles them:106 derived famil(ies) accounted for, 106 run, 0 NOT-MEASURED.3c8442fc0.a593c8c62, 4 needed a re-run. Three refused with exit 3 (PREREQUISITE NOT MET) before the packages they read were built:check:skill-examples,check:dual-build-cjs-loadsandcheck:i18n-coverage.check:slot-lookuphit an ENOENT on a temp fixture that a concurrent CLI test deleted. All 4 were green on re-run.@objectstack/cliunit tier (vitest run --project unit --maxWorkers=2): 243 files and 3440 tests passed at3c8442fc0, and again ata593c8c62. The two edited test files were re-run ata1e72918c: 2 files and 16 tests passed. The last merge (3c8442fc0toa1e72918c) brought 4 main commits, none of which touchpackages/cli.Reverse verification on the rewritten test, with the fix committed. Each mutation went through
scripts/ablation-replace.mjs(anchor hit, blob changed) with its restore proven (blob == HEAD,git diff HEADempty):oclif.pluginsarray:declares no oclif.pluginsgoes red (expected [ '@oclif/plugin-help', ... ] to be undefined);@oclif/plugin-pluginstodevDependencies:depends on no @oclif/plugin-* packagegoes red.pnpm --filter @objectstack/cli typecheck(ata593c8c62): exit 0.plugin-commands.test.tsis intsconfig.test.json's program anddoctor-deprecation-hint-commands.test.tsintsconfig.json's (--listFilesOnly).--project integration(ata593c8c62, run because the diff touchesbin/): 69/70 files and 601/603 tests pass. The 1 failure is pre-existing:test/published-entry-node-env-source-reroute.test.ts,CONTROL: neutralising the declaration in the child reproduces the card verbatim. It fails identically on base748b24072, built (59/59 turbo cache), in a separate worktree. Cause: tsx 4.23.15's ESM API registers./esm/index.mjsrelative todist/esm/api/index.cjs. That resolves to the nonexistentdist/esm/api/esm/index.mjs(oclif:config:ts-pathdebug: "Could not find tsx. Skipping tsx registration"), so the control's trap never arms. It is unrelated tooclif.plugins. The integration tier was not re-run at the final head: the incoming main commits touch nopackages/cli/binorsrcfile. It is declared to CI.Lint, narrowed and measured:
eslint --no-inline-config --format jsonover the 4 touched JS/TS files reports 4 files, 0 errors and 0 warnings. The other 6 touched files (.md,.mdx,.json,.yaml) are outsideeslint.config.mjs'sfilesglobs. The config enables no type-aware linting (noparserOptions.project), so this diff cannot move an untouched file's verdict. The fullpnpm lintis CI's.Acceptance notes (not filed here; for the seat)
packages/cli/README.md### Globalsays-v, --versionand-h, --help. Measured on the built entry:os -handos -vexit 2 withcommand -h not foundandcommand -v not found. Only--helpand--versionwork. This is pre-existing and unrelated to this diff, so it is reported, not fixed.packages/cli/README.md### Plugin Managementsays "There is noos plugincommand group in v1".os plugin build|sign|publishis registered: theplugintopic is inos --help. This is pre-existing, and feat(cli,create-objectstack): os generate picklist, the src/picklists starter barrel, and a Picklists count in the metadata summary #21167 also holds this file, so it is left untouched.packages/cli's integration tier wherever that file runs.Generated by Claude Code