Skip to content

feat(pipeline): introduce binary-safe artifact kernel - #369

Merged
szmyty merged 1 commit into
mainfrom
feat/artifact-kernel-352
Aug 31, 2026
Merged

feat(pipeline): introduce binary-safe artifact kernel#369
szmyty merged 1 commit into
mainfrom
feat/artifact-kernel-352

Conversation

@szmyty

@szmyty szmyty commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Introduces the binary-safe artifact substrate tracked by #352 without prematurely stabilizing the Transform v2/plugin contract owned by #357.

Artifact kernel

  • adds first-class Artifact, ArtifactId, SHA-256 ArtifactDigest, media type, canonical format, byte size, metadata, ordered lineage, payload handle, and storage-class types
  • separates content-addressed payload identity from artifact-record identity so payload bytes can be deduplicated without collapsing distinct format/lineage records
  • adds ordered ArtifactCollection values for aggregation inputs
  • adds a file-backed ArtifactStore with streaming SHA-256 ingestion and deterministic object paths
  • keeps canonical source files immutable by importing them into the store
  • atomically materializes final outputs only after a complete copy and sync

Artifact-native DAG execution

  • makes artifact values the canonical DagExecutor substrate
  • adds execute_artifact(...) and execute_artifacts(...)
  • adds register_artifact(...) for binary-safe transforms
  • preserves the existing execute(..., String) and register_single(..., Transform) APIs through TextTransformAdapter
  • rejects binary payloads explicitly at the legacy UTF-8 boundary rather than decoding them lossily
  • passes collection inputs to aggregation transforms as ordered file-backed payload paths
  • imports aggregation output into the content-addressed store only after the transform succeeds

Cache

Graph build integration

  • removes fs::read_to_string from graph source ingestion
  • imports configured input files as binary-safe source artifacts
  • keeps work/cache artifacts in hidden Renderflow state rather than emitting intermediates as final outputs
  • atomically materializes selected graph outputs
  • logs artifact ID, digest, and byte size

Fixtures and documentation

Tests cover:

  • representative PDF, PNG, WAV, and Markdown artifact payloads
  • binary graph traversal containing invalid UTF-8 bytes
  • legacy text-transform compatibility
  • ordered collection aggregation and lineage
  • artifact-cache reuse
  • failed aggregation leaving no falsely complete content-addressed artifact
  • source immutability and atomic final replacement

docs/artifact-kernel.md documents the model, store lifecycle, cache identity, compatibility boundary, Flow projection boundary, and migration sequence.

The PR also repairs the supported-format documentation generator for the Rust workspace layout and commits its deterministic regenerated projection. This surfaced and corrected previously stale graph identifiers without hand-editing generated documentation.

Architecture boundaries

This PR intentionally does not:

Validation

Final head: 1dc01301576600110fa8df5ae3e59c07e2dfeba9

All final-head workflows are green:

  • CI run 33429687003
    • Clippy with warnings denied
    • Rust workspace build and full tests
    • web frozen install, format, lint, typecheck, tests, build, and artifact upload
    • AUR stable and git package validation
    • portable installer smoke test
    • Snap build, classic install, renderflow --version smoke test, and artifact upload
    • bundled dry-run, library embedding, and plugin registration examples
  • Docs run 33429687002
    • generated-doc regeneration
    • zero-diff generated-doc verification
    • MkDocs build
    • versioned docs smoke build
  • Commit Lint run 33429687036

The PR contains one Conventional Commit and is mergeable.

Closes #352

Add content-addressed payload storage, artifact lineage, ordered collections,
and an artifact-native DAG execution seam.

Keep existing text transforms working through a UTF-8 compatibility adapter,
materialize final graph outputs atomically, and repair generated format docs.

Closes #352
@szmyty
szmyty force-pushed the feat/artifact-kernel-352 branch from 4401b30 to 1dc0130 Compare August 31, 2026 19:16
@szmyty
szmyty merged commit 3057fcd into main Aug 31, 2026
19 checks passed
@szmyty
szmyty deleted the feat/artifact-kernel-352 branch August 31, 2026 19:23
@devactivity-app

Copy link
Copy Markdown

Pull Request Summary by devActivity

Metrics

Cycle Time: 14m Coding Time: < 1 min

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.

Introduce a binary-safe artifact kernel and content-addressed artifact store

1 participant