Skip to content

chore(coverage): extend the D38 gate to co-located StyleSheet modules - #607

Closed
thomasluizon wants to merge 3 commits into
mainfrom
chore/coverage-gate-style-modules
Closed

chore(coverage): extend the D38 gate to co-located StyleSheet modules#607
thomasluizon wants to merge 3 commits into
mainfrom
chore/coverage-gate-style-modules

Conversation

@thomasluizon

Copy link
Copy Markdown
Owner

What

tools/redesign-coverage.mjs now walks co-located style modules (*.styles.ts, *-styles.ts, styles.ts) alongside .tsx, so each must map to exactly one #539 ticket by directory rule.

Why

D38 asserts that every file under apps/*/app and apps/*/components is claimed by exactly one redesign ticket, because the surface manifest only sees files a surface closure reaches. The gate implemented that for .tsx only.

Style modules are the wrong thing to exclude: they carry the local/spacing-scale and z-index suppressions the redesign has to own. A ticket could be signed off as visually complete while the file holding its actual spacing violations was never claimed by anything.

One rule needed widening as a result: R11-screen-astra now also matches /chat.styles, since the chat screen's style module sits beside chat.tsx rather than inside a /chat/ directory.

Verification

node tools/redesign-coverage.mjs exits 0 on this branch, so the widened denominator is fully claimed with no orphans. Exit 1 remains the behaviour for any unclaimed surface or orphaned file.

Provenance

Written earlier on 2026-07-24 and pushed, but no PR was ever opened, so it sat on the remote unreviewed. Found while sweeping for unmerged work; opening it rather than losing it.

🤖 Generated with Claude Code

thomasluizon and others added 2 commits July 24, 2026 14:33
tools/redesign-coverage.mjs walked only .tsx, so the 234 local/spacing-scale
suppressions living in .ts StyleSheet modules (*-styles.ts, *.styles.ts,
styles.ts) were invisible to the D38 denominator, letting a .ts file no #539
ticket owns silently defeat a future drive-suppressions-to-zero backstop.

Extend the walker (renamed walkTsx -> walkSurfaceFiles) to also collect
co-located StyleSheet modules, and add a /chat.styles matcher to R11 so
app/chat.styles.ts lands on the same ticket as its sibling chat.tsx. All 24
style modules now map to exactly one ticket; tool exits 0 with zero orphans.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
orbit-ui-mobile-web Ignored Ignored Jul 25, 2026 2:07am

Request Review

@claude claude Bot 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.

Code Review: PR #607 — chore(coverage): extend the D38 gate to co-located StyleSheet modules

Scope: PR #607 in orbit-ui-mobile
Recommendation: APPROVE

Summary

Single-file diff (tools/redesign-coverage.mjs, +13/-8) widens the D38 orphan-file gate from .tsx-only to also walk co-located StyleSheet modules (*.styles.ts, *-styles.ts, styles.ts), and widens the R11-screen-astra FILE_RULES entry to match /chat.styles so apps/mobile/app/chat.styles.ts doesn't fall through as an orphan. No prior review threads exist on this PR (checked via gh pr view --json reviews,comments and a GraphQL review-threads query — only an automated Vercel comment). All 24 style modules currently in apps/mobile/apps/web were manually traced against the ordered FILE_RULES table; every file resolves to exactly one ticket, including chat.styles.ts, confirming the PR's stated verification.

Findings

Critical: None. High: None.

Medium

[MEDIUM] Gate's own doc describes it as .tsx-only after the scope changed
· dimension: 2 (Dead/stale code) — doc-behavior drift
· location: orbit-ui-mobile/CLAUDE.md:85, orbit-ui-mobile/tools/README.md:23
· issue: Both the root CLAUDE.md docs registry entry for `.claude/manifests/surfaces.json`
  and the tools/README.md catalog row for redesign-coverage.mjs still say the D38 walk
  covers "every `.tsx` under apps/*/app + apps/*/components". This diff extends the walk
  to also include co-located StyleSheet modules, but neither description was updated.
· risk: A future agent reading either doc (both are exactly what this repo points agents
  to instead of exploring the codebase) will believe style modules sit outside the D38
  denominator and skip claiming them, reintroducing the orphan-file failure this gate
  exists to prevent.
· fix: CLAUDE.md:85 and tools/README.md:23 — change "every .tsx ... mapped to exactly one
  ticket" to "every .tsx and co-located StyleSheet module ... mapped to exactly one ticket".
· reference: root CLAUDE.md "When you change a doc, update its At a glance header and this
  registry in the same edit"; tools/CONVENTIONS.md "Adding one" (README.md catalog row is
  the tool's contract-facing description).

Low/Info: The widened rule's correctness was confirmed by manual trace against FILE_RULES (direct script execution was unavailable in this environment).

Subagents

All five gated N/A: the diff touches only tools/redesign-coverage.mjs — no apps/web/apps/mobile file, no i18n string, no shared-types/DTO, no orbit-api code, no UI file.

Validation

Skipped per CI-adapted instructions (Build/Unit Tests/SonarCloud run as separate required checks on this PR).

Not verifiable in CI

  • Dimensions requiring orbit-api (contract-aligner, orbit-api side of the backward-compat guard): N/A regardless — diff has no cross-repo surface.
  • Dimensions 8–14 (DESIGN.md/AI-slop, Parity, i18n, Contract drift, Security, Backend hard rules, FEATURES.md parity): all N/A — the diff's only file is outside every workspace's UI/i18n/shared-types/orbit-api surface.

What's good

  • The /chat.styles addition is minimally targeted at exactly the one file it needs to catch, not a generic loosening.
  • The header comment states the WHY (style modules carry local/spacing-scale/z-index suppressions the redesign must own).
  • isStyleModule matches exactly the three naming conventions actually in use (verified no *.style.ts singular or other variant exists that would evade it).
  • walkTsxwalkSurfaceFiles rename has no dangling references anywhere in the repo.

Recommendation

Approve. The one Medium finding (stale .tsx-only wording in CLAUDE.md and tools/README.md) is worth a quick follow-up but doesn't block merge — Medium never forces a request-changes verdict per the rubric's signal gate.

Severity Count
Critical 0
High 0
Medium 1
Low/Info 1

@sonarqubecloud

Copy link
Copy Markdown

@claude claude Bot 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.

Code Review: PR #607

Recommendation: REQUEST CHANGES

Summary

PR #607 (chore/coverage-gate-style-modulesmain) set out to extend tools/redesign-coverage.mjs's D38 walker to co-located StyleSheet modules. That work is real, but it already shipped independently as PR #587 (chore(coverage): extend the D38 gate to co-located StyleSheet modules, squash-merged as 6546a627 on 2026-07-24). This branch subsequently merged main a second time (commit d721dce8), which absorbed that already-merged change back into itself. The net effect: PR #607's current head is now byte-identical to main across the entire repository.

Findings

High

PR #607 is now a no-op duplicate of already-merged PR #587

  • Evidence: git diff ea0e179ab0b263d8d690e97b2efa85d29cc3a77d HEAD --stat (main vs. PR head) returns completely empty — zero files, zero lines changed anywhere in the repo. Independently verified in this review session. git log -- tools/redesign-coverage.mjs shows the only commit touching that file since #587 landed is ea0e179a (#606, unrelated harness-execution work), which is already present on both branches.
  • Risk: The PR body's own description and verification steps assert this PR ships a code change to tools/redesign-coverage.mjs. It does not — merging it would create a squash-merge commit in main's history that claims a change while shipping a literal empty diff, muddying the D38 audit trail and changelog provenance. A prior review of this PR (before its second merge of main) approved a real +13/-8 diff that no longer exists on this head; that approval is stale and should not be used to fast-track merging.
  • Fix: Close PR #607 as a duplicate of already-merged #587 rather than merging it. There is nothing to recover — the underlying engineering is sound and already shipped.

Medium / Low / Info

None attributable to this PR's diff (which is empty).

Subagents

N/A — diff touches no files, so parity-checker, i18n-syncer, contract-aligner, security-reviewer, and design-reviewer all have nothing to verdict.

Validation

Skipped per CI instructions (Build/Unit Tests/SonarCloud run as separate required checks on this PR).

What's good

The underlying engineering (widening the D38 walker to co-located StyleSheet modules) is sound and already correctly reviewed and shipped via #587. Merging #607 would not break main (diff is empty, so it's harmless at runtime) — the objection is git-history hygiene and the stale PR description, not correctness risk.

Recommendation

Close PR #607 without merging — it duplicates already-merged PR #587 and its diff against main is empty.

Severity Count
Critical 0
High 1
Medium 0
Low / Info 0

@thomasluizon

Copy link
Copy Markdown
Owner Author

Closing as a duplicate, confirmed empty.

The reviewer is right and I opened this PR in error. The D38 style-module widening already shipped as #587 (squash-merged 6546a627). This branch then merged main a second time, absorbing its own change back, so git diff origin/main origin/chore/coverage-gate-style-modules is now byte-empty across the whole repo. Verified independently just now.

My mistake, worth naming so it does not repeat. I found this branch with git branch -r --no-merged origin/main while sweeping for unmerged work. That predicate answers "does this branch have commits not in main", which a merge commit satisfies even when the tree is identical. It does not answer "does this branch change anything". The correct check for orphaned work is a non-empty git diff main <branch>, and I have applied it to the rest of the sweep.

Nothing is lost. The engineering is on main.

@thomasluizon
thomasluizon deleted the chore/coverage-gate-style-modules branch July 25, 2026 02:16
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