Skip to content

Smoke test: verify manifest SHAs against live release artifacts #265

@aniketmaurya

Description

@aniketmaurya

Context

#263 and the layered-image follow-up exposed a class of bug we don't currently detect: an artifact at <release_tag>/<asset> can be re-uploaded with different bytes, leaving the hardcoded SHA in published.py out of sync with the live file. Users hit ImageError: SHA-256 mismatch at runtime, not in CI.

#280 removed the default --clobber from both upload workflows — re-runs against an existing tag now fail loud at the upload step unless the dispatcher explicitly passes force_overwrite=true. That eliminates the most common drift source (accidental rebake on push), but several remain:

  • Intentional force_overwrite=true workflow_dispatch runs (the rebake escape hatch — by design).
  • Manual asset edits via the GitHub Releases UI (delete + re-add).
  • Copy-paste errors when populating SHAs in published.py during a tag-bump PR — the SHAs in source and the bytes at the URL are written in two different places by two different actors and nothing currently compares them.
  • Future regressions to the friction logic itself.

A cheap, independent SHA-verification gate catches all of these.

What

A new workflow — smoke-manifest-shas.yml — that:

  1. Imports BASE_KERNELS and MANIFEST from smolvm.images.published.
  2. For each unique (url, sha256) pair, downloads the asset and verifies the SHA-256 matches.
  3. Fails loudly with a clear diff if any drift is detected.

Triggers:

  • On push to main when src/smolvm/images/published.py changes (catches stale SHAs from typos or copy-paste errors during bump PRs).
  • Nightly via schedule: cron (catches manual GitHub UI edits and intentional force-overwrites whose SHA wasn't resynced).
  • workflow_dispatch for ad-hoc verification.

Not to be confused with smoke-published-images.yml

That existing workflow boots QEMU with the kernel + each rootfs and waits for SSH — it's a boot smoke. This issue asks for a cheaper SHA-only smoke, no VM launched. The two are complementary: boot smoke catches "kernel doesn't boot the rootfs," SHA smoke catches "the bytes the manifest pins no longer exist at the URL."

Acceptance criteria

  • New workflow runs green when BASE_KERNELS and MANIFEST SHAs match live bytes.
  • Workflow fails with a clear diff when any URL's live SHA differs from the recorded one (e.g. expected ab12…, got cd34…).
  • Nightly schedule catches manual GitHub Releases edits within 24h.

Related

  • #263 — layered build infrastructure that surfaced the drift class.
  • #264 — Alpine flavor (independent).
  • #280 — removed default --clobber; reduced but did not eliminate drift surface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions