Skip to content

fix(driver-memory,plugin-hono-server): put both objectstack.config.ts manifests inside a tsc program and import ObjectStackManifest from /kernel - #14387

Merged
os-musk merged 1 commit into
mainfrom
claude/issue-13284-manifest-config-tsc-program
Sep 2, 2026
Merged

fix(driver-memory,plugin-hono-server): put both objectstack.config.ts manifests inside a tsc program and import ObjectStackManifest from /kernel#14387
os-musk merged 1 commit into
mainfrom
claude/issue-13284-manifest-config-tsc-program

Conversation

@os-musk

@os-musk os-musk commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Fixes #13284

Both in-repo package-level manifest authoring sites imported ObjectStackManifest from @objectstack/spec/system, an entry that does not export it, and neither file was read by any tsc program. tsconfig.json selects src/**/* in both packages and the manifests sit at the package root, so the glob cannot match them: pnpm --filter ... typecheck exited 0 with a wrong import sitting on line 3. Both halves of the triage ruling are here — the import is corrected, and each file is now inside a program, so the next wrong key or wrong import fails at author time.

Half 1 — the import

ObjectStackManifest is declared in packages/spec/src/kernel/manifest.zod.ts:667 and re-exported only by packages/spec/src/kernel/index.ts:23. packages/spec/src/system/index.ts has zero occurrences of the name. Both files now read:

import type { ObjectStackManifest } from '@objectstack/spec/kernel';

import type, not a value import: the declaration is export type ObjectStackManifest = ... (a z.input alias), so there is no runtime binding to move. No spec change — the type already ships from /kernel, so the dispatch's clause ② does not fire.

Half 2 — the program, and the TS6059 measurement that chose its shape

Measured, not assumed (the prior seat's note, now a reading). Adding objectstack.config.ts to include while the emitting tsconfig.json keeps rootDir: "./src":

packages/drivers/driver-memory
  error TS6059: File '.../driver-memory/objectstack.config.ts' is not under 'rootDir'
  '.../driver-memory/src'. 'rootDir' is expected to contain all source files.
    The file is in the program because:
      Matched by include pattern 'objectstack.config.ts' in 'tsconfig.probe6059.json'

packages/plugins/plugin-hono-server
  error TS6059: File '.../plugin-hono-server/objectstack.config.ts' is not under 'rootDir'
  '.../plugin-hono-server/src'. 'rootDir' is expected to contain all source files.

It fires in both packages, and it fires under --noEmit — so the typecheck script's own flag does not sidestep it.

Route (a) chosen: a sibling typecheck-only program per package. rootDir was NOT widened, so route (b)'s dist comparison does not apply — and there is a direct reading in its place: tsc --listFiles on the build program (tsconfig.json) reports 0 occurrences of objectstack.config.ts in both packages, before and after. The emitting program is byte-for-byte the same set of files it was; tsup still builds src/index.ts only, and files publishes dist + README + CHANGELOG, which the manifest was never part of.

Each new tsconfig.typecheck.json is extends: "./tsconfig.json" + noEmit: true + rootDir: "." + include: ["objectstack.config.ts"], named by the package's typecheck script. That is the repo's established shape for source outside src/**, and its headers say why in the same words: packages/objectql/tsconfig.scripts.json, packages/plugins/plugin-auth/tsconfig.examples.json, packages/plugins/plugin-approvals/tsconfig.scripts.json. Strictness is inherited and nothing is relaxed.

Proof the program actually reads the file (a green typecheck over an unread file is the defect being fixed, so the reading is not optional) — tsc --listFiles -p tsconfig.typecheck.json:

package occurrences of objectstack.config.ts spec/dist/kernel/index.d.ts resolved files in program
driver-memory 1 1 263
plugin-hono-server 1 1 281

Reverse verification — both directions, both packages

Run from the committed state, one mutation at a time, each mutation proved on disk by counting the injected and the removed text before tsc runs, each restore proved by git diff HEAD empty and a git hash-object match against the HEAD blob, with an absolute-path trap on EXIT/INT/TERM.

Direction 1 — re-author the old /system spelling. Expected red, and red:

driver-memory        objectstack.config.ts(3,15): error TS2305: Module '"@objectstack/spec/system"' has no exported member 'ObjectStackManifest'.
plugin-hono-server   objectstack.config.ts(3,15): error TS2305: Module '"@objectstack/spec/system"' has no exported member 'ObjectStackManifest'.

Direction 2 — author a retired manifest key (capabilities, converted to a retiredKey() tombstone by the ADR-0049 retirements). Expected red against the tombstone, and red:

driver-memory        objectstack.config.ts(16,3): error TS2322: Type '{ protocols: string[]; }' is not assignable to type 'undefined'.
plugin-hono-server   objectstack.config.ts(16,3): error TS2322: Type '{ protocols: string[]; }' is not assignable to type 'undefined'.

The negative control is the base tree itself: on origin/main@d62f990a, with the wrong /system import present in both files, pnpm --filter @objectstack/driver-memory typecheck and pnpm --filter @objectstack/plugin-hono-server typecheck both exited 0. That is the blindness, measured here rather than inherited. The tsc half of the retiredKey() double channel now reaches both sites.

No ablation dist preflight is quoted because none applies: every leg above is tsc reading source directly through the new program, and no leg mutated a package whose build output another leg read.

No unrelated errors surfaced

Widening a program is the risky half, and the triage was explicit that pre-existing errors here belong to #4311 rather than to this card. Nothing surfaced: both new programs are green on their first run, with zero errors to report, absorb or suppress. Both packages' full typecheck (build program + new program), build and test are green — driver-memory 38 files / 1025 tests, plugin-hono-server 20 files / 225 tests, check-dts-emitted 1/1 for each.

Targeted in-flight re-check (triage condition 2), re-run at implementation time

24 open PRs. Each PR's changed-file list computed locally from its head branch against merge-base(origin/main, head) and intersected with the six-file surface plus both tsconfig.json:

Changeset

skip-changeset, applied at PR open and read back. ObjectStackManifest is a type alias with no runtime binding, so half 1 moves no emitted byte; the two new tsconfig files and the two scripts.typecheck strings are dev-only; and neither objectstack.config.ts is in either package's files whitelist or in tsup's entry, so nothing a consumer can resolve changes. There is no version for anyone to adopt.

Scope

Fenced to the six files the claim comment declared. One finding filed rather than absorbed, unassigned: #14386check:type-check-coverage's source-layer observation returns false at depth === 0, so package-root source is invisible to the ratchet by construction (which is why this card's two files were green in two gates at once), and three more package-root objectstack.config.ts manifest sites are outside every tsc program: plugin-auth, plugin-security, service-i18n. That also corrects the card's framing that these two were the only such sites in the repo — there are five.

🤖 Generated with Claude Code

https://claude.ai/code/session_0112hMx9hjJ9BgB28X97DS68


Generated by Claude Code

… manifests inside a tsc program and import ObjectStackManifest from /kernel

Both in-repo manifest authoring sites imported `ObjectStackManifest` from
`@objectstack/spec/system`, an entry that does not export it, and neither file
was read by any tsc program: `tsconfig.json` selects `src/**/*` in both
packages and the manifests sit at the package root, so the glob cannot match
them. `pnpm --filter ... typecheck` exited 0 with a wrong import in the file.

Two moves per package:

1. `import type { ObjectStackManifest } from '@objectstack/spec/kernel'` --
   the real home of the type (`kernel/manifest.zod.ts`, re-exported by
   `kernel/index.ts`). It is a type alias only (`export type ... = z.input<...>`),
   so the import is type-only and nothing published changes.
2. A sibling `tsconfig.typecheck.json` per package -- `noEmit: true`,
   `rootDir: "."`, `include: ["objectstack.config.ts"]` -- named by the
   package's `typecheck` script. Measured: adding the file to the EMITTING
   `tsconfig.json` raises TS6059 in both packages, under `--noEmit` too, so the
   sibling shape (`packages/objectql/tsconfig.scripts.json`,
   `packages/plugins/plugin-auth/tsconfig.examples.json`) is the right one --
   it neutralises `rootDir` without putting the manifest in front of the emit.

The tsc half of the `retiredKey()` double channel (ADR-0049, #11332/#10724/
#4914) now reaches the only two places in this repo where a plugin manifest is
authored in TypeScript.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0112hMx9hjJ9BgB28X97DS68
@github-actions github-actions Bot added the size/s label Sep 2, 2026
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️ 4 changed file(s) yielded no anchor (packages/drivers/driver-memory/objectstack.config.ts, packages/drivers/driver-memory/tsconfig.typecheck.json, packages/plugins/plugin-hono-server/objectstack.config.ts, …), 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 2 changed package(s)).

What this run could not see
  • 4 changed file(s) yielded no anchor (packages/drivers/driver-memory/objectstack.config.ts, packages/drivers/driver-memory/tsconfig.typecheck.json, packages/plugins/plugin-hono-server/objectstack.config.ts, …) — 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 — 11 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 1dcb995f23fc6f54c38d5e38068800e7513e14f0packageMentionDocs.

@os-musk os-musk added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Sep 2, 2026 — with Claude
@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Sep 2, 2026
@os-musk
os-musk marked this pull request as ready for review September 2, 2026 04:20
@os-musk
os-musk enabled auto-merge September 2, 2026 04:20

os-musk commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

Enqueue provenance (domain:engine execution seat, session_0112hMx9hjJ9BgB28X97DS68): ACCEPT on #13284 (comment 5504116579) → at 04:20Z every check run on head da49e9d6 was completed with success or skipped (38 runs; Lint & Repo Gates finished 04:13Z), governed-surface test on the six changed paths: NOT governed, mergeable_state not dirty → marked ready and auto-merge (squash) enabled 04:20:51Z. Landing is by the merge queue; the engine seat follows it to MERGED.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

2 participants