Skip to content

test: address adversarial-review findings (dict gate + harness)#237

Merged
heznpc merged 1 commit into
mainfrom
test/address-review-findings
Jun 17, 2026
Merged

test: address adversarial-review findings (dict gate + harness)#237
heznpc merged 1 commit into
mainfrom
test/address-review-findings

Conversation

@heznpc

@heznpc heznpc commented Jun 17, 2026

Copy link
Copy Markdown
Owner

An adversarial review (4 finder angles → per-finding skeptic verify) of PRs #234–236 found no runtime/production bugs — the YouTube subtitle lifecycle, dictionary reverts, a11y changes, and Check 7 gate all verified correct. It surfaced two test/gate-quality issues + one harness nit, fixed here.

1. Check 7 negative test was vacuous (medium)

tests/dict-coverage-checker.test.js set de.claudePlatform.Skills = "Fähigkeiten"already the current value, so the mutation was a no-op and the test passed trivially without exercising the per-locale guard. Rewritten as a real-data assertion that asserts its precondition explicitly (de translates "Skills"; ja._protected registers it; de._protected does not), so it can never go vacuous, then proves the full run stays clean — locking that Check 7 is per-locale, not a global term blocklist.

2. Check 7 scope documented (medium)

Added a comment stating Check 7 catches protected terms used as standalone section keys; brand tokens embedded inside longer strings are owned by the runtime restoreProtectedTerms pass (a substring scan would false-positive on legitimate translations that correctly keep the token English).

3. Harness op null-guard (low)

shortcutsOverlayA11y now guards on _sb/toggleShortcutsHelp before calling, matching the other ops.

Validation

lint · format · check:dict-coverage · 9 dict-coverage unit tests · a11y e2e — all green.

An adversarial review of PRs #234-236 found no runtime bugs (the youtube
lifecycle, dict reverts, a11y changes, and Check 7 all verified correct), but
flagged two test/gate-quality issues + one harness nit:

- Check 7 negative test was VACUOUS: it set de.claudePlatform.Skills =
  "Fähigkeiten", which is already the current value, so the mutation was a no-op
  and the test proved nothing. Rewrite it as a real-data assertion that asserts
  its precondition explicitly (de translates "Skills"; ja's _protected registers
  it; de's does not) so it can never go vacuous, then proves the full run stays
  clean — locking that Check 7 is per-locale, not a global term blocklist.
- Document Check 7's SCOPE: it catches protected terms used as standalone
  section KEYS; embedded brand tokens inside longer strings are owned by the
  runtime restore pass (a substring scan would false-positive).
- shortcutsOverlayA11y op now guards on _sb/toggleShortcutsHelp before calling,
  matching the other harness ops.

lint · format · check:dict-coverage · 9 dict-coverage unit tests · a11y e2e — green.
@heznpc
heznpc enabled auto-merge (squash) June 17, 2026 22:53
@heznpc
heznpc merged commit af3e125 into main Jun 17, 2026
8 checks passed
@heznpc
heznpc deleted the test/address-review-findings branch June 17, 2026 22:54
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.

1 participant