Skip to content

[Artifact Forest 1/9] Define cycle-safe exhaustive derivative planning #422

Open

Description

@szmyty

Parent: #421

Outcome

Add a canonical planning policy for "build every eligible derivative" without recursively walking cycles or producing duplicate/source-equivalent artifacts.

Problem

Renderflow's graph intentionally supports reversible and competing edges. A naive exhaustive traversal over edges such as fountain -> fdx -> fountain can loop, duplicate work, and create lower-fidelity derivatives from already-derived artifacts.

Model

Introduce a derivative-forest planning mode that is target-oriented.

For a source artifact and policy:

  1. enumerate eligible target artifact identities/capabilities;
  2. exclude source-format identity by default;
  3. compute one selected simple path per target;
  4. forbid repeated format nodes inside a selected path;
  5. deduplicate equivalent target identities;
  6. prefer higher-fidelity/direct source paths over paths starting from another derivative;
  7. preserve unavailable/unsupported targets as diagnostics rather than outputs.

Example:

source: fountain
targets: fdx, fadein, osf, json, pdf

fountain ─→ fdx
         ├→ fadein
         ├→ osf
         ├→ json
         └→ pdf

Deliverables

  • Versioned derivative-forest plan/evidence schema.
  • Explicit source-exclusion and target-deduplication rules.
  • Simple-path/cycle policy.
  • Target identity beyond raw extension where variants/profiles matter.
  • Loss/fidelity budget and path-selection evidence.
  • Provider-availability filtering.
  • CLI/SDK dry-run inspection for the forest.
  • Deterministic fixtures including reversible A ↔ B transforms and competing A → C paths.

Acceptance criteria

  • Reversible graph edges cannot cause recursive execution or duplicate target artifacts.
  • The source format is not regenerated unless explicitly requested.
  • Each target identity is materialized at most once per source/profile.
  • Selected paths contain no repeated format node.
  • Higher-fidelity source-derived paths win according to documented policy.
  • Unsupported/unavailable targets remain explicit.
  • Plan identity includes source, policy, targets, provider/toolchain identity, and relevant options.
  • Existing targeted graph execution remains compatible.
  • Tests cover cycles, aliases, competing paths, unavailable providers, lossy paths, and explicit source-format requests.

Non-goals

No new screenplay, subtitle, or AI provider is implemented here.

2026-10-12 implementation checkpoint

Draft PR #445 publishes the authored implementation at 6c73042c9b27b20d9b5d49a0915209e40281136d.

The checkpoint adds distinct target identities, bounded cycle-safe route selection, retained terminal selectors, exact executor registrations, isolated rendition groups, versioned forest evidence and policy, CLI/SDK inspection, documentation, and authored regression fixtures. Unsupported and unavailable branches remain diagnostics rather than output promises. Ordinary exact-target requests retain optimization-first behavior; exhaustive/profile plans prefer cumulative fidelity and fewer conversions.

Source review and Git object identity inspection were completed. Tests, compilation, lint/format checks, schema validation, native probes/conversions, and CI remain explicitly deferred for the later deep testing session. This issue and its acceptance checklist remain open; authored fixtures are not passing-test evidence. See the checkpoint handoff.

Audit-to-roadmap reconciliation — 2026-10-21

Audit: https://github.com/egohygiene/renderflow/blob/audit/flow-suite-20261021T025401Z/audits/flow-suite-20261021T025401Z.md · Complete roadmap: #367

Cycle-safe simple-path planner authored; exact targets keep optimization-first ranking and exhaustive targets retain bounded fidelity ranking.

Bounded preparation: Inspect declared bounds/branch diagnostics and refine authored counterexamples.

Remaining acceptance (common qualification deferral; no dependency star): Deferred focused planner/compiler/schema/corpus qualification.

The maintainer's implementation-sprint qualification deferral remains in force. This audit ran no Renderflow tests, compiler/build/Cargo resolution, product lint/format/schema qualification, native/CLI/provider/visual execution, installers or new CI. Reading existing exact-source provider records is not a qualification rerun. Source implementation and authored tests are not passing-test, native-fidelity, release or downstream-consumer evidence.

This is an additive planning note. The full original issue, acceptance criteria, scope, parent references and historical checkpoints remain authoritative and unchanged. No acceptance box or issue is closed by this audit. Recommended ledger parent: #421.

Activity

  1. added a commit that references this issue on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions