Skip to content

Prove application quiescence before swap - #263

Closed
peters wants to merge 1 commit into
fix/recovery-state-hardeningfrom
test/update-quiescence-regressions
Closed

Prove application quiescence before swap#263
peters wants to merge 1 commit into
fix/recovery-state-hardeningfrom
test/update-quiescence-regressions

Conversation

@peters

@peters peters commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • prove the original child generation is gone before PREPARING_SWAP
  • cover both the current app layout and retained versioned application layout
  • keep the restart retry deadline as failure-only tolerance

Why

The end-to-end regression must observe the swap boundary directly. Final state alone cannot prove that directory mutation waited for complete application quiescence.

This is stack 15 of 16.

Relates to fintermobilityas/youpark#1310.

Validation

  • exact layer b6be696 passed both update-layout quiescence regressions and the complete 391-test surge-core suite
  • it resolves the actionable review feedback previously raised on this PR by checking stable process-generation disappearance at PREPARING_SWAP
  • complete stack c48f19f passed 681 Rust workspace tests, both blocking Clippy tiers, vendor/version/format/maintainability checks, .NET formatting, and all 58 .NET tests

No migration is required.

@peters peters added bug Something isn't working rust Pull requests that update rust code labels Sep 1, 2026
@peters peters self-assigned this Sep 1, 2026
@peters
peters force-pushed the fix/recovery-state-hardening branch from 8ca0da4 to 522c305 Compare September 1, 2026 05:43
@peters
peters force-pushed the test/update-quiescence-regressions branch 2 times, most recently from 401448b to a47764b Compare September 1, 2026 05:53
@peters
peters force-pushed the fix/recovery-state-hardening branch 2 times, most recently from 30058d8 to 81890f3 Compare September 1, 2026 06:23
@peters
peters force-pushed the test/update-quiescence-regressions branch 2 times, most recently from 1852fd7 to e185de7 Compare September 1, 2026 06:31
@peters
peters force-pushed the fix/recovery-state-hardening branch 2 times, most recently from f72e8d2 to 7cf6e85 Compare September 1, 2026 06:51
@peters
peters force-pushed the test/update-quiescence-regressions branch from e185de7 to 663d32a Compare September 1, 2026 06:51
@peters
peters force-pushed the fix/recovery-state-hardening branch from 7cf6e85 to 1adab3e Compare September 1, 2026 07:00
@peters
peters force-pushed the test/update-quiescence-regressions branch 2 times, most recently from 12795e4 to d5baa6c Compare September 1, 2026 07:10
@peters
peters force-pushed the fix/recovery-state-hardening branch 2 times, most recently from 5273948 to 639af87 Compare September 1, 2026 07:20
@peters
peters force-pushed the test/update-quiescence-regressions branch 2 times, most recently from 9f5d01c to 6a88bf0 Compare September 1, 2026 07:26
@peters
peters force-pushed the fix/recovery-state-hardening branch 2 times, most recently from a486868 to 2b68089 Compare September 1, 2026 07:33
@peters
peters force-pushed the test/update-quiescence-regressions branch from 6a88bf0 to 6784e76 Compare September 1, 2026 07:33
@peters
peters force-pushed the fix/recovery-state-hardening branch from 2b68089 to 3bf7f13 Compare September 1, 2026 07:37
@peters
peters force-pushed the test/update-quiescence-regressions branch 2 times, most recently from 70c4639 to 5221d3d Compare September 1, 2026 07:56
@peters
peters force-pushed the fix/recovery-state-hardening branch 2 times, most recently from 62c10d9 to 519229b Compare September 1, 2026 08:02
@peters
peters force-pushed the test/update-quiescence-regressions branch from 5221d3d to 4ee1945 Compare September 1, 2026 08:02
@peters
peters requested a balanced review from Copilot September 1, 2026 08:09
@peters
peters force-pushed the test/update-quiescence-regressions branch from 21b5bba to 05480c8 Compare September 1, 2026 12:43
@peters
peters force-pushed the fix/recovery-state-hardening branch from 778d25f to 331b808 Compare September 1, 2026 12:43
@peters
peters requested a balanced review from Copilot September 1, 2026 12:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@peters
peters force-pushed the fix/recovery-state-hardening branch from e039cfc to 8e325a9 Compare September 1, 2026 13:13
@peters
peters force-pushed the test/update-quiescence-regressions branch from 4d2c0fc to 2a946eb Compare September 1, 2026 13:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comment thread crates/surge-core/src/update/manager.rs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Suppressed comments (1)

crates/surge-core/src/update/manager.rs:4632

  • These wrappers still check the child only after download_and_apply has completed, so they would also pass if a refactor moved termination until after the directory swap. That leaves the advertised pre-swap quiescence invariant uncovered. Please observe the child from the progress callback and assert it has exited when PREPARING_SWAP is emitted, before any swap operation begins.
    async fn assert_download_and_apply_quiesces_current_executable_when_target_name_changes(
        current_app_dir_name: &str,
    ) {

Exercise both current and retained legacy install layouts, and verify the exact original process generation is gone when PREPARING_SWAP is emitted. Keep the bounded supervisor retry assertion tolerant of slower validation hosts.

Relates to fintermobilityas/youpark#1310

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@peters

peters commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Closing this stacked PR as superseded. The stack hardens in-process quiescence but cannot eliminate the updating process's mixed-install window and no longer matches the required stable app-directory design. Replacement work will use one external-finalizer change and preserve the stable app execution path. The branch is intentionally retained until the replacement is merged so its regression cases remain available for reference.

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

Labels

bug Something isn't working rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants