Skip to content

fix(platform): make render-local.sh able to run - #24

Merged
ExtraToast merged 1 commit into
mainfrom
fix/render-local-parity
Aug 20, 2026
Merged

ExtraToast merged 1 commit into
mainfrom
fix/render-local-parity

Conversation

@ExtraToast

Copy link
Copy Markdown
Contributor

PLATFORM.md documents ./platform/render-local.sh as 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:

defect evidence
every render passed a directory as --output toolkit opens --output as a file → EISDIR: illegal operation on a directory on all five fragments
artifact leak-scan not a subcommand — artifact exposes only emit-apply-bundle, emit-contract, emit-kustomization-health; CI leak-scans via the actions/leak-scan composite action
artifact emit-contract called with --schema-version (not a flag) and without the required --deployment and --context → E_USAGE
artifact validate-raw-manifests exists in no published version
kubeconform / kustomize build on out/manifests a fragment is a schema document wrapping its payload; both tools expect top-level apiVersion/kind and always fail on that shape

That last one is not a guess: actions/deploy-artifact/run.sh carries 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-manifests replaced by an explicit guard that names the limitation if rawManifests is ever declared, rather than scoring an unexplained fail. emit-contract gets 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-bundle and points kubeconform and kustomize build at that bundle. Those objects are real Kubernetes YAML and the bundle ships the kustomization.yaml the previous kustomize build was missing, so both checks become meaningful instead of guaranteed failures.

The baked-in schema-version fallback still read 0.16.0 and 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 build succeeds on it, and artifact-contract.yaml is emitted with a render hash. The only scorecard fail in each run is npm_signatures_verified, caused by the stubbed npm used 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-ui carried 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.

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.
@ExtraToast ExtraToast added the type: bug Something is broken or behaving incorrectly. label Aug 20, 2026
@ExtraToast ExtraToast self-assigned this Aug 20, 2026
@github-actions

Copy link
Copy Markdown

Deploy Preview — auth-api

Environments: production
Context ref: ghcr.io/jorisjonkers-dev/cluster-deploy-context-public@sha256:9479bc22ae11183c0b68f257d2c1a21455be8c3cff602d3a491ea3ff31d01fe3
Workloads: 1 | Routes: 1 | Gatus entries: 0

Image refs

  • auth-api: ghcr.io/jorisjonkers-dev/auth-api/auth-api@sha256:0000000000000000000000000000000000000000000000000000000000000000

SC-11 Readiness Scorecard

Check Status
✅ schema_pinned pass
✅ context_pinned pass
✅ no_latest_images pass
✅ health_declared pass
✅ route_owner_authmode_declared pass
✅ rollback_retention_acknowledged pass
✅ no_raw_secrets pass
➖ stateful_policy_declared not_applicable
➖ raw_manifests_guarded not_applicable
➖ npm_signatures_verified not_applicable

⚠️ Escape hatch in use: one or more scorecard checks are not_applicable.


Updated by deploy-preview action on push to this PR.

@ExtraToast
ExtraToast merged commit 317656b into main Aug 20, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something is broken or behaving incorrectly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant