Repository navigation
refactor(proxy-capture): remove redundant peer check - #130068
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 10:50 AM ET / 14:50 UTC. ClawSweeper reviewWhat this changesRemoves the exact Merge readinessKeep open for normal maintainer handling: this member-authored, maintainer-labeled refactor removes a logically subsumed condition without changing proxy-capture output, subject to the pending exact-head preflight and base refresh. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherProxy capture stores request hosts and summarizes session coverage for debugging. Its local-peer subset is returned through the QA Lab capture-coverage API for operator inspection. flowchart LR
A[Captured request events] --> B[SQLite capture store]
B --> C[Session coverage summary]
C --> D[Loopback host classification]
D --> E[Local peer counts]
C --> F[QA Lab coverage API]
F --> G[Operator debugging view]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -4. Total -4 across 1 file. View PR surface stats
Review metrics
Merge-risk options
Maintainer options:
Technical reviewBest possible solution: Land the narrow simplification after rebasing or refreshing the branch and confirming green exact-head checks; no new abstraction, configuration, or compatibility path is needed. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR does not report a user-facing defect; source inspection establishes equivalence for every normalized host string. Is this the best way to solve the issue? Yes: deleting the subsumed equality is the narrowest maintainable repair and preserves the existing loopback classification policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 376510eb7128. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
dfa9e23 to
f94054f
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
f94054f to
35a609d
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Land-ready at exact head
The optional ClawSweeper rank-up item is satisfied by the completed refresh after the broken-main repair and the green exact-head CI above. Current live state is mergeable with no non-green checks; unrelated subsequent main drift is left to the native merge relevance guard. |
|
Merged via squash.
|
What Problem This Solves
The proxy-capture coverage owner carried an exact
127.0.0.1:11434check immediately before a generic127.0.0.1:prefix check that already accepts the same host. The stale special case added a duplicate decision and implied provider-specific behavior where none exists.This is a maintainer-requested, AI-assisted cleanup from the bounded M-P owner campaign.
Why This Change Was Made
Remove only the subsumed equality and retain the canonical loopback/localhost prefix checks. For every normalized host string,
host === "127.0.0.1:11434"implieshost.startsWith("127.0.0.1:"), so local-peer membership, counts, map insertion order, and sorted output remain identical.The original proxy-capture commit (#64895) introduced both terms together. No separate product, provider, persistence, security, or compatibility boundary distinguishes the exact port. Alternatives that extracted a helper or changed the local-peer policy were rejected as broader and less direct.
Production LOC: +1/-5 (net -4). Tests: +0/-0.
User Impact
No user-visible behavior changes. Proxy-capture coverage continues to classify all
127.0.0.1:<port>andlocalhost:<port>hosts exactly as before, with one fewer redundant predicate.Evidence
Exact head:
35a609d7e54f2205c92aa39ae7f221a2d996a284DebugProxyCaptureStore.summarizeSessionCoverage:127.0.0.1:11434,127.0.0.1:1234, andlocalhost:8080remained inlocalPeersin the same order;api.example.comremained excluded.node scripts/run-vitest.mjs src/proxy-capture/store.sqlite.test.ts— 14/14 passed.node scripts/check-changed.mjs -- src/proxy-capture/store.sqlite.ts— all changed-file gates passed, including core/core-test types, dead exports, lint, cycles, and database guards.node scripts/run-oxlint.mjs src/proxy-capture/store.sqlite.ts— 0 warnings/errors.git diff --check— passed.