Skip to content

docs(standard): state the tombstone projection rule correctly - #140

Merged
maehr merged 1 commit into
textrefs:stagingfrom
maehr:fix/deprecated-projection-rule
Sep 2, 2026
Merged

maehr merged 1 commit into
textrefs:stagingfrom
maehr:fix/deprecated-projection-rule

Conversation

@maehr

@maehr maehr commented Sep 2, 2026

Copy link
Copy Markdown
Member

The bug

Specification §11 and two matching code comments claimed:

a deprecated record is retained and still resolves, while a withdrawn or blocked record is additionally excluded from Work mapping projections

The compiler excludes all three. RETIRED_STATUSES is {deprecated, withdrawn, blocked} (scripts/compile.ts:641) and the projection loop skips every one of them (:493).

§6 already stated this correctly, so the specification contradicted itself. Both comments cited RETIRED_STATUSES as agreeing with them, while that constant said the opposite.

What the real difference is

The two halves of the sentence were attached to the wrong statuses.

rule statuses enforced by
left out of Work mapping projections deprecated, withdrawn, blocked RETIRED_STATUSES, compile.ts:493
a live record may not depend on it withdrawn, blocked TOMBSTONE_STATUSES, compile.ts:678

So the projection rule covers all three, and the additional rule for withdrawn and blocked is the dependency rule, not the projection one. §11 now says exactly that, in the same three places.

No test

scripts/compile.test.ts already carries deprecated mappings are excluded from the projection, and it has been passing throughout. The behaviour was correct and covered; only the prose was wrong. The comments now point at that test rather than duplicating it.

Not changed

The user-visible tombstone banner. It says a deprecated record "is retained and it still resolves", which is true, and it never mentions mapping projections.

Verification

  • npm run verify — 118 tests pass, 259,812 pages built, all internal links valid

Closes #132

🤖 Generated with Claude Code

https://claude.ai/code/session_011HLhfpsrWxq56jnZr1gD8B

Specification §11 and two matching comments claimed that a `withdrawn`
or `blocked` record is additionally excluded from `Work` mapping
projections. The compiler excludes all three retired statuses:
`RETIRED_STATUSES` is `{deprecated, withdrawn, blocked}` and the
projection skips every one of them.

The two halves of the sentence were attached to the wrong statuses. The
projection rule covers all three. The additional rule for `withdrawn`
and `blocked` is a different one: a live record may not depend on them,
which the compiler enforces through `TOMBSTONE_STATUSES`.

§6 already stated the projection rule correctly, so the specification
contradicted itself. The comments cited `RETIRED_STATUSES` as agreeing
with them while that constant said the opposite.

No test is added. `scripts/compile.test.ts` already asserts that a
deprecated mapping leaves the projection, so the behaviour was correct
and covered; only the prose was wrong. The comments now point at it.

Closes textrefs#132

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011HLhfpsrWxq56jnZr1gD8B
Copilot AI lite review requested due to automatic review settings September 2, 2026 20:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are documentation/comment-only and are consistent with the compiler constants and existing tests that already cover the behavior.

Pull request overview

This PR fixes an internal inconsistency in the TextRefs standard documentation and related UI-code comments by stating the tombstone projection vs. dependency rules in a way that matches the compiler’s actual behavior.

Changes:

  • Corrects Specification §11’s description of how deprecated / withdrawn / blocked affect Work mapping projections.
  • Updates tombstone explanatory comments in the tombstone banner component and the /id/ref/{uuid} page to align with RETIRED_STATUSES and TOMBSTONE_STATUSES.
  • Points prose/comments at existing tests rather than restating behavioral claims inconsistently.
File summaries
File Description
src/pages/id/ref/[uuid]/index.astro Updates tombstone explanatory comment to match compiler rules (projection exclusion for all three; dependency rule for withdrawn/blocked).
src/content/docs/standard/specification.md Fixes §11 tombstone rule prose to consistently reflect compiler behavior and §6.
src/components/Tombstone.astro Updates shared tombstone explanatory comment used by the tombstone banner component.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants