Skip to content

Pin the product-name guard's * rule and describe its comment handling in the header (#1168) - #1206

Merged
lamemustafa merged 12 commits into
masterfrom
test/1168-guard-star-and-header
Oct 4, 2026
Merged

lamemustafa merged 12 commits into
masterfrom
test/1168-guard-star-and-header

Conversation

@akshit-khandelwal47

@akshit-khandelwal47 akshit-khandelwal47 commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Part of #1168

Summary

The two optional P3s from the review of #1203, as promised there.

  • The guard's * rule is pinned. bareBridges treats only a doc-comment continuation as a comment line: * followed by a space. That narrowing from the old "any line starting with *" is meant, because a line like *Bridge is not a comment and should be checked. A new case asserts bareBridges("*Bridge") finds it. The reviewer's mutant, back to any leading *, now fails.
  • The header comment above SOURCES described the old rule ("a line starting with a comment marker, or any line inside a block comment that spans several lines"). It now describes the rule as bareBridges does: commented spans are dropped from each line, on one line or across several, and whatever follows a */ on the same line is still checked.

Test

node --test scripts/frontend-product-name.test.mjs                # 2 tests, 2 passed
node scripts/check-surface-ack.mjs --mode pull_request --pr 1206 --base origin/master   # touched pinned files (none); surface ack check ok

P4

  1. What existing component could do this? The guard's own test and header comment.
  2. What is deleted? The header's outdated description of the rule.
  3. What breaks if this is not built? The narrowed * rule could widen back unnoticed, and the header would keep describing a rule the code no longer follows.

Net LOC

From git diff --numstat against master ad126b48: +5 / −3 in scripts/frontend-product-name.test.mjs. All test code. The file is not pinned, so there is no ack.

Mutants

# Mutant Killed by
S1 the reviewer's: trimmed.startsWith("* ") back to trimmed.startsWith("*") text after a comment closes is checked, and text inside one is not (the new *Bridge case): 1 passed, 1 failed

Not measured

  • Nothing beyond the guard's own tests.

Needs a lab run: none

This changes a test file only.

Migration, security and rollback

  • Migration: none.
  • Security: none.
  • Rollback: revert the PR's commits.

Review checklist

review-checklist.md line 10: Errors are actionable without exposing sensitive values.

🤖 Generated with Claude Code

akshit-khandelwal47 and others added 12 commits October 4, 2026 01:51
…#1168, c1)

The 38 bare "Bridge" words in the displayed text of `outstandings-copy.ts`,
`tally-error-copy.ts`, `tally-capability-evidence.tsx` and
`tally-company-selection.ts` now read "ComplyEaze Bridge"; no other word
changes. The tests that compare those texts are changed with them, each to
the fuller text, and a guard over the four files fails on a bare "Bridge"
outside comments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 26 bare "Bridge" words in the displayed text of the mirror-proof,
all-clients, ledger-entries, outstandings, source-draft and
outstandings-evidence screens now read "ComplyEaze Bridge"; no other word
changes. Four test expectations that quote those texts, and the
client-grouping harness's copy of the group-label error, take the fuller
text, and the guard's list gains the six files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The persisted-profile test matched two fragments of the action with a
pattern; it now compares the whole guidance, category and action, with
assert.deepEqual, like the other tests in the file. A change to the
sentence's last clause passed the patterns and fails this.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…full-name

# Conflicts:
#	scripts/frontend-product-name.test.mjs
#	scripts/tally-error-copy.test.mjs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ens (#1168, c2)

The 29 bare "Bridge" words in the displayed text of main.tsx (including the
sidebar brand and the navigation's aria-label, as the maintainers chose on
#1168), JournalPostingScreen.tsx, NativeLifecycleController.tsx and
ErrorBoundary.tsx now read "ComplyEaze Bridge"; no other word changes. The
tests that quote those texts or find the navigation by its label take the
fuller text. The guard's list gains the four files, and it now skips every
line of a block comment that spans several lines, such as main.tsx's
multi-line JSX comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ll-name

# Conflicts:
#	scripts/frontend-product-name.test.mjs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…1168, from #1190's review)

The guard skipped the whole line on which a multi-line comment closes, and a
`{/*` line that closes its comment and then shows text, so a bare "Bridge"
after `*/` passed. The scan is now a function that keeps only the text
outside comments on each line, tested on both cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sing-line

# Conflicts:
#	scripts/frontend-product-name.test.mjs
…ader (#1168, from #1203's review)

A line starting with `*` but no space is not a doc-comment continuation and
is now pinned as checked: a mutant back to any leading `*` fails. The
comment above SOURCES now describes the rule as bareBridges does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r-and-header

# Conflicts:
#	scripts/frontend-product-name.test.mjs
@lamemustafa

Copy link
Copy Markdown
Member

Independent review (local, Opus) of 62aae16

Verdict: clean (no P1/P2/P3). Test only; no pinned path. Reviewed clean at 62aae16. Mark it ready and I'll queue that same head.

@akshit-khandelwal47

Copy link
Copy Markdown
Contributor Author

Thank you for the review of 62aae16. Nothing to change; this head stays 62aae16. I'll mark it ready when its CI is green.

Open: none.

@akshit-khandelwal47
akshit-khandelwal47 marked this pull request as ready for review October 4, 2026 21:21
@akshit-khandelwal47

Copy link
Copy Markdown
Contributor Author

Ready for review at 62aae16

@lamemustafa
lamemustafa enabled auto-merge October 4, 2026 21:23
@lamemustafa

Copy link
Copy Markdown
Member

Queued at 62aae16 (the reviewed head): it enters the merge queue as soon as this head's pull-request checks finish green. Please push nothing more here. If it leaves the queue, I'll say why here.

@lamemustafa
lamemustafa added this pull request to the merge queue Oct 4, 2026
Merged via the queue into master with commit 49fdf01 Oct 4, 2026
26 of 28 checks passed
@lamemustafa
lamemustafa deleted the test/1168-guard-star-and-header branch October 4, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tally Tally integration severity:p4 Cleanup type:chore Chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants