Skip to content

fix: Restore the patterns gate and reconcile its baselines with reality - #5065

Merged
Sinity merged 2 commits into
masterfrom
fix/retained-acquisition-logging
Sep 14, 2026
Merged

Sinity merged 2 commits into
masterfrom
fix/retained-acquisition-logging

Conversation

@Sinity

@Sinity Sinity commented Sep 14, 2026

Copy link
Copy Markdown
Owner

Summary

devtools gate patterns is red on master, blocking every PR opened since, including ones that touch neither implicated file. This restores it and makes the baselines honest.

Problem

Two PRs, each green on its own, red once both had landed:

Neither PR's CI ever saw the other's change. After both merged, master scanned 24 matches against a 23-entry baseline, so the gate reported a new match and set blocking: true. PRs #5061, #5062, #5063 and #5064 all failed for this inherited reason.

Separately, the baselines carried 22 stale entries whose sites no longer exist — several naming polylogue/storage/repair.py, a file deleted some time ago.

Solution

Convert the one blocking site to a structured event, source.zip.members_refused. No new allowlist field was needed: path and skipped are already registered, and the refused-member list rides in error_detail, the single existing quarantined field.

Prune the 22 stale entries. Pruning shrinks the ratchet, which is the permitted direction; adding an entry to silence the gate is the forbidden one.

Verification

devtools gate patterns   ->  blocking: false, new_matches: 0, stale_matches: 0

Baselines now match the scan exactly in both directions. Before this change the same command reported 1 new match and 22 stale entries. No test asserts on the old warning text, so no test changes were required.

Note for the ratchet's owner — not addressed here

A structural gap surfaced while fixing this. legacy-stdlib-logger matches logging.getLogger(...), but the form most of the tree actually uses is the polylogue.logging.get_logger wrapper, which the rule does not match. A concurrent conversion of 90 prose sites across daemon/cli.py and daemon/http.py therefore eliminated zero baseline entries — the gate meant to enforce "no legacy logging" is blind to the dominant legacy form.

Widening the existing rule would grow its baseline by roughly 140 modules, which the ratchet forbids. The coherent route is a second rule with its own baseline at the true remaining count: a new ratchet may start wherever reality is, while an existing one may only shrink. That is a deliberate decision and belongs in its own change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK

Two PRs, each green on its own, were red once both had landed. #5056 added
`logging.getLogger` to `sources/retained_acquisition.py` for the ZIP
member-skip warning; #5059 recorded the `legacy-stdlib-logger` baseline at 23
entries. Neither PR's CI saw the other's change, so master ended up scanning
24 matches against a 23-entry baseline and `gate patterns` began blocking
every PR opened afterwards, including ones touching neither file.

Convert that site to `source.zip.members_refused`. No new allowlist field is
needed: `path` and `skipped` are registered, and the refused-member list rides
in `error_detail`, the one existing quarantined field.

Also prune 22 stale baseline entries whose sites no longer exist, several of
them naming the long-deleted `storage/repair.py`. Pruning shrinks the ratchet,
which is the permitted direction; silencing the gate by adding an entry is the
forbidden one.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01DYUNBGoE652b3nfmq3CtqK
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: a8ffc90b-f7e5-4f2e-90ab-da005365a0e3

📥 Commits

Reviewing files that changed from the base of the PR and between 7a5160f and 6e4cb64.

📒 Files selected for processing (4)
  • devtools/patterns/baselines/exclusive-create-write.txt
  • devtools/patterns/baselines/replace-without-parent-fsync.txt
  • devtools/patterns/baselines/sqlite-error-default.txt
  • polylogue/sources/retained_acquisition.py

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.

@Sinity
Sinity merged commit 4daf176 into master Sep 14, 2026
3 checks passed
@Sinity
Sinity deleted the fix/retained-acquisition-logging branch September 14, 2026 10:38
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