Repository navigation
test(gateway): retain saved source in reload fixtures - #140453
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 5:23 PM ET / 21:23 UTC. ClawSweeper reviewWhat this changesThe PR preserves saved configuration during Gateway reload tests so logging and UI edits can reach the existing credential and origin assertions. Merge readiness✅ Ready for maintainer review This remains a useful, focused fixture repair absent from the inspected current main. No introduced correctness defects were found; the merged sibling repair explicitly left these cases for follow-up. Priority: P3 Review scores
Verification
How this fits togetherGateway reload tests write configuration and exercise a running Gateway through its config and WebSocket interfaces. Saved source values must remain separate from runtime credentials, logging overrides, and automatically seeded browser origins. flowchart TD
A[Saved configuration] --> B[Read source snapshot]
B --> C[Apply logging or UI edit]
C --> D[Config write safety checks]
D --> E[Gateway reload and runtime overrides]
E --> F[Credential and origin assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +4. Total +4 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Retain saved source fields in these fixtures while preserving the config writer’s safety checks and the existing runtime-overlay assertions. Do we have a high-confidence way to reproduce the issue? Yes, the affected fixtures and size-drop rejection path provide a clear source-backed reproduction route, corroborated by the author’s before/after report; this review did not execute it. Is this the best way to solve the issue? Yes. Reading saved source immediately before each edit matches the merged sibling repair and avoids weakening the config guard or persisting runtime-only values. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c1fbb4622ee2. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* commit '294df333c58f2da104eccffc623ccb3c4d43d4d8': (1802 commits) fix: clear stale diagnostics after Gateway changes (#140426) fix: keep plugin catalogs intact after discovery timeouts (#140441) perf(tui): prepare session picker rows once per overlay (#140462) refactor(config): reuse environment substitution for write-back (#140460) refactor(discord): remove retired auto-presence templates (#140463) fix(ui): finish roster refreshes during session activity (#140459) fix(setup): match prepared credentials to the model provider (#140461) fix: keep MiniMax discovery on the selected credential (#140438) refactor(tests): remove unused parent context cache reset (#140456) fix: avoid repeated xAI OAuth refresh during discovery (#140434) perf(routing): reuse prepared event session targets (#140454) fix(media): keep deferred audio and extraction providers discoverable (#139231) refactor(codex): remove redundant app-server forwarding (#140451) fix(test): avoid false native polling timeouts (#140119) test(gateway): retain saved source in reload fixtures (#140453) fix(gateway): reduce repeated model work when listing sessions (#140414) fix(feishu): fall back to post mode over table limit (#136382) fix: use the bundle-compatible Proxyline runtime under Bun (#140411) refactor(trace): reuse the canonical usage counter type (#140444) refactor(node-host): share execution policy result fields (#140446) ...
Two remaining Gateway reload fixtures discarded saved config fields when constructing unrelated logging/UI updates. On current main, the config writer rejected both updates for removing roughly half the saved config, so the tests stopped before completing their SecretRef-auth and Control UI origin checks.
Read the current saved source before each update and retain existing logging/UI fields. The SecretRef test still rotates runtime credentials, authenticates the new client, and verifies that the original file token remains persisted. The origin test still checks seeded origins and logging overrides before and after reset. All existing assertions and timeouts remain unchanged.
Follow-up to #140433. Validation on pinned main
b9a80868: both original cases reproduceCONFIG_WRITE_REJECTED; the repaired cases and four auth-reload siblings pass together, six real Gateway cases total, using this worktree's fresh canonical E2E build. Production LOC delta: 0; test LOC delta: +4.The complete changed-file gate and independent P2 review pass.