Repository navigation
fix: enable parallel f.run in hosted standalone (2.0.53) - #676
miyaontherelay wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
miyaontherelay has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
miyaontherelay has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
There was a problem hiding this comment.
miyaontherelay has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
Hosted 2.0.52 uses the Bun standalone CLI, whose reformatted function text caused certified Promise.all flows to be admitted serially. Once admitted as parallel, valid causal child IDs also failed the standalone result verifier's global-ordinal assumption.
This change certifies the closed, hash-pinned source in the Bun parent and verifies causal result claims against the durable child index and each child's completion journal. Opt-in
FLOWS_PARALLEL_DEBUG=1explains serial admission on stderr.The review fixes preserve the safety checks:
parallel.v3, so 2.0.52 refuses them before dispatch. Existingparallel.v2roots remain readable by the new runtime; serial root kinds remain unchanged.after,afterTruncatedandlabelwith the durable index.Current-head focused evidence, including literal commands and complete output, is in desktop-report.txt. It captures 142 passing focused tests, the no-emit type check, and isolated revert failures: F1 2, F3 7, F4 8, F5 7, plus 4 for reverting default strip-mode support. Counts overlap across mutants; each mutation was restored byte-for-byte before its passing rerun. The F1 proof is at the certifier level. The cached published 2.0.52 resume-function check uses a mock journal, not a live rollback run.
Live verification remains blocked: the internal disk has 7.2 GiB available against the required 10 GB build floor. This desktop continuation ran no builds, installs or heavy/live tests. The standalone/npm review fixtures, including SUB1, TS1param/TS2annot/TS3ret, FG_edges and RB_NATW/RB_N2, still need to run after space is freed. Earlier standalone evidence predates these review fixes and is not current-head live evidence.
Target release: 2.0.53 after live verification, independent review and green CI. Cloud must retain a 2.0.53-capable artifact for active
parallel.v3roots. This PR does not change the Surface API or kernel protocol.Need help on this PR? Tag
@codesmith-botwith what you need.Note
High Risk
Changes parallel admission, embedded Node execution gates, result verification, and journaled root kind—core authored-runtime durability and rollback compatibility paths.
Overview
Fixes hosted Bun standalone flows that were wrongly pinned to serial
f.runbecause parallel admission comparedFunction.prototype.toString()byte-for-byte with source—Bun reformats that string while npm/Node does not.Admission: Node still certifies via exact body match against type-stripped or transform-loaded source (
parallelLoadedBodyEligiblefor both strip and transform). Bun certifies the closed, hash-pinned source module (parallelPinnedSourceEligible) instead of the in-memory body. The embedded Node child re-verifies source hash and body grammar before any parallel child runs. TypeScript annotations on parameters, awaits, and branch returns are allowed when the stripped body matches.Durability: New parallel roots journal as
relayflows.authored-root.parallel.v3(2.0.52 refuses them on rollback; 2.0.53 still resumesparallel.v2). The standalone result verifier no longer requires a single globalrun-1..Nordinal for parallel claims—it cross-checks the durable authored-step index (includingafter,afterTruncated,label) and then each child journal. Serial roots keep the old ordinal check.Ops: Optional
FLOWS_PARALLEL_DEBUG=1logs why admission chose serial without changing root metadata. Docs (SURFACE.md) and reproduction evidence are added; tests cover eligibility, admission, verifier, rollback readback, and live Bun→Node parallel overlap.Reviewed by Cursor Bugbot for commit b1e4375. Bugbot is set up for automated code reviews on this repo. Configure here.