Skip to content

Add transactional artifact generations - #18

Merged
pasunboneleve merged 1 commit into
mainfrom
feature/3tvx-artifact-generations
Sep 2, 2026
Merged

Add transactional artifact generations#18
pasunboneleve merged 1 commit into
mainfrom
feature/3tvx-artifact-generations

Conversation

@pasunboneleve

Copy link
Copy Markdown
Owner

Summary

  • add a single transactional publish_artifact workflow action
  • build into isolated immutable generations and inject absolute generation paths
  • require exact-generation HTTP readiness before downstream reload
  • roll back failed or interrupted switches and retain bounded history
  • ignore devloop-owned state and artifact output in broad watch groups
  • expose the agent contract through devloop docs artifacts and durable docs

API decision

The public workflow deliberately does not expose prepare/promote/cleanup fragments. Tests showed that one high-level action is the smallest interface that prevents invalid ordering while keeping build commands and generation endpoints project-owned.

Real consumer proof

The API was adopted in a local live-dashblog commit (0df386c). While Wrangler served generation 1788329830351-527f731c, an independent npm run build replaced dist and the generation, homepage, and observability post remained healthy. A watched edit then selected generation 1788329898297-f8cde486 only after exact readiness; both pages remained HTTP 200.

Validation

  • cargo test (187 unit tests plus integration suites)
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check
  • devloop docs artifacts and devloop docs --help
  • Roborev 256 and 257; all findings resolved under the two-pass cap

Tracking

Kata 3tvx

Context:
Destructive site builds could empty a directory while a long-running server still held the old asset manifest. A status-only readiness probe then accepted a server that returned transient 404s for its assets.

Decision:
Add one high-level publish_artifact workflow action backed by named artifact declarations. Devloop now builds in an isolated candidate, injects absolute generation paths, switches non-autostart consumers, requires exact-generation HTTP readiness, rolls back failed or interrupted switches, ignores engine-owned output in the watcher, and retains bounded history. Embed the complete agent contract in devloop docs artifacts and the durable documentation.

Alternatives considered:
Separate prepare, promote, restart, and cleanup workflow actions were rejected because they expose invalid orderings and make partial publication easy to configure. A project-only shell solution was rejected because every directory-serving HTTP project needs the same lifecycle invariant.

Tradeoffs:
Consumers must expose a small generation endpoint and read the generated directory and generation from environment variables. Artifact names and consumer startup are deliberately constrained so filesystem containment and crash recovery remain enforceable.

Architectural impact:
Configuration gains artifact declarations and exact-body HTTP probes. The workflow core emits one publication effect; the process boundary owns filesystem and process switching. Session state records active and rollback generations, and runtime watch filtering excludes state and artifact storage.

SemVer:
MINOR. This ordinary feature commit updates [Unreleased], does not bump Cargo.toml, and creates no dated release section.

Validation:
cargo test
cargo clippy --all-targets --all-features -- -D warnings
cargo fmt --all -- --check
git diff --check
Roborev jobs 256 and 257 reviewed the dirty tree; all findings were resolved locally under the two-pass cap.

Kata: 3tvx
@pasunboneleve
pasunboneleve merged commit 685ec79 into main Sep 2, 2026
2 checks passed
@pasunboneleve
pasunboneleve deleted the feature/3tvx-artifact-generations branch September 2, 2026 06:30
@pasunboneleve pasunboneleve mentioned this pull request Sep 2, 2026
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