Skip to content

chore(governance): add scoped PR-size exception for PR #583 (#532) - #586

Open
qnbs wants to merge 5 commits into
mainfrom
chore/pr-583-size-exception
Open

chore(governance): add scoped PR-size exception for PR #583 (#532)#586
qnbs wants to merge 5 commits into
mainfrom
chore/pr-583-size-exception

Conversation

@qnbs

@qnbs qnbs commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a scoped config/pr-size-exceptions.json entry for PR #583 (issue #532 E2E startup/navigation nondeterminism), mirroring the precedent set by #576 for PR #564.

check-pr-size.mjs loads the exception registry from the PR's base ref, so PR #583 cannot self-authorize this — it must land on main first, 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) so wipeAllAppData() 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 centralized beginIdbOpenAdmission()/isIdbOpenStillValid() pair closes a further gap cubic found: an open that starts after a reset already bumped the generation would otherwise still match at completion, so every opener now also refuses to start a fresh open while a reset is in progress. deleteAllIndexedDBDatabases() uses Promise.allSettled so a fast-rejecting deletion can't release the gate while another deletion is still outstanding. It also closes several stale-open-completion single-flight races via an identity token (proForgeHistoryStore, loraAdapterService, sceneRevisionService, logSinks, crossProjectIndexService, proForgeMemoryBank, the worker-bus DeadLetterQueue), a synchronous indexedDB.open() throw that could permanently memoize a rejected open promise, a broken E2E testid, a still-locale-dependent mobile selector, and a misleading post-failure error message needing a dedicated i18n key. That key (settings.data.dangerZone.factoryReset.failed) is now genuinely translated (not English-fallback) in all 14 locales that previously lacked it, which is what pushes an otherwise ~24-file code fix past the absolute 30-file ceiling.

Scope

Exact 68-file allowlist (no wildcards) matching #583's actual diff, maxNonExemptMeaningfulLines: 1600 (covers its measured 1506 with modest headroom, not a new target), maxCommits: 16 (covers its 15 commits).

17 of the 68 files are locales/*/sidebar.json with only a trailing-newline diff — they already lacked a final newline on main, 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

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

codeant-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Incremental review completed ea34858 Sep 02, 2026 · 15:59 16:00
✅ Incremental review completed 3a2a82a Sep 02, 2026 · 14:26 14:27
✅ Reviewed your PR 5bc1765 Sep 02, 2026 · 12:57 12:58

@codeant-ai

codeant-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
worldscript-studio Ready Ready Preview Sep 2, 2026 4:00pm UTC

@sourcery-ai

sourcery-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds 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

Change Details Files
Adds a narrowly scoped PR-size exception for PR #583, using an explicit allowlist and bounded size/commit limits. config/pr-size-exceptions.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 57 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 73 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.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: 6d60b32b-86ca-4ea3-960f-9d75592996cd

📥 Commits

Reviewing files that changed from the base of the PR and between b1718d7 and ea34858.

📒 Files selected for processing (1)
  • config/pr-size-exceptions.json

Comment @coderabbitai help to get the list of available commands.

@what-the-diff

what-the-diff Bot commented Sep 2, 2026

Copy link
Copy Markdown

PR Summary

  • Improvements to Startup/Navigation Process: This update includes details about managing exceptions linked to inconsistencies or unpredictability during system start-up or navigating through the system. It mainly affects the project termed qnbs/WorldScript-Studio.

  • Clear Restrictions for Contributions: Clear boundaries have been set for any additions or changes to the project, inclusive of the maximum number of files that can be altered (85), the maximum number of updates or new elements (10 commits), and the maximum number of lines that can contain significant changes (1500 lines).

  • Defined Scope of Change: The scope of this update is defined by specifying the exact file paths that can be modified - these include components, regional settings, backend services, and testing files.

  • Rationale for Exception Cases: The reason for exceptions in the system has been elaborated on. It points out multiple issues identified during system review that demanded significant design changes and corrections, including modifications for multi-language support (Internationalization or i18n).

@deepsource-io

deepsource-io Bot commented Sep 2, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in b1718d7...ea34858 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Docker Sep 2, 2026 3:59p.m. Review ↗
Python Sep 2, 2026 3:59p.m. Review ↗
Rust Sep 2, 2026 3:59p.m. Review ↗
Shell Sep 2, 2026 3:59p.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-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Sep 2, 2026
codescene-access[bot]

This comment was marked as outdated.

@codeant-ai

codeant-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit: ea348587
Scan Time: 2026-09-02 16:01:05 UTC

✅ Overall Status: PASSED

Quality Gate Details

Quality Gate Status Details
Secrets ✅ PASSED 0 secrets found
Duplicate Code ✅ PASSED 0.0% duplicated
SAST ✅ PASSED No security issues
Bugs ✅ PASSED Rating S: No bugs
IAC ✅ PASSED Rating S: No issues

View Full Results

@sourcery-ai sourcery-ai 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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@amazon-q-developer amazon-q-developer 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.

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.

Comment thread config/pr-size-exceptions.json Outdated

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 1 file

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread config/pr-size-exceptions.json Outdated
@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

codescene-access[bot]

This comment was marked as outdated.

…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).
codescene-access[bot]

This comment was marked as outdated.

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="config/pr-size-exceptions.json">

<violation number="1" location="config/pr-size-exceptions.json:82">
P1: PR #583's exception will never apply while its generated locale bundles are omitted from `allowedPaths`. Add the 19 `public/locales/*/bundle.json` paths, or make path-scope validation use the same generated-artifact exclusion as the file and line counters.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment thread config/pr-size-exceptions.json Outdated
"prNumber": 583,
"baseRef": "main",
"headRef": "fix/532-e2e-startup-determinism",
"maxFiles": 67,

@cubic-dev-ai cubic-dev-ai Bot Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: PR #583's exception will never apply while its generated locale bundles are omitted from allowedPaths. Add the 19 public/locales/*/bundle.json paths, or make path-scope validation use the same generated-artifact exclusion as the file and line counters.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At config/pr-size-exceptions.json, line 82:

<comment>PR #583's exception will never apply while its generated locale bundles are omitted from `allowedPaths`. Add the 19 `public/locales/*/bundle.json` paths, or make path-scope validation use the same generated-artifact exclusion as the file and line counters.</comment>

<file context>
@@ -79,72 +79,54 @@
-      "maxFiles": 81,
-      "maxCommits": 10,
-      "maxNonExemptMeaningfulLines": 1500,
+      "maxFiles": 67,
+      "maxCommits": 12,
+      "maxNonExemptMeaningfulLines": 1100,
</file context>
Fix with 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.
codescene-access[bot]

This comment was marked as outdated.

…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.

@codescene-access codescene-access 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.

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.

@cubic-dev-ai cubic-dev-ai 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.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="config/pr-size-exceptions.json">

<violation number="1" location="config/pr-size-exceptions.json:83">
P2: The exception now permits 16 commits and 1600 lines, while its reason records a final reviewed diff of 15 commits and 1506 lines. Additional changes within the allowlisted paths can therefore bypass the stated one-time scope; set the ceilings to the measured values or explicitly add a mechanism and rationale for the headroom.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Fix all with cubic | Re-trigger cubic

Comment on lines +83 to +84
"maxCommits": 16,
"maxNonExemptMeaningfulLines": 1600,

@cubic-dev-ai cubic-dev-ai Bot Sep 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The exception now permits 16 commits and 1600 lines, while its reason records a final reviewed diff of 15 commits and 1506 lines. Additional changes within the allowlisted paths can therefore bypass the stated one-time scope; set the ceilings to the measured values or explicitly add a mechanism and rationale for the headroom.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At config/pr-size-exceptions.json, line 83:

<comment>The exception now permits 16 commits and 1600 lines, while its reason records a final reviewed diff of 15 commits and 1506 lines. Additional changes within the allowlisted paths can therefore bypass the stated one-time scope; set the ceilings to the measured values or explicitly add a mechanism and rationale for the headroom.</comment>

<file context>
@@ -80,8 +80,8 @@
       "maxFiles": 68,
-      "maxCommits": 14,
-      "maxNonExemptMeaningfulLines": 1300,
+      "maxCommits": 16,
+      "maxNonExemptMeaningfulLines": 1600,
       "supplementalLineAllowances": [],
</file context>
Suggested change
"maxCommits": 16,
"maxNonExemptMeaningfulLines": 1600,
"maxCommits": 15,
"maxNonExemptMeaningfulLines": 1506,
Fix with cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant