Skip to content

docs(comment-policy): add loaded-term taxonomy (SD-2923)#3103

Merged
caio-pizzol merged 5 commits into
mainfrom
caio-pizzol/SD-2923
May 4, 2026
Merged

docs(comment-policy): add loaded-term taxonomy (SD-2923)#3103
caio-pizzol merged 5 commits into
mainfrom
caio-pizzol/SD-2923

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol commented May 4, 2026

Adds a five-term taxonomy to comment-policy.md (legacy-public, compat-fallback, removed-dead, deprecated, temporary) so loaded words like "legacy" and "deprecated" stop carrying three different meanings inside the same package. Each term comes with a required annotation - replacement, removal version, fallback trigger, or issue id - so future readers can tell what the comment actually constrains.

The accompanying audit and the report-only hygiene script that surfaced the existing damage (14 .ts/.d.ts divergences, 52 orphan TODO/FIXME, ~68 undated @deprecated) are kept local until enforcement lands. Committing transitional audit tooling alongside the policy change creates a half-owned script with known heuristic gaps; it returns in the enforcement PR rewritten on a TypeScript AST extractor (tracked on SD-2922) and with proper CI behavior then.

  • Phase 2 (small isolated stale-comment fixes) and Phase 3 (vendor sweep + lint enforcement) plan lives on SD-2923.
  • Related: SD-2922 (internal type shadow cleanup).

…e script (SD-2923)

Define five loaded-term categories so words like "legacy" and "deprecated"
stop carrying three different meanings inside the same package, and add a
report-only Node script that surfaces the existing damage: .ts/.d.ts
sibling divergences (tracked under SD-2922), orphan TODO/FIXME/HACK/XXX
without an issue id, undated @deprecated, and AIDEV-NOTE candidate
locations. The script always exits 0; flipping it to blocking is gated on
the taxonomy being adopted across the codebase.
…ript (SD-2923)

Brings the new content in line with the project writing style (no em-dashes).
@caio-pizzol caio-pizzol requested a review from a team as a code owner May 4, 2026 00:14
@linear
Copy link
Copy Markdown

linear Bot commented May 4, 2026

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef5320ebbf

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread scripts/comment-hygiene-report.mjs Outdated
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…itely (SD-2923)

The deprecation check used OR across all three keywords, which would have
suppressed a comment that only had `replaceWith` set. The taxonomy added
in the same patch requires `replaceWith` AND either `removeIn` or
`compat-indefinitely`. Switch to AND so the script enforces what the
policy says.

Current baseline counts are unchanged (no comment in the repo has only
one keyword today), but the script will now correctly flag partial
annotations as they appear.
… 0 (SD-2923)

The script promises "always exits 0" but `process.stdout.write` throws
on a closed pipe (e.g. `node scripts/comment-hygiene-report.mjs | head`),
which Node turns into a non-zero exit and a stack trace. Add an EPIPE
handler on stdout so early pipe closure exits cleanly.
The script is transitional audit tooling, not product or CI behavior.
It's heuristic by design and would need ownership, tests, and clear CI
intent the moment it lands in scripts/. Phase 1 only needs the policy
change; the script comes back in the enforcement PR with the
deprecation rule properly enforcing replaceWith AND a removal decision,
and with the export extractor rewritten on top of a TypeScript AST
(tracked on SD-2922).
@caio-pizzol caio-pizzol changed the title docs(comment-policy): add loaded-term taxonomy and hygiene script (SD-2923) docs(comment-policy): add loaded-term taxonomy (SD-2923) May 4, 2026
@caio-pizzol caio-pizzol merged commit 985ee97 into main May 4, 2026
3 of 4 checks passed
@caio-pizzol caio-pizzol deleted the caio-pizzol/SD-2923 branch May 4, 2026 00:45
caio-pizzol added a commit that referenced this pull request May 4, 2026
…agmentIndex (SD-2923) (#3112)

The four `fragmentIndex` fields on ResolvedFragmentItem / Table / Image /
Drawing previously used the word "legacy" with three different shades
across the layout-engine - older path, current fallback, and removed
code - all conflated. In this file, "legacy" actually means the *current
load-bearing fallback* the painter uses to read inner content from
Fragment until ResolvedFragmentItem carries full content directly.

Apply the compat-fallback term from comment-policy.md uniformly: each
fragmentIndex field now carries an AIDEV-NOTE: compat-fallback anchor
naming what triggers the fallback (ResolvedFragmentItem missing
content) and the retirement condition (paint items become
self-describing). Drop "legacy content lookup" trailer from
ResolvedFragmentItem.blockId and rewrite the type-level docstring to
reference the per-field anchor instead of "legacy fragment renderers".

This is the first in-the-wild use of the loaded-term taxonomy added in
#3103. No behavior change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants