Skip to content

fix(qa): correct rootDir comment that opens "No rootDir" above one that sets it - #11919

Merged
os-steve merged 1 commit into
mainfrom
claude/issue-11476-dogfood-rootdir-comment
Aug 25, 2026
Merged

os-steve merged 1 commit into
mainfrom
claude/issue-11476-dogfood-rootdir-comment

Conversation

@os-steve

Copy link
Copy Markdown
Collaborator

Fixes #11476

History (full clone, not the finder's shallow one)

git log --follow on packages/qa/dogfood/tsconfig.json shows three touches:

  1. 10c2b854f (2026-07-20, docs(approvals): document the full decision surface, send-back/resubmit, declared actions + viewer gating #3349, docs-only PR) — file created with
    "rootDir": "." and no comment.
  2. cc3555e78 (2026-08-11, Three ledgered /meta routes are never mounted and die in the /meta/:type catch-all — the route audit can't see this class because it treats the ledger as ground truth for what's mounted #7526/fix(rest,runtime): mount six ledgered-but-dead routes and gate the class that hid them (#7526) #7584) — the same commit both (a) added
    the seven-line comment and (b) changed rootDir from "." to "../../..".
    git log -S on the literal string rootDir on this path finds only these
    two commits (positive control: the same search technique reliably finds
    real hits — confirmed against #7526 elsewhere in history — so the result
    here isn't a broken search).
  3. d41d99047 (2026-08-23, chore(qa): drop dead src/**/* include glob from dogfood tsconfig #11474, this same PM session) — dropped the dead
    src/**/* include glob and explicitly left rootDir/its comment
    "deliberately untouched", per [finding] packages/qa/dogfood/tsconfig.json includes src/**/*, a directory the package does not have #10899's scope fence on this file.

So rootDir was not added after the comment was written — the comment's
opening sentence was wrong from the moment it was introduced, in the same diff
that set the value it denies two lines below. There is no earlier form of
this file where "no rootDir" was true.

Why disposition 1, not 2

Removing rootDir (disposition 2) would need evidence the file was meant
to have none. There isn't any — the opposite, if anything: rootDir has been
present since the file's creation (as ".", TS's own default), and the
commit that broadened it to "../../.." did so on purpose, to admit the
sibling-package ledger imports the parity gate needs (below). Nothing in the
history argues for removing it, so per triage's default this stays
disposition 1: fix the wording, keep the declaration.

The comment's own argument still checks out

Verified the premise the comment relies on rather than inheriting it: the one
file in the package importing outside it,
test/route-ledger-live-mount-parity.dogfood.test.ts, resolves all five of
its relative imports (../../../runtime/src/route-ledger.js,
../../../rest/src/rest-route-ledger.js, and three more) to packages/**
three ../ segments up from packages/qa/dogfood/test/, i.e. inside the
../../.. (repo root) bound. No import anywhere in the package goes deeper.
So the declared rootDir never actually constrains anything here, exactly as
the comment's body (correctly) argues — only its opening sentence contradicted
the line beneath it.

The fix

One-sentence correction; the rest of the comment is untouched content-wise
(only re-wrapped for line width by the change in opening-sentence length):

-    // No `rootDir`. This project emits nothing (`noEmit`), so `rootDir` never
-    // shaped an output layout here — its only effect was to forbid importing a
+    // `rootDir` is set to the repo root — wide enough to be a no-op. This
+    // project emits nothing (`noEmit`), so `rootDir` never shaped an output
+    // layout here — its only effect was to forbid importing a sibling
     ... (unchanged: parity-gate / five-ledgers reasoning, verbatim)

No behaviour change: tsc --showConfig -p packages/qa/dogfood/tsconfig.json
is byte-identical before/after this edit (compilerOptions, include,
exclude, files all unchanged — JSONC comments are stripped before
parsing), and pnpm --filter @objectstack/dogfood typecheck passes clean.

Scope

Comment text only, in this one file — no other tidying, per #10899's standing
fence on this file.

Gates

No changeset: comment-only edit inside a tsconfig.json, nothing publishable
changes. skip-changeset label applied.

Local gates (node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack
against packages/qa/dogfood/tsconfig.json), all green at 7b93b7521:

  • pnpm --filter @objectstack/dogfood typecheck — clean, 0 errors
  • pnpm check:published-files — self-test (21+12+4 cases) + live, pass
  • pnpm check:slot-lookup — ratchet holds, 0 new sites
  • pnpm check:test-source-alias — self-test + live, 72 packages scanned, pass
  • pnpm check:type-source-resolution — self-test + live, 77 packages scanned, pass
  • node scripts/check-plugin-teardown-shape.mjs — 0 known-unreached, pass
  • node scripts/docs-audit/check-affected-docs.mjs — pass
  • node scripts/docs-audit/check-drift-comment.mjs — 56 cases pass
  • pnpm --filter @objectstack/spec run check:empty-state — all classified, pass
  • pnpm --filter @objectstack/spec run check:liveness — pass (one pre-existing,
    unrelated warning: an unregistered dogfood proof tag in
    admin-platform-admin-standing.dogfood.test.ts, a different file this PR
    never touches)
  • pnpm --filter @objectstack/spec run check:strictness-ledger — pass
  • pnpm --filter @objectstack/spec run check:variant-docs — 18 unions governed/exempt, pass

Generated by Claude Code

…at sets it

git history (full clone): the file was created (#3349) with `"rootDir": "."`
and no comment. The very same commit that later broadened it to
`"rootDir": "../../.."` (#7526/#7584) also introduced the seven-line comment
whose opening sentence claims there is none — the contradiction was there from
the moment the comment was written, not a later drift. `git log -S'rootDir'`
on this path finds only those two commits; no earlier form of the file ever
had a bare "no rootDir" state, so disposition is a one-sentence wording fix,
not a removal.

Verified the comment's own argument still holds: the only file in the package
importing outside it (route-ledger-live-mount-parity.dogfood.test.ts) resolves
all five of its relative imports under `../../..`, so the declared rootDir
still never constrains anything. `tsc --showConfig` is byte-identical
before/after (comments are stripped before parsing) — no behaviour change.

Scope: this one file's comment text only, per #10899's standing fence.

Fixes #11476

Claude-Session: https://claude.ai/code/session_015ahemw8RcTgqtxrj15PEZx

Co-authored-by: Claude <noreply@anthropic.com>
@claude claude Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Aug 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

⚠️ 1 changed file(s) yielded no anchor (packages/qa/dogfood/tsconfig.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/qa/dogfood/tsconfig.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 — 2 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 0010797373dfa8f4ad690fac2c45c63f07ae8312packageMentionDocs.

Copy link
Copy Markdown
Collaborator Author

ACCEPT. Flipping out of draft (a tsconfig comment is not a governed surface); arming once green.

The history answer is a third option — neither the card's nor mine

The card framed it as two possibilities: "whether rootDir was re-added after the comment was written, or the comment was written for a form the file no longer has" — and said the two imply different fixes. My dispatch carried that same binary.

Both are wrong. Verified at source, not taken from the report:

cc3555e78  fix(rest,runtime): mount six ledgered-but-dead routes and gate the class that hid them (#7526) (#7584)

-    "rootDir": "."
+    // No `rootDir`. This project emits nothing (`noEmit`), so `rootDir` never
+    "rootDir": "../../.."

One commit broadened rootDir from "." to "../../.." and added the "No rootDir." comment at the same time. The contradiction was born, not acquired. The comment was wrong the moment it was written, and the file has never been in the state the comment describes.

That is a materially better outcome than either branch of the binary, because it settles the disposition without ambiguity: there is no earlier intended no-rootDir state to restore, so disposition 2 was never on the table — and now nobody has to re-derive that from a shallow clone again.

⭐ The finder earned this. They were on a 92-commit shallow clone, said so, and explicitly declined to guess between the two readings rather than picking the plausible one. That refusal is the only reason the question was still open to be answered correctly.

Verified against the diff

Checking the comment's underlying argument still holds (that the package's cross-package imports all resolve within ../../.., so the declaration never constrains anything) was the right instinct — the sentence would have been newly wrong if it did not.

Using tsc --showConfig before and after as the behaviour-change proof is the correct instrument here: comments are stripped before parsing, so an identical showConfig is a direct demonstration that the edit cannot change what the program compiles, rather than an argument that it should not.

No counts, shas or line numbers went into the comment. Good — that is the same defect class this card is about.


Generated by Claude Code

@os-steve
os-steve marked this pull request as ready for review August 25, 2026 01:11
@os-steve
os-steve added this pull request to the merge queue Aug 25, 2026
Merged via the queue into main with commit 3689991 Aug 25, 2026
36 checks passed
@os-steve
os-steve deleted the claude/issue-11476-dogfood-rootdir-comment branch August 25, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[finding] packages/qa/dogfood/tsconfig.json: the rootDir comment opens "No rootDir." directly above a line that sets one

2 participants