fix: scope provider gatekeeper suppressions and declare honest lexical scope - #2702
Conversation
|
Codex review: needs changes before merge. Reviewed August 6, 2026, 2:44 AM ET / 06:44 UTC. ClawSweeper reviewWhat this changesThe PR narrows provider-gatekeeper suppressions, adds parser regressions, and documents the lexical scanner’s actual scope. Merge readinessKeep open: the new logging exemption still suppresses a provider literal when it appears inside a nested policy call passed to a logger, so the gatekeeper can miss an in-scope architecture violation. Priority: P3 Review scores
Verification
How this fits togetherCodexBar centralizes provider identifiers and policies across the app, CLI, and provider integrations. Its provider-architecture gatekeeper is a test-only lexical scanner over shipped Swift that reports forbidden provider-specific references during validation. flowchart LR
A[Shipped Swift source] --> B[Lexical gatekeeper]
B --> C[Provider token scan]
C --> D[Scoped suppressions]
D --> E[Gatekeeper findings]
E --> F[CI validation]
G[Provider architecture guide] --> B
Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Suppress only a literal that belongs directly to a recognized logging call, while retaining detection for nested policy expressions and adding a focused regression for that boundary. Do we have a high-confidence way to reproduce the issue? Yes—source inspection gives a high-confidence path: place a provider-policy literal in a nested call within a logging argument and the new ancestor-call check suppresses it. Is this the best way to solve the issue? No. The intended token-level solution needs direct-call scoping; checking every enclosing logging call is broader than the documented lexical contract. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1ff063fc3158. LabelsLabel justifications:
EvidenceAcceptance criteria:
What 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
|
Final slice of the provider-architecture campaign: fixes the two remaining gatekeeper suppression-precision bugs (argument-scoped log suppression;
category:limited to log-category constructors), each with exact regressions, and replaces the aspirational threat-model wording with the honest lexical-scanner scope — what is detected, what is documented out of scope and why, and the SwiftSyntax-based implementation named as the upgrade path if real drift ever slips the tripwire.Proof: gatekeeper 34/34 zero findings, make check clean, full suite 821/821, Linux target builds, autoreview clean.
🤖 Generated with Claude Code