feat(tooling): onboard packages/plugins/** into check:test-typecheck (#14062) - #14420
Merged
Conversation
…14062) All 14 `packages/plugins/**` packages now have a `tsconfig.test.json` compiled by the shared `check:test-typecheck` gate, with the four that measure non-zero carrying a generated, EXACT, shrink-only starting ledger. Before this the ratchet said nothing about a third of the repo's runtime surface: 14 packages, 1 `tsconfig.test.json`, 0 `check:test-typecheck` scripts. Measured at e808890, workspace closure built first — plugin-approvals 324 errors over 8 files (345 under build semantics; the 21 difference is the config tier), plugin-auth 94 over 10, plugin-sharing 3 over 2, knowledge-ragflow 3 over 1, and zero for the other ten. No test file is edited: opening the ratchet is not the same job as paying it down. Onboarded as a family by the director ruling of 2026-09-01 on #14062, which carries the #5286 maintainer authority for the starting ledgers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WLJQhde67SeTccsmnBVarV
…ugins-test-typecheck
…aseline the source-resolution registry (#14062) `check:type-check-coverage` — plugin-approvals (345), plugin-auth (94) and plugin-sharing (3) leave TEST_DEBT, and knowledge-ragflow (4) leaves DEBT. None was paid down: the same errors are now held one level finer, per file and per signature, in each package's own `test-typecheck-debt.json`. That is the graduation the gate's own message asks for. `check:type-source-resolution` — the thirteen new `tsconfig.test.json` move the program set, which #11490 made a package's prerogative. Re-baselined on the registry's documented onboarding limb: every dep admitted is annotated `via tsconfig.test.json`, and the before/after numbers are stated in place (96 -> 109 programs, 54 -> 55 entries, 242 -> 269 pairs). `knowledge-ragflow` additionally splits its build config, because `check:type-check-coverage` refuses a `typecheck` that never invokes tsc and the package had no `typecheck` script at all before this card. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WLJQhde67SeTccsmnBVarV
…ugins-test-typecheck # Conflicts: # packages/plugins/plugin-hono-server/package.json
…ranch's merge base (#14062) The absolute program totals moved under the branch because #13284 landed two `tsconfig.typecheck.json` on main in between; the delta this change is responsible for (+13 programs, +1 entry, +27 pairs) did not. Both readings are recorded so the number in the file matches what `--list` prints today. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WLJQhde67SeTccsmnBVarV
Contributor
📓 Docs Drift Check
What this run could not see
Coarse fallback — 19 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
This was referenced Sep 2, 2026
baozhoutao
marked this pull request as ready for review
September 2, 2026 06:18
baozhoutao
enabled auto-merge
September 2, 2026 06:18
This was referenced Sep 2, 2026
baozhoutao
pushed a commit
that referenced
this pull request
Sep 2, 2026
…ne rule pin file is type-checked (#14173) Onboarded by wiring to the mechanism #14062 (PR #14420) landed on, per the triage ruling on this card (comment 5502888897): a sibling tsconfig.test.json matching vitest's real module semantics, named by `typecheck`. Measured: 6 residual TS6059 errors over 2 files (rootDir violations from imports outside this package, pre-existing, config-tier), recorded in the new test-typecheck-debt.json as a CONVERSION of the coverage gate's existing 16-error TEST_DEBT entry, which is deleted as the graduation that pairing forces. Co-Authored-By: Claude Code <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WLJQhde67SeTccsmnBVarV
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.
Fixes #14062
All fourteen
packages/plugins/**packages now have atsconfig.test.jsonthatthe shared
check:test-typecheckgate compiles, and each package'stypecheckscript names it. The four that measure non-zero carry a generated, EXACT,
shrink-only starting ledger; the ten that measure zero deliberately carry none.
The ruling this implements
Director seat, comment 5494659007, 2026-09-01, maintainer verbatim 「同意」 —
quoted in full because item 2 is the #5286 authority any ledger-expansion gate
or reviewer needs to see:
One PR rather than two: the whole change is config plus generated ledgers, and
no test file is edited. Item 5 is honoured — #13676, #14173 and #14181 are not
touched here.
The table
Measured at
e80889095with the workspace closure built first, re-verified onthe merged tree. "BUILD semantics" is the package's own
tsconfig.jsonoptionswith only the test exclusion lifted; "THIS config" adds vitest's module
semantics.
--listFilescounts are the program's own, not a grep.The card's 345 reproduces exactly by the card's own recipe (the package
tsconfig with
excludereduced to["dist","node_modules"]) at today's HEAD.The ledger reads 324 because
tsconfig.test.jsonmatches vitest's modulesemantics, which subtracts 21 diagnostics about the CHECK and not one line of
test code: 20 x TS2550 (
lib: ES2021older than es2022) + 1 x TS1470(
import.metain a CommonJS program). Fixing the config first and reading theresidue afterwards is the #4311 discipline, and both numbers are recorded in
the config header and the ledger
_noteso neither can be mistaken for theother later.
No ledger for a zero package, on purpose. Verified reading:
check:test-typechecktreats a missing ledger as{ entries: {} }and prints0 file(s) / 0 error(s) / 0 pinned signature(s), under which any error in anyfile is red immediately with no entry to be added to. That is strictly stronger
than a ledger holding nothing, and it is the call
plugin-securityhad alreadyrecorded for itself.
gen:test-typecheck-debtis wired only where a ledgerexists, so no package carries a generator whose only possible output is an empty
file.
Two corrections to the finding, both measured
Recorded rather than smoothed over, because the ruling's item 4 rests on the
second one.
1. The exclusion was narrower than "no plugin package has a tsc program that
compiles its tests." Measured per package with
tsc --listFiles -p tsconfig.json: nine of the fourteen (embedder-openai, knowledge-memory,plugin-audit, plugin-dev, plugin-email, plugin-hono-server,
plugin-pinyin-search, plugin-reports, plugin-webhooks) never excluded their
tests, so
tsc --noEmitalready compiled them — at zero errors. The finding'sown table is accurate as written (14 packages, 1
tsconfig.test.json, 0check:test-typecheckscripts) and the 345 is exact; the generalisation in theheadline is not. Three packages hid their tests behind
**/*.test.ts(approvals 35, auth 87, sharing 30) and knowledge-ragflow was silent the other
way round — its tests were in the build program, but the package declared no
typecheckscript at all, andturbo run typecheckcannot run a script thatdoes not exist. 153 test files newly come under a type check that actually
runs.
2.
exec-context-annotation.pin.tswas never a phantom pin. It is a.pin.ts, and**/*.test.tsdoes not match it, so it was in the build programall along. Control measurement in the ablation below: deleting one of its
directives reddens the build config too. The pin this change genuinely makes
real is
plugin-approvals/src/manager-org-screen-parity.contract.test.ts— a.test.tsthat no tsc program had ever read. Ruling item 4 holds for that one;for the other it was already true. Repo-wide sweep for the general case: no
@ts-expect-errordirective anywhere inpackages/plugins/**was actuallyphantom before this PR (the eight files carrying directives are all either
.pin.ts, or in a package whose build config includes tests, or inplugin-security which was wired in #13176).
Ablations — the gate really reds, and the restore really restored
Both run from a committed implementation, so the restore leg has a real
reference; both prove the mutation reached disk before reading anything, and
prove the restore by content hash against the HEAD blob rather than by an exit
code.
A. An unledgered file in the newly compiled zone (the load-bearing one:
this file is in NO tsc program on
main).B. Deleting a compile-time pin directive, with the control that says what
this PR did and did not change.
The control is the point: this directive was live before the PR, and correction
2 above is that reading rather than a claim.
What else moved, and why
scripts/check-type-check-coverage.mjs— four ledger entries graduated.plugin-approvals(345),plugin-auth(94) andplugin-sharing(3) leaveTEST_DEBT;knowledge-ragflow(4) leavesDEBT. ⛔ None was paid down. Thegate itself named all four as graduated once the programs existed, and the same
errors are now held one level finer — per file and per signature — in each
package's own
test-typecheck-debt.json. A block aboveTEST_DEBTrecordsthat, because a deleted debt entry normally means the errors are gone and here
it does not.
scripts/check-type-source-resolution.mjs— a re-baseline on the registry'sdocumented onboarding limb (#11490). Thirteen new
tsconfig.test.jsonmovethe program set, which #11490 made a package's prerogative. All three of that
doc-block's conditions are met and stated in place: every dep admitted is
annotated
via tsconfig.test.jsonby the gate's own failure text (condition 1 —none is newly reached through a program that was already counted); the numbers
are stated (condition 2) —
— so +13 programs, +1 entry (
plugin-dev, which had none) and +27 pairs; and itis reviewed as a re-baseline, not an escape from red (condition 3). ⛔
pathsis deliberately not the tool here, by that doc-block's own measurement on PR
#12570. Nine of the onboarded packages add zero pairs.
scripts/regen-artifacts.mjs— fourNOT_DRIVER_MANAGEDrows, one per newledger.
reconcileGeneratorskeys on (owner, script), so each newgen:test-typecheck-debtneeds its own disposition; the ten zero packages defineno generator and therefore need no row.
packages/plugins/knowledge-ragflow/tsconfig.json— its build config nowexcludes
**/*.test.ts. This is not a package hiding its tests: it had notypecheckscript at all,check:type-check-coveragerefuses atypecheckthat never invokes tsc, and with the tests still in the build program that first
limb would land red on debt this card is explicitly not chartered to repair. The
split is the family's shape —
tsc --noEmitjudges the shipped source, andevery test file is judged one command later against the EXACT ledger. ⛔ This is
not the repo-wide "packages missing a
typecheckscript" carry-over the rulingholds separate in item 5; it is the single invocation path this card's own
instrument needs in order to run at all in that package.
packages/plugins/plugin-hono-server/tsconfig.test.jsonhas noliboverride, unlike its thirteen siblings, and that is measured rather than
stylistic: this package's
tsconfig.jsondoes not extend the root config anddeclares no
lib, so tsc supplies thetarget: ES2022default — which includesDOM. Pinninglib: ["ES2022"]strips it and manufactures 34 errors, 26 of theminside
node_modules.d.ts files this package cannot reach to fix. Zero withoutit.
Verification
Union run at
b7413a964.pnpm --filter @objectstack/PKG check:test-typecheck— all 14 green onthe merged tree, each printing its own
check:test-typecheck: OKverdict line.node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack, re-derived from the final diff), all green:check:agent-test-spelling,check:bash32-floor,check:changeset-gate-self-tests,check:cli-command-ids,check:cross-package-test-inputs,check:doc-authoring,check:entry-guard,check:merge-driver,check:nul-bytes,check:objectui-changeset,check:override-consistency,check:page-declaration-shape,check:parse-guard,check:pm-half-states,check:pnpm-filter-targets,check:published-files,check:ratchet-remedy-authority,check:service-providers,check:slot-lookup,check:test-source-alias,check:turbo-task-graph,check:type-check-coverage,check:type-source-resolution,check:watch-hint-literal,check:declared-population-live.check:type-check-coverage --self-test(47 + 65 + 43 + 28 + 19 + 18 cases),check:type-source-resolution --self-test, andcheck:merge-driver(which isgit-merge-regen --self-test,the reconciliation that reads
regen-artifacts.mjs). No vitest suite names anyof the three (
git grepover*.test.*: 0 hits that reference them as code).pnpm --filter the 14 plugin packages typecheck— green.35 of the 38 changed paths outside its population entirely (
--format json,every one carrying
File ignored because no matching configuration was supplied.); the 3 it does judge — the editedscripts/*.mjs— reporterrorCount: 0, warningCount: 0. The narrowing cannot have excluded anything:this repo runs one
eslint.config.mjswhich "never enables type-aware linting(no
parserOptions.project, no typed@typescript-eslintrules) for ANYfile", so no untouched file's verdict is a function of this diff.
check:dual-build-cjs-loadsandcheck:type-check-debt(--re-measure) exit3 = PREREQUISITE NOT MET in a worktree without the whole repo's
dist/—NOT a pass and NOT a failure. Both were re-run after
turbo run build --filter='./packages/*' --filter='./packages/*/*'and are green:check-type-check-coverage --re-measure: OK — 23 ledger entr(ies) re-measured in 287.7s, 771 raw tsc error(s) total, none above its recorded number.withsurplus: none — every entry sits exactly at its measurement, so any new error is red.That is the reading that matters for the four entries this PR deletes.Convention-triggered (
check:i18n,check:i18n-stale-fill) and thefilter-scoped
@objectstack/spec check:llms-txt: green.vitestfor@objectstack/knowledge-ragflow(the only package whose buildtsconfig.jsonthis PR edits): 1 file / 9 tests passed. No runtime source is edited anywhere in
this PR, so no other suite is in the change's radius.
Generated by Claude Code