Skip to content

refactor(auth): keep test suites within line limits - #157805

Merged
steipete merged 1 commit into
mainfrom
codex/auth-test-fixtures-line-cap-20260924
Sep 25, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/auth-test-fixtures-line-cap-20260924

Conversation

@steipete

@steipete steipete commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Three authentication and prompt-observer test files exceeded the existing 1,000-line cap and blocked the relevant CI checks.

User Impact

There is no user-visible behavior change. Developers retain all existing test coverage while the suites satisfy the unchanged file-size limit.

Why This Change Was Made

Move fixture constructors and row data into test-support modules. Keep all test callbacks, hooks, mocks, assertions, case order, and fixture values. The OAuth row factories run at the original it.each registration points, preserving when Date.now() and identity fixtures are evaluated. Production code and lint baselines are unchanged.

This focused current-main cleanup was identified during #151608 validation. The separately owned workspace test repair is outside this change.

Evidence

  • All 75 tests passed before and after: 22 OAuth refresh cases, 26 provider-choice cases, and 27 prompt-observer cases.
  • Parsed-code comparison confirmed identical ordered callbacks, moved constructors, and row tables.
  • Existing line-cap, suppression, assertion-safety, dependency, boundary, export, formatting, and lint checks passed; all nine reached type-check groups passed.
  • Isolated Codex review found no actionable P0–P2 issue. Type checking subsequently caught an over-removed type import; its original declaration was restored and the affected package check passed.
  • ClawSweeper reviewed the exact head and found no actionable issue. Exact-head CI passed (48 jobs succeeded, 21 skipped); no product build or live-runtime claim is made for this test-only change.

@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 25, 2026 01:50
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Sep 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 24, 2026, 10:24 PM ET / September 25, 2026, 02:24 UTC (Revision 2).

ClawSweeper review

What this changes

Moves fixture constructors and case data from three authentication and prompt-observer tests into adjacent test-support modules to meet the existing line limit.

Merge readiness

✅ Ready for maintainer review

Current main still has the three over-limit test suites, and this branch provides a focused remedy. The introduced changes preserve the reviewed test calls and show no concrete correctness or security defect.

Priority: P3
Reviewed head: bfff58a939836bb3cc8c32cb9a98a623044f62d7

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The bounded extraction has a clear line-limit purpose, reported before-and-after suite validation, and no identified patch defect.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The repository state identifies this as a member-authored, test-only refactor: the changed owners are fixture modules and test imports, with no production behavior to demonstrate. The reported before-and-after test runs and CI are supporting validation; no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The repository state identifies this as a member-authored, test-only refactor: the changed owners are fixture modules and test imports, with no production behavior to demonstrate. The reported before-and-after test runs and CI are supporting validation; no stored-data contract changes.
Evidence reviewed 8 items Existing line limit: The test-file rule allows 1,000 counted lines and skips blank and comment lines.
Current-main need: The three affected suite files on fetched main are unchanged from the PR merge base; the newly added provider test-support file is absent from main.
Suite-size comparison: A read-only count excluding blank and full-comment lines estimates the three suites at 1010, 1046, and 1025 counted lines on main, versus 987, 982, and 956 on the PR head. This approximates, rather than executes, Oxlint's rule.
Findings None None.
Security None None.

How this fits together

These suites exercise OAuth credential refresh, plugin-provider setup, and OpenAI Responses prompt observations. Fixture data feeds the tests, whose assertions check the production behavior during CI.

flowchart LR
  A[Fixture data] --> B[OAuth refresh tests]
  A --> C[Provider setup tests]
  A --> D[Prompt observer tests]
  B --> E[Test assertions]
  C --> E
  D --> E
  E --> F[CI checks]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +34. Total +34 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 281 247 +34
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 281 247 +34

Review metrics

Metric Value Why it matters
Counted suite lines 3 suites: approximately 1010→987, 1046→982, 1025→956 Each affected suite moves below the configured 1,000-line limit without a rule change.

Technical review

Best possible solution:

Enforce the existing counted-line budget while retaining the suites' coverage, case order, and fixture evaluation timing.

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

Yes. Current-main source and the configured line rule give a high-confidence path to the reported size failure; I did not execute Oxlint in this read-only review.

Is this the best way to solve the issue?

Yes. The fixture extraction is narrow, leaves production code untouched, and retains the case factories at their prior registration points.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is a bounded test and CI cleanup with no user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The repository state identifies this as a member-authored, test-only refactor: the changed owners are fixture modules and test imports, with no production behavior to demonstrate. The reported before-and-after test runs and CI are supporting validation; no stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • stevenlee-oai: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-25T01:57:13.837Z sha bfff58a :: needs maintainer review before merge. :: none

@openclaw-barnacle openclaw-barnacle Bot added commands Command implementations agents Agent runtime and tooling size: L labels Sep 25, 2026
@steipete steipete changed the title test(auth): move fixtures below file line limits refactor(auth): keep test suites within line limits Sep 25, 2026
@steipete
steipete merged commit 573babf into main Sep 25, 2026
198 of 202 checks passed
@steipete
steipete deleted the codex/auth-test-fixtures-line-cap-20260924 branch September 25, 2026 02:50
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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