Skip to content

test: broaden provider gatekeeper to its full declared scope - #2704

Merged
steipete merged 1 commit into
mainfrom
steipete/gatekeeper-truth
Aug 6, 2026
Merged

test: broaden provider gatekeeper to its full declared scope#2704
steipete merged 1 commit into
mainfrom
steipete/gatekeeper-truth

Conversation

@steipete

@steipete steipete commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Implements the gatekeeper's declared scope fully instead of narrowing it: raw lowercase provider-ID literals now flag in every single-statement position (assignment, bare argument, dictionary key/value, array element, return), the labeled multiline dotted-case gap is closed, and the new hits were triaged honestly (one derivation through CodexHomeScope, truthful justifications, exact per-token suppressions). The out-of-scope list now contains only genuinely parser-requiring patterns, dynamic construction, Tests/**, and non-Swift files.

Proof: gatekeeper 37/37 zero findings, make check clean, full suite 821/821, Linux target builds, autoreview clean.

🤖 Generated with Claude Code

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels Aug 6, 2026
@clawsweeper

clawsweeper Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed August 6, 2026, 3:35 AM ET / 07:35 UTC.

ClawSweeper review

What this changes

The PR expands the provider-architecture gatekeeper’s lexical detection of raw lowercase provider IDs, records exact exceptions, and updates the provider guide.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open: this focused hardening is not yet on current main and has no actionable correctness finding. Likely related people: steipete (high confidence; feature owner and recent area contributor).

Priority: P3
Reviewed head: 85a5af61470ff05f681f1c2cde7eb58f1ceb47e5

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is focused, source-consistent, and has no actionable correctness finding; CI remains in progress.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored test and documentation hardening PR is exempt from the external-contributor real-behavior-proof gate; supplied validation claims are supplemental.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored test and documentation hardening PR is exempt from the external-contributor real-behavior-proof gate; supplied validation claims are supplemental.
Evidence reviewed 4 items Current-main comparison: The current base retains the narrower raw-ID policy-position wording; this branch changes the scanner and its focused tests to cover every single-statement position.
Generated artifact verified: The generated parser hash matches the SHA-256 calculation over the affected CostUsage Swift sources.
Home-directory derivation: The production adjustment preserves the default Codex directory while routing the path through the existing CodexHomeScope helper; an empty environment resolves to the user’s .codex directory.
Findings None None.
Security None None.

How this fits together

CodexBar’s provider architecture maps provider identifiers to descriptors, implementations, and local usage sources. The gatekeeper scans shipped Swift for unapproved cross-provider literals, directing contributors toward descriptor-driven boundaries or explicit documented exceptions.

flowchart LR
  A[Shipped Swift sources] --> B[Provider gatekeeper]
  C[Provider ID catalog] --> B
  B --> D{Allowed or suppressed?}
  D -->|No| E[Test failure]
  D -->|Yes| F[Documented provider boundary]
  F --> G[Provider descriptors and usage paths]
Loading

Before merge

  • Complete next step (P2) - Normal maintainer PR validation remains; no concrete automated repair is needed.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Gatekeeper coverage 4 files affected; production +11/-5, tests +229/-41 Most changes are focused scanner coverage and exception accounting; the small production adjustment removes a duplicated Codex-home path derivation.

Technical review

Best possible solution:

Land the focused gatekeeper expansion after the in-progress CI suite confirms this exact head.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a test and documentation hardening PR rather than a reported runtime defect; the focused scanner cases provide a source-level validation path.

Is this the best way to solve the issue?

Yes—the lexical tripwire remains deliberately scoped and uses exact line/token exceptions, while CodexHomeScope removes a duplicated default-path derivation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against fb88548b02f3.

Labels

Label justifications:

  • P3: This is low-risk architecture-test and documentation hardening, not a user-facing regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored test and documentation hardening PR is exempt from the external-contributor real-behavior-proof gate; supplied validation claims are supplemental.

Evidence

What I checked:

Likely related people:

  • steipete: Peter Steinberger introduced and repeatedly maintained the provider-architecture gatekeeper, including the latest current-main scope revision. (role: feature owner and recent area contributor; confidence: high; commits: fb88548b02f3, 1ff063fc3158, d96e1822f856; files: Tests/CodexBarTests/ProviderArchitectureGatekeeperTests.swift, docs/provider.md)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Wait for the in-progress macOS and Linux checks to finish on this head.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 5cb69f0 into main Aug 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant