feat(compose): emit validation receipts as JSON - #3650
Open
tang-vu wants to merge 1 commit into
Open
Conversation
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
--jsonto the shipped Compose stack validatorWhy this matters
Installers and CI already call
validate-compose-stack.shat the point where layered Compose files become a deployable stack. Machine-readable receipts let automation distinguish missing Compose, invalid input, and invalid merged configuration without scraping prose or storing the fully rendered Compose document.Behavioral invariant: validation still delegates to the exact shipped Compose engine and returns non-zero whenever
compose configfails.Overlap check
Searched open and closed PRs for
validate-compose-stack,validate compose JSON,compose stack JSON, and the production file. PR #2630 adds structured resolution plans toresolve-compose-stack.sh; PR #3259 adds deployed-stack drift attestation. Neither exposes the validation result fromvalidate-compose-stack.sh, so this is a separate handoff boundary.Test plan
bash -n ods/scripts/validate-compose-stack.shbash ods/tests/test-validate-compose-json.shbash ods/tests/test-extension-integration.sh(39 passed, 1 environment skip)git diff --checkThe boundary test invokes the real validator with a Docker Compose shim, validates exact success JSON, then forces
compose configfailure and verifies stderr detail, stable error code, and exit 1.Security, portability, and rollback
Rendered Compose output may contain expanded configuration, so JSON intentionally carries only a normalized error code; diagnostic text stays on stderr under the existing operator policy. Linux/macOS use the same Bash path and Windows uses WSL. Removing
--jsoncleanly restores the prior interface.Generated with Codex
Batch compatibility
This PR is independently mergeable. For the September feature batch, the tested order is #3647 ? #3656. All ten heads cherry-picked without conflict onto
upstream/main@6ff9b4fc; the resulting synthetic integration head was17e0791c.Combined validation: all focused boundary suites passed,
make lintpassed, and every GitHub Actions check on all ten PRs passed.make testreaches the pre-existingHermes template bounds each model turnfailure; the same command/failure was reproduced on a cleanupstream/main@6ff9b4fcworktree. No live hardware, physical-print, archive/restore, or deployment claim is inferred from static/simulated validation.