Repository navigation
fix(platform): make render-local.sh able to run - #24
Merged
Merged
Conversation
PLATFORM.md documents ./platform/render-local.sh as the local CI-parity gate whose scorecard must pass before committing, but the script could never complete. It failed in five independent ways, each verified against the published toolkit rather than inferred: - Every fragment render passed the per-environment directory as --output, while the toolkit opens --output as a file, so all five renders exited with "EISDIR: illegal operation on a directory". They now render to out/manifests/<env>/<fragment>.yaml, matching the deploy-artifact action. - artifact leak-scan is not a subcommand. The toolkit exposes only emit-apply-bundle, emit-contract and emit-kustomization-health; leak scanning in CI is the actions/leak-scan composite action. The call is removed rather than left to fail. - artifact emit-contract was called with --schema-version, which is not a flag, and without the required --deployment and --context. It now passes the deployment and the resolved cluster-context file. - artifact validate-raw-manifests does not exist in any published version. The dead branch is replaced by an explicit guard that says so if rawManifests is ever declared, instead of scoring an unexplained fail. - kubeconform and kustomize build ran against out/manifests, but a fragment is a schema document wrapping its payload; both tools expect apiVersion and kind at the top level and always fail on that shape. The deploy-artifact action documents exactly this and omits both steps. The applyable objects are what can be validated, so the script now lifts them with emit-apply-bundle and validates that bundle, which also gives kustomize the kustomization.yaml it was missing. The baked-in schema version fallback still read 0.16.0 and the default context digest was two republications behind what CI pins; both now match the pipeline.
Deploy Preview — auth-apiEnvironments: production Image refs
SC-11 Readiness Scorecard
Updated by deploy-preview action on push to this PR. |
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.
PLATFORM.mddocuments./platform/render-local.shas the local CI-parity gate whose scorecard must pass before committing. The script could never complete. Five independent defects, each verified by running the published toolkit rather than reading the code:--output--outputas a file →EISDIR: illegal operation on a directoryon all five fragmentsartifact leak-scanartifactexposes onlyemit-apply-bundle,emit-contract,emit-kustomization-health; CI leak-scans via theactions/leak-scancomposite actionartifact emit-contract--schema-version(not a flag) and without the required--deploymentand--context→E_USAGEartifact validate-raw-manifestskubeconform/kustomize buildonout/manifestsapiVersion/kindand always fail on that shapeThat last one is not a guess:
actions/deploy-artifact/run.shcarries a comment stating steps 9 and 10 "are intentionally absent" for exactly this reason.What changed
Renders now write
out/manifests/<env>/<fragment>.yaml, matching the deploy-artifact action. The two nonexistent subcommands are gone —validate-raw-manifestsreplaced by an explicit guard that names the limitation ifrawManifestsis ever declared, rather than scoring an unexplained fail.emit-contractgets the deployment and the resolved cluster-context file, located the way CI locates it.For validation, the script now lifts the applyable objects with
emit-apply-bundleand pointskubeconformandkustomize buildat that bundle. Those objects are real Kubernetes YAML and the bundle ships thekustomization.yamlthe previouskustomize buildwas missing, so both checks become meaningful instead of guaranteed failures.The baked-in schema-version fallback still read
0.16.0and the default context digest was two republications behind the digest CI pins; both now match the pipeline.Verification
Run end-to-end against the current public context in all six repos carrying the script: five fragments render, the apply bundle builds,
kustomize buildsucceeds on it, andartifact-contract.yamlis emitted with a render hash. The only scorecardfailin each run isnpm_signatures_verified, caused by the stubbednpmused to skip a global install in this environment, not by the script.Underlying cause
This script is duplicated across seven repositories, and it had already drifted —
agents-uicarried a third distinct context digest. Every defect above was fixed seven times because there is one copy per repo. Worth considering a single shared script or action invoked by each repo, but that is a design change rather than a fix and is left out of this PR.