Skip to content

fix(plugins): preserve update failure codes - #188187

Merged
vincentkoc merged 1 commit into
mainfrom
fix/plugin-update-failure-codes-20261030
Oct 30, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/plugin-update-failure-codes-20261030

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Plugin update error outcomes lose the installer's typed failure code, leaving npm metadata and ClawHub artifact failures identifiable only through their text.

User Impact

Error outcomes now retain their existing npm/ClawHub diagnostic code. Status, messages, retention, activation, consent and trust-skip behavior remain unchanged. No configuration or migration is required.

Why This Change Was Made

The update owner already passes the code into the canonical summary producer, which used it for policy and then omitted it from the error outcome. Preserve that field at its producer. The production change adds one line for the existing typed diagnostic contract; existing regression assertions cover npm metadata and the sibling ClawHub source. Shared metadata expectations preserve exact equality outside beta and beta's existing partial match while removing duplication. Release-note context: plugin update errors retain typed diagnostics.

Evidence

Exact-head PR CI passed all 86 plugin update tests, including the npm metadata and ClawHub artifact regression cases, retention, consent, trust-skip and alias custody. Executed job, reviewed head eee34bafc92b9d8c0f4f27d212e7be0694acda33.

Production: one line added. Tests: 25 added / 29 removed. This code-only editor has no dependency installation; Testbox capacity queued during the related fixture proof, so execution proof uses PR CI.

Local autoreview of the complete changed owner/test modules and installed-update/source/attempt owners completed with no P0–P3 findings. Targeted oxfmt and git diff --check passed, and normal signed-commit hooks passed. No live service or operator state was changed.

@clawsweeper

clawsweeper Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vincentkoc
vincentkoc marked this pull request as ready for review October 30, 2026 08:27
@vincentkoc vincentkoc self-assigned this Oct 30, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 30, 2026
@clawsweeper

clawsweeper Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Plugin update error outcomes retain the diagnostic code supplied by the installer or metadata lookup.

Example: Updating lossless-claw encounters an npm registry timeout.

  • Before: The error outcome contains the failure message but omits npm_metadata_failure.
  • After: The same error outcome also contains code: npm_metadata_failure.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is minimal and source-supported; execution evidence is limited to CI tests with mocked external boundaries.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; its supplied evidence exercises the update owner through mocked external boundaries in exact-head CI, without a shipped-entry-point demonstration.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Plugin update diagnostics lose their machine-readable failure classification.
Reason: The maintainer-authored direction repairs an existing typed outcome contract with one production line and no new configuration or policy.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR fixes a verified diagnostic omission still present on main, with no introduced correctness or security defect found.

Priority: P2
Reviewed head: eee34bafc92b9d8c0f4f27d212e7be0694acda33

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped-entry-point demonstration or executed base-red/head-green comparison is supplied.
Agent review details

How this fits together

Plugin installers and metadata probes supply failures to the shared update-summary producer; CLI and post-core update consumers receive its structured outcomes.

flowchart LR
  A[Plugin update request] --> B[Metadata probe or installer]
  B --> C[Installed plugin update owner]
  C --> D[Failure summary producer]
  D --> E[CLI diagnostics]
  D --> F[Post-core failure facts]
Loading

Technical review

Best possible solution:

Preserve the supplied diagnostic code in the existing shared error-summary producer, as this PR does.

Do we have a high-confidence way to reproduce the issue?

Source inspection traces npm and ClawHub codes into recordPluginUpdateFailure and shows main dropping them from error outcomes; no target code was executed.

Is this the best way to solve the issue?

This is the smallest complete fix: retain the existing optional field at its canonical producer and extend existing boundary assertions.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e1535e45662b.

Provenance checked

  • Shared plugin update failure summary keeps the original intent (5a643e3: The package-lifecycle refactor placed failure recording in the shared summary owner; earlier metadata handling intentionally preserved real registry errors and disable-on-failure behavior. Older-content history searches encountered the documented local missing-object limit, so the original omission's introduction remains unestablished.)
  • Existing plugin update tests keeps the original intent (refactor: consolidate plugin update tests #113243: Fixture consolidation retained semantically distinct update and failure paths; this PR extends their diagnostic expectations without adding parallel test machinery.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 5a643e3 adds src/plugins/update-summary.ts:37 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5a643e354310; files: src/plugins/update-summary.ts)

PR surface

Source +1, Tests -4. Total -3 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 1 0 +1
Tests 1 25 29 -4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 26 29 -3

Labels

Label changes:

  • add P2: Structured plugin-update diagnostics lose useful failure classification, while existing messages and update policy remain functional.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Structured plugin-update diagnostics lose useful failure classification, while existing messages and update policy remain functional.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 30, 2026, 4:39 AM ET / 08:39 UTC.

@vincentkoc
vincentkoc merged commit 4f52fe9 into main Oct 30, 2026
212 checks passed
@vincentkoc
vincentkoc deleted the fix/plugin-update-failure-codes-20261030 branch October 30, 2026 08:46
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant