Skip to content

release: promote dev to main (flowsafe 0.37.0) - #198

Merged
gcharang merged 40 commits into
mainfrom
dev
Nov 29, 2026
Merged

gcharang merged 40 commits into
mainfrom
dev

Conversation

@gcharang

Copy link
Copy Markdown
Contributor

Promotes dev to main for @proofoftech/flowsafe 0.37.0 (version PR #197; wave 2b release R2, child runs).

0.37.0: run lineage on summaries (rootRunId, rootWorkflowId, depth, parentRunId, parentWorkflowId) with table flowsafe_child_runs and the child-runs drain category; childRuns().start from a workflow step, with version pins, depth and per-parent limits, inherited owner and requester, and beforeStartChild; childRuns().awaitChildren(keys, { mode, timeoutMs }) to suspend a step until any or all children finish; cascade termination of unfinished children on terminate, deadline and natural completion. Breaking type changes: RunLeg start legs can carry parent, custom ChildRunTopology implementations gain start-principal lookup, child-start resolution and cascadeTerminate, and exhaustive InventoryCategory handlers must include child-runs.

No pending changesets on dev; dev push CI on 83fd9106 is green on the required jobs.

🤖 Generated with Claude Code

gcharang and others added 30 commits November 29, 2026 21:31
Run summaries carry root and parent lineage (stored runs before this version
read as roots); flowsafe.runLineage is reserved; table flowsafe_child_runs
keys children by parent run and child key and bounds stored outcomes; the
child-runs drain category counts unsettled children.
Carry CP-Q1 and CP-P2 fixes; the spike inventory counts ten work categories
with child-runs.
Carry bounded question recovery, stored-answer re-authorization and the
CP-P1/CP-P2 fixes.
childRuns().start() and result() bind to the active leg; child ids derive
from the parent run and a run-scoped key; depth and per-parent caps, the
host's beforeStartChild hook and the version pin gate admission; the child
inherits the parent's registered owner and the root's stored requester.
Biome's noAssignInExpressions refuses the logical-assignment return.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
childRuns().awaitChildren() suspends a step until any or all named children
finish or the wait expires; the parent resumes once against the suspension
fingerprint with every known outcome. A child's alarm retries its settlement
notice for up to 24 hours and stops when the parent is gone; the parent
acknowledges outside its operation lock. Results over 16 KiB are omitted from
the envelope and stay readable through result(key).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A terminate or a matched run deadline cascades to every unfinished child in
parallel (25 s per call) before the parent commits; a child that does not
answer is recorded indeterminate and retried by the parent's alarm for up to
24 hours. A parent that finishes on its own cancels its unfinished children,
and a cancellation stamp fences a child start still in transit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A child start passes the router's role, catalog and beforeStart checks for
the parent's registered owner, and beforeStartChild receives that owner. The
parent waits at most 25 s for the child's durable admission instead of its
first leg; a starting row resolves to started or refused by probing the child.
Child starts carry the deployment's current mutation epoch, a resume deadline
stays within the parent's, the child records a start-principal receipt, agent
targets and keys over 128 bytes are refused, and two strict-index reads are fixed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A ready or expired await that cannot resume shares the five-attempt deadline
budget with backoff, and a resume schema that rejects the outcome settles the
run as CHILD_AWAIT_RESUME_FAILED. A nested or malformed children wait fails
at suspension as INVALID_CHILD_AWAIT, and both summary views classify it.
Recording a child outcome after a committed transition no longer fails that
transition; re-awaits resume only for an undelivered outcome; deep results
are omitted as too-deep; error cuts keep surrogate pairs whole.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep bounded admission and reservation recovery with child await delivery.
Record terminal outcomes after ownership commits and retry parent notices.
Update await fixtures for admission before first-leg completion.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The runtime's active-leg scope imports AsyncLocalStorage from
node:async_hooks, which the showcase Worker provides under nodejs_compat;
its Worker typecheck now includes the pinned Node types to resolve it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…mitted

The child topology must implement cascadeTerminate, and a terminate or
deadline with unfinished children refuses as CHILD_CASCADE_UNAVAILABLE without
it. The parent's terminal intent commits under compare-and-set before any child
is called, and the alarm re-checks it before retrying a child. Deadline sweeps
run eight transitions at a time, and a cascade keeps a direct terminate's
replay principals.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Probe starting children within the cascade budget and preserve abortable
admission waits. Keep outcome recording best effort after terminal cleanup.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The showcase's browser program reads two resume refusal codes, and importing
them from runtime.ts pulled node:async_hooks into it. Both now import the
codes from a leaf module; behaviour and public exports are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
gcharang and others added 10 commits November 30, 2026 00:28
…st needs

The parent resume in the requester-header test omitted requestedBy and
requestedByKind, which /resume requires, so it answered 400 before the
child-start property was exercised.
The child-run settle path now raises RunStateUnreadableError for an
initial or non-terminal snapshot before it touches the ledger, so the
existing retry path applies and settle always receives a terminal summary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s entry

The await-children work exports CHILDREN_RESUME_KEY from
`do-runner/constants` for hosts that read the resume envelope, so the
packed agent-host surface check lists it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nate

feat(flowsafe): end child runs before their parent's terminal state
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
anchorage-showcase-single-tenant 83fd910 Nov 29 2026, 09:29 PM

@gcharang
gcharang merged commit a9151f8 into main Nov 29, 2026
6 of 8 checks passed
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.

1 participant