Skip to content

fix: enable parallel f.run in hosted standalone (2.0.53) - #676

Open
miyaontherelay wants to merge 3 commits into
mainfrom
codex/hosted-parallel-2-0-53
Open

miyaontherelay wants to merge 3 commits into
mainfrom
codex/hosted-parallel-2-0-53

Conversation

@miyaontherelay

@miyaontherelay miyaontherelay commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

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=1 explains serial admission on stderr.

The review fixes preserve the safety checks:

  • F1: The embedded Node child matches the registered body exactly against the transform-mode text served by its pinned loader, before any child effects.
  • F3: npm admission matches the loaded body exactly against Node's strip or transform output. TS-annotated parameters, awaited values and branch return types are covered in both loader modes. The original source must still pass the closed-module grammar.
  • F4: New parallel roots use parallel.v3, so 2.0.52 refuses them before dispatch. Existing parallel.v2 roots remain readable by the new runtime; serial root kinds remain unchanged.
  • F5: Parallel result verification also compares after, afterTruncated and label with the durable index.
  • F2 accepted, no code change: A tampered, hash-pinned Surface can patch intrinsics only in the Node child. That contrived case fails closed before effects; ms-lead accepted it as out of scope.

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.v3 roots. This PR does not change the Surface API or kernel protocol.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with 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.run because parallel admission compared Function.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 (parallelLoadedBodyEligible for 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 resumes parallel.v2). The standalone result verifier no longer requires a single global run-1..N ordinal for parallel claims—it cross-checks the durable authored-step index (including after, afterTruncated, label) and then each child journal. Serial roots keep the old ordinal check.

Ops: Optional FLOWS_PARALLEL_DEBUG=1 logs 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.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

miyaontherelay has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3962fb4f-3cd2-4289-a3fc-c696c040c457
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

View 2 other findings in Capy.

Open in Capy

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

miyaontherelay has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

miyaontherelay has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@capy-ai capy-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capy found no issues.

Open in Capy

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