Repository navigation
docs(spec): record that ADR-0087 entry prose is scanned as source twice - #19676
Merged
os-warren merged 2 commits intoSep 22, 2026
Merged
Conversation
An ADR-0087 entry's strings are concatenated verbatim into the generated `registry.ts`, which is ordinary `.ts`, so a repo-wide textual scan reads the same sentence twice. The house code/prose separator masks comments and leaves string literals intact by design, so a quoted example is code to every scan built on it — which is how prose in `packages/spec` can turn another package's test red. Adds a fourth bullet to the authoring-rules section stating the broad rule (never spell a shape a live textual ratchet matches) with the parenthesised call spelling as its instance, and records why an existing entry that does spell one is not a counter-example. Claude-Session: https://claude.ai/code/session_01UDXER3sdqfeVYpEWZs5mZx Co-authored-by: Claude <noreply@anthropic.com>
`src/migrations/entries/README.md` ships inside `@objectstack/spec` — `files[]` carries a bare `README.md`, which matches at every depth. Measured with `npm pack --dry-run`: the tarball is 277 files and this one is among them, so the diff moves a published surface and takes a `patch`. Claude-Session: https://claude.ai/code/session_01UDXER3sdqfeVYpEWZs5mZx Co-authored-by: Claude <noreply@anthropic.com>
Contributor
📓 Docs Drift Check
What this run could not see
Coarse fallback — 136 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
os-warren
marked this pull request as ready for review
September 22, 2026 07:21
os-warren
enabled auto-merge
September 22, 2026 07:21
os-warren
deleted the
claude/issue-15130-entry-prose-scanned-as-source
branch
September 22, 2026 07:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #15130
Clause-②: no
One file, one section: a fourth bullet under the authoring-rules heading of
packages/spec/src/migrations/entries/README.md, plus thepatchchangeset themeasurement below says is owed. Prose only — no behaviour change, no mechanical check,
no entry edited.
The rule that landed, and why the broad wording
The narrow wording the incident suggests — "quote a retired call site without its
parentheses" — would make counter-examples of entries that are green today. What an
author actually controls is not spelling a shape some ratchet matches; the parenthesis
is the instance, and the bullet carries a warning saying so, so that an existing entry
spelling a parenthesised call is not read as a violation.
The heading moved from "Three rules that are not style" to "Four". Nothing in the repo
references that heading or its anchor (
git grep, one hit: the heading itself).What I re-derived before writing it down, and what did not match
The mechanism — confirmed, live, end to end. Not transcribed. Two untracked stand-in
.tsfiles were placed underpackages/spec/src/migrations/, one standing for an entryfile and one for the generated registry region it is concatenated into, each carrying one
parenthesised call spelling of an enumerated method inside a string literal:
packages/clientcensusTwo files, one spelling each,
+2— the doubling, measured. The failure text named bothfiles by path and flagged each as "inside the ' literal". Restoration was proven by
observing state (
git status --porcelainandgit diff HEADboth empty), not by an exitcode. No tracked file was touched in any leg.
Reading the scanner confirms why:
sitesInSourcecallsmaskComments(comments only —literals deliberately intact), walks the whole workspace from the repo root over
.ts/.tsx/.js/.mjs/.cjs, and matches on the method name followed by an openingparenthesis.
NON_ENTRY_FILESin the generator excludesREADME.md, so this edit cannotreach generation.
The precedent trap — confirmed in substance, with one correction to the card. The
census enumerates four methods only (
analytics.query,analytics.meta,analytics.explain,automation.trigger). Neithermeta.deleteItemnordata.deleteis among them, which is why the two precedent entries are green — and the clean-tree run
reports "no counted site sits inside a string, template or regex literal", so today no
entry's prose is counted at all.
client.meta.deleteItem(...). Only18.client-meta-reset-result-resetdoes.17.client-delete-result-successspellsclient.data.delete()andclient.project(id).data.delete()— a different method, still parenthesised, stillunenumerated. The reasoning survives intact; the method name does not. The landed wording
does not depend on which method it is, which is the point of the broad rule.
Changeset — measured, and it contradicts the expected shape
skip-changesetis not applicable here and no label is owed on that ground.packages/spec'sfiles[]carries a bareREADME.md, which matches at every depth,so this file ships. Measured rather than reasoned, with
npm pack --dry-run --jsoninpackages/spec:src/migrations/entries/README.md— present in the 277-file tarballllms.txtpresent,src/ai/agent.zod.tsand two more*.zod.tspresent — the instrument reports hits when hits exist
A published surface moved, so the diff takes a
patchchangeset(
.changeset/15130-entry-prose-scanned-as-source.md). Clause-② isno, no arm, nothingbreaking.
Acceptance notes
They are green and their meaning is right; the new bullet is written so that they stay
correct rather than becoming violations.
trap and points at the offending file and line. An author who trips this rule today gets
a much better diagnostic than the original incident did — the rule shortens the
diagnosis, it is no longer the only thing standing between an author and a confusing red.
packages/specto another package's test suite.🤖 Generated with Claude Code
https://claude.ai/code/session_01UDXER3sdqfeVYpEWZs5mZx
Generated by Claude Code