Skip to content

docs(branch): RFC for composed environment snapshotting + rollout branching - #1045

Open
JeremyJC67 wants to merge 2 commits into
benchflow-ai:mainfrom
JeremyJC67:docs/rollout-branching-rfc
Open

docs(branch): RFC for composed environment snapshotting + rollout branching#1045
JeremyJC67 wants to merge 2 commits into
benchflow-ai:mainfrom
JeremyJC67:docs/rollout-branching-rfc

Conversation

@JeremyJC67

@JeremyJC67 JeremyJC67 commented Aug 20, 2026

Copy link
Copy Markdown

Summary

Adds docs/rollout-branching-rfc.md: a design for composed environment snapshotting + rollout branching, so a failed rollout can be attributed to a stage (env/tool init, research, execution, self-judgment) instead of reported as an undifferentiated zero, and so ablations (skills on/off, tool outage, plan injection) can be run as controlled comparisons rather than independent re-runs.

Design-only PR; no behavior change. It composes what benchflow already ships rather than inventing a parallel mechanism:

The RFC specifies: the three-layer composed checkpoint and its ordering, stage boundaries mapped onto the existing lifecycle phases, per-child branch deltas reusing the existing S/C/skill_mode axes, branch lineage artifacts (branched runs currently leave none), and a replay cut-point API. Agent-session snapshotting is explicitly out of scope for v1, with the record-replay bridge named as the v1 substitute. Side effect: it makes the declared-but-fail-closed branch_execution: forked-snapshot value in task-standard.md real.

Test plan

  • Docs-only change; no source touched. Full suite unaffected: uv run python -m pytest tests/ -q5814 passed, 65 skipped (single pre-existing unrelated failure, test_check_results_accepts_symlinked_current_repo_inferred_source, fails identically on an untouched tree)
  • uv run ruff check . → All checks passed; uv run ty check src/ → All checks passed

Implementation lives in a follow-up PR (draft) so the design can be discussed first. Tracks FrontierPhysics#73.


Open in Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3890653680

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +86 to +87
`env-ready` deliberately precedes `install_agent()` so skills-on/off branches re-run
skill deployment from a skill-free world (skills are baked in at install time).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep skills out of the env-ready snapshot

When the source rollout uses bundled skills with a Dockerfile-built environment, this boundary is not skill-free: Rollout.setup() injects the skills into the Dockerfile (src/benchflow/rollout/__init__.py:1009-1016), and start() builds and launches that image before this snapshot. Consequently, an env-ready snapshot from a with-skill run already contains the skill files, so its no-skill child can access them even if install_agent() omits the discovery links, invalidating the proposed ablation. The design needs a skill-neutral build/runtime upload path or an explicit scrub before creating no-skill children.

AGENTS.md reference: AGENTS.md:L30-L30

Useful? React with 👍 / 👎.

@JeremyJC67
JeremyJC67 force-pushed the docs/rollout-branching-rfc branch from 3890653 to 80565f3 Compare August 21, 2026 04:53
JeremyJC67 and others added 2 commits August 27, 2026 14:34
Specifies the three-layer checkpoint composition (environment x container x
agent-session), stage-boundary snapshot policy mapped onto existing lifecycle
phases, per-child branch deltas reusing the S/C/skill_mode axes, branch lineage
artifacts (tree.json + per-child result.json + source_provenance
kind=benchflow-branch), and the replay cut-point API. Tracks FrontierPhysics#73.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZggU3vNYzr3hfDZJUE7jX
…ations

§3.2 said the env-ready snapshot is a skill-free world, full stop. That holds
only when the source rollout is no-skill: a with-skill run's setup() injects
the bundled pack into the Dockerfile and start() builds that image before the
env-ready snapshot is taken, so the snapshot already carries /skills. A
no-skill child forked from it would restore the pack, deploy nothing on top of
it, and still be labelled no-skill in every artifact.

The engine already fails closed on exactly this (BranchParentSkillModeConflict
unless the parent's own mode is no-skill); the RFC now states the precondition
that gate enforces, so the design text and the implementation agree.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DZggU3vNYzr3hfDZJUE7jX
@JeremyJC67
JeremyJC67 force-pushed the docs/rollout-branching-rfc branch from ecf4160 to abee192 Compare August 27, 2026 21:34
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