Skip to content

feat(flow): revalidate dependency graphs before durable execution - #67

Merged
szmyty merged 1 commit into
mainfrom
feat/flow-64-graph-recovery
Sep 26, 2026
Merged

szmyty merged 1 commit into
mainfrom
feat/flow-64-graph-recovery

Conversation

@szmyty

@szmyty szmyty commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

A saved Succeeded prerequisite can become stale after its inputs, provider, authority, validator, or outputs change. The previous durable single-step path checked recorded dependency status, so a downstream step could miss that stale ancestor.

This PR requires fresh graph evidence before dependent execution. It is the first bounded checkpoint under #31.

  • Add assess_run with the exact expected plan and a complete, explicitly identified context inventory. Reports classify ready, reusable, invalidated, dependency-blocked, approval-required, and abandoned work.
  • Propagate stale evidence to every descendant while preserving immutable acceptance history and independent branches. Reports carry state/plan digests, recorded statuses, typed local reasons, and direct blockers.
  • Add execute_in_plan, which recomputes eligibility for the caller-selected step. Serialized reports grant no authority; the original single-step APIs now refuse dependent steps.
  • Publish flow.run-assessment/v1 in provisional contract set 0.8.0, with schema/examples, proposed ADR-0012, API guidance, and the updated roadmap.

Validation completed locally on Rust 1.85 and stable: all targets passed, including eight new graph tests and all 81 acceptance scenarios twice in fresh roots; Clippy passes with warnings denied on both toolchains. Contract/source drift, report rejection, repository validators, formatting, documentation tests, all three examples, and package verification passed. At head 7a45e95f19b01b1533b6aba641f692ac68e6ac49, all five hosted CI jobs passed: Rust 1.85.0, Rust stable, repository validators, macOS durable state, and Windows durable state. Both Linux jobs retained normalized acceptance reports.

The graph tests cover restart and deterministic reports; branch/transitive invalidation across input, artifact, provider, configuration, authority, binding, invocation, capability, and validator boundaries; missing/reordered/duplicate/extra contexts; exact-plan refusal; stale-report non-authority; single-step bypass refusal; unresolved dependencies; corrupt history; and no repeated successful launch.

Limits: exact saved plan only; sequential observations require quiescent external files. This adds no scheduler, automatic retry, cross-plan migration, artifact cleanup, real provider adapter, or exactly-once external-effect guarantee. Validation implementation changes conservatively invalidate older acceptance evidence. #65 owns the broader lifecycle corpus and #66 owns authority/effect and residual proofs. Keep parent #31 open.

Closes #64. Refs #31, #11.

Maintainer merge only. After merge and green main CI, #65 is next.

Require complete current contexts and fresh ancestor evidence, propagate typed
reuse invalidation without rewriting history, and close single-step bypasses.
Add versioned assessment reports and deterministic hermetic graph coverage.

Refs #64, #31
@devactivity-app

Copy link
Copy Markdown

Pull Request Summary by devActivity

Metrics

Cycle Time: 3h 38m

Achievements

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.

[FLO-13.4a] Revalidate dependency graphs before durable resume and execution

1 participant