Skip to content

Add cancellation-safe task region feasibility spike for bounty #348 - #405

Open
Rohank143 wants to merge 2 commits into
limitlessprojects:mainfrom
Rohank143:feat/spike-cancellation-regions
Open

Rohank143 wants to merge 2 commits into
limitlessprojects:mainfrom
Rohank143:feat/spike-cancellation-regions

Conversation

@Rohank143

@Rohank143 Rohank143 commented Oct 17, 2026 •

Copy link
Copy Markdown

Summary

  • Pre-register and provide a bounded feasibility spike for wildcard bounty [wildcard] Certify cancellation-safe structured task regions through blocking-effect admission #348 (W-007: Certify cancellation-safe structured task regions through blocking-effect admission), scheduled for Slot 7 in the upcoming 2026-11-01 review window (Discussion #365).
  • Add a dependency-free Rust unit test model (spikes/spike15-cancellation-regions/cancellation_model.rs) and companion verification harness (verify_model.mjs) implementing the formal admission algebra, effect summaries, supervisor state machine, and channel interruptibility.
  • Implement tests covering all 3 positive acceptance cases and all 4 rejection/falsification rules preregistered in [wildcard] Certify cancellation-safe structured task regions through blocking-effect admission #348:
    • Positive 1: Pipeline producer blocked on send unblocks via cancellation exit.
    • Positive 2: Consumer blocked on receive unblocks cleanly without leaks.
    • Positive 3: Compute loop canceled at backedge check joins nested children before resource release.
    • Falsification 1: Rejection of uninterruptible foreign call (HYB-E3501).
    • Falsification 2: Rejection of escaping goroutine / detached child task (HYB-E3502).
    • Falsification 3: Rejection of nested select lacking cancellation branch (HYB-E3503).
    • Falsification 4: Rejection of blocking cleanup block (HYB-E3504).
  • Document spikes/spike15-cancellation-regions/RESULTS.md directly answering the maintainer's three review questions:
    1. Plain-Go supervisor lowering: Concrete emitted Go demonstrating standard context.WithCancel, sync.WaitGroup, and select multiplexing with zero runtime changes.
    2. Back-edge check placement cost: Instruction-level and branch predictor analysis showing untaken predicted branch cost and outer loop stride hoisting (< 1.8% penalty).
    3. Cross-package call boundaries: Formal fail-closed effect summaries in package export headers, contrasting context.Context convention with certified cancellation contracts, and specifying the managed(cancellation_unchecked) explicit boundary.

Evidence

  • Executable test suite: node spikes/spike15-cancellation-regions/verify_model.mjs — 7 passed, 0 failed.
  • Standalone model: spikes/spike15-cancellation-regions/cancellation_model.rs designed for standard rustc --edition=2021 --test.
  • Based on latest upstream main (8dd00028c7791813e56c586a3b77192bd57db2d8).
  • Clean repository hygiene: git diff --check passes with zero warnings.

Scope and acceptance status

This is a research spike artifact for the Wildcard Track (Track 3); it lives entirely within spikes/ and does not mutate the production compiler code. It formalizes the admission criteria and lowerings needed for the M1 acceptance decision in the 2026-11-01 Review Window (Discussion #365).

Refs: #348, W-007 in MOONSHOT.md, Discussion #365.

@limitlessprojects

Copy link
Copy Markdown
Owner

Thank you, @Rohank143 — this is a serious piece of work. Attached to W-007, slot 7 in the 2026-11-01 review window (discussion #365); the MOONSHOT.md ledger row now names this PR. One-line assessment: the admission algebra is executable and the RESULTS.md answers all three triage questions head-on — the <1.8% back-edge figure is honestly labeled as an instruction-level argument rather than a measurement, which is exactly the right posture. One housekeeping ask before the window: the spike directory spikes/spike12-cancellation-regions collides with #370's spikes/spike12-operational-take-and-detach — please renumber (suggest spike15-cancellation-regions). The M1 verdict lands 2026-11-01 in #365 with a written reason; note the window also holds a doc-only W-007 analysis (PR #446), so your executable falsifiers are the differentiator.

@Rohank143

Copy link
Copy Markdown
Author

Thanks for the review and the positive feedback!

I have renamed spikes/spike12-cancellation-regions to spikes/spike15-cancellation-regions, updated all internal references in RESULTS.md and cancellation_model.rs, updated the PR description, re-verified the model test suite (verify_model.mjs: 7 passed, 0 failed), and pushed the updates directly to this PR branch.

Looking forward to the 2026-11-01 review window in discussion #365!

@limitlessprojects limitlessprojects added triage:new New arrival (<= 3 days old), awaiting recon triage:wildcard-hold Wildcard Track spike artifact — stays open, never merges (Track 3); window verdicts in MOONSHOT.md labels Oct 19, 2026
@Rohank143
Rohank143 force-pushed the feat/spike-cancellation-regions branch from 26f59af to a33a50a Compare October 20, 2026 10:52
@Rohank143

Copy link
Copy Markdown
Author

/claim #348

W-007 cancellation-safe task region feasibility spike submitted in PR #405.

Settlement / Payout Details:

  • PayPal: Rohank70000@gmail.com
  • ETH: 0x12d82214Bb97409e3654E9B7acd658a3f812F272
  • USDC: 0x12d82214Bb97409e3654E9B7acd658a3f812F272
  • BTC: bc1qw2nk7f2d9z6h4pscga9pq52r5v64chsw6c9fku

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

Labels

triage:new New arrival (<= 3 days old), awaiting recon triage:wildcard-hold Wildcard Track spike artifact — stays open, never merges (Track 3); window verdicts in MOONSHOT.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants