Repository navigation
test(e2e): share canonical auth store reader - #126960
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
2e0b41e to
7a158fb
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 23, 2026, 8:39 PM ET / August 24, 2026, 00:39 UTC. ClawSweeper reviewWhat this changesThe PR centralizes fresh-install E2E reads of the shared auth-profile SQLite row and updates release, npm-onboard, and Codex-on-demand assertions to use it. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open. The PR is still necessary: current main’s affected E2E assertions retain retired per-agent reads, while fresh auth ownership persists the shared row in the state database. No blocking correctness or security finding was identified; exact-head integration validation remains the merge gate. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherFresh onboarding records shared provider credentials in the global state SQLite database. Release and package E2E scenarios consume that state to verify onboarding before continuing to channel setup, Doctor, and agent execution. flowchart LR
Onboarding[Fresh onboarding] --> SharedStore[Shared state database]
LegacyStore[Retired agent database] --> LegacyCheck[No primary auth rows]
SharedStore --> Reader[Shared E2E auth reader]
LegacyCheck --> Assertions[Release and install assertions]
Reader --> Assertions
Assertions --> Acceptance[Package acceptance result]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +198, Other +38. Total +236 across 9 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land one shared E2E auth-store reader after the current merge-result suite confirms all three scenario consumers preserve the fresh shared-store and legacy-row invariants. Do we have a high-confidence way to reproduce the issue? Yes—source-reproducible: current main’s assertion consumers read retired per-agent tables while the auth owner writes fresh shared credentials to state/openclaw.sqlite; the PR body also records the matching package-acceptance failure. Is this the best way to solve the issue? Yes. One E2E-local reader removes three divergent storage queries while keeping the explicit check that fresh onboarding leaves no retired primary auth rows. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b0d6fff9f951. 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 (5 earlier review cycles)
|
7a158fb to
969dad1
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* test(e2e): read shared auth store after onboarding * test(e2e): harden shared auth proof --------- Co-authored-by: Amp <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
Closes #126916.
What Problem This Solves
Fresh onboarding stores shared auth profiles in
state/openclaw.sqlite, but the release-scenario and Codex-on-demand assertions still opened the retired per-agent auth store. They could report missing credentials even though onboarding had persisted the canonical shared row correctly.PR #126958 independently fixed the npm-onboard reader. This PR keeps that work in one shared E2E owner and fixes the remaining release-scenario and Codex-on-demand siblings.
Why This Change Was Made
The shared E2E auth-profile owner now reads
state/openclaw.sqlite/auth_profile_stores/shared. npm-onboard, fresh release scenarios, and Codex-on-demand all consume that helper instead of maintaining separate storage queries.Fresh proof rejects retired
primaryrows inauth_profile_storeandauth_profile_state, but permits the main-agent SQLite database when it contains unrelated runtime state. Corrupt databases and auth-table view substitutions fail closed. Existing payload validation still rejects missing or malformed environment references and inline/raw OpenAI keys.This is release-harness support only. It does not change runtime auth persistence, add eager agent-directory creation, or copy credentials into the retired store.
User Impact
Package and release acceptance can verify fresh reference-mode onboarding through downstream Doctor and agent checks instead of failing on a retired storage assumption.
Evidence
a434545620127a3105699513d662395a43b43eb1. Onboarding exited 0; the stale assertion failed before downstream product checks.c8514ed20a3ba32f218b7f114ae7bbfac44e55c6; exact PR head969dad159ea8e96ce45d36be5621f6403af18433.node scripts/run-vitest.mjs test/scripts/auth-profile-store-assertions.test.ts test/scripts/npm-onboard-channel-agent-assertions.test.ts test/scripts/release-scenarios-assertions.test.ts test/scripts/codex-install-assertions.test.ts- 65/65 passed.origin/mainb0d6fff9f951bf709e37bae396628446f01cb2cd: the same four focused suites passed 65/65 in 8.42s, then the no-commit merge was aborted and the exact PR head restored cleanly.pnpm test:docker:release-typed-onboardingpassed on Testboxtbx_01m0rk0sxc0j9xtw1xrjje0991after building the exact checkout package. Run 32677081321, command 6m17s, exit 0.tbx_01m0rm2eykqrv13qjn05dyr4ghagainst969dad159ea8e96ce45d36be5621f6403af18433merged withb0d6fff9f951bf709e37bae396628446f01cb2cd. Run 32678012644, command 6m03s, exit 0; Blacksmith then stopped the successful one-shot lease.node scripts/check-docker-e2e-boundaries.mts- passed.node scripts/check-no-raw-http2-imports.mts- passed.git diff --checkand the changed-file formatting/temp-directory guards - passed.969dad159ea8e96ce45d36be5621f6403af18433.Regression provenance: the fresh shared-auth ownership transition merged in #126783 /
a8a9f284fb91af6a9d78fe66f9141eb01e009b21and explicitly proved that fresh onboarding does not persist auth in the per-agent store. This change brings all fresh package assertions forward to that contract.AI-assisted: Amp and Codex. The runtime owner, fresh-onboarding callers, legacy-upgrade siblings, fixtures, exact package failure, and #126958 overlap were reviewed directly.