Skip to content

Unblock auto-release on handled duplicate-import dogfood errors - #493

Merged
unbraind merged 1 commit into
mainfrom
fix/sentry-handled-import-release-gate
Jul 10, 2026
Merged

unbraind merged 1 commit into
mainfrom
fix/sentry-handled-import-release-gate

Conversation

@unbraind

@unbraind unbraind commented Jul 10, 2026 •

Copy link
Copy Markdown
Owner

Outcome

Unblocks the 2026-07-10 daily Auto Release without weakening Sentry reliability enforcement. The package import dogfood intentionally exercises merge-strategy=fail twice; its handled, pre-write duplicate refusal is now classified as expected, while an isUnhandled=true twin with identical text remains blocking.

Changes

  • add a narrow handled CommandError classifier for duplicate-import refusals
  • add a TDD regression proving handled and unhandled twins are partitioned correctly
  • record the incident as pm-io4t with full files, test, result, live-ops, dependency, note, and learning evidence
  • regenerate CHANGELOG.md with latest pm-changelog 2026.7.8

Verification

  • pre-push Greptile review: confidence 5/5, no findings
  • focused regression: 49/49 passing
  • full repository coverage: 270 files, 5,506 tests
    • statements: 100% (34,380/34,380)
    • branches: 100% (24,588/24,588)
    • functions: 100% (6,882/6,882)
    • lines: 100% (33,039/33,039)
  • typecheck and contract snapshot: pass
  • ESLint, jscpd (0 clones), static quality/docstring gate, token budget: pass
  • docs/skills and changelog checks: pass
  • secret scan and production dependency audit: pass / no known vulnerabilities
  • live Sentry gate with production token: critical=0, high=0; PM-CLI-1X expected-handled
  • live telemetry gate: 0.25% finish error rate, 0 missing error-code rows
  • telemetry inline flush: queue drained to zero on disk

Incident lineage


Summary by cubic

Unblocks the 2026-07-10 auto-release by teaching the Sentry gate to treat the intentional, handled duplicate-import error from the package dogfood as expected. Unhandled errors with the same message remain blocking.

  • Bug Fixes
    • Classify handled CommandError for duplicate-import (merge-strategy "fail": bead ...) as expected in scripts/release/sentry-telemetry-gate.mjs.
    • Add regression test that ignores the handled event while still blocking the unhandled twin.
    • Update CHANGELOG.md with pm-changelog 2026.7.8 and record incident pm-io4t.

Written for commit bb50814. Summary will update on new commits.

Review in cubic

Keep the Sentry reliability gate strict for unhandled failures while recognizing the intentional merge-strategy=fail duplicate-import refusal emitted by package dogfood. Add a TDD regression covering both handled and unhandled variants, record complete pm incident evidence and lineage, and regenerate CHANGELOG.md with pm-changelog 2026.7.8.

@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 @unbraind, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@unbraind, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 9 seconds

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

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: cea7c31c-9f3a-4250-ac72-7c670ceeaf70

📥 Commits

Reviewing files that changed from the base of the PR and between b5a41fb and bb50814.

📒 Files selected for processing (6)
  • .agents/pm/extensions/.managed-extensions.json
  • .agents/pm/history/pm-io4t.jsonl
  • .agents/pm/issues/pm-io4t.toon
  • CHANGELOG.md
  • scripts/release/sentry-telemetry-gate.mjs
  • tests/unit/scripts/release/sentry-telemetry-gate.spec.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@unbraind

Copy link
Copy Markdown
Owner Author

@greptileai please review the current head.

/gemini review

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

@unbraind: Got it — I'll perform a full review of all changes in this PR.

✅ Action performed

Full review finished.


Your plan includes PR reviews subject to rate limits. More reviews will be available in 20 minutes.

@unbraind

Copy link
Copy Markdown
Owner Author

Bot feedback acknowledgment: CodeRabbit comments 4933677642/4933679585 were read and rated; the service is rate-limited for about 20 minutes, so I will retrigger and wait rather than bypass its review. Sourcery review 4669963875 was also read; it is blocked by its weekly diff-character quota and GitHub exposes no review-body reaction endpoint. No code finding was reported by either service.

@gemini-code-assist gemini-code-assist 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

This pull request addresses an issue where the Sentry release gate misclassified handled duplicate-import refusals as blocking runtime errors. To resolve this, the pattern 'merge-strategy "fail": bead' was added to the list of known expected handled CLI issues in sentry-telemetry-gate.mjs. Additionally, a unit test was introduced to verify that handled duplicate-import refusals are correctly ignored while unhandled variants continue to block. Issue history, metadata, and changelog files were also updated accordingly. There are no review comments, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@gemini-code-assist gemini-code-assist 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

This pull request addresses an issue where the Sentry release gate misclassifies handled duplicate-import refusals as blocking runtime errors. It updates scripts/release/sentry-telemetry-gate.mjs to include the 'merge-strategy "fail": bead' pattern in the list of known expected handled CLI issues. Additionally, a unit test has been added to verify that handled duplicate-import refusals are ignored while unhandled equivalents remain blocking. Relevant issue tracking files and the changelog have also been updated. There are no review comments, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@greptile-apps

greptile-apps Bot commented Jul 10, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the release gate so expected duplicate-import dogfood errors do not block auto-release. The main changes are:

  • Adds a narrow handled CommandError classifier for duplicate package-import refusals.
  • Adds tests showing handled duplicate-import errors are ignored while identical unhandled errors still block.
  • Records the pm-io4t incident and adds the unreleased changelog entry.

Confidence Score: 5/5

Safe to merge with minimal risk.

The classifier change is narrow and remains constrained by the existing CommandError/PmCliError and isUnhandled !== true checks. Tests cover both the handled duplicate-import event and the identical unhandled event.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • Ran the vitest test suite for the Sentry Telemetry Gate module and confirmed the command exited with code 0.
  • Reviewed the duplicate-import coverage snippet and verified it asserts that handled duplicate-import refusals are ignored without masking unhandled failures.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
scripts/release/sentry-telemetry-gate.mjs Extends the expected handled CLI issue classifier with a narrow duplicate-import refusal pattern behind the existing type and isUnhandled guards.
tests/unit/scripts/release/sentry-telemetry-gate.spec.ts Adds tests proving handled duplicate-import refusals are ignored while identical unhandled failures remain blocking.
.agents/pm/issues/pm-io4t.toon Adds the closed issue record documenting the release-gate incident, affected files, tests, dependencies, and resolution.
CHANGELOG.md Adds an unreleased changelog entry for the handled duplicate-import Sentry gate fix.
.agents/pm/history/pm-io4t.jsonl Adds tracker history for the duplicate-import Sentry classifier incident, including validation and closure evidence.
.agents/pm/extensions/.managed-extensions.json Updates the managed extension timestamp while keeping the existing pm-changelog manifest entry unchanged.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Gate as sentry-telemetry-gate.mjs
participant Sentry as Sentry issues API
participant Classifier as Expected-handled classifier
participant Threshold as Release thresholds

Gate->>Sentry: Fetch unresolved fatal/error issues
Sentry-->>Gate: Return issue payload
Gate->>Classifier: Partition issues by noise/expected/relevant
alt "CommandError/PmCliError and isUnhandled=false and duplicate-import pattern"
    Classifier-->>Gate: Add to ignored_expected_handled
else "isUnhandled=true or pattern/type guard not matched"
    Classifier-->>Gate: Keep in relevant issues
end
Gate->>Threshold: Tally relevant critical/high counts
Threshold-->>Gate: Pass/fail release gate
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Gate as sentry-telemetry-gate.mjs
participant Sentry as Sentry issues API
participant Classifier as Expected-handled classifier
participant Threshold as Release thresholds

Gate->>Sentry: Fetch unresolved fatal/error issues
Sentry-->>Gate: Return issue payload
Gate->>Classifier: Partition issues by noise/expected/relevant
alt "CommandError/PmCliError and isUnhandled=false and duplicate-import pattern"
    Classifier-->>Gate: Add to ignored_expected_handled
else "isUnhandled=true or pattern/type guard not matched"
    Classifier-->>Gate: Keep in relevant issues
end
Gate->>Threshold: Tally relevant critical/high counts
Threshold-->>Gate: Pass/fail release gate
Loading

Reviews (1): Last reviewed commit: "fix(release): classify handled duplicate..." | Re-trigger Greptile

@greptile-apps

greptile-apps Bot commented Jul 10, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the release gate to ignore one expected handled duplicate-import error while keeping unhandled errors blocking. The main changes are:

  • Added the duplicate-import refusal text to the expected handled CLI issue patterns.
  • Added a test that separates handled duplicate-import refusals from unhandled twins.
  • Recorded the pm-io4t incident in tracker history and issue files.
  • Updated the changelog and managed extension metadata.

Confidence Score: 5/5

Safe to merge with minimal risk.

The functional change is a single narrow classifier string protected by the existing CommandError/PmCliError and isUnhandled=false checks. The added test covers both the handled case and the identical unhandled blocking case. The remaining changes are tracker metadata, changelog, and extension timestamp updates.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • Ran the Sentry telemetry gate unit tests with Vitest; the command executed in the repository and produced full console output.
  • The Vitest log confirms the run completed with exit code 0 and includes the elapsed time.
  • The exact pass/fail summary shows 49 tests in the spec and 1 test file passed, with all tests reported as passing.
  • The test-name log reveals the grep evidence for the duplicate-import regression test and notes on handled and unhandled assertions.
  • Uploaded artifacts include the Vitest run log and the test-names log for reviewer access.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
scripts/release/sentry-telemetry-gate.mjs Adds a narrow handled CommandError pattern for duplicate-import refusals behind the existing type and isUnhandled guards.
tests/unit/scripts/release/sentry-telemetry-gate.spec.ts Adds a test that confirms handled duplicate-import refusals are ignored while identical unhandled failures still block.
.agents/pm/issues/pm-io4t.toon Adds the closed tracker issue documenting the duplicate-import release gate fix and validation.
CHANGELOG.md Records the Sentry release-gate duplicate-import fix in the changelog.
.agents/pm/history/pm-io4t.jsonl Adds incident history for the Sentry duplicate-import classifier fix.
.agents/pm/extensions/.managed-extensions.json Updates the managed extension metadata timestamp.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant Gate as sentry-telemetry-gate
participant Sentry as Sentry issues API
participant Classifier as Expected-handled classifier
participant Threshold as Release threshold

Gate->>Sentry: Fetch unresolved fatal/error issues
Sentry-->>Gate: Return issue list
Gate->>Classifier: Partition each issue by logger/type/isUnhandled/text
alt "CommandError/PmCliError and isUnhandled=false and duplicate-import text"
    Classifier-->>Gate: ignored_expected_handled
else "isUnhandled=true or non-matching issue"
    Classifier-->>Gate: relevant blocking issue
end
Gate->>Threshold: Tally critical/high relevant issues
Threshold-->>Gate: Pass/fail release gate
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant Gate as sentry-telemetry-gate
participant Sentry as Sentry issues API
participant Classifier as Expected-handled classifier
participant Threshold as Release threshold

Gate->>Sentry: Fetch unresolved fatal/error issues
Sentry-->>Gate: Return issue list
Gate->>Classifier: Partition each issue by logger/type/isUnhandled/text
alt "CommandError/PmCliError and isUnhandled=false and duplicate-import text"
    Classifier-->>Gate: ignored_expected_handled
else "isUnhandled=true or non-matching issue"
    Classifier-->>Gate: relevant blocking issue
end
Gate->>Threshold: Tally critical/high relevant issues
Threshold-->>Gate: Pass/fail release gate
Loading

Reviews (2): Last reviewed commit: "fix(release): classify handled duplicate..." | Re-trigger Greptile

@unbraind

Copy link
Copy Markdown
Owner Author

Review acknowledgment: Greptile comments 4933694213 and 4933697055 were both read and upvoted; both independently returned confidence 5/5, executed the 49-test focused suite, and confirmed the unhandled twin remains blocking. Gemini reviews 4669970059 and 4669978773 were both read; each reports no review comments or additional feedback on current head bb50814. GitHub does not expose reactions for review bodies, so this explicit acknowledgment records both reviews.

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@unbraind

Copy link
Copy Markdown
Owner Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jul 10, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.


Your plan includes PR reviews subject to rate limits. More reviews will be available in 11 seconds.

@unbraind

Copy link
Copy Markdown
Owner Author

CodeRabbit full-review acknowledgment: comment 4933831405 was read and upvoted. The fresh full review finished on unchanged head bb50814 after the quota window reopened and produced no inline finding or review-requested change.

@unbraind

Copy link
Copy Markdown
Owner Author

Codecov acknowledgment: comment 4933735845 was read and upvoted. It confirms every modified coverable line is tested and all tests passed on current head bb50814.

@unbraind
unbraind merged commit 798aed4 into main Jul 10, 2026
24 checks passed
@unbraind
unbraind deleted the fix/sentry-handled-import-release-gate branch July 10, 2026 09:16
@unbraind

unbraind commented Aug 4, 2026

Copy link
Copy Markdown
Owner Author

Tracked in PM: pm-io4t, pm-yohx.

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