Skip to content

refactor(platform): call the shared deploy-check instead of a vendored copy - #33

Merged
ExtraToast merged 2 commits into
mainfrom
refactor/shared-deploy-check
Aug 20, 2026
Merged

ExtraToast merged 2 commits into
mainfrom
refactor/shared-deploy-check

Conversation

@ExtraToast

Copy link
Copy Markdown
Contributor

platform/render-local.sh was a ~400-line copy of logic that also lived in actions/deploy-preview/run.sh, vendored into all seven service repositories. It is replaced by a wrapper around @jorisjonkers-dev/deploy-check (JorisJonkers-dev/github-workflows#94), which the deploy-preview action runs too — so a local result and a CI result cannot disagree.

Why the copy had to go

The copies drifted. The CI version parsed deployment.yml with yq and read the artifact contract; this one re-derived the same answers by grepping raw text. And this one could not run at all:

  • --output was passed the per-environment directory, but the toolkit opens it as a file → EISDIR on all five fragments
  • artifact leak-scan and artifact validate-raw-manifests are not published subcommands → E_USAGE
  • artifact emit-contract was called with --schema-version (not a flag) and without the required --deployment and --context
  • kubeconform and kustomize build were pointed at fragment documents, which both tools reject by design

Pinned values now have one home

The script no longer restates the schema version or the context digest. It reads them from this repository's own workflows, so the local check and CI are pinned by construction. That closes the drift that had already happened: the hardcoded schema version was four minor releases behind, and the context digest two republications behind, what CI used.

Prerequisites

node, plus either oras or --context-dir pointing at an already-pulled context package. The toolkit install reads npm.pkg.github.com, which needs a token even for public packages, so export GITHUB_TOKEN="$(gh auth token)" first — the wrapper picks it up, falling back to gh auth token when available.

Verification

Run in all seven repos against the current public context, via npx from the published 0.15.0 package: five fragments render, the apply bundle builds, and the contract is emitted. Six pass; knowledge exits 1 on its one real gap, now reported as no health.path on knowledge-ingest-worker rather than a bare fail.

…d copy

platform/render-local.sh was a ~400-line copy of logic that also lived in
actions/deploy-preview/run.sh, duplicated into every service repository. The
copies drifted, and this one could not run at all: it passed a directory where
--output names a file, and called artifact leak-scan and artifact
validate-raw-manifests, neither of which the toolkit publishes.

The logic now lives in @jorisjonkers-dev/deploy-check, which the deploy-preview
action runs as well, so a local result and a CI result cannot disagree. What is
left here is a wrapper that pulls the cluster context and invokes the pinned
checker.

The schema version and context ref are read out of this repository's own
workflows rather than restated in the script. The previous copy hardcoded both
and both went stale: the schema version by four minor releases, the context
digest by two republications. There is now one place to change either.
@ExtraToast ExtraToast added the type: refactor Code structure change without intended behavior change. label Aug 20, 2026
@ExtraToast ExtraToast self-assigned this Aug 20, 2026
@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown

Deploy Preview — agent-runtime

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

Image refs

  • agent-gateway: ghcr.io/jorisjonkers-dev/agent-runtime/agent-gateway@sha256:0000000000000000000000000000000000000000000000000000000000000000
  • agents-login: ghcr.io/jorisjonkers-dev/agent-runtime/agents-login@sha256:0000000000000000000000000000000000000000000000000000000000000000

SC-11 Readiness Scorecard

Check Status Detail
schema_pinned pass
context_pinned pass
no_latest_images pass
health_declared pass
route_owner_authmode_declared not_applicable deployment declares no routes
rollback_retention_acknowledged pass
no_raw_secrets pass
stateful_policy_declared not_applicable deployment declares no stateful workloads
raw_manifests_guarded not_applicable no workload enables rawManifests
npm_signatures_verified not_applicable provenance is only verified when publishing an artifact

pass = ready · fail = blocks deployment · not_applicable = check does not apply

➖ 4 check(s) not applicable: route_owner_authmode_declared, stateful_policy_declared, raw_manifests_guarded, npm_signatures_verified


Updated by deploy-check on push to this PR.

The wrapper hardcoded deploy-check 0.15.0, which is the same mistake the
400-line copy made with its schema version and context digest -- and 0.15.0
turned out to carry a context-resolution bug fixed in 0.15.1.

deploy-check is released from the same repository as the reusable workflows,
so the version comment on the deploy-validate (or deploy-artifact) pin is the
version to run. The wrapper reads it from there, leaving nothing about the
checker restated in this repository.

The github-workflows pins move to v0.15.1 accordingly. Both reusable
workflow interfaces are unchanged across the versions involved -- same
inputs, same required flags -- so no caller change is needed.
@ExtraToast
ExtraToast merged commit c0c4b31 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: refactor Code structure change without intended behavior change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant