build(objectql): give the package a test-layer tsc program and ledger its 242 errors - #14115

Merged
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-13676-objectql-test-typecheck
Sep 1, 2026
Merged

build(objectql): give the package a test-layer tsc program and ledger its 242 errors#14115
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-13676-objectql-test-typecheck

Conversation

@claude

@claudeclaudeBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes#13676

packages/objectql/tsconfig.json excluded **/*.test.ts, and the package's typecheck script was tsc --noEmit against that very config. So pnpm --filter @objectstack/objectql typecheck exiting 0 was a true sentence carrying no information about any of the package's 251 test files. This adopts the sibling-config route the repo already prescribes (the #5286 mechanism, generalised in #5449, and the route #12542 took for packages/rest).

The premise, re-verified before anything was written

Measured at 2a181174a6, workspace closure built first:

proberesult
tsc --listFiles on packages/objectql (build config)536 files in program, 0 of its 251 *.test.ts among them
same probe, objectql's own non-test src/**50 present — so the probe fires; the zero is the exclude line
directional control: packages/drivers/driver-memory (no test exclusion)38 of 38 test files in program

The premise held. engine-filter-array-lowering.test.ts — the negative pin required by maintainer ruling #13357 execution point 3, landed in #13673, proving a refused filter shape cannot reach the reference matcher — was in no tsc program at all.

What this changes

  • packages/objectql/tsconfig.test.json (new) — module semantics matched to vitest (esnext / bundler / lib: ES2022) and rootDir widened to the package. ⛔ Strictness is untouched: strict, noUnusedLocals, noUnusedParameters, noImplicitReturns, noFallthroughCasesInSwitch all inherit from the root config.
  • packages/objectql/package.jsontypecheck now names the sibling via check:test-typecheck, plus gen:test-typecheck-debt. tsx added to devDependencies: it was not linked into this package, and the three onboarded siblings all declare it.
  • packages/objectql/test-typecheck-debt.json (new, generated) — 44 files / 242 errors / 69 pinned signatures, exact and shrink-only.
  • scripts/check-type-check-coverage.mjs — the @objectstack/objectqlTEST_DEBT entry is deleted. The package graduated, and the gate itself demands the deletion.

The number this card was dispatched to produce

242 errors across 44 files, from a raw 251 under the inherited NodeNext semantics. The config tier removed is 9: TS2550 x8 (Array.prototype.at against a lib older than es2022) and TS1470 x1 (import.meta in a CJS program).

By code: TS2339 x115 · TS7006 x36 · TS2345 x34 · TS2749 x14 · TS2322 x14 · TS6133 x9 · TS18048 x8 · TS2353 x4 · 8 singletons.

Top files: engine.test.ts x102 · datasource-mapping.test.ts x17 · plugin.integration.test.ts x12 · hook-condition-fail-loud.test.ts x12 · registry.test.ts x10 · protocol-package-lifecycle.test.ts x8.

Every one of the 242 is pre-existing: this PR edits no test file, and each would have been reported on origin/main had this program ever existed. They are ledgered per file rather than repaired, which is what #12542 did for rest's 37 and #5286 for spec's 691. Paying them down belongs on its own card, as rest's does.

Not one any and not one @ts-expect-error was added anywhere to open this gate. Bulk-suppressing the residue is the exact shape this card exists to prevent — it turns a real gate into a phantom one.

⚠️ The negative pin: zero errors, and that zero is weak

src/engine-filter-array-lowering.test.ts reports 0 errors and therefore carries no ledger entry, so any error it ever gains is red on arrival. But read the zero correctly — it is not evidence the pin is type-checked:

  • const driver: any — the recording driver, whose captured AST is the unreachability evidence.
  • interface SeenRead { ast: any } — so lastWhere(), the expression the whole proof reads, is typed by nothing.
  • 31 bare as any call sites, against the file's own header, which rejects "a bare as any" in favour of as unknown as EngineQueryOptions (asFilterArrayQuery, used 14 times).

A drifted IDataDriver signature would still not redden this file. Putting it in a program is the precondition for repairing that, not the repair; it is recorded separately and is deliberately not smuggled in here.

Verification

Run at 344681185a, workspace closure built first.

  • pnpm --filter @objectstack/objectql typecheck — exit 0. Gate's own verdict: check:test-typecheck: OK — @objectstack/objectql's test layer compiles under packages/objectql/tsconfig.test.json; 44 file(s) / 242 error(s) / 69 pinned signature(s).
  • pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2251 test files passed, 4331 tests passed.
  • pnpm check:type-check-coverage — exit 0. Test layer now reads 16 package(s) still hide their own tests / 695 files / 908 frozen errors, down from 17 / 946 / 1159.
  • pnpm check:type-check-debt — exit 0. 27 ledger entr(ies) re-measured in 195.0s, 1217 raw tsc error(s) total, none above its recorded number. surplus: none.
  • Full derived family (node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack, 34 commands): 32 exit 0, 1 already-green duplicate, 1 NOT MEASUREDcheck-test-completeness.mjs exits 3 without a CI test-run log, which its own text says to record as not measured rather than as a pass. Exit codes captured before any pipe.

Ablation — the ledger deletion is required, not cosmetic. Mutant taken byte-exact from a real commit (git checkout BASE -- scripts/check-type-check-coverage.mjs), confirmed on disk by hash (df3b0f68 to 84c4c608) and by the entry count going 0 to 1, then the gate run: exit 1, @objectstack/objectql: has a TEST_DEBT entry but has no test files -- it graduated; delete its entry from TEST_DEBT. Restore leg proven the same way and not merely trapped: on-disk hash back to df3b0f68, identical to the HEAD blob, with git diff HEAD empty.

No changeset: this publishes nothing from any package (files is dist / README.md / CHANGELOG.md, and neither new file is in it), matching PR #12570, the identical change for packages/rest, which merged under skip-changeset.

Generated by Claude Code


Generated by Claude Code

@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 1, 2026
@github-actions

github-actionsBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️1 changed file(s) yielded no anchor (packages/objectql/test-typecheck-debt.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/objectql/test-typecheck-debt.json) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.

Coarse fallback — 15 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 556ebc1509b1a6dcc842425ec58e74d095b7c966packageMentionDocs.

…VER_MANAGED
`gen:test-typecheck-debt` in `@objectstack/objectql` had no recorded merge
disposition, so `check:merge-driver` refused the branch. The artifact it writes
is a shrink-only ratchet — the same file, generator and trade as its
`packages/spec`, `packages/client` and `packages/rest` siblings — so
recomputing it mid-merge would record whatever the half-merged tree compiles to
and let a file that gained errors enter the ledger as merge noise instead of as
red. It therefore takes the NOT_DRIVER_MANAGED side, with no `.gitattributes`
route: routing a shrink-only ratchet is what that ledger exists to prevent.
Accounting in `reconcileGenerators` is keyed per (owner, script), so the entry
carries both `gen` and `owner: '@objectstack/objectql'`; the `packages/client`
and `packages/rest` copies of the same generator are accounted the same way.
@zhuangjianguo
zhuangjianguo marked this pull request as ready for review September 1, 2026 07:42
@zhuangjianguo
zhuangjianguo added this pull request to the merge queueSep 1, 2026
Merged via the queue into main with commit 9235e2dSep 1, 2026
35 checks passed
@zhuangjianguo
zhuangjianguo deleted the claude/issue-13676-objectql-test-typecheck branch September 1, 2026 08:08
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependenciesPull requests that update a dependency filesize/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants

@zhuangjianguo@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

build(objectql): give the package a test-layer tsc program and ledger its 242 errors - #14115

Merged
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-13676-objectql-test-typecheck
Sep 1, 2026
Merged

build(objectql): give the package a test-layer tsc program and ledger its 242 errors#14115
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-13676-objectql-test-typecheck

Conversation

@claude

@claudeclaudeBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes#13676

packages/objectql/tsconfig.json excluded **/*.test.ts, and the package's typecheck script was tsc --noEmit against that very config. So pnpm --filter @objectstack/objectql typecheck exiting 0 was a true sentence carrying no information about any of the package's 251 test files. This adopts the sibling-config route the repo already prescribes (the #5286 mechanism, generalised in #5449, and the route #12542 took for packages/rest).

The premise, re-verified before anything was written

Measured at 2a181174a6, workspace closure built first:

proberesult
tsc --listFiles on packages/objectql (build config)536 files in program, 0 of its 251 *.test.ts among them
same probe, objectql's own non-test src/**50 present — so the probe fires; the zero is the exclude line
directional control: packages/drivers/driver-memory (no test exclusion)38 of 38 test files in program

The premise held. engine-filter-array-lowering.test.ts — the negative pin required by maintainer ruling #13357 execution point 3, landed in #13673, proving a refused filter shape cannot reach the reference matcher — was in no tsc program at all.

What this changes

  • packages/objectql/tsconfig.test.json (new) — module semantics matched to vitest (esnext / bundler / lib: ES2022) and rootDir widened to the package. ⛔ Strictness is untouched: strict, noUnusedLocals, noUnusedParameters, noImplicitReturns, noFallthroughCasesInSwitch all inherit from the root config.
  • packages/objectql/package.jsontypecheck now names the sibling via check:test-typecheck, plus gen:test-typecheck-debt. tsx added to devDependencies: it was not linked into this package, and the three onboarded siblings all declare it.
  • packages/objectql/test-typecheck-debt.json (new, generated) — 44 files / 242 errors / 69 pinned signatures, exact and shrink-only.
  • scripts/check-type-check-coverage.mjs — the @objectstack/objectqlTEST_DEBT entry is deleted. The package graduated, and the gate itself demands the deletion.

The number this card was dispatched to produce

242 errors across 44 files, from a raw 251 under the inherited NodeNext semantics. The config tier removed is 9: TS2550 x8 (Array.prototype.at against a lib older than es2022) and TS1470 x1 (import.meta in a CJS program).

By code: TS2339 x115 · TS7006 x36 · TS2345 x34 · TS2749 x14 · TS2322 x14 · TS6133 x9 · TS18048 x8 · TS2353 x4 · 8 singletons.

Top files: engine.test.ts x102 · datasource-mapping.test.ts x17 · plugin.integration.test.ts x12 · hook-condition-fail-loud.test.ts x12 · registry.test.ts x10 · protocol-package-lifecycle.test.ts x8.

Every one of the 242 is pre-existing: this PR edits no test file, and each would have been reported on origin/main had this program ever existed. They are ledgered per file rather than repaired, which is what #12542 did for rest's 37 and #5286 for spec's 691. Paying them down belongs on its own card, as rest's does.

Not one any and not one @ts-expect-error was added anywhere to open this gate. Bulk-suppressing the residue is the exact shape this card exists to prevent — it turns a real gate into a phantom one.

⚠️ The negative pin: zero errors, and that zero is weak

src/engine-filter-array-lowering.test.ts reports 0 errors and therefore carries no ledger entry, so any error it ever gains is red on arrival. But read the zero correctly — it is not evidence the pin is type-checked:

  • const driver: any — the recording driver, whose captured AST is the unreachability evidence.
  • interface SeenRead { ast: any } — so lastWhere(), the expression the whole proof reads, is typed by nothing.
  • 31 bare as any call sites, against the file's own header, which rejects "a bare as any" in favour of as unknown as EngineQueryOptions (asFilterArrayQuery, used 14 times).

A drifted IDataDriver signature would still not redden this file. Putting it in a program is the precondition for repairing that, not the repair; it is recorded separately and is deliberately not smuggled in here.

Verification

Run at 344681185a, workspace closure built first.

  • pnpm --filter @objectstack/objectql typecheck — exit 0. Gate's own verdict: check:test-typecheck: OK — @objectstack/objectql's test layer compiles under packages/objectql/tsconfig.test.json; 44 file(s) / 242 error(s) / 69 pinned signature(s).
  • pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2251 test files passed, 4331 tests passed.
  • pnpm check:type-check-coverage — exit 0. Test layer now reads 16 package(s) still hide their own tests / 695 files / 908 frozen errors, down from 17 / 946 / 1159.
  • pnpm check:type-check-debt — exit 0. 27 ledger entr(ies) re-measured in 195.0s, 1217 raw tsc error(s) total, none above its recorded number. surplus: none.
  • Full derived family (node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack, 34 commands): 32 exit 0, 1 already-green duplicate, 1 NOT MEASUREDcheck-test-completeness.mjs exits 3 without a CI test-run log, which its own text says to record as not measured rather than as a pass. Exit codes captured before any pipe.

Ablation — the ledger deletion is required, not cosmetic. Mutant taken byte-exact from a real commit (git checkout BASE -- scripts/check-type-check-coverage.mjs), confirmed on disk by hash (df3b0f68 to 84c4c608) and by the entry count going 0 to 1, then the gate run: exit 1, @objectstack/objectql: has a TEST_DEBT entry but has no test files -- it graduated; delete its entry from TEST_DEBT. Restore leg proven the same way and not merely trapped: on-disk hash back to df3b0f68, identical to the HEAD blob, with git diff HEAD empty.

No changeset: this publishes nothing from any package (files is dist / README.md / CHANGELOG.md, and neither new file is in it), matching PR #12570, the identical change for packages/rest, which merged under skip-changeset.

Generated by Claude Code


Generated by Claude Code

@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 1, 2026
@github-actions

github-actionsBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️1 changed file(s) yielded no anchor (packages/objectql/test-typecheck-debt.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/objectql/test-typecheck-debt.json) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.

Coarse fallback — 15 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 556ebc1509b1a6dcc842425ec58e74d095b7c966packageMentionDocs.

…VER_MANAGED
`gen:test-typecheck-debt` in `@objectstack/objectql` had no recorded merge
disposition, so `check:merge-driver` refused the branch. The artifact it writes
is a shrink-only ratchet — the same file, generator and trade as its
`packages/spec`, `packages/client` and `packages/rest` siblings — so
recomputing it mid-merge would record whatever the half-merged tree compiles to
and let a file that gained errors enter the ledger as merge noise instead of as
red. It therefore takes the NOT_DRIVER_MANAGED side, with no `.gitattributes`
route: routing a shrink-only ratchet is what that ledger exists to prevent.
Accounting in `reconcileGenerators` is keyed per (owner, script), so the entry
carries both `gen` and `owner: '@objectstack/objectql'`; the `packages/client`
and `packages/rest` copies of the same generator are accounted the same way.
@zhuangjianguo
zhuangjianguo marked this pull request as ready for review September 1, 2026 07:42
@zhuangjianguo
zhuangjianguo added this pull request to the merge queueSep 1, 2026
Merged via the queue into main with commit 9235e2dSep 1, 2026
35 checks passed
@zhuangjianguo
zhuangjianguo deleted the claude/issue-13676-objectql-test-typecheck branch September 1, 2026 08:08
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependenciesPull requests that update a dependency filesize/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants

@zhuangjianguo@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

build(objectql): give the package a test-layer tsc program and ledger its 242 errors - #14115

Merged
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-13676-objectql-test-typecheck
Sep 1, 2026
Merged

build(objectql): give the package a test-layer tsc program and ledger its 242 errors#14115
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-13676-objectql-test-typecheck

Conversation

@claude

@claudeclaudeBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes#13676

packages/objectql/tsconfig.json excluded **/*.test.ts, and the package's typecheck script was tsc --noEmit against that very config. So pnpm --filter @objectstack/objectql typecheck exiting 0 was a true sentence carrying no information about any of the package's 251 test files. This adopts the sibling-config route the repo already prescribes (the #5286 mechanism, generalised in #5449, and the route #12542 took for packages/rest).

The premise, re-verified before anything was written

Measured at 2a181174a6, workspace closure built first:

proberesult
tsc --listFiles on packages/objectql (build config)536 files in program, 0 of its 251 *.test.ts among them
same probe, objectql's own non-test src/**50 present — so the probe fires; the zero is the exclude line
directional control: packages/drivers/driver-memory (no test exclusion)38 of 38 test files in program

The premise held. engine-filter-array-lowering.test.ts — the negative pin required by maintainer ruling #13357 execution point 3, landed in #13673, proving a refused filter shape cannot reach the reference matcher — was in no tsc program at all.

What this changes

  • packages/objectql/tsconfig.test.json (new) — module semantics matched to vitest (esnext / bundler / lib: ES2022) and rootDir widened to the package. ⛔ Strictness is untouched: strict, noUnusedLocals, noUnusedParameters, noImplicitReturns, noFallthroughCasesInSwitch all inherit from the root config.
  • packages/objectql/package.jsontypecheck now names the sibling via check:test-typecheck, plus gen:test-typecheck-debt. tsx added to devDependencies: it was not linked into this package, and the three onboarded siblings all declare it.
  • packages/objectql/test-typecheck-debt.json (new, generated) — 44 files / 242 errors / 69 pinned signatures, exact and shrink-only.
  • scripts/check-type-check-coverage.mjs — the @objectstack/objectqlTEST_DEBT entry is deleted. The package graduated, and the gate itself demands the deletion.

The number this card was dispatched to produce

242 errors across 44 files, from a raw 251 under the inherited NodeNext semantics. The config tier removed is 9: TS2550 x8 (Array.prototype.at against a lib older than es2022) and TS1470 x1 (import.meta in a CJS program).

By code: TS2339 x115 · TS7006 x36 · TS2345 x34 · TS2749 x14 · TS2322 x14 · TS6133 x9 · TS18048 x8 · TS2353 x4 · 8 singletons.

Top files: engine.test.ts x102 · datasource-mapping.test.ts x17 · plugin.integration.test.ts x12 · hook-condition-fail-loud.test.ts x12 · registry.test.ts x10 · protocol-package-lifecycle.test.ts x8.

Every one of the 242 is pre-existing: this PR edits no test file, and each would have been reported on origin/main had this program ever existed. They are ledgered per file rather than repaired, which is what #12542 did for rest's 37 and #5286 for spec's 691. Paying them down belongs on its own card, as rest's does.

Not one any and not one @ts-expect-error was added anywhere to open this gate. Bulk-suppressing the residue is the exact shape this card exists to prevent — it turns a real gate into a phantom one.

⚠️ The negative pin: zero errors, and that zero is weak

src/engine-filter-array-lowering.test.ts reports 0 errors and therefore carries no ledger entry, so any error it ever gains is red on arrival. But read the zero correctly — it is not evidence the pin is type-checked:

  • const driver: any — the recording driver, whose captured AST is the unreachability evidence.
  • interface SeenRead { ast: any } — so lastWhere(), the expression the whole proof reads, is typed by nothing.
  • 31 bare as any call sites, against the file's own header, which rejects "a bare as any" in favour of as unknown as EngineQueryOptions (asFilterArrayQuery, used 14 times).

A drifted IDataDriver signature would still not redden this file. Putting it in a program is the precondition for repairing that, not the repair; it is recorded separately and is deliberately not smuggled in here.

Verification

Run at 344681185a, workspace closure built first.

  • pnpm --filter @objectstack/objectql typecheck — exit 0. Gate's own verdict: check:test-typecheck: OK — @objectstack/objectql's test layer compiles under packages/objectql/tsconfig.test.json; 44 file(s) / 242 error(s) / 69 pinned signature(s).
  • pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2251 test files passed, 4331 tests passed.
  • pnpm check:type-check-coverage — exit 0. Test layer now reads 16 package(s) still hide their own tests / 695 files / 908 frozen errors, down from 17 / 946 / 1159.
  • pnpm check:type-check-debt — exit 0. 27 ledger entr(ies) re-measured in 195.0s, 1217 raw tsc error(s) total, none above its recorded number. surplus: none.
  • Full derived family (node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack, 34 commands): 32 exit 0, 1 already-green duplicate, 1 NOT MEASUREDcheck-test-completeness.mjs exits 3 without a CI test-run log, which its own text says to record as not measured rather than as a pass. Exit codes captured before any pipe.

Ablation — the ledger deletion is required, not cosmetic. Mutant taken byte-exact from a real commit (git checkout BASE -- scripts/check-type-check-coverage.mjs), confirmed on disk by hash (df3b0f68 to 84c4c608) and by the entry count going 0 to 1, then the gate run: exit 1, @objectstack/objectql: has a TEST_DEBT entry but has no test files -- it graduated; delete its entry from TEST_DEBT. Restore leg proven the same way and not merely trapped: on-disk hash back to df3b0f68, identical to the HEAD blob, with git diff HEAD empty.

No changeset: this publishes nothing from any package (files is dist / README.md / CHANGELOG.md, and neither new file is in it), matching PR #12570, the identical change for packages/rest, which merged under skip-changeset.

Generated by Claude Code


Generated by Claude Code

@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 1, 2026
@github-actions

github-actionsBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️1 changed file(s) yielded no anchor (packages/objectql/test-typecheck-debt.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/objectql/test-typecheck-debt.json) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.

Coarse fallback — 15 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 556ebc1509b1a6dcc842425ec58e74d095b7c966packageMentionDocs.

…VER_MANAGED
`gen:test-typecheck-debt` in `@objectstack/objectql` had no recorded merge
disposition, so `check:merge-driver` refused the branch. The artifact it writes
is a shrink-only ratchet — the same file, generator and trade as its
`packages/spec`, `packages/client` and `packages/rest` siblings — so
recomputing it mid-merge would record whatever the half-merged tree compiles to
and let a file that gained errors enter the ledger as merge noise instead of as
red. It therefore takes the NOT_DRIVER_MANAGED side, with no `.gitattributes`
route: routing a shrink-only ratchet is what that ledger exists to prevent.
Accounting in `reconcileGenerators` is keyed per (owner, script), so the entry
carries both `gen` and `owner: '@objectstack/objectql'`; the `packages/client`
and `packages/rest` copies of the same generator are accounted the same way.
@zhuangjianguo
zhuangjianguo marked this pull request as ready for review September 1, 2026 07:42
@zhuangjianguo
zhuangjianguo added this pull request to the merge queueSep 1, 2026
Merged via the queue into main with commit 9235e2dSep 1, 2026
35 checks passed
@zhuangjianguo
zhuangjianguo deleted the claude/issue-13676-objectql-test-typecheck branch September 1, 2026 08:08
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependenciesPull requests that update a dependency filesize/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants

@zhuangjianguo@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

build(objectql): give the package a test-layer tsc program and ledger its 242 errors - #14115

Merged
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-13676-objectql-test-typecheck
Sep 1, 2026
Merged

build(objectql): give the package a test-layer tsc program and ledger its 242 errors#14115
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-13676-objectql-test-typecheck

Conversation

@claude

@claudeclaudeBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes#13676

packages/objectql/tsconfig.json excluded **/*.test.ts, and the package's typecheck script was tsc --noEmit against that very config. So pnpm --filter @objectstack/objectql typecheck exiting 0 was a true sentence carrying no information about any of the package's 251 test files. This adopts the sibling-config route the repo already prescribes (the #5286 mechanism, generalised in #5449, and the route #12542 took for packages/rest).

The premise, re-verified before anything was written

Measured at 2a181174a6, workspace closure built first:

proberesult
tsc --listFiles on packages/objectql (build config)536 files in program, 0 of its 251 *.test.ts among them
same probe, objectql's own non-test src/**50 present — so the probe fires; the zero is the exclude line
directional control: packages/drivers/driver-memory (no test exclusion)38 of 38 test files in program

The premise held. engine-filter-array-lowering.test.ts — the negative pin required by maintainer ruling #13357 execution point 3, landed in #13673, proving a refused filter shape cannot reach the reference matcher — was in no tsc program at all.

What this changes

  • packages/objectql/tsconfig.test.json (new) — module semantics matched to vitest (esnext / bundler / lib: ES2022) and rootDir widened to the package. ⛔ Strictness is untouched: strict, noUnusedLocals, noUnusedParameters, noImplicitReturns, noFallthroughCasesInSwitch all inherit from the root config.
  • packages/objectql/package.jsontypecheck now names the sibling via check:test-typecheck, plus gen:test-typecheck-debt. tsx added to devDependencies: it was not linked into this package, and the three onboarded siblings all declare it.
  • packages/objectql/test-typecheck-debt.json (new, generated) — 44 files / 242 errors / 69 pinned signatures, exact and shrink-only.
  • scripts/check-type-check-coverage.mjs — the @objectstack/objectqlTEST_DEBT entry is deleted. The package graduated, and the gate itself demands the deletion.

The number this card was dispatched to produce

242 errors across 44 files, from a raw 251 under the inherited NodeNext semantics. The config tier removed is 9: TS2550 x8 (Array.prototype.at against a lib older than es2022) and TS1470 x1 (import.meta in a CJS program).

By code: TS2339 x115 · TS7006 x36 · TS2345 x34 · TS2749 x14 · TS2322 x14 · TS6133 x9 · TS18048 x8 · TS2353 x4 · 8 singletons.

Top files: engine.test.ts x102 · datasource-mapping.test.ts x17 · plugin.integration.test.ts x12 · hook-condition-fail-loud.test.ts x12 · registry.test.ts x10 · protocol-package-lifecycle.test.ts x8.

Every one of the 242 is pre-existing: this PR edits no test file, and each would have been reported on origin/main had this program ever existed. They are ledgered per file rather than repaired, which is what #12542 did for rest's 37 and #5286 for spec's 691. Paying them down belongs on its own card, as rest's does.

Not one any and not one @ts-expect-error was added anywhere to open this gate. Bulk-suppressing the residue is the exact shape this card exists to prevent — it turns a real gate into a phantom one.

⚠️ The negative pin: zero errors, and that zero is weak

src/engine-filter-array-lowering.test.ts reports 0 errors and therefore carries no ledger entry, so any error it ever gains is red on arrival. But read the zero correctly — it is not evidence the pin is type-checked:

  • const driver: any — the recording driver, whose captured AST is the unreachability evidence.
  • interface SeenRead { ast: any } — so lastWhere(), the expression the whole proof reads, is typed by nothing.
  • 31 bare as any call sites, against the file's own header, which rejects "a bare as any" in favour of as unknown as EngineQueryOptions (asFilterArrayQuery, used 14 times).

A drifted IDataDriver signature would still not redden this file. Putting it in a program is the precondition for repairing that, not the repair; it is recorded separately and is deliberately not smuggled in here.

Verification

Run at 344681185a, workspace closure built first.

  • pnpm --filter @objectstack/objectql typecheck — exit 0. Gate's own verdict: check:test-typecheck: OK — @objectstack/objectql's test layer compiles under packages/objectql/tsconfig.test.json; 44 file(s) / 242 error(s) / 69 pinned signature(s).
  • pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2251 test files passed, 4331 tests passed.
  • pnpm check:type-check-coverage — exit 0. Test layer now reads 16 package(s) still hide their own tests / 695 files / 908 frozen errors, down from 17 / 946 / 1159.
  • pnpm check:type-check-debt — exit 0. 27 ledger entr(ies) re-measured in 195.0s, 1217 raw tsc error(s) total, none above its recorded number. surplus: none.
  • Full derived family (node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack, 34 commands): 32 exit 0, 1 already-green duplicate, 1 NOT MEASUREDcheck-test-completeness.mjs exits 3 without a CI test-run log, which its own text says to record as not measured rather than as a pass. Exit codes captured before any pipe.

Ablation — the ledger deletion is required, not cosmetic. Mutant taken byte-exact from a real commit (git checkout BASE -- scripts/check-type-check-coverage.mjs), confirmed on disk by hash (df3b0f68 to 84c4c608) and by the entry count going 0 to 1, then the gate run: exit 1, @objectstack/objectql: has a TEST_DEBT entry but has no test files -- it graduated; delete its entry from TEST_DEBT. Restore leg proven the same way and not merely trapped: on-disk hash back to df3b0f68, identical to the HEAD blob, with git diff HEAD empty.

No changeset: this publishes nothing from any package (files is dist / README.md / CHANGELOG.md, and neither new file is in it), matching PR #12570, the identical change for packages/rest, which merged under skip-changeset.

Generated by Claude Code


Generated by Claude Code

@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 1, 2026
@github-actions

github-actionsBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️1 changed file(s) yielded no anchor (packages/objectql/test-typecheck-debt.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/objectql/test-typecheck-debt.json) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.

Coarse fallback — 15 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 556ebc1509b1a6dcc842425ec58e74d095b7c966packageMentionDocs.

…VER_MANAGED
`gen:test-typecheck-debt` in `@objectstack/objectql` had no recorded merge
disposition, so `check:merge-driver` refused the branch. The artifact it writes
is a shrink-only ratchet — the same file, generator and trade as its
`packages/spec`, `packages/client` and `packages/rest` siblings — so
recomputing it mid-merge would record whatever the half-merged tree compiles to
and let a file that gained errors enter the ledger as merge noise instead of as
red. It therefore takes the NOT_DRIVER_MANAGED side, with no `.gitattributes`
route: routing a shrink-only ratchet is what that ledger exists to prevent.
Accounting in `reconcileGenerators` is keyed per (owner, script), so the entry
carries both `gen` and `owner: '@objectstack/objectql'`; the `packages/client`
and `packages/rest` copies of the same generator are accounted the same way.
@zhuangjianguo
zhuangjianguo marked this pull request as ready for review September 1, 2026 07:42
@zhuangjianguo
zhuangjianguo added this pull request to the merge queueSep 1, 2026
Merged via the queue into main with commit 9235e2dSep 1, 2026
35 checks passed
@zhuangjianguo
zhuangjianguo deleted the claude/issue-13676-objectql-test-typecheck branch September 1, 2026 08:08
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependenciesPull requests that update a dependency filesize/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants

@zhuangjianguo@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

build(objectql): give the package a test-layer tsc program and ledger its 242 errors - #14115

Merged
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-13676-objectql-test-typecheck
Sep 1, 2026
Merged

build(objectql): give the package a test-layer tsc program and ledger its 242 errors#14115
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-13676-objectql-test-typecheck

Conversation

@claude

@claudeclaudeBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes#13676

packages/objectql/tsconfig.json excluded **/*.test.ts, and the package's typecheck script was tsc --noEmit against that very config. So pnpm --filter @objectstack/objectql typecheck exiting 0 was a true sentence carrying no information about any of the package's 251 test files. This adopts the sibling-config route the repo already prescribes (the #5286 mechanism, generalised in #5449, and the route #12542 took for packages/rest).

The premise, re-verified before anything was written

Measured at 2a181174a6, workspace closure built first:

proberesult
tsc --listFiles on packages/objectql (build config)536 files in program, 0 of its 251 *.test.ts among them
same probe, objectql's own non-test src/**50 present — so the probe fires; the zero is the exclude line
directional control: packages/drivers/driver-memory (no test exclusion)38 of 38 test files in program

The premise held. engine-filter-array-lowering.test.ts — the negative pin required by maintainer ruling #13357 execution point 3, landed in #13673, proving a refused filter shape cannot reach the reference matcher — was in no tsc program at all.

What this changes

  • packages/objectql/tsconfig.test.json (new) — module semantics matched to vitest (esnext / bundler / lib: ES2022) and rootDir widened to the package. ⛔ Strictness is untouched: strict, noUnusedLocals, noUnusedParameters, noImplicitReturns, noFallthroughCasesInSwitch all inherit from the root config.
  • packages/objectql/package.jsontypecheck now names the sibling via check:test-typecheck, plus gen:test-typecheck-debt. tsx added to devDependencies: it was not linked into this package, and the three onboarded siblings all declare it.
  • packages/objectql/test-typecheck-debt.json (new, generated) — 44 files / 242 errors / 69 pinned signatures, exact and shrink-only.
  • scripts/check-type-check-coverage.mjs — the @objectstack/objectqlTEST_DEBT entry is deleted. The package graduated, and the gate itself demands the deletion.

The number this card was dispatched to produce

242 errors across 44 files, from a raw 251 under the inherited NodeNext semantics. The config tier removed is 9: TS2550 x8 (Array.prototype.at against a lib older than es2022) and TS1470 x1 (import.meta in a CJS program).

By code: TS2339 x115 · TS7006 x36 · TS2345 x34 · TS2749 x14 · TS2322 x14 · TS6133 x9 · TS18048 x8 · TS2353 x4 · 8 singletons.

Top files: engine.test.ts x102 · datasource-mapping.test.ts x17 · plugin.integration.test.ts x12 · hook-condition-fail-loud.test.ts x12 · registry.test.ts x10 · protocol-package-lifecycle.test.ts x8.

Every one of the 242 is pre-existing: this PR edits no test file, and each would have been reported on origin/main had this program ever existed. They are ledgered per file rather than repaired, which is what #12542 did for rest's 37 and #5286 for spec's 691. Paying them down belongs on its own card, as rest's does.

Not one any and not one @ts-expect-error was added anywhere to open this gate. Bulk-suppressing the residue is the exact shape this card exists to prevent — it turns a real gate into a phantom one.

⚠️ The negative pin: zero errors, and that zero is weak

src/engine-filter-array-lowering.test.ts reports 0 errors and therefore carries no ledger entry, so any error it ever gains is red on arrival. But read the zero correctly — it is not evidence the pin is type-checked:

  • const driver: any — the recording driver, whose captured AST is the unreachability evidence.
  • interface SeenRead { ast: any } — so lastWhere(), the expression the whole proof reads, is typed by nothing.
  • 31 bare as any call sites, against the file's own header, which rejects "a bare as any" in favour of as unknown as EngineQueryOptions (asFilterArrayQuery, used 14 times).

A drifted IDataDriver signature would still not redden this file. Putting it in a program is the precondition for repairing that, not the repair; it is recorded separately and is deliberately not smuggled in here.

Verification

Run at 344681185a, workspace closure built first.

  • pnpm --filter @objectstack/objectql typecheck — exit 0. Gate's own verdict: check:test-typecheck: OK — @objectstack/objectql's test layer compiles under packages/objectql/tsconfig.test.json; 44 file(s) / 242 error(s) / 69 pinned signature(s).
  • pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2251 test files passed, 4331 tests passed.
  • pnpm check:type-check-coverage — exit 0. Test layer now reads 16 package(s) still hide their own tests / 695 files / 908 frozen errors, down from 17 / 946 / 1159.
  • pnpm check:type-check-debt — exit 0. 27 ledger entr(ies) re-measured in 195.0s, 1217 raw tsc error(s) total, none above its recorded number. surplus: none.
  • Full derived family (node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack, 34 commands): 32 exit 0, 1 already-green duplicate, 1 NOT MEASUREDcheck-test-completeness.mjs exits 3 without a CI test-run log, which its own text says to record as not measured rather than as a pass. Exit codes captured before any pipe.

Ablation — the ledger deletion is required, not cosmetic. Mutant taken byte-exact from a real commit (git checkout BASE -- scripts/check-type-check-coverage.mjs), confirmed on disk by hash (df3b0f68 to 84c4c608) and by the entry count going 0 to 1, then the gate run: exit 1, @objectstack/objectql: has a TEST_DEBT entry but has no test files -- it graduated; delete its entry from TEST_DEBT. Restore leg proven the same way and not merely trapped: on-disk hash back to df3b0f68, identical to the HEAD blob, with git diff HEAD empty.

No changeset: this publishes nothing from any package (files is dist / README.md / CHANGELOG.md, and neither new file is in it), matching PR #12570, the identical change for packages/rest, which merged under skip-changeset.

Generated by Claude Code


Generated by Claude Code

@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 1, 2026
@github-actions

github-actionsBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️1 changed file(s) yielded no anchor (packages/objectql/test-typecheck-debt.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/objectql/test-typecheck-debt.json) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.

Coarse fallback — 15 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 556ebc1509b1a6dcc842425ec58e74d095b7c966packageMentionDocs.

…VER_MANAGED
`gen:test-typecheck-debt` in `@objectstack/objectql` had no recorded merge
disposition, so `check:merge-driver` refused the branch. The artifact it writes
is a shrink-only ratchet — the same file, generator and trade as its
`packages/spec`, `packages/client` and `packages/rest` siblings — so
recomputing it mid-merge would record whatever the half-merged tree compiles to
and let a file that gained errors enter the ledger as merge noise instead of as
red. It therefore takes the NOT_DRIVER_MANAGED side, with no `.gitattributes`
route: routing a shrink-only ratchet is what that ledger exists to prevent.
Accounting in `reconcileGenerators` is keyed per (owner, script), so the entry
carries both `gen` and `owner: '@objectstack/objectql'`; the `packages/client`
and `packages/rest` copies of the same generator are accounted the same way.
@zhuangjianguo
zhuangjianguo marked this pull request as ready for review September 1, 2026 07:42
@zhuangjianguo
zhuangjianguo added this pull request to the merge queueSep 1, 2026
Merged via the queue into main with commit 9235e2dSep 1, 2026
35 checks passed
@zhuangjianguo
zhuangjianguo deleted the claude/issue-13676-objectql-test-typecheck branch September 1, 2026 08:08
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependenciesPull requests that update a dependency filesize/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants

@zhuangjianguo@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

build(objectql): give the package a test-layer tsc program and ledger its 242 errors - #14115

Merged
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-13676-objectql-test-typecheck
Sep 1, 2026
Merged

build(objectql): give the package a test-layer tsc program and ledger its 242 errors#14115
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-13676-objectql-test-typecheck

Conversation

@claude

@claudeclaudeBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes#13676

packages/objectql/tsconfig.json excluded **/*.test.ts, and the package's typecheck script was tsc --noEmit against that very config. So pnpm --filter @objectstack/objectql typecheck exiting 0 was a true sentence carrying no information about any of the package's 251 test files. This adopts the sibling-config route the repo already prescribes (the #5286 mechanism, generalised in #5449, and the route #12542 took for packages/rest).

The premise, re-verified before anything was written

Measured at 2a181174a6, workspace closure built first:

proberesult
tsc --listFiles on packages/objectql (build config)536 files in program, 0 of its 251 *.test.ts among them
same probe, objectql's own non-test src/**50 present — so the probe fires; the zero is the exclude line
directional control: packages/drivers/driver-memory (no test exclusion)38 of 38 test files in program

The premise held. engine-filter-array-lowering.test.ts — the negative pin required by maintainer ruling #13357 execution point 3, landed in #13673, proving a refused filter shape cannot reach the reference matcher — was in no tsc program at all.

What this changes

  • packages/objectql/tsconfig.test.json (new) — module semantics matched to vitest (esnext / bundler / lib: ES2022) and rootDir widened to the package. ⛔ Strictness is untouched: strict, noUnusedLocals, noUnusedParameters, noImplicitReturns, noFallthroughCasesInSwitch all inherit from the root config.
  • packages/objectql/package.jsontypecheck now names the sibling via check:test-typecheck, plus gen:test-typecheck-debt. tsx added to devDependencies: it was not linked into this package, and the three onboarded siblings all declare it.
  • packages/objectql/test-typecheck-debt.json (new, generated) — 44 files / 242 errors / 69 pinned signatures, exact and shrink-only.
  • scripts/check-type-check-coverage.mjs — the @objectstack/objectqlTEST_DEBT entry is deleted. The package graduated, and the gate itself demands the deletion.

The number this card was dispatched to produce

242 errors across 44 files, from a raw 251 under the inherited NodeNext semantics. The config tier removed is 9: TS2550 x8 (Array.prototype.at against a lib older than es2022) and TS1470 x1 (import.meta in a CJS program).

By code: TS2339 x115 · TS7006 x36 · TS2345 x34 · TS2749 x14 · TS2322 x14 · TS6133 x9 · TS18048 x8 · TS2353 x4 · 8 singletons.

Top files: engine.test.ts x102 · datasource-mapping.test.ts x17 · plugin.integration.test.ts x12 · hook-condition-fail-loud.test.ts x12 · registry.test.ts x10 · protocol-package-lifecycle.test.ts x8.

Every one of the 242 is pre-existing: this PR edits no test file, and each would have been reported on origin/main had this program ever existed. They are ledgered per file rather than repaired, which is what #12542 did for rest's 37 and #5286 for spec's 691. Paying them down belongs on its own card, as rest's does.

Not one any and not one @ts-expect-error was added anywhere to open this gate. Bulk-suppressing the residue is the exact shape this card exists to prevent — it turns a real gate into a phantom one.

⚠️ The negative pin: zero errors, and that zero is weak

src/engine-filter-array-lowering.test.ts reports 0 errors and therefore carries no ledger entry, so any error it ever gains is red on arrival. But read the zero correctly — it is not evidence the pin is type-checked:

  • const driver: any — the recording driver, whose captured AST is the unreachability evidence.
  • interface SeenRead { ast: any } — so lastWhere(), the expression the whole proof reads, is typed by nothing.
  • 31 bare as any call sites, against the file's own header, which rejects "a bare as any" in favour of as unknown as EngineQueryOptions (asFilterArrayQuery, used 14 times).

A drifted IDataDriver signature would still not redden this file. Putting it in a program is the precondition for repairing that, not the repair; it is recorded separately and is deliberately not smuggled in here.

Verification

Run at 344681185a, workspace closure built first.

  • pnpm --filter @objectstack/objectql typecheck — exit 0. Gate's own verdict: check:test-typecheck: OK — @objectstack/objectql's test layer compiles under packages/objectql/tsconfig.test.json; 44 file(s) / 242 error(s) / 69 pinned signature(s).
  • pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2251 test files passed, 4331 tests passed.
  • pnpm check:type-check-coverage — exit 0. Test layer now reads 16 package(s) still hide their own tests / 695 files / 908 frozen errors, down from 17 / 946 / 1159.
  • pnpm check:type-check-debt — exit 0. 27 ledger entr(ies) re-measured in 195.0s, 1217 raw tsc error(s) total, none above its recorded number. surplus: none.
  • Full derived family (node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack, 34 commands): 32 exit 0, 1 already-green duplicate, 1 NOT MEASUREDcheck-test-completeness.mjs exits 3 without a CI test-run log, which its own text says to record as not measured rather than as a pass. Exit codes captured before any pipe.

Ablation — the ledger deletion is required, not cosmetic. Mutant taken byte-exact from a real commit (git checkout BASE -- scripts/check-type-check-coverage.mjs), confirmed on disk by hash (df3b0f68 to 84c4c608) and by the entry count going 0 to 1, then the gate run: exit 1, @objectstack/objectql: has a TEST_DEBT entry but has no test files -- it graduated; delete its entry from TEST_DEBT. Restore leg proven the same way and not merely trapped: on-disk hash back to df3b0f68, identical to the HEAD blob, with git diff HEAD empty.

No changeset: this publishes nothing from any package (files is dist / README.md / CHANGELOG.md, and neither new file is in it), matching PR #12570, the identical change for packages/rest, which merged under skip-changeset.

Generated by Claude Code


Generated by Claude Code

@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 1, 2026
@github-actions

github-actionsBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️1 changed file(s) yielded no anchor (packages/objectql/test-typecheck-debt.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/objectql/test-typecheck-debt.json) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.

Coarse fallback — 15 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 556ebc1509b1a6dcc842425ec58e74d095b7c966packageMentionDocs.

…VER_MANAGED
`gen:test-typecheck-debt` in `@objectstack/objectql` had no recorded merge
disposition, so `check:merge-driver` refused the branch. The artifact it writes
is a shrink-only ratchet — the same file, generator and trade as its
`packages/spec`, `packages/client` and `packages/rest` siblings — so
recomputing it mid-merge would record whatever the half-merged tree compiles to
and let a file that gained errors enter the ledger as merge noise instead of as
red. It therefore takes the NOT_DRIVER_MANAGED side, with no `.gitattributes`
route: routing a shrink-only ratchet is what that ledger exists to prevent.
Accounting in `reconcileGenerators` is keyed per (owner, script), so the entry
carries both `gen` and `owner: '@objectstack/objectql'`; the `packages/client`
and `packages/rest` copies of the same generator are accounted the same way.
@zhuangjianguo
zhuangjianguo marked this pull request as ready for review September 1, 2026 07:42
@zhuangjianguo
zhuangjianguo added this pull request to the merge queueSep 1, 2026
Merged via the queue into main with commit 9235e2dSep 1, 2026
35 checks passed
@zhuangjianguo
zhuangjianguo deleted the claude/issue-13676-objectql-test-typecheck branch September 1, 2026 08:08
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependenciesPull requests that update a dependency filesize/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants

@zhuangjianguo@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

build(objectql): give the package a test-layer tsc program and ledger its 242 errors - #14115

Merged
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-13676-objectql-test-typecheck
Sep 1, 2026
Merged

build(objectql): give the package a test-layer tsc program and ledger its 242 errors#14115
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-13676-objectql-test-typecheck

Conversation

@claude

@claudeclaudeBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes#13676

packages/objectql/tsconfig.json excluded **/*.test.ts, and the package's typecheck script was tsc --noEmit against that very config. So pnpm --filter @objectstack/objectql typecheck exiting 0 was a true sentence carrying no information about any of the package's 251 test files. This adopts the sibling-config route the repo already prescribes (the #5286 mechanism, generalised in #5449, and the route #12542 took for packages/rest).

The premise, re-verified before anything was written

Measured at 2a181174a6, workspace closure built first:

proberesult
tsc --listFiles on packages/objectql (build config)536 files in program, 0 of its 251 *.test.ts among them
same probe, objectql's own non-test src/**50 present — so the probe fires; the zero is the exclude line
directional control: packages/drivers/driver-memory (no test exclusion)38 of 38 test files in program

The premise held. engine-filter-array-lowering.test.ts — the negative pin required by maintainer ruling #13357 execution point 3, landed in #13673, proving a refused filter shape cannot reach the reference matcher — was in no tsc program at all.

What this changes

  • packages/objectql/tsconfig.test.json (new) — module semantics matched to vitest (esnext / bundler / lib: ES2022) and rootDir widened to the package. ⛔ Strictness is untouched: strict, noUnusedLocals, noUnusedParameters, noImplicitReturns, noFallthroughCasesInSwitch all inherit from the root config.
  • packages/objectql/package.jsontypecheck now names the sibling via check:test-typecheck, plus gen:test-typecheck-debt. tsx added to devDependencies: it was not linked into this package, and the three onboarded siblings all declare it.
  • packages/objectql/test-typecheck-debt.json (new, generated) — 44 files / 242 errors / 69 pinned signatures, exact and shrink-only.
  • scripts/check-type-check-coverage.mjs — the @objectstack/objectqlTEST_DEBT entry is deleted. The package graduated, and the gate itself demands the deletion.

The number this card was dispatched to produce

242 errors across 44 files, from a raw 251 under the inherited NodeNext semantics. The config tier removed is 9: TS2550 x8 (Array.prototype.at against a lib older than es2022) and TS1470 x1 (import.meta in a CJS program).

By code: TS2339 x115 · TS7006 x36 · TS2345 x34 · TS2749 x14 · TS2322 x14 · TS6133 x9 · TS18048 x8 · TS2353 x4 · 8 singletons.

Top files: engine.test.ts x102 · datasource-mapping.test.ts x17 · plugin.integration.test.ts x12 · hook-condition-fail-loud.test.ts x12 · registry.test.ts x10 · protocol-package-lifecycle.test.ts x8.

Every one of the 242 is pre-existing: this PR edits no test file, and each would have been reported on origin/main had this program ever existed. They are ledgered per file rather than repaired, which is what #12542 did for rest's 37 and #5286 for spec's 691. Paying them down belongs on its own card, as rest's does.

Not one any and not one @ts-expect-error was added anywhere to open this gate. Bulk-suppressing the residue is the exact shape this card exists to prevent — it turns a real gate into a phantom one.

⚠️ The negative pin: zero errors, and that zero is weak

src/engine-filter-array-lowering.test.ts reports 0 errors and therefore carries no ledger entry, so any error it ever gains is red on arrival. But read the zero correctly — it is not evidence the pin is type-checked:

  • const driver: any — the recording driver, whose captured AST is the unreachability evidence.
  • interface SeenRead { ast: any } — so lastWhere(), the expression the whole proof reads, is typed by nothing.
  • 31 bare as any call sites, against the file's own header, which rejects "a bare as any" in favour of as unknown as EngineQueryOptions (asFilterArrayQuery, used 14 times).

A drifted IDataDriver signature would still not redden this file. Putting it in a program is the precondition for repairing that, not the repair; it is recorded separately and is deliberately not smuggled in here.

Verification

Run at 344681185a, workspace closure built first.

  • pnpm --filter @objectstack/objectql typecheck — exit 0. Gate's own verdict: check:test-typecheck: OK — @objectstack/objectql's test layer compiles under packages/objectql/tsconfig.test.json; 44 file(s) / 242 error(s) / 69 pinned signature(s).
  • pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2251 test files passed, 4331 tests passed.
  • pnpm check:type-check-coverage — exit 0. Test layer now reads 16 package(s) still hide their own tests / 695 files / 908 frozen errors, down from 17 / 946 / 1159.
  • pnpm check:type-check-debt — exit 0. 27 ledger entr(ies) re-measured in 195.0s, 1217 raw tsc error(s) total, none above its recorded number. surplus: none.
  • Full derived family (node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack, 34 commands): 32 exit 0, 1 already-green duplicate, 1 NOT MEASUREDcheck-test-completeness.mjs exits 3 without a CI test-run log, which its own text says to record as not measured rather than as a pass. Exit codes captured before any pipe.

Ablation — the ledger deletion is required, not cosmetic. Mutant taken byte-exact from a real commit (git checkout BASE -- scripts/check-type-check-coverage.mjs), confirmed on disk by hash (df3b0f68 to 84c4c608) and by the entry count going 0 to 1, then the gate run: exit 1, @objectstack/objectql: has a TEST_DEBT entry but has no test files -- it graduated; delete its entry from TEST_DEBT. Restore leg proven the same way and not merely trapped: on-disk hash back to df3b0f68, identical to the HEAD blob, with git diff HEAD empty.

No changeset: this publishes nothing from any package (files is dist / README.md / CHANGELOG.md, and neither new file is in it), matching PR #12570, the identical change for packages/rest, which merged under skip-changeset.

Generated by Claude Code


Generated by Claude Code

@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 1, 2026
@github-actions

github-actionsBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️1 changed file(s) yielded no anchor (packages/objectql/test-typecheck-debt.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/objectql/test-typecheck-debt.json) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.

Coarse fallback — 15 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 556ebc1509b1a6dcc842425ec58e74d095b7c966packageMentionDocs.

…VER_MANAGED
`gen:test-typecheck-debt` in `@objectstack/objectql` had no recorded merge
disposition, so `check:merge-driver` refused the branch. The artifact it writes
is a shrink-only ratchet — the same file, generator and trade as its
`packages/spec`, `packages/client` and `packages/rest` siblings — so
recomputing it mid-merge would record whatever the half-merged tree compiles to
and let a file that gained errors enter the ledger as merge noise instead of as
red. It therefore takes the NOT_DRIVER_MANAGED side, with no `.gitattributes`
route: routing a shrink-only ratchet is what that ledger exists to prevent.
Accounting in `reconcileGenerators` is keyed per (owner, script), so the entry
carries both `gen` and `owner: '@objectstack/objectql'`; the `packages/client`
and `packages/rest` copies of the same generator are accounted the same way.
@zhuangjianguo
zhuangjianguo marked this pull request as ready for review September 1, 2026 07:42
@zhuangjianguo
zhuangjianguo added this pull request to the merge queueSep 1, 2026
Merged via the queue into main with commit 9235e2dSep 1, 2026
35 checks passed
@zhuangjianguo
zhuangjianguo deleted the claude/issue-13676-objectql-test-typecheck branch September 1, 2026 08:08
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependenciesPull requests that update a dependency filesize/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants

@zhuangjianguo@claude
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

build(objectql): give the package a test-layer tsc program and ledger its 242 errors - #14115

Merged
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-13676-objectql-test-typecheck
Sep 1, 2026
Merged

build(objectql): give the package a test-layer tsc program and ledger its 242 errors#14115
zhuangjianguo merged 2 commits into
mainfrom
claude/issue-13676-objectql-test-typecheck

Conversation

@claude

@claudeclaudeBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes#13676

packages/objectql/tsconfig.json excluded **/*.test.ts, and the package's typecheck script was tsc --noEmit against that very config. So pnpm --filter @objectstack/objectql typecheck exiting 0 was a true sentence carrying no information about any of the package's 251 test files. This adopts the sibling-config route the repo already prescribes (the #5286 mechanism, generalised in #5449, and the route #12542 took for packages/rest).

The premise, re-verified before anything was written

Measured at 2a181174a6, workspace closure built first:

proberesult
tsc --listFiles on packages/objectql (build config)536 files in program, 0 of its 251 *.test.ts among them
same probe, objectql's own non-test src/**50 present — so the probe fires; the zero is the exclude line
directional control: packages/drivers/driver-memory (no test exclusion)38 of 38 test files in program

The premise held. engine-filter-array-lowering.test.ts — the negative pin required by maintainer ruling #13357 execution point 3, landed in #13673, proving a refused filter shape cannot reach the reference matcher — was in no tsc program at all.

What this changes

  • packages/objectql/tsconfig.test.json (new) — module semantics matched to vitest (esnext / bundler / lib: ES2022) and rootDir widened to the package. ⛔ Strictness is untouched: strict, noUnusedLocals, noUnusedParameters, noImplicitReturns, noFallthroughCasesInSwitch all inherit from the root config.
  • packages/objectql/package.jsontypecheck now names the sibling via check:test-typecheck, plus gen:test-typecheck-debt. tsx added to devDependencies: it was not linked into this package, and the three onboarded siblings all declare it.
  • packages/objectql/test-typecheck-debt.json (new, generated) — 44 files / 242 errors / 69 pinned signatures, exact and shrink-only.
  • scripts/check-type-check-coverage.mjs — the @objectstack/objectqlTEST_DEBT entry is deleted. The package graduated, and the gate itself demands the deletion.

The number this card was dispatched to produce

242 errors across 44 files, from a raw 251 under the inherited NodeNext semantics. The config tier removed is 9: TS2550 x8 (Array.prototype.at against a lib older than es2022) and TS1470 x1 (import.meta in a CJS program).

By code: TS2339 x115 · TS7006 x36 · TS2345 x34 · TS2749 x14 · TS2322 x14 · TS6133 x9 · TS18048 x8 · TS2353 x4 · 8 singletons.

Top files: engine.test.ts x102 · datasource-mapping.test.ts x17 · plugin.integration.test.ts x12 · hook-condition-fail-loud.test.ts x12 · registry.test.ts x10 · protocol-package-lifecycle.test.ts x8.

Every one of the 242 is pre-existing: this PR edits no test file, and each would have been reported on origin/main had this program ever existed. They are ledgered per file rather than repaired, which is what #12542 did for rest's 37 and #5286 for spec's 691. Paying them down belongs on its own card, as rest's does.

Not one any and not one @ts-expect-error was added anywhere to open this gate. Bulk-suppressing the residue is the exact shape this card exists to prevent — it turns a real gate into a phantom one.

⚠️ The negative pin: zero errors, and that zero is weak

src/engine-filter-array-lowering.test.ts reports 0 errors and therefore carries no ledger entry, so any error it ever gains is red on arrival. But read the zero correctly — it is not evidence the pin is type-checked:

  • const driver: any — the recording driver, whose captured AST is the unreachability evidence.
  • interface SeenRead { ast: any } — so lastWhere(), the expression the whole proof reads, is typed by nothing.
  • 31 bare as any call sites, against the file's own header, which rejects "a bare as any" in favour of as unknown as EngineQueryOptions (asFilterArrayQuery, used 14 times).

A drifted IDataDriver signature would still not redden this file. Putting it in a program is the precondition for repairing that, not the repair; it is recorded separately and is deliberately not smuggled in here.

Verification

Run at 344681185a, workspace closure built first.

  • pnpm --filter @objectstack/objectql typecheck — exit 0. Gate's own verdict: check:test-typecheck: OK — @objectstack/objectql's test layer compiles under packages/objectql/tsconfig.test.json; 44 file(s) / 242 error(s) / 69 pinned signature(s).
  • pnpm --filter @objectstack/objectql exec vitest run --maxWorkers=2251 test files passed, 4331 tests passed.
  • pnpm check:type-check-coverage — exit 0. Test layer now reads 16 package(s) still hide their own tests / 695 files / 908 frozen errors, down from 17 / 946 / 1159.
  • pnpm check:type-check-debt — exit 0. 27 ledger entr(ies) re-measured in 195.0s, 1217 raw tsc error(s) total, none above its recorded number. surplus: none.
  • Full derived family (node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack, 34 commands): 32 exit 0, 1 already-green duplicate, 1 NOT MEASUREDcheck-test-completeness.mjs exits 3 without a CI test-run log, which its own text says to record as not measured rather than as a pass. Exit codes captured before any pipe.

Ablation — the ledger deletion is required, not cosmetic. Mutant taken byte-exact from a real commit (git checkout BASE -- scripts/check-type-check-coverage.mjs), confirmed on disk by hash (df3b0f68 to 84c4c608) and by the entry count going 0 to 1, then the gate run: exit 1, @objectstack/objectql: has a TEST_DEBT entry but has no test files -- it graduated; delete its entry from TEST_DEBT. Restore leg proven the same way and not merely trapped: on-disk hash back to df3b0f68, identical to the HEAD blob, with git diff HEAD empty.

No changeset: this publishes nothing from any package (files is dist / README.md / CHANGELOG.md, and neither new file is in it), matching PR #12570, the identical change for packages/rest, which merged under skip-changeset.

Generated by Claude Code


Generated by Claude Code

@claudeclaudeBot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 1, 2026
@github-actions

github-actionsBot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️1 changed file(s) yielded no anchor (packages/objectql/test-typecheck-debt.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files. Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 1 changed package(s)).

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/objectql/test-typecheck-debt.json) — pages documenting those are invisible to this run
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.

Coarse fallback — 15 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 556ebc1509b1a6dcc842425ec58e74d095b7c966packageMentionDocs.

…VER_MANAGED
`gen:test-typecheck-debt` in `@objectstack/objectql` had no recorded merge
disposition, so `check:merge-driver` refused the branch. The artifact it writes
is a shrink-only ratchet — the same file, generator and trade as its
`packages/spec`, `packages/client` and `packages/rest` siblings — so
recomputing it mid-merge would record whatever the half-merged tree compiles to
and let a file that gained errors enter the ledger as merge noise instead of as
red. It therefore takes the NOT_DRIVER_MANAGED side, with no `.gitattributes`
route: routing a shrink-only ratchet is what that ledger exists to prevent.
Accounting in `reconcileGenerators` is keyed per (owner, script), so the entry
carries both `gen` and `owner: '@objectstack/objectql'`; the `packages/client`
and `packages/rest` copies of the same generator are accounted the same way.
@zhuangjianguo
zhuangjianguo marked this pull request as ready for review September 1, 2026 07:42
@zhuangjianguo
zhuangjianguo added this pull request to the merge queueSep 1, 2026
Merged via the queue into main with commit 9235e2dSep 1, 2026
35 checks passed
@zhuangjianguo
zhuangjianguo deleted the claude/issue-13676-objectql-test-typecheck branch September 1, 2026 08:08
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependenciesPull requests that update a dependency filesize/mskip-changesetPR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants

@zhuangjianguo@claude