Skip to content

Fix readable-alias backfill workflow command rendering - #534

Merged
athNdev merged 1 commit into
mainfrom
codex/docker-alias-workflow-fix
Nov 18, 2026
Merged

athNdev merged 1 commit into
mainfrom
codex/docker-alias-workflow-fix

Conversation

@athNdev

@athNdev athNdev commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Fixes the failed backfill workflow (run 44272525192)

Two source-visible bugs in .github/workflows/docker-readable-aliases.yml:

  1. Validate command was a YAML plain scalar with a trailing \; YAML folded
    the newline into a literal escaped space, so argparse never received
    --input. It is now a single-line command:
    python3 scripts/docker_readable_aliases.py validate --input docs/docker-readable-aliases.json.
  2. ALIAS_ARG: ${{ ... && '' || '--dry-run' }} always yielded --dry-run
    because GitHub treats '' as falsy. Replaced with an explicit shell branch on
    PUBLISH_ALIASES so a confirmed run applies with no --dry-run.

Executed-command evidence

Actual rendered validate command executed from the repo root:

python3 scripts/docker_readable_aliases.py validate --input docs/docker-readable-aliases.json
{"valid": true, "aliases": 19}

Commands extracted by the new contract test (shlex-tokenized per gate outcome):

Gate validate apply
true validate --input docs/docker-readable-aliases.json apply --mapping docs/docker-readable-aliases.json
false validate --input docs/docker-readable-aliases.json apply --mapping docs/docker-readable-aliases.json --dry-run

The contract test also asserts no run: step in the file ends in a plain-scalar
backslash and that the && '' || idiom is gone.

Safety gates unchanged

Dispatch-only, confirm default false, trusted-main pinned SHA with HEAD
assertion, exact main CI verification, gate, strict observation, idempotence,
conflict/unknown zero-write refusal, imagetools create only (no rebuild,
platform change or channel move), original sha refs and channels untouched.

New fixture test_apply_verifies_each_target_digest_and_preserves_sha_and_channel_refs
observes every alias after apply, asserts its digest and both platforms, and
checks original sha/channel refs are unchanged; conflict still refuses with zero
writes.

Verification

  • python3 -B -m unittest scripts.test_docker_readable_aliases scripts.test_release -q — 80 tests OK
  • All 16 workflow YAML files parse; workflow contract test passes
  • knowledge-lint -fix then final: OK, 38/38 queries

No registry write or workflow dispatch occurred. Do not merge until independent
review and release-free CI are green; backfill remains a separate authorized step.

Use a single-line validate command so YAML cannot fold a trailing backslash into
an escaped space, and replace the falsy-empty-string ALIAS_ARG idiom with an
explicit shell branch so confirmed runs apply without --dry-run. Add contract
tests that parse each step, shlex-tokenize the selected command for both gate
outcomes, execute validate, and verify alias digests after apply.
@athNdev
athNdev merged commit e9b6051 into main Nov 18, 2026
13 checks passed
@athNdev
athNdev deleted the codex/docker-alias-workflow-fix branch November 18, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant