Repository navigation
fix: preserve config reload diagnostics in tests - #157886
Conversation
Preserve the existing stale-preparation retry after plugin activation rolls back cleanly and wraps the original error. Keep committed replacements and cleanup failures terminal, and retain bounded reload diagnostics in the config RPC fixture.
|
🦞👀 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 25, 2026, 5:57 PM ET / 21:57 UTC (Revision 4). ClawSweeper reviewWhat this changesThe branch makes Gateway reload tests exercise an actual committed failure and adds bounded, redacted reload logs to failed config RPC test responses. Merge readiness✅ Ready for maintainer review Keep open. Current main contains the runtime reload repair, but it does not contain this branch’s distinct test and diagnostic improvements. A later merged rollback repair addresses the historical timeout discussed on the PR; the introduced patch has no supported blocking finding. Priority: P2 Review scores
Verification
How this fits togetherGateway config RPCs save settings edits and ask the running Gateway to apply them. The shared test fixture sends those requests and presents reload failure details to test assertions. flowchart LR
A[Config RPC test] --> B[Gateway client]
B --> C[Config write]
C --> D[Reload coordinator]
D --> E{Applied?}
E -->|Yes| F[Active Gateway]
E -->|No| G[Redacted log tail]
G --> H[Test failure details]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +56. Total +56 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep recovery semantics guarded at the publication commit boundary and make persisted-but-unapplied config writes diagnosable through the shared, redacted test logger. Do we have a high-confidence way to reproduce the issue? Yes for the test defect: the prior committed-error case asserted that commit was never called, while the new table reaches the publication commit callback. I did not execute tests in this read-only review. Is this the best way to solve the issue? Yes. The test uses the production publication boundary, and the fixture consumes the existing redacting log-tail owner without adding runtime diagnostic behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 800bf8e10e7c. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
Adopt the canonical runtime fix from main. Keep one recovery table, derive committed failure from an actual commit, preserve refreshed state after cleanup failure, and retain bounded redacted diagnostics from the config RPC fixture.
|
Additional canonical Linux context for this diagnostic work: run36087033303/1, job107933689308, frozen source The retained log contains no underlying reload exception, so this is not evidence of numeric-key rejection, a timeout, or the host-broker failures in other jobs. It also differs from the seed-application stage covered by the previously reported macOS reproduction. Main already contains Your bounded redacted reload-tail diagnostics and post-commit coverage are the existing owner path for resolving that uncertainty. I have not changed assertions/deadlines, opened a competing patch, or replayed the suite to get green. Keeping this exact Linux patch-stage failure linked here avoids silently treating adjacent proof as its diagnosis. |
Preserve canonical admission-checkpoint coverage while exercising real publication commit ownership in the existing recovery table. Keep bounded, redacted reload context on persisted-config RPC failures. The prior CI include-only hook timeout remains unexplained; the current boundary proof does not establish its cause or claim a runtime fix.
|
Merged via squash.
|
Main now records and attaches Gateway reload diagnostics through the canonical config RPC fixture (2998a88, #157886). Remove this branch-only console override so the merge takes that implementation without conflict. All five native ownership simplifications and production source remain unchanged. Verified fixture equality with the branch base, formatting, type-aware lint, and whitespace checks. Co-authored-by: galiniliev <[email protected]>
Preserve the existing stale-preparation retry after plugin activation rolls back cleanly and wraps the original error. Keep committed replacements and cleanup failures terminal, and retain bounded reload diagnostics in the config RPC fixture.
Related: #157584
What Problem This Solves
Config RPC tests hid the runtime cause when a saved edit failed to apply, and the committed-error regression did not actually perform a commit.
User Impact
This improves internal tests and failure diagnostics. The runtime recovery fix is already supplied by @joshavant in 71cc18ae.
Why This Change Was Made
Keep one four-case recovery table, reach the actual publication commit boundary before injecting a committed error, and verify retry decisions, commit ownership, and preserved authored state. Canonical admission-checkpoint tests remain intact.
Persisted-config RPC failures retain their original code, details, and message prefix, with up to eight redacted reload-log records from a 64 KiB tail window. The fixture uses its own log file and flushes before removing its state. This is a tail-window bound, not a guarantee of strict total I/O or operation-correlated logs.
Evidence
9f0e24a57fb9, all 149 tests passed. The four owner/logging files passed 68 cases in 116.85 seconds grouped wall time; the owner file passed 18 cases in 89.68 Vitest seconds, with the four refined recovery cases taking 22 ms combined.Production source is byte-for-byte the incorporated canonical main. Published-head CI 36193004339 passed with 34 successful jobs and 21 skipped; the exact-head ClawSweeper review reported no findings. Landed as
2998a881c7bca2d0d336bc9933dbbd82cca701d8through native merge and completed cleanup. The historical timeout remains unresolved as described above.