Skip to content

Correlate backend deploy failures with initiating request - #37

Merged
ElSargo merged 1 commit into
mainfrom
fix/deploy-connection-failed-intent
Sep 16, 2026
Merged

ElSargo merged 1 commit into
mainfrom
fix/deploy-connection-failed-intent

Conversation

@ElSargo

@ElSargo ElSargo commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add optional backward-compatible request on BackendCatalogueMessage::ConnectionFailed and on SSH/container/remote deploy HostMessages.
  • Thread that id through deployer threads and client ready/failed notify paths.
  • Session switcher ignores ConnectionFailed unless it matches current pending, and clears pending only on match; new submits bump pending so prior in-flight failures are superseded.
  • Remit Backend deployment results do not identify the initiating intent in docs/frictions/ui-concurrency.md.
  • Protocol + switcher regression tests for optional request wire shape and stale failure overwrite.

Fixes #31

Residual risk

Superseded deployer threads are not cancelled; they are only ignored when their failure notification does not match pending. Success/Connected still does not settle pending by request id.

Test plan

  • cargo test -p brood-protocol --lib backend_catalogue — 6 passed
  • cd plugins/session-switcher && RUSTFLAGS='-C linker=cc' cargo test --lib — 45 passed
  • RUSTFLAGS='-C linker=cc' cargo check -p brood-client
  • Manual: start SSH deploy, immediately submit a corrected target; confirm the first failure does not replace the newer deploying status

@ElSargo ElSargo left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brood QA (static) — code looks good

Verdict: COMMENT LGTM for remit of #31 (deploy failure ↔ initiating request). Not a formal APPROVE (reviewer is ElSargo).

Evidence

  • Optional request on ConnectionFailed, SSH/container failed events, and deploy host messages; wire-compat omits when unset.
  • Switcher SSH/container submit paths send request from next_request(); ConnectionFailed ignores when pending is set and does not match, clears pending only when request is Some.
  • Regression test: unidentified/stale failure leaves newer “Deploying…” status; matched failure clears pending and surfaces error.

Residuals (as documented — do not block this PR)

  • Superseded deployer threads not cancelled (ignore-only).
  • Connected still does not settle pending by request id; success path correlation remains open follow-up.
  • Local / some attach-failure notifies still pass request: None (correctly ignored while a stamped pending deploy is in flight).

CI

FAILED — GHA Nix ENOSPC on build; lint log also surfaces pre-existing shellcheck SC2148 on sourced theme scripts (not introduced here). Not a code blocker for this change.

Stacking

Same session-switcher + ui-concurrency.md stack as #36 / #40. Merge after #36 if both land; expect conflicts.

Desktop verify: not run.

Thread an optional request id from the session switcher through host
deploy messages, deployer ready/failed events, and ConnectionFailed so
late failures from superseded attempts cannot overwrite newer pending
deploy status.

Fixes #31
@ElSargo
ElSargo force-pushed the fix/deploy-connection-failed-intent branch from c6e9baf to bcd0ab9 Compare September 16, 2026 21:59
@ElSargo
ElSargo merged commit 5352709 into main Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

backend deploy results lack initiating intent; stale failure can overwrite newer attempt status

1 participant