Repository navigation
fix(qa): isolate packaged mock auth bootstrap - #126247
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
2b5a67f to
648bd40
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 4:30 PM ET / 20:30 UTC. ClawSweeper reviewWhat this changesThe PR gives packaged mock-auth bootstrap a writable isolated config while retaining the Gateway’s canonical config, and removes inherited shell-startup controls from QA child environments. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessNo discrete patch defect found. Keep this maintainer-authored PR open while exact-head CI completes and the final shell-environment hardening receives package-backed workflow proof. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherQA Lab starts an isolated Gateway and, for packaged candidates, invokes the candidate CLI to seed mock credentials. The bootstrap needs shared QA state but must not write the runner-owned Gateway configuration or inherit privileged shell startup behavior. flowchart LR
A[QA test runner] --> B[QA child environment]
B --> C[Packaged auth bootstrap]
C --> D[Writable bootstrap config]
C --> E[Shared QA auth state]
B --> F[Gateway launcher]
F --> G[Immutable canonical config]
E --> F
Before merge
Agent review detailsSecurityNone. PR surfaceSource +44, Tests +92, Config +16. Total +152 across 6 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Before merge, run the modified release Telegram QA path on the current head and show that both bootstrap writes use the SUT-owned config while the Gateway starts from the unchanged canonical config. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main's API-key command updates the active config, while the release workflow gives the SUT a runner-owned canonical config; the supplied failed workflow trace corroborates that path. Is this the best way to solve the issue? Yes, with an evidence gap: the fix redirects only bootstrap writes to a SUT-owned config, preserves the Gateway config and shared auth store, and should be confirmed in the current-head release workflow. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a4178c7eb15a. 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)
|
648bd40 to
408ede7
Compare
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Punchcard-Session: frost-orchard-lantern-ze (cherry picked from commit 648bd40)
0b3af59 to
9ef352a
Compare
|
Merged via squash.
|
* fix(qa): isolate packaged mock auth config Punchcard-Session: frost-orchard-lantern-ze (cherry picked from commit 648bd40) * fix(qa): scrub inherited shell startup env * fix(qa): block exported Bash functions
What Problem This Solves
Fixes a package-backed Telegram QA failure where the installed candidate auth CLI attempted to mutate the runner-owned immutable canonical config before Gateway startup.
Current-main workflow run https://github.com/openclaw/openclaw/actions/runs/32348061162 failed fast at this boundary with inherited Bash startup state and a config permission failure. The prior reservation hang is separately resolved by #126370; this change preserves its
reserveQaGatewayPort(net.createServer())release lifecycle.Why This Change Was Made
The QA harness records only generic mock-auth profile selection in the canonical config. Packaged candidate auth commands receive a regular, non-symlink
0600scratch config under the SUT state directory while sharing the Gateway's singleOPENCLAW_STATE_DIRand SQLite auth store. The Gateway remains pinned to the immutable canonical config.buildQaRuntimeEnvremovesBASH_ENV,BASHOPTS,ENV,SHELLOPTS, and exportedBASH_FUNC_*functions after caller runtime patches and before any launcher or runtime child is created. The late privileged-launcher cleanup is removed. Strict mode, process identity checks, environment-key attestation, and the current Gateway port-reservation lifecycle remain intact.User Impact
Release maintainers can run the package-backed Telegram QA lane without mock-auth bootstrap violating the SUT config ownership boundary or inherited shell startup state aborting the privileged launcher. Product CLI, auth, config, filesystem, SQLite schema, and release behavior are unchanged.
Evidence
dac4bf581a7a0ed98f7b1be1b7a9f744f0a61357tbx_01m0cf6nbp7p8bsa8yvmbd2pyz: workflow16/16, Gateway child87/8715 passed,2 skipped87 passed,1 Linux-only skipped9ef352a64121f99de681a0b428992aafca72fcdc;dac4bf581a7a0ed98f7b1be1b7a9f744f0a61357scrubs the prefix and adds adjacent unit plus Linux Bash coverage.pnpm exec oxfmt --checkon all six PR pathsgit diff --checkcheck-changedpassed formatting, guards, contract tests, plugin boundaries, and dead-export scans, then stopped in extension typecheck on unrelated existingextensions/acpx,extensions/cua-computer, andpackages/terminal-coredependency-type errors. No dependency reconciliation or unrelated edits were made; exact-head clean-checkout CI is required.Exact-head Package Acceptance proof
754ba927782bfda73f113295a1411eafa2017890dac4bf581a7a0ed98f7b1be1b7a9f744f0a61357advisory=falsetelegram-commands-command,mock-openai, 1 passed / 0 failed0600; canonical config unchanged; packaged auth and Gateway shared one SQLite auth storeClawSweeper rank-up move disposition
Change Size
+62/-18to establish the packaged auth/config boundary and scrub parent shell startup controls plus exported functions at the child-environment owner+22/-6to enforce and attest the isolated launcher contract+109/-17