chore(governance): add scoped PR-size exception for PR #583 (#532) - #586
chore(governance): add scoped PR-size exception for PR #583 (#532)#586qnbs wants to merge 7 commits into
Conversation
check-pr-size.mjs loads config/pr-size-exceptions.json from the PR's base ref, so PR #583 cannot self-authorize this exception -- it must land on main first, then #583 rebases onto it. Scoped narrowly to PR #583 / fix/532-e2e-startup-determinism: the exact 81 files its review-convergence diff touches (no wildcard paths), a 1500-line non-exempt ceiling covering its actual 1256 meaningful lines with headroom, and 10 commits. The one new i18n key it adds (settings.data.dangerZone.factoryReset.failed, replacing a message that falsely told users after a failed factory reset "your data has not been lost") fans out across 19 locales x 3 source files, which is what pushes an otherwise ~24-file code fix past the absolute ceiling.
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds a base-ref-visible, tightly constrained PR-size exception for PR #583 so its reviewed architectural and localization changes can exceed the normal file-count ceiling without broadly weakening size enforcement. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Review limit reachedNext included review available in 12 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 74 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (1)
Comment |
PR Summary
|
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Docker | Sep 2, 2026 7:27p.m. | Review ↗ | |
| Python | Sep 2, 2026 7:27p.m. | Review ↗ | |
| Rust | Sep 2, 2026 7:27p.m. | Review ↗ | |
| Shell | Sep 2, 2026 7:27p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
🏁 CodeAnt Quality Gate ResultsCommit: ✅ Overall Status: PASSEDQuality Gate Details
|
There was a problem hiding this comment.
Review Summary
This PR adds a scoped exception for PR #583 to the pr-size-exceptions.json governance file. The structure follows the established pattern from previous exceptions.
Critical Issue Found
There's a logic error in the maxFiles configuration: it's set to 85 while the allowedPaths array contains exactly 81 entries. According to the PR description, this should be an "exact 81-file allowlist" with no wildcards. The 4-file gap between maxFiles and the actual path count would incorrectly permit files outside the intended allowlist.
Please fix this mismatch to ensure the exception enforces the exact file list as intended.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
There was a problem hiding this comment.
All reported issues were addressed across 1 file
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…ect locale fan-out count in reason
…ew-converged scope The prior 81-file/1500-line/10-commit entry was a snapshot before #583's substantive review convergence (the async epoch-based reset-gate redesign, retry-after-failure fixes across 9 services, and reverting the unrelated locale drift). Recomputed from the exact final head via node scripts/check-pr-size.mjs: 67 governed files, 1027 meaningful lines, 11 commits. allowedPaths verified to match the actual diff exactly (comm -3, zero discrepancy either direction).
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
…fail-closed scope PR #583 grew by one file and ~187 meaningful lines across 2 more commits after the reset gate was redesigned to fail closed and to fold late registrations into its own awaited barrier, plus the completed 14-locale translation pass. Recomputes allowedPaths (68, zero discrepancy verified both directions against the actual diff), maxNonExemptMeaningfulLines (1300, covers the measured 1214 with modest headroom), and maxCommits (14, covers the actual 13) against #583's current head, and rewrites the reason text to describe the final fail-closed contract rather than the earlier log-only design.
…tion P1 fix The reset-generation admission fix (beginIdbOpenAdmission/isIdbOpenStillValid across all 9 openers) and the allSettled deletion fix added ~292 meaningful lines and 2 more commits without changing the governed file set. Bumps maxNonExemptMeaningfulLines to 1600 (covers the measured 1506) and maxCommits to 16 (covers the actual 15); allowedPaths is unchanged (still zero discrepancy against the actual diff). Also corrects the reason text's prior false claim that the 17 sidebar.json newline-only files were reverted — they remain in the diff because Biome's format-on-commit hook re-adds the missing trailing newline the moment any of them is staged for any reason, which cannot be avoided without skipping the pre-commit hook.
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
…eview state #583's review-thread state is now settled: 76 of 77 threads resolved, with the one remaining thread an explicitly-classified pre-existing design question orthogonal to this PR (not a current-source finding requiring code changes). Recomputes to the exact measured ceilings with no speculative headroom, per the standing convergence directive's final-freeze instruction: maxFiles 70, maxCommits 21, maxNonExemptMeaningfulLines 1753. allowedPaths gains the 2 files that entered the diff in the last source round (tests/unit/listenerMiddleware.test.ts, tests/unit/loraAdapterService.test.ts) — zero discrepancy verified both directions against the actual diff. Reason text rewritten to describe the complete final scope, including the reset- closer pending-flight invalidation and preserve-first deletion-ownership work that landed after the previous recompute.
…exception actually applies check-pr-size.mjs's path-scope match requires EVERY path in the raw diff to be listed in allowedPaths for the exception to apply at all -- unlike the file/line counts, this check does not exclude generated files via isGovernanceExcluded(). The exception's allowedPaths only listed #583's 70 governed files, omitting the 19 public/locales/*/bundle.json files that are also part of its diff. Once #583 rebased onto a main carrying this exception, pathScopeMatch would have been false, the exception would never have applied, and the raw governed-file-count check (70 > the absolute ceiling of 30) would have blocked the PR outright -- silently defeating the entire point of this exception. Adds all 19 generated bundle paths; maxFiles stays 70 since that check is separately based on the governed count. Zero discrepancy verified against the full 89-path unfiltered diff.
There was a problem hiding this comment.
No application code in the PR — skipped Code Health checks.
See analysis details in CodeScene
Quality Gate Profile: The Bare Minimum
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
|
[check-pr-size] PR size is over the target tier (normal profile): 1 files, 103 meaningful lines, 7 commits — limit ≤8 files / ≤400 lines / ≤6 commits. Consider splitting into smaller, independently reviewable PRs. |
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
Summary
Adds a scoped
config/pr-size-exceptions.jsonentry for PR #583 (issue #532 E2E startup/navigation nondeterminism), mirroring the precedent set by #576 for PR #564.check-pr-size.mjsloads the exception registry from the PR's base ref, so PR #583 cannot self-authorize this — it must land onmainfirst, then #583 rebases onto it so its own merge-base picks up this entry.Why #583 needs it
#583's review-convergence (CodeRabbit, cubic, Amazon Q, and direct maintainer review) surfaced real defects requiring a genuine architectural fix — a shared IDB reset-gate covering every long-lived connection in the app (9 modules). The gate fails closed: a registered connection-closer failure rejects
beginIdbReset()(after every closer, including the failing one, has still had its chance to run) sowipeAllAppData()aborts before any database deletion on an unproven teardown, and a closer registered while the reset is draining joins that same awaited barrier instead of racing ahead of it as fire-and-forget. A centralizedbeginIdbOpenAdmission()/isIdbOpenStillValid()pair closes a further gap: an open that starts after a reset already bumped the generation would otherwise still match at completion, so every opener also refuses to start a fresh open while a reset is in progress — and every reset closer now also invalidates its own module's pending open flight (not just the already-open connection), so the first post-reset caller starts a genuinely fresh attempt instead of reusing one already doomed to reject.deleteAllIndexedDBDatabases()usesPromise.allSettledso a fast-rejecting deletion can't release the gate while another is still outstanding, and only targets database names it can prove it owns (exactKNOWN_DB_NAMESplus theworldscript-localfirst-prefix), never assuming ownership just because enumeration returned a name. It also closes several stale-open-completion single-flight races via an identity token, a synchronousindexedDB.open()throw that could permanently memoize a rejected open promise, a test-reset helper that swapped the fake IndexedDB factory without releasing its cached connection, and a transient reset-denial NOOP that was indistinguishable from an intentional one. Plus a broken E2E testid, a still-locale-dependent mobile selector, and a misleading post-failure error message needing a dedicated i18n key — now genuinely translated (not English-fallback) in all 14 locales that previously lacked it.Scope
Exact 70-file allowlist (no wildcards) matching #583's actual diff,
maxNonExemptMeaningfulLines: 1753andmaxCommits: 21— exact measured ceilings, no speculative headroom, since #583's review-thread state is now settled: 76 of 77 threads resolved, with the one remaining thread an explicitly-classified pre-existing design question (encryption-transition data remanence) that's orthogonal to this PR and left open for a separate maintainer decision.17 of the 70 files are
locales/*/sidebar.jsonwith only a trailing-newline diff — they already lacked a final newline onmain, and Biome's format-on-commit hook re-adds one the moment any of them is staged for any reason in this PR. This could not be reverted for real without skipping the pre-commit hook, so they remain in the allowlist with that diff.Test plan
jq empty config/pr-size-exceptions.json— valid JSONallowedPathsand PR fix(e2e): eliminate WelcomePortal startup/navigation nondeterminism (#532) #583's actualgit diff --name-onlyoutput against its current merge-basepnpm run ci:prepush— pass