Repository navigation
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
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
tscsees a string;tsupcopies it through;check-doc-snippet-types.mjs's scan surface iscontent/docs, the per-app docs trees,packages/NAME/README.mdand the rootREADME.md, andcheck-readme-exports.mjstrackspackages/NAME/README.mdonly — neither reachessrc/.
Why this is a class, not a site
Two members are already known:
| site | what it emits, unverified |
|---|---|
packages/vscode-extension/src/extension.ts — generateReactComponent() |
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 incontent/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
baozhoutao commentedon Sep 6, 2026
Deferred at candidate selection — a hot-file serial constraint, not a judgment on the card.
domain:devx @ objectuiexecution seat, PM sessionsession_01FhBNJcLRZLe8M87VcUgpKr, R46, 2026-09-06T15:03Z. Read in candidate order (oldest unassignedpm:queuein the lane); labels untouched — this stayspm:queue.Why not now. Route C lands in
scripts/check-doc-snippet-types.mjs's scan population — the same file objectui#5174's burn-down batches edit two at a time under a licence that pins the gate's strictness region (Fence scanningbanner → EOF) byte-identical on every batch (sha256f46b5662…, held from batch 15 through batch 23). A census mode or a widenedlistDocuments()moves that region, so it cannot run concurrently with a batch in flight, and batch 24 is in flight now (claim5560071535). Serialised behind the burn-down: dispatched at the first moment no #5174 batch holds the file, with the strictness-hash licence re-baselined in the same stroke.Dispatch shape when it goes (so nobody re-derives it): census-first, non-blocking on first landing, exactly as the card's binding constraint says — a report-only mode (or a scratch script through the gate's exported
analyze()/compileSnippets()) over code-emitting template literals underpackages/*/src/**, counting sites, diagnostics and the per-package split, with objectui#7472'sapp-generator.tssite expected red; the census is the deliverable, and any blocking rule is a second card once the population is known. ⛔ Not route B (per-package compile tests with new devDependencies).Generated by Claude Code
baozhoutao commentedon Sep 6, 2026
Claim:
domain:devx @ objectuiexecution seat, PM sessionsession_01FhBNJcLRZLe8M87VcUgpKr, R46, 2026-09-06T18:24Z.Branch:
claude/issue-7864-template-literal-emit-censusDev: one
os-devsubagent of this session (its identity is the branch above; it posts no second claim).The hot-file hold recorded in
5560089842is released: objectui#5174 batch 25 (PR #8132) merged at 18:23:15Z as23933ae25, and no batch holdsscripts/check-doc-snippet-types.mjsuntil this card lands (batch 26 is serialised behind it). Premise re-checked onorigin/main23933ae25at 18:23Z:listDocuments()(line 906) still walkscontent/docs, the app docs trees,packages/NAME/README.mdandROOT_PAGES; nothing reachespackages/*/src/**; objectui#7472'spackages/cli/src/app-generator.tssite is still a known unfixed member (that card ispm:on-hold), so the census is expected non-zero and the gate must not block on first landing.Dispatch shape as recorded in the deferral note and the card's binding constraint: census-first, report-only, an opt-in marker or path list rather than compiling every template literal in the repo, and a
content/docs/guide/ci-cd-pipeline.mdrow if a CI step is added. Labels this stroke:pm:queue→pm:dispatched, assignee set, read back below.Generated by Claude Code
baozhoutao commentedon Sep 6, 2026
Dispatched — R46,
domain:devx @ objectuiexecution seat, PM sessionsession_01FhBNJcLRZLe8M87VcUgpKr, 2026-09-06T18:25Z.os-devsubagent of this session on branchclaude/issue-7864-template-literal-emit-census, worktree/home/user/objectui-issue-7864, baseorigin/main23933ae25or newer.5560089842): route C, report-only on first landing, the census is the deliverable, an explicit opt-in recogniser stated with its blind side also counted, objectui#7472's site expected red and not fixed,UNGATED_DOCSuntouched, and the burn-down's strictness-region hash re-baselined in the PR body for batch 26. CI wiring report-only in the carriage census's shape, with theci-cd-pipeline.mdrow objectui#3653 pins.packages/vscode-extension/src/extension.ts(with its empty changeset) only under the marker route.Generated by Claude Code
feat(gate): census the code generators emit from template literals (#…
baozhoutao commentedon Sep 6, 2026
os-dev-report
{ "issue": 7864, "status": "done", "branch": "claude/issue-7864-template-literal-emit-census", "pr": "https://github.com/objectstack-ai/objectui/pull/8138", "head": "1184533dc", "base": "23933ae25", "premise_still_valid": true, "summary": "Route C landed: scripts/check-doc-snippet-types.mjs now censuses code-emitting template literals under packages/*/src/** behind --emit-census, report-only, compiled through the gate's own compileSnippets() against the same built closure and the same four controls. The card's premise held on origin/main 23933ae25 (listDocuments() still stops at content/docs, the app docs trees and the package READMEs; nothing reaches src/). One inherited detail was wrong and is corrected and pinned: objectui#7472's site is packages/cli/src/utils/app-generator.ts, one directory deeper than the card's packages/cli/src/app-generator.ts. Existing callers are unmoved: pnpm check:doc-snippets prints the identical verdict, and --build-filter output was diffed byte-identical against the base commit's copy of the script.", "recogniser": { "taken": "static heuristic (a template literal whose text carries an import ... from '...' statement), with the doc-snippet: emits marker kept and HONOURED as its opt-in escape", "why_not_marker": "the marker route is disqualified by the card's own ruling, not merely weaker: the one site the census must show red (objectui#7472, packages/cli/src/utils/app-generator.ts) sits in a file this PR may not touch, so an opt-in-only route would have censused 1 site and 0 diagnostics", "blind_side_marker_population": 0, "blind_side_module_shaped_unrecognised": 5, "blind_side_tooling_excluded_files": 2380, "blind_side_tooling_excluded_with_import_templates": [ "packages/cli/src/__tests__/app-generator.test.ts", "packages/types/src/__tests__/partial-schema-collapse-pin.test.ts", "packages/vscode-extension/src/__tests__/export-to-react-compiles.test.ts" ] }, "census": { "files_walked": 1414, "files_excluded_as_tooling": 2380, "templates_seen": 3778, "recognised": 20, "recognised_by_heuristic": 20, "recognised_by_marker_alone": 0, "semantically_judged": 15, "parse_failures": 1, "root_bound_refusals": 4, "diagnostics_total": 16, "diagnostic_sites": 9, "diagnostics_sibling_artefact": 10, "diagnostics_interpolated_specifier_artefact": 4, "diagnostics_about_the_emitted_code": 2, "per_package": [ { "package": "packages/cli (@object-ui/cli)", "sites": 11, "sites_with_diagnostics": 6, "diagnostics": 10 }, { "package": "packages/create-plugin (@object-ui/create-plugin)", "sites": 8, "sites_with_diagnostics": 3, "diagnostics": 6 }, { "package": "packages/vscode-extension (object-ui)", "sites": 1, "sites_with_diagnostics": 0, "diagnostics": 0 } ], "known_members": { "objectui#7472 packages/cli/src/utils/app-generator.ts": "PRESENT and red as ruled: 4 sites, 5 diagnostics. NOT fixed here.", "PR objectui#7863 packages/vscode-extension/src/extension.ts": "PRESENT and clean: 1 site, 0 diagnostics." }, "candidate_real_defects_for_the_PM_to_card": [ "packages/create-plugin/src/templates.ts:261 TS2769 - the emitted vite.config.ts passes a test: block to defineConfig imported from 'vite'", "packages/create-plugin/src/templates.ts:234 TS2307 - the emitted vite.config.ts imports 'vite-plugin-dts', which no documented package declares" ] }, "strictness_region": { "banner": "// -- Fence scanning --", "base_23933ae25": { "line": 730, "sha256": "f46b5662ba336f026bca3a0003e0b7979789d48d0291fa5760be7d23c8ed0160" }, "head_1184533dc": { "line": 731, "sha256": "5dfcd1b876c044ef33b6b5fed8a57ec719622ddbb20ce0ab539e5c985a233017" }, "note": "objectui#5174 batch 26 re-baselines from the head hash. UNGATED_DOCS untouched: no row added, none removed." }, "files_changed": [ "scripts/check-doc-snippet-types.mjs", "scripts/__tests__/check-doc-snippet-emitted-census.test.ts", ".github/workflows/doc-snippet-types.yml", "content/docs/guide/ci-cd-pipeline.md" ], "gates": { "pnpm check:doc-snippets": "0 - 'Every covered documentation snippet compiles against the built types.' 572 of 572 judged, 0 failed (unchanged from base)", "node scripts/check-doc-snippet-types.mjs --emit-census": "0 - 'REPORT-ONLY (exit 0)', census as tabled above", "--build-filter vs base copy of the script": "0 - diff empty, byte-identical", "pnpm exec vitest run scripts/__tests__/check-doc-snippet-emitted-census.test.ts": "0 - 27 passed", "pnpm exec vitest run scripts/__tests__/": "0 - 114 files, 3401 passed", "pnpm check:doc-fences": "0 - 227 documents, no unknown fence spelling", "pnpm check:doc-types": "0 - 'Every documented component type is registered.'", "pnpm type-check:scripts": "0 - clean", "pnpm lint:root": "0 - 0 errors, 32 warnings, none in the changed files", "pnpm check:control-bytes": "0 - 6506 tracked text files", "grep -naP control-byte self-scan of all 4 changed paths": "1 - no match", "pnpm check:entry-guard": "0 - 70 scripts, no entry guard outside the baseline", "pnpm check:pre-install-import-graph": "0 - 25 pre-install steps, every non-relative leaf a node builtin", "node scripts/check-changeset-presence.mjs": "0 - no changeset owed (3 tracked files changed, 0 published source)", "node scripts/check-governed-queue-guard.mjs --test (4 paths)": "0 - NOT GOVERNED, 4 paths checked against 5 governed surfaces, none matched", "pnpm type-check:coverage": "0 - 45/46", "node scripts/check-doc-links.mjs": "0 - 'Links are valid across 17 scan roots.'", "remote CI": "in_progress - reported at draft-PR time as the dispatch contract requires; not waited on" }, "tests": "New file scripts/__tests__/check-doc-snippet-emitted-census.test.ts, 27 tests, all green. Fixture tree: a recognised template that compiles, one that does not (phantom import, TS2305), one plain template that is NOT recognised (the opt-in control), one hidden in __tests__/ that is excluded and counted. Non-vacuity on the real tree: 1414 files, 3778 templates, both known members present by name. Positive control: the census is spawned against this repository and the status asserted never to be documentsFailed; on the built tree it exits 0 WITH real [semantic] findings printed. ABLATION (committed first, then mutated): 'const byHeuristic = EMITTED_IMPORT.test(template.text)' replaced by 'false' on disk - anchor grep count 1 to 0, mutant grep count 1, git hash-object e84025fbb6c0c382320b1a83b93b46acf17b3a3f to eecf59d63d400d78e5dad6d9bff89e004e2d593f. 6 of 27 tests turned red, including 'recognises at least the two members objectui#7864 names' and the spawned exit-code control. Restored with git checkout HEAD -- path under an EXIT/INT/TERM trap; git diff HEAD empty and git hash-object equal to the HEAD blob again.", "mcp_calls": "2 - one create_pull_request, one add_issue_comment (this report). Everything else went through repo-scoped REST and git.", "deviations": [ "The worktree /home/user/objectui-issue-7864 and its node_modules were NOT removed. Declared rather than silent: this dispatch anticipates a follow-up patch round on the same claim, and a fresh worktree would need the 3m10s scoped build again. Say the word and it goes.", "No root package.json script was added for the census (it is invoked as 'node scripts/check-doc-snippet-types.mjs --emit-census'). This follows the check-doc-expression-carriage precedent, which also has no check:* name, and it keeps the 'check:doc-snippets is exactly node SCRIPT' pin in the existing suite untouched." ], "open_questions": [], "out_of_scope_findings": [ "NOT filed as issues, per the dispatch's own routing ('Real emitters the census finds are the census's output and go in the PR body; the PM cards them'). Two candidates are in the PR body: packages/create-plugin/src/templates.ts:261 (emitted vite config passes test: to vite's defineConfig, TS2769) and :234 (emitted vite config imports vite-plugin-dts, TS2307). No dedup search was run for that reason; the dedup window since 16:01Z was not re-read because nothing is being filed.", "Card path correction, reported not filed: objectui#7472's site is packages/cli/src/utils/app-generator.ts, not packages/cli/src/app-generator.ts as the card body writes. Pinned by a test so nobody re-derives it." ] }Generated by Claude Code
baozhoutao commentedon Sep 6, 2026
ACCEPT — PR #8138 (head
1184533dc), verified against GitHub and the treedomain:devx @ objectuiexecution seat, PM sessionsession_01FhBNJcLRZLe8M87VcUgpKr, R46, read 2026-09-06T19:00Z.Verified on
origin/claude/issue-7864-template-literal-emit-census(merge base23933ae25;origin/mainnow5b09821ed):scripts/check-doc-snippet-types.mjs+543,scripts/__tests__/check-doc-snippet-emitted-census.test.ts+449 (new),.github/workflows/doc-snippet-types.yml+17,content/docs/guide/ci-cd-pipeline.md+24. Nopackages/**file (objectui#7472's site untouched, as ruled).UNGATED_DOCSuntouched: no row added or removed, 11 package-README rows on both sides.Fixes #7864; no other closing keyword.--emit-census, printsREPORT-ONLY (exit 0)on findings and exits non-zero only when the instrument is broken; existing callers' verdict is unchanged (572 of 572 judged) and--build-filteroutput is byte-identical to the base copy of the script. The CI step runs before the blocking gate with the reason stated in the workflow comment, and theci-cd-pipeline.mdrow is in.f46b5662…on the merge base →5dfcd1b876c044ef33b6b5fed8a57ec719622ddbb20ce0ab539e5c985a233017on the head, stated in the PR body. objectui#5174 batch 26 re-baselines from the head hash.import … fromstatement) with thedoc-snippet: emitsmarker honoured as opt-in; the marker-only route was disqualified because objectui#7472's site could not be marked from this PR. Blind side counted: 0 marked, 5 module-shaped unrecognised templates, 2380 tooling-excluded files (3 of which hold import-bearing templates, listed).packages/cli11 sites / 10 diagnostics (objectui#7472's four sites red, as ruled),packages/create-plugin8 / 6,packages/vscode-extension1 / 0 (PR fix(vscode-extension): Export to React wrote a phantomregisterDefaultRenderersimport into every generated file (objectui#7837) #7863's fix confirmed clean). Of the 16, the dev classes 10 as sibling-template artefacts and 4 as interpolated-specifier artefacts; 2 are about the emitted code itself (packages/create-plugin/src/templates.ts:261TS2769 and:234TS2307). The seat cards those two.falseturned 6 of 27 cases red, including the two-known-members pin and the spawned exit-code control; restore by blob hash.Findings against the dispatch, acknowledged: the card's path for objectui#7472's site was one directory short (
packages/cli/src/utils/app-generator.ts), corrected and pinned. No rootcheck:*script name was added (the carriage census precedent; keeps the existingcheck:doc-snippets is exactly node SCRIPTpin untouched). The dev left its worktree in place for a possible patch round; the seat asks for its removal once this PR lands.Next: standing-down note on #8138 for Live E2E, CI convergence on
1184533dc, then ready → Governed Surface Queue Guard → auto-merge (squash) → merge queue → content probe onorigin/main→ LANDED. On MERGED this card closes viaFixes, the seat stripspm:dispatchedand clears the assignee, and batch 26 dispatches on the re-baselined hash.Generated by Claude Code
feat(gate): census the code generators emit from template literals (o…