Skip to content

fix(governance): raise PR #596's ceilings for its codecov coverage-gap fix - #600

Merged
qnbs merged 1 commit into
mainfrom
fix/pr-size-exception-596-coverage-wave
Sep 4, 2026
Merged

fix(governance): raise PR #596's ceilings for its codecov coverage-gap fix#600
qnbs merged 1 commit into
mainfrom
fix/pr-size-exception-596-coverage-wave

Conversation

@qnbs

@qnbs qnbs commented Sep 3, 2026

Copy link
Copy Markdown
Owner

User description

Summary

PR #596's codecov/patch check failed at 67.20% (target 74.99%). Root-caused by downloading and directly inspecting the actual CI-generated lcov.info artifact (not just the Codecov dashboard, which can lag or be misread) -- the gap was real, not stale data: Codecov correctly counts a line with only partial branch coverage as not-fully-covered, and this PR's own earlier review-fix commits had left the reset-in-progress-rejection, generation-mismatch, onversionchange, and onerror branches largely untested across most of the reset-gate's service modules.

Closed with test-only additions (no production code changed):

  • services/storage/idbCore.ts
  • services/crossProjectIndexService.ts
  • services/diagnostics/logSinks.ts
  • services/proForge/proForgeHistoryStore.ts
  • services/proForge/proForgeMemoryBank.ts
  • packages/worker-bus/src/deadLetterQueue.ts

A subsequent CodeRabbit finding on logSinks.test.ts flagged that two reset-race tests were synchronized via a fixed await Promise.resolve() -- coupled to the write queue's internal await-depth, and would silently stop covering the intended generation-invalidation branch if that depth ever changed. Fixed in the same wave by waiting on observable evidence instead (beginIdbOpenAdmission()/indexedDB.open() spies), verified stable across 5 repeated runs.

This PR updates config/pr-size-exceptions.json's pr-596-532-e2e-startup-determinism entry: maxFiles (65 -> 70, 5 new test files), maxCommits (15 -> 16), maxNonExemptMeaningfulLines (1900 -> 2199, exact re-measurement against current main after the synchronization fix).

Verification

Simulated the exception match locally against the rebased #596 branch:

PR_SIZE_EXCEPTION=APPLIED outcome=within target id=pr-596-532-e2e-startup-determinism pr=#596 scope=70/70 files
TOTAL_MEANINGFUL_LINES=2199 NON_EXEMPT_MEANINGFUL_LINES=2199/2199 commits=16/16
BASE_GOVERNED=YES IDENTITY_MATCH=YES PATH_SCOPE_MATCH=YES
EFFECTIVE_LIMITS=files<=70;nonExemptLines<=2199;commits<=16

Test plan


CodeAnt-AI Description

Raise the PR #596 size allowance to include coverage tests

What Changed

  • Adds five test files covering reset-in-progress rejection, generation mismatches, IndexedDB lifecycle errors, and related failure paths across storage and service modules
  • Updates the PR size exception to allow 70 files, 16 commits, and 2,199 meaningful non-exempt lines
  • Replaces timing-dependent reset-race test waits with observable IndexedDB activity, making those tests reflect actual behavior

Impact

✅ Higher coverage for reset and storage failure paths
✅ More reliable reset-race tests
✅ PR size checks pass for the completed review fixes

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • Chores
    • Updated project change-review exception criteria and supporting documentation.
    • Added coverage for a dead-letter-queue test scenario.
    • No changes to end-user functionality or public interfaces.

@codeant-ai

codeant-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Incremental review completed 002f1ee Sep 03, 2026 · 23:41 23:41
✅ Reviewed your PR 64c5613 Sep 03, 2026 · 22:36 22:37

@codeant-ai

codeant-ai Bot commented Sep 3, 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 3, 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 3, 2026 11:42pm UTC

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

Sorry @qnbs, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 7 hours and 13 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Essentials

Run ID: a41151e7-8ba8-4c05-b0ca-e3b4ea81bd18

📥 Commits

Reviewing files that changed from the base of the PR and between 2c7a6ca and 002f1ee.

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

Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.


📝 Walkthrough

Walkthrough

The PR size exception for PR #596 was updated. Its ceilings increased, additional test paths were allowed, and the reason now records the finalized scope and metrics.

Changes

PR size exception

Layer / File(s) Summary
Update exception scope
config/pr-size-exceptions.json
The exception limits increased to 70 files, 16 commits, and 2,199 meaningful lines. The allowed paths now include additional coverage tests, including the dead-letter-queue test. The reason documents the finalized scope and metrics.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 002f1

This updates the scoped size exception for the finalized test coverage changes. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the governance fix: raising PR #596's size-exception ceilings for a Codecov coverage-gap fix. It is specific and related to the main change.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pr-size-exception-596-coverage-wave

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

@sourcery-ai

sourcery-ai Bot commented Sep 3, 2026

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

Reviewer's Guide

This test-only coverage fix adds targeted branch tests across six service modules and updates the narrowly scoped PR-size exception so PR #596 can remain within its governed file, commit, and meaningful-line limits; lint, prepush checks, and local exception matching were reported as passing.

File-Level Changes

Change Details Files
Expanded the governance exception for PR #596 to accommodate the additional coverage-gap test commit and five test files.
  • Raised the file ceiling from 65 to 70.
  • Raised the commit ceiling from 15 to 16.
  • Raised the non-exempt meaningful-line ceiling from 1900 to 2193.
  • Review that the exception remains narrowly scoped to the intended PR, base, and paths.
config/pr-size-exceptions.json
Added tests covering previously missed reset-gate error, race, and lifecycle branches to restore Codecov patch coverage.
  • Covered reset-in-progress rejection and generation-mismatch behavior.
  • Covered IndexedDB onversionchange and onerror paths.
  • Added coverage across storage, cross-project indexing, diagnostics, ProForge stores, and the worker dead-letter queue.
  • Confirm these are test-only changes with no production behavior changes.
services/storage/idbCore.ts
services/crossProjectIndexService.ts
services/diagnostics/logSinks.ts
services/proForge/proForgeHistoryStore.ts
services/proForge/proForgeMemoryBank.ts
packages/worker-bus/src/deadLetterQueue.ts

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

@deepsource-io

deepsource-io Bot commented Sep 3, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 2c7a6ca...002f1ee 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 3, 2026 11:41p.m. Review ↗
Python Sep 3, 2026 11:41p.m. Review ↗
Rust Sep 3, 2026 11:41p.m. Review ↗
Shell Sep 3, 2026 11:41p.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:XS This PR changes 0-9 lines, ignoring generated files label Sep 3, 2026
@codeant-ai

codeant-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit: 002f1ee1
Scan Time: 2026-09-03 23:43:17 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

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

This PR correctly updates the governance exception ceilings for PR #596 to accommodate test-only additions that close a codecov/patch coverage gap. The changes are properly scoped (5 new test files, 1 additional commit, 293 additional meaningful lines) and align with the stated purpose of addressing untested reset-in-progress-rejection, generation-mismatch, onversionchange, and onerror branches. The updated allowedPaths correctly includes all 5 new test files, and the comprehensive reason field documents the evolution from the previous 15-commit state through the coverage fix. No blocking defects found.


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.

codescene-access[bot]

This comment was marked as outdated.

@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…p fix

codecov/patch failed at 67.20% (target 74.99%) on #596's diff -- root-caused
by downloading and inspecting the actual CI-generated lcov.info directly
(not just the Codecov dashboard): the gap was real, not stale data, and
traced to reset-in-progress-rejection/generation-mismatch/onversionchange/
onerror branches left untested across most of the reset-gate's service
modules. Closed as a new 16th commit with 5 new test files, no production
changes.

A subsequent coderabbit finding on logSinks.test.ts (two reset-race tests
synchronized via a fixed `await Promise.resolve()` -- coupled to the write
queue's internal await-depth, silently degrading test 2's coverage of the
generation-invalidation branch if that depth ever changed) was fixed in
the same wave by waiting on observable evidence instead
(beginIdbOpenAdmission()/indexedDB.open() spies).

maxFiles: 65 -> 70, maxCommits: 15 -> 16, maxNonExemptMeaningfulLines:
1900 -> 2199, all exact measurements re-verified against current main,
not carried forward from an earlier estimate.
@qnbs
qnbs force-pushed the fix/pr-size-exception-596-coverage-wave branch from 64c5613 to 002f1ee Compare September 3, 2026 23:41

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

@qnbs
qnbs merged commit c0f372b into main Sep 4, 2026
41 checks passed
@qnbs
qnbs deleted the fix/pr-size-exception-596-coverage-wave branch September 4, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant