Skip to content

net: framed: property testing FrameWrite is cancel safe #939

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shayne-fletcher
Copy link
Contributor

Summary: introduce proptest-based property tests for FrameWrite cancellation safety. add proptest dev/test deps; factor test harness (Throttled, SharedWriter, Gate, BudgetedWriter, budget_drips) into test_support; add generator sanity check (test_budget_sequence). new property test framewrite_cancellation_is_safe uses assert_cancel_safe_async to cancel/restart send at arbitrary poll boundaries under fuzzed budget drip sequences, with shared gate+writer ensuring state persists. wrap in timeout to catch regressions; verify emitted frame matches body. behavior is unchanged; we now exercise cancel-safety as a theorem.

Differential Revision: D80651806

Differential Revision: D80626978
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 20, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80651806

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80651806

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Aug 20, 2025
…#939)

Summary:
Pull Request resolved: meta-pytorch#939

introduce proptest-based property tests for `FrameWrite` cancellation safety. add proptest dev/test deps; factor test harness (`Throttled`, `SharedWriter`, `Gate`, `BudgetedWriter`, `budget_drips`) into `test_support`; add generator sanity check (`test_budget_sequence`). new property `test framewrite_cancellation_is_safe` uses `assert_cancel_safe_async` to cancel/restart send at arbitrary poll boundaries under fuzzed budget drip sequences, with shared gate+writer ensuring state persists. wrap in timeout to catch regressions; verify emitted frame matches body. behavior is unchanged; we now exercise cancel-safety as a theorem.

Differential Revision: D80651806
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80651806

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Aug 20, 2025
…#939)

Summary:
Pull Request resolved: meta-pytorch#939

introduce proptest-based property tests for `FrameWrite` cancellation safety. add proptest dev/test deps; factor test harness (`Throttled`, `SharedWriter`, `Gate`, `BudgetedWriter`, `budget_drips`) into `test_support`; add generator sanity check (`test_budget_sequence`). new property `test framewrite_cancellation_is_safe` uses `assert_cancel_safe_async` to cancel/restart send at arbitrary poll boundaries under fuzzed budget drip sequences, with shared gate+writer ensuring state persists. wrap in timeout to catch regressions; verify emitted frame matches body. behavior is unchanged; we now exercise cancel-safety as a theorem.

Differential Revision: D80651806
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80651806

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Aug 20, 2025
…#939)

Summary:
Pull Request resolved: meta-pytorch#939

introduce proptest-based property tests for `FrameWrite` cancellation safety. add proptest dev/test deps; factor test harness (`Throttled`, `SharedWriter`, `Gate`, `BudgetedWriter`, `budget_drips`) into `test_support`; add generator sanity check (`test_budget_sequence`). new property `test framewrite_cancellation_is_safe` uses `assert_cancel_safe_async` to cancel/restart send at arbitrary poll boundaries under fuzzed budget drip sequences, with shared gate+writer ensuring state persists. wrap in timeout to catch regressions; verify emitted frame matches body. behavior is unchanged; we now exercise cancel-safety as a theorem.

Differential Revision: D80651806
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80651806

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Aug 20, 2025
…#939)

Summary:
Pull Request resolved: meta-pytorch#939

introduce proptest-based property tests for `FrameWrite` cancellation safety. add proptest dev/test deps; factor test harness (`Throttled`, `SharedWriter`, `Gate`, `BudgetedWriter`, `budget_drips`) into `test_support`; add generator sanity check (`test_budget_sequence`). new property `test framewrite_cancellation_is_safe` uses `assert_cancel_safe_async` to cancel/restart send at arbitrary poll boundaries under fuzzed budget drip sequences, with shared gate+writer ensuring state persists. wrap in timeout to catch regressions; verify emitted frame matches body. behavior is unchanged; we now exercise cancel-safety as a theorem.

Differential Revision: D80651806
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80651806

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Aug 20, 2025
…#939)

Summary:
Pull Request resolved: meta-pytorch#939

introduce proptest-based property tests for `FrameWrite` cancellation safety. add proptest dev/test deps; factor test harness (`Throttled`, `SharedWriter`, `Gate`, `BudgetedWriter`, `budget_drips`) into `test_support`; add generator sanity check (`test_budget_sequence`). new property `test framewrite_cancellation_is_safe` uses `assert_cancel_safe_async` to cancel/restart send at arbitrary poll boundaries under fuzzed budget drip sequences, with shared gate+writer ensuring state persists. wrap in timeout to catch regressions; verify emitted frame matches body. behavior is unchanged; we now exercise cancel-safety as a theorem.

Differential Revision: D80651806
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80651806

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Aug 20, 2025
…#939)

Summary:
Pull Request resolved: meta-pytorch#939

introduce proptest-based property tests for `FrameWrite` cancellation safety. add proptest dev/test deps; factor test harness (`Throttled`, `SharedWriter`, `Gate`, `BudgetedWriter`, `budget_drips`) into `test_support`; add generator sanity check (`test_budget_sequence`). new property `test framewrite_cancellation_is_safe` uses `assert_cancel_safe_async` to cancel/restart send at arbitrary poll boundaries under fuzzed budget drip sequences, with shared gate+writer ensuring state persists. wrap in timeout to catch regressions; verify emitted frame matches body. behavior is unchanged; we now exercise cancel-safety as a theorem.

Differential Revision: D80651806
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80651806

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Aug 20, 2025
…#939)

Summary:
Pull Request resolved: meta-pytorch#939

introduce proptest-based property tests for `FrameWrite` cancellation safety. add proptest dev/test deps; factor test harness (`Throttled`, `SharedWriter`, `Gate`, `BudgetedWriter`, `budget_drips`) into `test_support`; add generator sanity check (`test_budget_sequence`). new property `test framewrite_cancellation_is_safe` uses `assert_cancel_safe_async` to cancel/restart send at arbitrary poll boundaries under fuzzed budget drip sequences, with shared gate+writer ensuring state persists. wrap in timeout to catch regressions; verify emitted frame matches body. behavior is unchanged; we now exercise cancel-safety as a theorem.

Differential Revision: D80651806
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80651806

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Aug 20, 2025
…#939)

Summary:
Pull Request resolved: meta-pytorch#939

introduce proptest-based property tests for `FrameWrite` cancellation safety. add proptest dev/test deps; factor test harness (`Throttled`, `SharedWriter`, `Gate`, `BudgetedWriter`, `budget_drips`) into `test_support`; add generator sanity check (`test_budget_sequence`). new property `test framewrite_cancellation_is_safe` uses `assert_cancel_safe_async` to cancel/restart send at arbitrary poll boundaries under fuzzed budget drip sequences, with shared gate+writer ensuring state persists. wrap in timeout to catch regressions; verify emitted frame matches body. behavior is unchanged; we now exercise cancel-safety as a theorem.

Differential Revision: D80651806
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80651806

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Aug 20, 2025
…#939)

Summary:
Pull Request resolved: meta-pytorch#939

introduce proptest-based property tests for `FrameWrite` cancellation safety. add proptest dev/test deps; factor test harness (`Throttled`, `SharedWriter`, `Gate`, `BudgetedWriter`, `budget_drips`) into `test_support`; add generator sanity check (`test_budget_sequence`). new property `test framewrite_cancellation_is_safe` uses `assert_cancel_safe_async` to cancel/restart send at arbitrary poll boundaries under fuzzed budget drip sequences, with shared gate+writer ensuring state persists. wrap in timeout to catch regressions; verify emitted frame matches body. behavior is unchanged; we now exercise cancel-safety as a theorem.

Differential Revision: D80651806
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80651806

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Aug 20, 2025
…#939)

Summary:
Pull Request resolved: meta-pytorch#939

introduce proptest-based property tests for `FrameWrite` cancellation safety. add proptest dev/test deps; factor test harness (`Throttled`, `SharedWriter`, `Gate`, `BudgetedWriter`, `budget_drips`) into `test_support`; add generator sanity check (`test_budget_sequence`). new property `test framewrite_cancellation_is_safe` uses `assert_cancel_safe_async` to cancel/restart send at arbitrary poll boundaries under fuzzed budget drip sequences, with shared gate+writer ensuring state persists. wrap in timeout to catch regressions; verify emitted frame matches body. behavior is unchanged; we now exercise cancel-safety as a theorem.

Differential Revision: D80651806
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80651806

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Aug 20, 2025
…#939)

Summary:
Pull Request resolved: meta-pytorch#939

introduce proptest-based property tests for `FrameWrite` cancellation safety. add proptest dev/test deps; factor test harness (`Throttled`, `SharedWriter`, `Gate`, `BudgetedWriter`, `budget_drips`) into `test_support`; add generator sanity check (`test_budget_sequence`). new property `test framewrite_cancellation_is_safe` uses `assert_cancel_safe_async` to cancel/restart send at arbitrary poll boundaries under fuzzed budget drip sequences, with shared gate+writer ensuring state persists. wrap in timeout to catch regressions; verify emitted frame matches body. behavior is unchanged; we now exercise cancel-safety as a theorem.

Differential Revision: D80651806
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80651806

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Aug 20, 2025
…#939)

Summary:
Pull Request resolved: meta-pytorch#939

introduce proptest-based property tests for `FrameWrite` cancellation safety. add proptest dev/test deps; factor test harness (`Throttled`, `SharedWriter`, `Gate`, `BudgetedWriter`, `budget_drips`) into `test_support`; add generator sanity check (`test_budget_sequence`). new property `test framewrite_cancellation_is_safe` uses `assert_cancel_safe_async` to cancel/restart send at arbitrary poll boundaries under fuzzed budget drip sequences, with shared gate+writer ensuring state persists. wrap in timeout to catch regressions; verify emitted frame matches body. behavior is unchanged; we now exercise cancel-safety as a theorem.

Differential Revision: D80651806
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80651806

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Aug 21, 2025
…#939)

Summary:
Pull Request resolved: meta-pytorch#939

introduce proptest-based property tests for `FrameWrite` cancellation safety. add proptest dev/test deps; factor test harness (`Throttled`, `SharedWriter`, `Gate`, `BudgetedWriter`, `budget_drips`) into `test_support`; add generator sanity check (`test_budget_sequence`). new property `test framewrite_cancellation_is_safe` uses `assert_cancel_safe_async` to cancel/restart send at arbitrary poll boundaries under fuzzed budget drip sequences, with shared gate+writer ensuring state persists. wrap in timeout to catch regressions; verify emitted frame matches body. behavior is unchanged; we now exercise cancel-safety as a theorem.

Differential Revision: D80651806
…#939)

Summary:
Pull Request resolved: meta-pytorch#939

introduce proptest-based property tests for `FrameWrite` cancellation safety. add proptest dev/test deps; factor test harness (`Throttled`, `SharedWriter`, `Gate`, `BudgetedWriter`, `budget_drips`) into `test_support`; add generator sanity check (`test_budget_sequence`). new property `test framewrite_cancellation_is_safe` uses `assert_cancel_safe_async` to cancel/restart send at arbitrary poll boundaries under fuzzed budget drip sequences, with shared gate+writer ensuring state persists. wrap in timeout to catch regressions; verify emitted frame matches body. behavior is unchanged; we now exercise cancel-safety as a theorem.

Differential Revision: D80651806
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D80651806

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants