Add transactional artifact generations - #18
Merged
Conversation
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
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
publish_artifactworkflow actiondevloop docs artifactsand durable docsAPI 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 generation1788329830351-527f731c, an independentnpm run buildreplaceddistand the generation, homepage, and observability post remained healthy. A watched edit then selected generation1788329898297-f8cde486only after exact readiness; both pages remained HTTP 200.Validation
cargo test(187 unit tests plus integration suites)cargo clippy --all-targets --all-features -- -D warningscargo fmt --all -- --checkgit diff --checkdevloop docs artifactsanddevloop docs --helpTracking
Kata
3tvx