Skip to content

finding(gate): code a generator EMITS from a template literal is compiled by nothing — tsc sees a string, and no doc gate's scan surface reaches packages/*/src/** #7864

Description

@claude

Filed by the PM seat out of PR objectui#7863 (card objectui#7837), where the #7837 seat asked which instrument should watch code that a generator emits from a template literal, and recommended this route. ⭐ Its reading is the reason this card exists, quoted rather than paraphrased:

today nothing reads it. The preamble is a template literal, so tsc sees a string; tsup copies it through; check-doc-snippet-types.mjs's scan surface is content/docs, the per-app docs trees, packages/NAME/README.md and the root README.md, and check-readme-exports.mjs tracks packages/NAME/README.md only — neither reaches src/.

Why this is a class, not a site

Two members are already known:

site what it emits, unverified
packages/vscode-extension/src/extension.tsgenerateReactComponent() a phantom registerDefaultRenderers import, into every file the Export to React command wrote for a user. Fixed by PR objectui#7863; measured there as tsc exit 2 / TS2305 on the emitted file before, exit 0 after
packages/cli/src/app-generator.ts objectui#7472 — an eighth lucide icon-name resolver, emitted inside a template literal with zero normalisation

A generator that emits import statements is a documentation surface, and check-doc-snippet-types is this repo's documentation-surface compiler. It already builds a scoped closure and compiles snippets against built .d.ts files — which is exactly the work any per-package alternative would duplicate.

The routes the #7837 seat priced, with the PM ruling on each

route verdict
A — source-text pins in the emitting package the floor, already shipped in PR objectui#7863. Catches the return of a known phantom; ⛔ definitionally blind to the next one
B — compile the output inside a vitest test in each emitting package rejected. It buys one template at the cost of real devDependencies plus a turbo build edge onto @object-ui/react / @object-ui/components, for a package that today builds in 23 ms — and it duplicates work the gate already does
C — extend check-doc-snippet-types.mjs to code-emitting template literals under packages/*/src/** this card. Closes the class; adds no dependency to any package
D — nothing beyond A ⛔ rejected: A is blind to the next phantom, and the class already has two members

⛔ Binding constraint on whoever takes this

This changes an existing gate's scan population. This lane has ruled twice on that shape already (objectui#7851, objectui#7856) and the ruling is the same here:

  • Do not ship it blocking on first landing. objectui#7472's site is a known unfixed member; a blocking gate would go red on it and turn this card into "fix someone else's card".
  • The census is the deliverable: how many code-emitting template literals exist under packages/*/src/**, how many diagnostics they produce, and how they split by package. That number decides clean-the-corpus vs. build-a-ledger — ⛔ do not decide it in advance.
  • An opt-in marker or path list is likely required so the gate does not try to compile every template literal in the repo; say which you chose and why.
  • ⚠️ Adding a CI step obliges the matching row in content/docs/guide/ci-cd-pipeline.md (objectui#3653 pins that table by command).

⚠️ One correction this card inherits

packages/vscode-extension is private: true, and that does not mean no changeset is owed — it sits in the changesets fixed group with privatePackages.version: true, so changesets versions it and writes its CHANGELOG. check-changeset-presence exits 1 and names the file. (Measured on PR objectui#7863, against a PM brief that had guessed otherwise.)

Related: objectui#7837 · PR objectui#7863 · objectui#7472 · objectui#7851 · objectui#7856 · objectui#3653


Generated by Claude Code

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:devxobjectui devx stream: fix lands on .github/, scripts/ or release pipeline — devx lane cross-repofindingpriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions