Repository navigation
fix(test): preserve watcher errors when diagnostic capture fails - #155383
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 22, 2026, 9:30 AM ET / 13:30 UTC (Revision 3). ClawSweeper reviewWhat this changesThe skill-watcher integration test preserves its original operation error when diagnostic capture throws and labels when each failure snapshot was captured. Merge readiness✅ Ready for maintainer review The narrowed repair remains useful on current main. No introduced correctness or security defect was found; the earlier merged watcher work covers only part of the original proposal. Priority: P3 Review scores
Verification
How this fits togetherSkill watchers keep workspace skill discovery fresh after filesystem changes. This patch affects the integration test’s failure reporting, which turns watcher observations into diagnostics for developers. flowchart TD
A[Filesystem changes] --> B[Skill watchers]
B --> C[Integration assertions]
C --> D[Operation failure]
D --> E[Attempt diagnostic capture]
E --> F[Preserve original error]
E --> G[Snapshot with capture stage]
F --> H[Test teardown and reporting]
G --> H
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +3. Total +3 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep diagnostic capture best-effort at the operation boundary while retaining first-snapshot semantics and existing teardown behavior. Do we have a high-confidence way to reproduce the issue? Yes, from source: a diagnostic serialization exception escapes main’s operation-error handler before it can rethrow the original error. This review did not execute that fault; the PR reports a matching controlled reproduction. Is this the best way to solve the issue? Yes. The nested catch repairs error precedence at the existing diagnostic owner, and explicit stage labels remove misleading fallback reporting without changing watcher behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2c7feb0648ce. 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
History |
|
@clawsweeper re-review Please review exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
* commit '739e2410702e0b1ad1d17a6dac07ddc0ab6dbebb': (140 commits) fix(ui): pause passive polling in hidden tabs (#155617) improve(android): keep chat photos outside text bubbles (#155338) fix(ui): preserve saved project after discovery failure (#155619) feat: compare Kitchen Sink Gateway resource costs (#155734) test(gateway): arm clock-jump claim after readiness (#155748) chore(ui): refresh control ui locales (#155700) fix(ci): join archive placement fixtures before teardown (#155751) fix(matrix): keep bot discovery off the Gateway thread (#152122) fix(agents): reconcile late requester recovery receipts (#155357) test(gateway): guard embeddings HTTP fixture lifetimes fix: isolate triage fixture acquisition and cleanup (#155736) refactor(sessions): hydrate saved transcripts off thread (#153325) fix: Claude MCP turns abort before tool timeout (#155663) fix(goals): pause terminal failures and clarify goal states (#155694) fix(test): preserve watcher errors when diagnostic capture fails (#155383) ci: move native runtime proofs to release validation (#155606) fix(auth): decouple compaction from profile rotation (#155204) fix(agents): admit compaction outside retired plugin generations (#151232) perf(ui): reduce automatic session list refetches (#155705) test: avoid unused source repos in release input fixtures (#155733) ...
…nclaw#155383) * fix(test): preserve watcher diagnostics before teardown * fix(test): preserve operation errors without unsafe finally * test(skills): preserve operation errors during failure capture Co-authored-by: Vincent Koc <[email protected]>
Related: #149882
What Problem This Solves
The watcher integration test can replace its original failure when diagnostic serialization throws, and its fallback snapshot is labelled as if captured before teardown.
User Impact
No runtime behavior changes. Maintainers retain the original test error and can distinguish an operation-boundary snapshot from an
afterEachfallback. This does not fix the underlying watcher discovery failure.Why This Change Was Made
Main already captures the first snapshot before the test's
finallyand preserves it with??=through #155570. This PR is narrowed to the remaining two concerns: truthful capture-stage labels and a catch confined to diagnostic capture that preserves the original operation Error.Signed head
8a6c0a051fcf1c3b7824bd44884d22a3f685aeef, tree43abf02ad4bf4a4ba0dafe6d5e1b4225433bc1ac, composes the previous head with frozen main774687378d80058d4e5ee93ec187421eeac74a71. Main's simpler??=remains. All original test bodies, assertions, polling, deadlines, teardown/join and cleanup-error precedence are unchanged. A persistent serialization failure in fallback/independent teardown is outside this repair.Evidence
17da22f59475e0cd907789dd7c2aa52e1734116f523e28e8e75bf4d4178102cf; archive: 8,222 bytes/SHA256794593c74f1d76e06dd9e195ac146ede7519517d87421b6f95cd3083a32b33a7.The earlier pre-finally/closed-watcher controls apply to historical heads only. This narrower PR claims neither that main still lacks first-failure capture nor that it fixes the watcher/Windows runtime issue. It does not qualify the FreeBSD update path, adopt a dependency, or perform a release.