Skip to content

refactor: share current auth store test envelopes - #146808

Merged
steipete merged 1 commit into
mainfrom
codex/tenk-auth-store-envelopes
Sep 13, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/tenk-auth-store-envelopes

Conversation

@steipete

@steipete steipete commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Related: #146699

What Problem This Solves

Auth tests repeat the same current-store envelope around explicit profile maps, adding unnecessary fixture maintenance.

User Impact

No user-visible change. This maintainer-requested cleanup removes 466 net test/support code lines while preserving production behavior and test assertions.

Why This Change Was Made

Use the existing pure auth fixture module for the common envelope at 245 call sites. The factory preserves profile-map identity, key order, omitted fields, and callback evaluation. Historical migration payloads, marker-sensitive fixtures, expected-value oracles, and hoisted setup remain literal.

Evidence

Retained source-bound proof includes 1,991 passing tests across 45 files, followed by 218 passing tests when two files changed upstream. Native TypeScript and AST/comment comparisons preserve every changed fixture, and independent review found no actionable findings. All 46 files and the complete refactor patch remain byte-identical to that verified source.

A fresh complete changed-code gate passes on corrected main, including core test types, lint, ownership guards, and all three dead-export scans. Shared focused proof passes all four corrected sidebar cases and all 24 compiler-shard owner tests. These new results supplement the retained tests; unchanged suites were not rerun.

The branch now includes the existing main repairs from #146702 (CI routing fixture), #146862 (sidebar deferred imports), and #146803 (compiler-shard headroom). The previous CI failures were traced to shared main state; no assertions, compiler limits, or concurrency controls were weakened. Fresh required CI is verified separately before landing.

Final CI qualification

The exact published-head required CI workflow passed, and native preparation completed without changing the head. Seven separate CodeQL Security High/Critical Quality jobs completed query execution and SARIF export but failed during result upload. The Actions security job explicitly reports a server error; the other six logs do not expose the HTTP cause. Their SARIF results are unavailable, so this is not a claim of a clean CodeQL scan. Original failures are retained; no scanner suppression, CI override, or source change was introduced. Live branch rules require the passing openclaw/ci-gate.

@clawsweeper

clawsweeper Bot commented Sep 13, 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.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime commands Command implementations agents Agent runtime and tooling size: XL maintainer Maintainer-authored PR labels Sep 13, 2026
@steipete
steipete marked this pull request as ready for review September 13, 2026 06:51
@steipete
steipete requested a review from a team as a code owner September 13, 2026 06:51
@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 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 13, 2026, 4:07 AM ET / 08:07 UTC (Revision 2).

ClawSweeper review

What this changes

Consolidates repeated authentication-store wrappers into a shared test fixture helper while preserving explicit credentials and expectations.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: this remains a useful, maintainer-requested cleanup that current main does not contain. No actionable patch defect was found.

Priority: P3
Reviewed head: 58a042eca21c8f669124626bc213fc7fe35bb235

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving test refactor with no actionable finding; current CI failures remain a separate validation matter.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored fixture cleanup changes no production behavior, so the external-contributor runtime-proof gate does not apply; reported test results are supplemental validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored fixture cleanup changes no production behavior, so the external-contributor runtime-proof gate does not apply; reported test results are supplemental validation.
Evidence reviewed 7 items Small, pure fixture owner: The added helper returns version 1 and the original profiles reference. It introduces no defaults for optional state, cloning, normalization, runtime imports, or production side effects.
Introduced scope and consumers: The merge-base-to-head delta contains only test files and the existing test-support module. All references to the new helper are confined to those test surfaces; production credential, persistence, permission, and provider contracts are unchanged.
Independent behavioral expectations retained: Catalog tests retain their explicit ordering, cooldown, credential-kind, and exclusion assertions. Historical OAuth-reference input remains literal. The full test and its production resolver were inspected.
Findings None None.
Security None None.

How this fits together

Authentication tests supply profile maps to OpenClaw’s model selection, credential storage, commands, and secret-resolution paths. The shared helper constructs their current-store input without changing production behavior.

flowchart LR
  A[Explicit test profiles] --> B[Shared fixture helper]
  B --> C[Current auth store input]
  C --> D[Auth and secret operations]
  D --> E[Independent test expectations]
  F[Historical migration fixtures] --> D
Loading

Before merge

  • Resolve merge risk (P1) - Current-head CI failures remain unattributed because detailed job logs were inaccessible to this reviewer.
Agent review details

Security

None.

PR surface

Tests -467. Total -467 across 46 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 46 1463 1930 -467
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 46 1463 1930 -467

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the shared factory limited to current-store inputs, with historical migration payloads and expected-value oracles remaining explicit.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the shared factory limited to current-store inputs, with historical migration payloads and expected-value oracles remaining explicit.

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

Not applicable: this is fixture cleanup, not a reported product defect. Runtime tests were not rerun in the read-only review.

Is this the best way to solve the issue?

Yes: extending the existing pure fixture module preserves profile identity and evaluation timing while leaving independent expectations intact.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against d7111df63696.

Labels

Label justifications:

  • P3: This reduces repeated test setup without changing user-facing behavior or production contracts.
  • 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: The maintainer-authored fixture cleanup changes no production behavior, so the external-contributor runtime-proof gate does not apply; reported test results are supplemental validation.

Evidence

What I checked:

Likely related people:

  • steipete: 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-13T06:57:02.734Z sha da733a96c13c0c887a0438a07efabb6333ae98b6 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/tenk-auth-store-envelopes branch from da733a9 to 58a042e Compare September 13, 2026 07:59
Reuse the existing pure auth fixture owner at 245 current-store construction sites. Preserve profile maps, historical inputs and independent assertions while removing 466 net test/support code lines.
@steipete
steipete force-pushed the codex/tenk-auth-store-envelopes branch from 58a042e to e5597ec Compare September 13, 2026 08:57
@steipete
steipete merged commit 0b1dc19 into main Sep 13, 2026
143 of 150 checks passed
@steipete
steipete deleted the codex/tenk-auth-store-envelopes branch September 13, 2026 09:26
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
Reuse the existing pure auth fixture owner at 245 current-store construction sites. Preserve profile maps, historical inputs and independent assertions while removing 466 net test/support code lines.
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 gateway Gateway runtime maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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