Repository navigation
fix(application): surface web resource cleanup errors via tagged error algebra - #3492
mohsinkhandevs wants to merge 1 commit into
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The PR appears safe to merge, with the existing non-blocking loss of cleanup details still outstanding. Findings
Fix with agent prompt### Issue 1
src/application/closeOwnedWebResources.ts:13-16
`SourceMapCleanupFailure` stores failed stop/delete reasons in `diagnostics.cleanup_failures`, not `cleanup.reason`. This branch substitutes the generic adapter message, and the new wrapper drops the original diagnostics. `projectAnalysisError` does not recover them from `cause`.
When the final cleanup retry fails differently, CLI users lose the latest reason and process details needed to diagnose leftover resources. Preserve each owner's caller-safe diagnostics in the combined error and use its reported cleanup reasons.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryWeb cleanup failures now use
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Web CLI command] --> B[Run trace]
B --> C[Close all cleanup owners]
C --> D{Cleanup failed?}
D -->|No| E[Return evidence or primary error]
D -->|Yes| F[Create ProviderCleanupError]
F --> G[Keep evidence or primary error]
G --> H[Return cleanup failure details]
Reviews (2) · Last reviewed commit: "fix(application): surface web resource c..." · Reviewed by Greptile |
| if (cause instanceof AnalysisError) { | ||
| return { | ||
| reason: cause.cleanup?.reason ?? cause.message, | ||
| resources: cause.cleanupResources, |
There was a problem hiding this comment.
SourceMapCleanupFailure stores failed stop/delete reasons in diagnostics.cleanup_failures, not cleanup.reason. This branch substitutes the generic adapter message, and the new wrapper drops the original diagnostics. projectAnalysisError does not recover them from cause.
When the final cleanup retry fails differently, CLI users lose the latest reason and process details needed to diagnose leftover resources. Preserve each owner's caller-safe diagnostics in the combined error and use its reported cleanup reasons.
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/application/closeOwnedWebResources.ts
Line: 13-16
Comment:
**Cleanup reasons disappear**
`SourceMapCleanupFailure` stores failed stop/delete reasons in `diagnostics.cleanup_failures`, not `cleanup.reason`. This branch substitutes the generic adapter message, and the new wrapper drops the original diagnostics. `projectAnalysisError` does not recover them from `cause`.
When the final cleanup retry fails differently, CLI users lose the latest reason and process details needed to diagnose leftover resources. Preserve each owner's caller-safe diagnostics in the combined error and use its reported cleanup reasons.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.|
Source-derived audit against pinned main |
|
Correction to my earlier closure: pinned main does implement shared tagged cleanup aggregation and caller finalization, but this PR also carries meaningful web-specific provider/operation attribution and cleanup-detail extraction that I did not verify in main. I reopened the PR because that portion remains unrepresented. Source comparison: https://github.com/morluto/rea/blob/4ed33efb0cc993895cf4b4c74049f939f08888c2/src/application/closeOwnedWebResources.ts and https://github.com/morluto/rea/blob/4ed33efb0cc993895cf4b4c74049f939f08888c2/src/domain/providerCleanupError.ts. |
|
Thank you for this fix! Surfacing web resource cleanup failures via |
Summary
Problem and expected behavior
Change and scope
Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs):Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
For evidence-bearing changes:
Validation performed
command— resultCompatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.