fix: validate machine config before activation - #451
Merged
Conversation
Greptile SummaryThe PR validates rendered machine configuration before activation and preserves literal TOML scalar types.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported stale-candidate issue is fixed for the regular files that interrupted candidate writes can leave behind.
|
| Filename | Overview |
|---|---|
| crates/alien-deploy-cli/src/commands/join.rs | Adds typed TOML rendering, optional pre-activation validation, durable candidate writes, atomic replacement, stale-candidate recovery, and focused regression tests. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Render typed TOML] --> B[Remove stale PID candidate]
B --> C[Create and sync candidate]
C --> D{Validator configured?}
D -- No --> F[Atomically replace active config]
D -- Yes --> E{Validation succeeds?}
E -- Yes --> F
E -- No --> G[Remove candidate]
G --> H[Keep active config unchanged]
F --> I[Sync parent directory]
Reviews (4): Last reviewed commit: "fix: validate machine config before acti..." | Re-trigger Greptile
alongubkin
force-pushed
the
alon/alien-545-preserve-toml-scalar-types
branch
from
August 21, 2026 00:03
f927236 to
45626a3
Compare
alongubkin
changed the base branch from
main
to
alon/alien-559-regenerate-worker-runtime-typescript-client-for-locked-ts
August 21, 2026 00:03
Base automatically changed from
alon/alien-559-regenerate-worker-runtime-typescript-client-for-locked-ts
to
main
August 21, 2026 01:39
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.
Background
Machine join renders configuration from a release manifest. TOML itself accepts values such as both
trueand"true", but Horizond requires specific scalar types. Replacing the active file before the actual consumer validates it can turn a repair or reconfiguration into a service crash loop.Changes
The validator is optional for backward compatibility with existing bundle manifests. Horizon PR #97 adds
horizond validate-config <path>and publishes it in new manifests.Validation
cargo test -p alien-deploy-cli machine_config_(4 passed)