Skip to content

Add cooperative cancellation to the PHP SDK - #91

Merged
rmcdaniel merged 112 commits into
mainfrom
feat/cooperative-cancellation
Oct 6, 2026
Merged

rmcdaniel merged 112 commits into
mainfrom
feat/cooperative-cancellation

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Implements the PHP consumer and published demonstration for
shared cancellation #136.

Supported release boundary

Whole-run cooperative requests, immutable request context and inherited budget,
Activity/Child policies, supervised callback stop without application heartbeats,
stale fencing, shielded cleanup and canonical replacement replay. Ordinary
workers stay protocol 1.19. Cooperation opts into 1.20. Independently cancellable
scopes stay a disabled source preview. Local Abandon is refused before admission.
PHP process supervision requires pcntl/posix and callback-owned connections.

Verified

Connected source qualification
passes 50 cases / 2,789 assertions without failures, errors or skips. Memo restart
adds 1 / 67. The required PHP parent, Python child, Rust remote Activity and PHP
local Activity case passes 237 assertions. Both workflows complete cancellation
17.169470 seconds after the original request, before its unchanged 30-second
deadline. It asserts both physical stops, stale publication rejection, cleanup
SIGKILL/replay, duplicate identity/deadline and the shared API/CLI cascade.

Current head f38babb2f21da38108fb1eaf512b1b11be539a63 passes all ordinary
PHP 8.1–8.4, framework, package, docs, analysis and corpus gates. Later changes
prepare the RC onboarding identity and reuse the mixed case with registry SDKs,
the released CLI and an immutable Server digest. The runner rejects source
fallback and records actual installed package identities.

Publication

Publish PHP SDK 2.2.0-rc.1 for Server 2.5.0-rc.1 and run Published mixed
cancellation with the exact tuple. This PR does not close #136 or claim that
published qualification has already passed.

@rmcdaniel

Copy link
Copy Markdown
Member Author

The PHP SDK request foundation is now in draft PR #91 at 44397843e4d86c0ca840bd1f40dd970c6a1a77a6.

It requires explicit Server capability discovery, validates the workflow/run acknowledgment and preserves the original request ID, deadline and opaque history refresh token. PHP exposes current-run and explicitly selected-run handle operations using its existing handle convention. Default protocol remains 1.19, and the PHP worker does not advertise cooperative cancellation support.

Local qualification on PHP 8.4.26 passes the full 804-case source suite with 4,745 assertions and one existing skip, plus static analysis. The new request tests cover 26 cases and 72 assertions. The normal supported PHP and framework CI is running against the latest draft head.

Fresh development installation identified an independent phpDocumentor dependency advisory. PR #92 fixed it with one advisory-specific resolution exception that remains visible to audits. Its normal CI, documentation, clean runtime dependency audit and unchanged blocking of the older Flysystem advisory were verified before merge.

Next for PHP: consume canonical request/delivery history, replay cancellation at the recorded authored boundary, integrate lease-fenced delivery and history refresh, then qualify shutdown and cold replacement against the same Server candidate. Rust support and exact published artifact qualification remain required before the shared capability is enabled.

@rmcdaniel

rmcdaniel commented Oct 1, 2026 •

Copy link
Copy Markdown
Member Author

PHP request and canonical history foundation verified

Exact source: 037438d0a366f0f3db141ce077703084bd39c643, including merged main's development-install fix. Normal CI and both public boundary checks pass. PHP 8.1 through 8.4, static analysis, regression corpus, API docs, framework compatibility, consumer installation and target qualification all pass.

Local qualification at this source on PHP 8.4.26 passes:

  • 75 focused cooperative request/history cases with 170 assertions.
  • Full source suite: 853 cases, 4,843 assertions, one existing skip, no failures.
  • PHPStan and git diff --check.

The tests exercise capability refusal before mutation, selected-run and namespace binding, scoped control credentials, duplicate requests retaining Server identity/deadline, malformed acknowledgment rejection, immutable canonical request/delivery state, wrong-run and changed-deadline rejection, reordered/duplicate markers, valid and invalid parallel/selection operation ranges, and preservation of earlier committed results, failures and selection winners.

The local runner used an isolated path consumer for the SDK, PHPUnit 11.5.56 and PHPStan 2.2.16, with the repository's PHPUnit configuration and test namespace bootstrap. The ordinary CI uses the normal contributor composer install, composer test and composer analyse commands. No advisory blocking was disabled in that consumer. The documentation-only scoped exception was separately qualified and merged through PR #92, with the full advisory still reported by audits and no runtime advisories.

This remains a draft. The canonical reader is not yet connected to replay, and the PHP worker does not advertise this capability. Next is to inject cancellation at the recorded authored boundary, commit delivery through the live task lease, reload canonical paged history and qualify cleanup shielding, worker lifetime and cold replacement against the connected Server candidate. Rust parity and exact published artifact qualification remain required before shared capability activation. Published protocol defaults remain 1.19.

Cleanup is complete. Both clean task worktrees, all task dependency/build/cache/diagnostic directories, the temporary security negative-check consumer, and the local PHP tool image and its task layers have been removed. No task container or volume remains. No paid infrastructure was used or created.

@rmcdaniel

Copy link
Copy Markdown
Member Author

PHP replay and cleanup shielding implemented

Exact candidate source: c33b4d8a7446e8712e404e26090a191a2ec9d4b1 in draft SDK PR #91.

Canonical delivery now throws WorkflowCancelled at the recorded authored call, with the original request ID. A pending observation returns a delivery intent without throwing into workflow code or executing that call. Replay checks the call kind, parallel span, selection handle operation range, recorded operation identity and shielding. It rejects a removed or changed committed boundary.

WorkflowContext::cancellationShield() supports nested durable cleanup and restores its depth after exceptions. Saga compensation runs inside that shield. Completed results, earlier failures and committed selection winners retain their original behavior. Condition wait reopens retain their physical sequence so delivery and subsequent cleanup replay at the correct calls.

Local qualification on PHP 8.4.26, PHPUnit 11.5.56 and PHPStan 2.2.16:

  • 20 new focused replay cases, 48 assertions, pass.
  • Full ordinary composer test: 873 cases, 4,891 assertions, one existing skip, no failures.
  • Static analysis and git diff --check pass.
  • Regression corpus grows from 26 to 27 replay fixtures. The new timer-delivery fixture fails on main f425185ef26730f4973c8dfab1ec35ce88626a82 and passes on the candidate through the official Worker, including inline and paginated history. Validator reports consumer: worker, base fail and candidate pass.

The selection test starts with the retained runtime-produced selection fixture, preserves the committed winner, removes the pending loser's completion and verifies that cancellation targets its earlier operation range while cleanup follows the delivery slot. The local activity check proves that a pending request does not execute the callback.

This remains source work in a draft. Claim/heartbeat negotiation, fenced delivery transport, canonical history refresh, local activity interruption, shutdown and real connected PHP Server qualification remain required. Default protocol remains 1.19 and the PHP worker does not advertise cooperative support. Rust parity and exact published artifact conformance remain required before the shared capability is enabled.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Latest PHP source foundation verified

Exact source: 34c717f092620ca11b301718db84e59bfcf37dec in draft PHP PR #91. Normal CI and both public boundary checks pass. This includes all supported PHP and framework cells, static analysis, API docs, consumer installation, regression corpus and target qualification.

The delivery client uses worker credentials, the selected namespace, current task/owner/attempt and the complete authored call range. Malformed acknowledgments and changed request, sequence, kind or operation range are rejected. Source qualification may select protocol 1.20 explicitly through the Client constructor. Default protocol remains 1.19, and the managed PHP worker does not advertise cooperative support.

Local PHP 8.4.26 qualification passes 114 focused cooperative cases with 257 assertions and the complete ordinary source suite of 892 cases with 4,930 assertions, one existing skip and no failures. PHPStan and git diff --check pass. The replay corpus's new timer delivery fixture fails on main and passes on this candidate through the official Worker, for inline and paginated history.

Replay/cleanup behavior and the 20 new replay cases are detailed in the preceding report. No SDK release or published capability claim is made from this source work.

Next: integrate immutable claim/heartbeat observations, fenced delivery and canonical paged history refresh into Worker. Qualify in-flight local activities with and without user heartbeats, preserved earlier local reports, cleanup deadlines, shutdown and cold replacement against the same Server candidate. PHP synchronous callbacks require an explicit lifetime solution before the worker can advertise support. Rust parity and exact published artifact conformance remain required.

The clean task worktree, dependency/build/cache data and PHP tool image plus its task layers have been removed. No task container, volume or paid infrastructure was created or retained.

@rmcdaniel

Copy link
Copy Markdown
Member Author

PHP Worker integration and connected qualification

Exact PHP source: a245a4fec26e23ed157960e9ad95b75018d4035e in draft PR #91. Exact Server source: 2e2d6b31df981e98c1a054a8953e9efe95d17e6e, built with published Workflow 2.3.0. Qualification selects protocol 1.20 explicitly. Ordinary PHP workers remain at protocol 1.19 with cooperative cancellation disabled.

Ordinary CI, both public boundary checks and the complete connected MySQL run pass at this head, including target branch qualification. The connected job verifies the exact Server commit, runs real SDK worker processes against its isolated MySQL/Redis stack, and removes its containers, network and local images afterward.

  • Six cooperative cases pass with 142 assertions: a waiting timer, SIGKILL/cold replacement, a request before claim, a discarded successful delivery response, a local callback observed at its user heartbeat, and a late unencodable local result discarded after callback return.
  • Duplicate requests retain the original request ID and deadline. Each case proves one canonical request and authored delivery, one shielded cleanup completion using that original ID, and a cancelled run without an application failure or timer firing. A request before claim schedules no timer.
  • The existing persisted memo/cold-worker restart case also passes, with 67 assertions. Exact Avro bytes and decoded integer/float/binary types survive replacement without a duplicate memo event. JSON object key order is excluded from the envelope comparison while exact members and types remain required.
  • Raw JUnit artifact 11140887753 contains both suites and expires October 8 at 04:10:53 UTC. These measured results and source identities remain retained in this owning record.

Worker now observes immutable task/heartbeat requests, renews the exact lease fence, performs delivery through worker credentials, reloads every canonical history page through the Server-issued opaque token and proves the matching committed delivery before workflow cleanup. Lost or malformed replies cannot manufacture delivery. Earlier local reports commit before later cancellation. Unsafe claims are abandoned without an application failure event.

Real connected history exposed a start-prefix defect: new histories begin with StartAccepted, WorkflowStarted. Canonical refresh and cold sticky-cache recovery now accept and preserve that prefix. Separate focused regressions fail on prior 2dadc40a6d65af71aad0b3ecfa3a0a674192c80b and pass on the candidate. The authored timer-delivery corpus fixture fails on main and passes through the official Worker for inline and paginated history; replay fixtures grow from 26 to 27. Local PHP 8.4.26 checks at 00aa0a2 pass 929 cases, 5,095 assertions and seven opt-in runtime skips, plus PHPStan and 30 focused Worker cases/138 assertions. Current-head CI qualifies the final test-only envelope correction across all supported PHP/framework cells.

This remains a draft and source qualification. The no-user-heartbeat callback case proves rejection after a bounded callback returns, not interruption during an arbitrary blocking callback. Next PHP action is a deliberate execution-lifetime solution and real in-flight checks for cancellation, lease loss, shutdown, grace/deadline expiry and SIGKILL replacement, plus remote activity fencing. Rust parity and exact published Server/SDK conformance remain required before the shared capability is published or enabled by default. Existing terminal cancel/terminate behavior stays intact.

Local task evidence is retained here before removing the clean worktree, dependencies, test/build caches, counterfactual files and tool image. No local Server stack, paid infrastructure or customer state was created for this qualification.

@rmcdaniel

Copy link
Copy Markdown
Member Author

October 1 source baseline at e558391dde4c3dcd4e6a9adeea833e05b536f988

Ordinary CI, both public boundary checks and explicit connected qualification pass at this exact head. The connected job passes six cooperative cases with 143 assertions and the persisted memo/cold-restart case with 67 assertions against Server 2e2d6b31df981e98c1a054a8953e9efe95d17e6e, built with published Workflow 2.3.0. Stack and image teardown succeeds. Raw JUnit artifact 11141691529 is retained through October 8 at 04:40:55 UTC.

This head contains the internal process-execution foundation and bounded worker I/O. Eight real-process cases cover typed IPC, a callback blocked without user heartbeats, rejection before result encoding, original failure metadata, partial writes, inherited destructor isolation and SIGKILL of the owning worker. Four transport cases cover unchanged caller configuration, rejecting an adapter that cannot bound requests, opaque PSR-18 compatibility and a real stalled HTTP body. Local PHP 8.4.26 passes 941 cases with 5,175 assertions and seven existing runtime skips. Twelve focused cases pass with 80 assertions. Static analysis passes.

The executor is not connected to Worker at this baseline. The connected local case observes a heartbeat or rejects the result after callback return. The next implementation connects local execution to real lease observations, original cleanup deadlines, user heartbeat accounting and shutdown, then reruns connected qualification using a callback that stays blocked for 60 seconds. Remote activity fencing/lifetime, graceful shutdown, active-task cold replacement, Rust parity and exact published-tuple conformance remain required. Defaults remain protocol 1.19 with cooperative support disabled.

@rmcdaniel

Copy link
Copy Markdown
Member Author

The connected run at 6396384732beb91b7d29fe2a558abf7b2fbdcaae is not a pass. Run 36817037879 passes the first four timer/request cases, but both local cases fail during fixture shutdown. The new process-check loop reused $pid, replacing the owning Worker PID with the callback PID. Its finalizer then waited for a process it did not own and left the Worker polling. The log also records a poll admission refusal. Stack/image teardown succeeds, and JUnit artifact 11142221037 expires October 8 at 04:55:38 UTC.

dc1edf27367c917c504a14523761a1f23818fd22 fixes the fixture by using a separate activity PID variable. Product source is unchanged from the locally qualified 953-case commit. Both public boundaries pass. Ordinary CI and new connected qualification are running at the corrected exact head and the same pinned Server source. Require the complete connected outcome, memo restart and teardown before accepting this phase.

@rmcdaniel

Copy link
Copy Markdown
Member Author

PHP local activity lifetime qualified at dc1edf27367c917c504a14523761a1f23818fd22

Ordinary CI, both public boundary checks and explicit connected qualification pass at this exact head, including target qualification. The connected job passes six cooperative cases with 158 assertions and memo/cold restart with 67 assertions against Server 2e2d6b31df981e98c1a054a8953e9efe95d17e6e, built with published Workflow 2.3.0. Raw JUnit artifact 11141539999 is retained through October 8 at 05:02:15 UTC. Task stack and image teardown succeeds.

The executor is now connected to local activity handling. The owning Worker remains available while a callback blocks, renews the actual task lease, preserves the original request/deadline, checks execution timeouts and controls result encoding. User heartbeat details return to the owner through typed IPC and retain their own progress accounting. A relay stops the callback process group if the owner disappears. The owner rejects an unsafe result before it can become a local report.

Both connected local cases use a 60-second callback, with and without user heartbeats. They require cancellation and canonical cleanup in less than ten seconds, verify callback/relay process absence and check that no late return marker appears. History proves one original request, one delivery at the local activity call and one shielded cleanup result, without a failed application event. Waiting timers, cold replacement while waiting, duplicate immutable deadlines and discarded successful delivery replies also pass. The separate persisted memo case preserves Avro bytes/types and one memo event.

Local PHP 8.4.26 at product-source commit 6396384 passes 953 cases/5,292 assertions/seven existing runtime skips, static analysis and the local boundary. The corrected head changes only the connected fixture's PID variable. Worker cases cover blocked lease loss/shutdown, cleanup-deadline expiry, execution and heartbeat timeouts, retry-backoff cancellation, original failure/retry classification, invalid metadata and storage refusal. Real-process cases cover owner SIGKILL, typed/large IPC, partial writes and inherited destructor isolation. The earlier fixture failure and correction remain recorded.

Explicit cooperative PHP callbacks require Unix CLI with pcntl/posix, bounded transport and connections opened in the callback process. Captured memory changes do not update the owning Worker. Process termination does not undo external effects, so retries must remain safe. Ordinary workers keep their existing protocol 1.19 behavior.

This remains a source-qualified draft. Next: finish PHP remote activity lifetime/fencing, graceful shutdown, active-task cold replacement and external-payload discovery/transfer I/O bounds. Preserve terminal cancel/terminate behavior. Rust parity and exact published-tuple conformance remain required before release or default activation.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Bounded payload I/O implemented, October 1

Current source is e0711a4 and remains a draft. Cooperative worker requests now share a monotonic budget across payload-policy discovery, uploads, the ordinary API call and response hydration. Polling retains its offered wait plus five seconds, followed by one five-second hydration budget shared by all references. Transfers cannot restart that budget, and late replies are rejected. Whole-second transport timeouts can overshoot the deadline by less than one second before that final rejection.

Optional bounded binary interfaces preserve ordinary transport signatures and settings. Cooperative registration rejects adapters that expose legacy binary I/O without bounded counterparts. The default cooperative transport requires Guzzle with cURL, forces complete-response mode even when the caller enables streaming, and uses Guzzle's finite temporary sink. Upload replies are capped at 64 KiB, successful downloads still require the exact declared size and metadata, and the Client preserves namespace, role and digest validation. Temporary storage spills to disk instead of retaining an unbounded transfer in memory. Large transfers must finish within the worker budget, so a slow link may be refused rather than pinning task ownership. Ordinary workers keep their existing settings and protocol1.19.

Local PHP8.4.26 qualification passes 966 cases / 5,387 assertions / eight opt-in runtime skips, static analysis, the dependency boundary, Compose configuration and git diff --check. Focused regressions use real TCP for stalled download bodies, continuous trickling, stalled upload responses, oversized downloads/replies and successful binary/JSON transfers. Shared-budget cases reject late discovery/upload/hydration before another request or partial task escapes. A settings/role case preserves the caller's ordinary streaming and timeout configuration.

Ordinary public CI and explicit connected source qualification are running on this exact head. The connected suite now includes a unique namespace and a task-owned shared payload volume. An actual cooperative Worker must hydrate and complete a value above the ordinary 2 MiB request limit, with the stored result reference, bytes and digest checked. No connected pass is claimed yet. Existing Server/Python evidence remains retained. Next resolve these exact checks, then continue remote activity lifetime/fencing, graceful shutdown and active-task cold replacement. Rust parity and exact published-tuple conformance remain required before release/default activation. No Cloud deployment or stable release occurred.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Payload bounds qualified on exact PHP source, October 1

Exact PHP head e0711a45668b5552640ef6188916d75c45cf650c passes ordinary CI, both public boundaries and explicit connected qualification, including target qualification. This remains source qualification for the draft, with ordinary defaults unchanged.

Against exact Server 2e2d6b31df981e98c1a054a8953e9efe95d17e6e, built from published Workflow 2.3.0 / bce4365d76b3e5ff3a9f765f8a7831e6997e5da7, PHP8.3.35 passes seven cooperative cases / 167 assertions, and memo/cold restart passes one case / 67 assertions. The cooperative suite takes17.865 seconds. The new actual Worker round trip above the ordinary2 MiB limit takes2.089 seconds and verifies decoded result identity plus the runtime's stored external reference, exact byte count and SHA256. It uses a unique namespace and a task-owned shared payload volume. Existing cancellation/cold-replay cases continue to pass.

Commands are the repository's opt-in ci.yml dispatch with cooperative_qualification=true and the exact server_commit, followed by vendor/bin/phpunit tests/Integration/CooperativeCancellationTest.php --log-junit cooperative-results.xml and the same command for PortableMemoRestartTest.php. Raw JUnit artifact11142114561 expires October8 at05:26:27 UTC. The connected job's stack, images and payload-volume teardown passes at05:26:40 UTC. Target qualification job110232694541 passes.

Local PHP8.4.26 passes 966 cases / 5,387 assertions / eight opt-in runtime skips, static analysis, the dependency boundary, Compose configuration and git diff --check. Real TCP cases prove bounded stalls, continuous trickling, oversized responses and valid binary/JSON transfers. Shared-budget cases reject late discovery/upload/hydration before another request or a partial task escapes. The ordinary caller's namespace, role, streaming and timeout settings are preserved.

Cooperative control I/O now shares one monotonic five-second budget across discovery, payload upload, the API response and hydration. Long polls retain their offered wait, followed by one five-second hydration budget shared by references. Guzzle's cURL complete-transfer mode and finite temporary sinks close the per-read timeout gap. Optional bounded binary interfaces preserve ordinary transport signatures. Whole-second transport limits may overshoot the final fractional second before the budget check rejects a late reply. Slow large transfers can be refused, and custom adapters/handlers must honor their bounded capability. No new dependency, published capability, stable release or Cloud deployment is claimed.

Next: PHP remote activity lifetime/fencing, graceful shutdown and active-task cold replacement, then Rust parity and exact published-tuple conformance before release/default activation. Preserve terminal cancel/terminate behavior, user-heartbeat timeout semantics and at-least-once external effects. Existing Python remote proof fences heartbeat and late publication after canonical delivery. It does not prove an owning Worker can supervise a blocked remote callback without user heartbeats, so carry that distinction into the next shared-contract review.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Committed unshielded subtree replay is source-qualified

Pushed 5f2c6af67ecd01aa2a6af8c00ee81c202269527f to draft SDK PHP #91.
One ancestor marker now covers its frozen unshielded subtree. The active scope
gets its own accepted context, ancestors retain theirs while unwinding, and
outer work remains unaffected. Parent, child and grandchild cleanup use the
original ancestor receipt and narrower authority ceiling. Replacement preserves
all eight receipt fields. Shielded branches stay outside that cascade.

Local PHP 8.4 passes 1993 tests / 9733 assertions, zero errors/failures and
the same 40 opt-in skips. The descendant suite passes 29 / 366. Independent
verification preserves 1963 preceding case identities and exact results,
all 108 SDK and 125 Native dependency references, and eight committed
source hashes. Static analysis, syntax and whitespace pass.

The preceding blanket descendant-refusal test is deliberately replaced by an
original-boundary mismatch contract, including its exact diagnostic assertion.
Four pinned Native fixture profiles cover timer and complete nested mixed group
replay, partial admission refusal and shield exclusion. The preceding reader
rejects both valid profiles. Removing ancestor-state registration fails both
positive cases, restored at 2 / 128. Replacing the captured 26-second ceiling
with the original 30-second context deadline fails four of six cleanup cases,
restored at 6 / 180. Exact guard restoration passes the full suite.

Ordinary CI
and connected qualification
are pending at this exact head. The local test container and dependency scratch
were removed at 13:22:28 UTC, before the recorded deadline.

Worker scope execution remains off, protocol 1.20 remains unfrozen/unpublished,
this PR remains draft and #136 remains open.
These fixtures establish history
projection and replay. Live scope preparation/delivery, selective physical stop,
scope cleanup SIGKILL/replacement, published artifacts and the complete customer
demonstration remain acceptance gates. Next public execution work is that live
claim coordination and selective supervision, using these verified receipts.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Frozen descendant replay: hosted qualification passed

PHP source 5f2c6af67ecd01aa2a6af8c00ee81c202269527f now has successful ordinary CI and connected source qualification.

  • Hosted PHP 8.3 reproduces all local results: 1993 tests / 9733 assertions, no errors/failures and forty unchanged opt-in skips. All 1963 retained preceding case results match, with one explicitly replaced boundary-mismatch contract. Raw unit artifact.
  • Connected qualification passes all 32 gates, including hosted teardown: the same 39 test identities / 2182 assertions, zero errors/failures/skips. Memo restart remains 1/67. The mixed cascade retains 237 assertions and converges in 19.648102 seconds before its original +30-second deadline. Eight original remote stop/recovery/fencing and diagnostic evidence sets match. Raw connected artifact.
  • Official artifact digests, sizes, exact head and paired source tuple were independently verified. The connected test file is unchanged. Six polling-sensitive cases vary by -1, -1, -2, -2, +20 and +9 assertions because the history helper checks each observed batch. All other assertion counts are unchanged. No product tests or timeouts changed.

Worker scope execution remains OFF, candidate protocol 1.20 remains unfrozen/unpublished, and PR91 stays draft. The next step is live claim coordination and selective physical scoped supervision using the original delivery boundaries, request lineage and authority ceiling. The exact published PHP-parent/Python-child/Rust-remote/PHP-local cascade and unified inspection view remain closing requirements for #136.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Pending scope boundary selection source candidate

Pushed PHP 4874406b5763b98c80a6684fad744fa135e7568f to draft PR91. The internal replay path selects scalar pending requests from canonical history, preserving completed prefixes, accepted ancestor lineage, shields and the exact original preparation/deadline on replacement. A changed or skipped prepared call fails before cleanup. Selection emits an intent. Cleanup starts only after committed delivery.

Local qualification passes 2014 tests / 9883 assertions, no errors/failures and the same forty opt-in skips. The new suite is 21 / 150. All 1993 preceding test identities and exact results are unchanged. All 108 original SDK dependency references, seven source files, unchanged Native-produced fixture hashes, static analysis, syntax and whitespace are independently verified. Removing ordering or the prepared-boundary termination check makes its regression fail. Exact restoration passes and precedes the final full suite.

Ordinary CI and connected source qualification are queued at the exact head. Results remain pending. Local container and scratch were removed at 14:03:17 UTC, ahead of their 15:15 deadline.

Worker scopes remain OFF. Candidate 1.20 is unfrozen/unpublished, PR91 draft and shared #136 open. Claim-bound preparation/delivery coordination, selective physical scoped supervision and the exact published cross-language cascade remain required. This source profile grants no callback execution authority.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Pending scope boundary selection: hosted qualification passed

At PHP 4874406b5763b98c80a6684fad744fa135e7568f, ordinary CI and connected source qualification both pass.

  • Hosted PHP8.3 reproduces all local results: 2014 tests / 9883 assertions, zero errors/failures and forty unchanged opt-in skips. Every one of the 1993 preceding case identities and results is unchanged. Raw unit artifact.
  • Connected qualification passes all 32 gates and teardown: same 39 cases / 2162 assertions, no errors/failures/skips. Memo restart stays 1/67. The mixed cascade retains 237 assertions and converges in 21.391478 seconds, before the original +30-second deadline. All eight remote stop/recovery/fencing and diagnostic sets match. Raw connected artifact.
  • Artifact digests, sizes, exact head, inventories, source tuple and cleanup were independently verified. The connected test file is unchanged. Six polling-sensitive cases vary by +1, +1, +1, +6, -20 and -9 assertions as the helper checks observed history batches. All other assertion counts match. Product tests and timeouts are unchanged.

The local task was removed at 14:03:17, before its 15:15 deadline. Worker scopes remain OFF, protocol1.20 unfrozen/unpublished, PR91 draft and shared136 open. Next: integrate claim-bound preparation/delivery coordination with selective physical scope supervision. The exact published cross-language cascade, unified inspection and competitive closing requirements remain.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Source coordination qualified, scope execution remains disabled

SDK PHP draft PR91 now contains
68c96f114a48dd30505c28d35f61101a90038fa1. Scalar scope preparation and
delivery bind one original task, owner and attempt. Preparation verifies
canonical history and preserves the selected context and existing preparation.
Delivery requires replay of its exact boundary, identity and authority ceiling.

The original monotonic budget is shared across mutation, reply-loss recovery
and every history page. A tighter preparation ceiling restricts the same budget
before the first history read. Later restrictions cannot extend it. The accepted
context remains immutable, and cached proof causes no new dispatch.

Local full suite: 2030 / 9933, no errors/failures and the same 40 opt-in
skips. New suite: 16 / 50. All 2014 preceding case identities and exact
results, 108 original dependency references, Native fixture hashes and five
tested source hashes are independently verified. Static analysis, syntax and
whitespace pass. Removing either new authority guard fails its selected case,
and exact restoration passes. Test transport is a fixture, with explicitly
synthetic current timestamps derived from the Native fixture shape.

The task container and scratch were removed at 14:40:39 UTC, before their
15:45 deadline. Ordinary CI
and connected source qualification
are running at this exact source head. Their final artifacts will be checked
separately. The original Worker source is unchanged and scopes stay OFF.

Next: qualify selective physical scoped supervision and live Worker
coordination, then connected replacement and the exact published mixed-language
closing demonstration. Shared #136 remains open and PR91 remains draft.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Exact source head passes hosted qualification

SDK PHP 68c96f114a48dd30505c28d35f61101a90038fa1 has verified
ordinary CI
and connected qualification.

Ordinary CI passes 31 gates and its expected connected skip. The
PHP 8.3 artifact
matches every local case identity and exact result: 2030 / 9933, no
errors/failures and the same forty opt-in skips. All 2014 preceding case
identities/results remain unchanged. Official ZIP digest and byte size match.

Connected qualification passes all 32 gates, including hosted stack/image
cleanup. The unchanged 39 cases / 2163 assertions have zero
errors/failures/skips. Memo restart remains 1 / 67. The mixed cascade
retains 237 assertions and finishes in 21.605998 seconds, within its
original thirty-second deadline. Eight original remote physical stop, fencing,
historical acknowledgement and diagnostic sets, exact source tuple and official
ZIP digest/size are independently verified in
artifact 11352284996.

Five polling-sensitive cases vary by -1, +1, +1, -2 and +2 assertions as
unchanged helpers inspect observed history batches. All other assertion counts
match. The test source and timeouts are unchanged. This timing records the
acceptance budget, without claiming a performance gain.

The new scope coordinator remains a source candidate. Worker scope execution
stays disabled. Next work is live Worker coordination and selective supervision,
connected replacement, then the exact published closing scenario and fair
comparison with competing systems. Shared #136 stays open and PR91 stays draft.
Local task resources were removed at 14:40:39 UTC, before their deadline.

@rmcdaniel
rmcdaniel marked this pull request as ready for review October 6, 2026 05:21
@rmcdaniel
rmcdaniel merged commit 6a3a39b into main Oct 6, 2026
34 checks passed
@rmcdaniel
rmcdaniel deleted the feat/cooperative-cancellation branch October 6, 2026 05:24
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.

2 participants