Skip to content

test(cli): drop ticket and point-in-time references from test comments - #527

Merged
blafourcade merged 1 commit into
nextfrom
refactor/drop-ticket-refs-from-tests
Jul 27, 2026
Merged

blafourcade merged 1 commit into
nextfrom
refactor/drop-ticket-refs-from-tests

Conversation

@blafourcade

Copy link
Copy Markdown
Contributor

🎯 What & why

Test names and comments carried backlog identifiers (BUG-E2-01, BUG-E3-02, A2/A3) and phrasing anchored to a moment in time — "before this fix", "the collapse-to-one-pass fix", "Scope note".

Both rot. The identifiers point at a backlog that isn't tracked in this repo, so they're unresolvable for any future reader. And "before this fix" stops meaning anything the moment the fix is history — which it already is.

🛠️ How it works

Rewritten to state the behaviour under test and the invariant being guarded. Where a comment carried a genuinely durable fact — why a local-source install never reaches restoreViaBuiltTree, why PluginFormat and AiToolId only look interchangeable — that fact is kept, stripped of the historical framing. Git history already holds when and why each line changed.

Four files:

  • restore-all-use-case.unit.test.ts — describe name + 2 comment blocks
  • restore-use-case.unit.test.ts — 2 test names
  • ensure-built-marketplace-use-case.integration.test.ts — describe name + header comment
  • registry-conformance.unit.test.ts — header comment

🧪 How to verify

pnpm --filter cli test — 2092/2092. Comments and test names only; no test logic touched, no assertion changed.

⚠️ Heads-up

Two older instances of the same pattern were left alone, since they predate this work and aren't mine to rewrite here — say the word if you want them included:

  • plugin-add-use-case.unit.test.ts:515 — "Before this fix, ModeAMarketplaceTranslator bypassed the guard."
  • command-matrix-plugin.e2e.test.ts:124 — "plugin doctor used to gate on the FULL …"

Test names and comments carried backlog identifiers (BUG-E2-01, BUG-E3-02,
A2/A3) and phrasing anchored to a moment in time ("before this fix", "the
collapse-to-one-pass fix", "Scope note"). Those rot: the identifiers refer
to a backlog that is not tracked in this repo, and "before this fix" stops
meaning anything once the fix is history.

Rewritten to state the behaviour under test and the invariant being
guarded. Git history already holds when and why each changed.

Comments only — no test logic touched. 2092/2092 pass.
@blafourcade
blafourcade merged commit 0ad4a48 into next Jul 27, 2026
14 checks passed
@blafourcade
blafourcade deleted the refactor/drop-ticket-refs-from-tests branch July 27, 2026 08:01
blafourcade added a commit that referenced this pull request Jul 31, 2026
#527)

Test names and comments carried backlog identifiers (BUG-E2-01, BUG-E3-02,
A2/A3) and phrasing anchored to a moment in time ("before this fix", "the
collapse-to-one-pass fix", "Scope note"). Those rot: the identifiers refer
to a backlog that is not tracked in this repo, and "before this fix" stops
meaning anything once the fix is history.

Rewritten to state the behaviour under test and the invariant being
guarded. Git history already holds when and why each changed.

Comments only — no test logic touched. 2092/2092 pass.
blafourcade added a commit that referenced this pull request Jul 31, 2026
#527)

Test names and comments carried backlog identifiers (BUG-E2-01, BUG-E3-02,
A2/A3) and phrasing anchored to a moment in time ("before this fix", "the
collapse-to-one-pass fix", "Scope note"). Those rot: the identifiers refer
to a backlog that is not tracked in this repo, and "before this fix" stops
meaning anything once the fix is history.

Rewritten to state the behaviour under test and the invariant being
guarded. Git history already holds when and why each changed.

Comments only — no test logic touched. 2092/2092 pass.