Skip to content

data.nemar.org: detect git:-keyed manifest entries whose backing tag/file is missing on GitHub #503

Closed

Description

@neuromechanist

Follow-up surfaced during the Phase 1 PR review (#502) for epic #449.

Background

The Worker route at `data.nemar.org///...` resolves manifest entries to two backends:

The `git:` branch implicitly assumes:

  1. The dataset's GitHub repo is public when D1 `visibility = 'public'`.
  2. The version tag exists on that repo and points at a commit that contains the file at ``.

Today both hold because the publish-approve flow flips the repo public before writing the D1 `dataset_versions` row, and rows are only written after a successful tag push. The Worker has no signal when either invariant breaks. The 302 fires; the end user sees a GitHub 404; the team finds out from a support ticket.

Failure modes (low-frequency but real)

  • Recovery scripts that insert a `dataset_versions` row without minting the corresponding tag.
  • Force-pushed/retagged versions where the manifested blob no longer exists at that ref.
  • A publication-workflow bug that writes the D1 row before the GitHub repo is flipped public.

Options (pick one for Phase 3, or punt)

  1. Manifest-writer canary: in the dataset-repo publication CI, after generating the manifest, `HEAD` every `git:`-keyed URL once. Refuse to write the manifest if any return non-200. Moves the failure to the publisher, not the consumer.
  2. Worker HEAD precheck on manifest.json: probe one canary file (e.g. `dataset_description.json`) on each request to `/manifest.json`. Return 503 with a clear message if it 404s. Adds latency.
  3. Phase 3 proper: mirror small in-tree files to S3 at publish time. Drops the `git:` key class entirely; no GitHub dependency on the read path.

Option 3 is the clean answer but requires a one-time backfill and a publication-flow change. Options 1 and 2 are cheaper but leave the architectural dependency in place.

Acceptance criteria

  • Documented, tested behavior for the "git: blob refers to a non-existent ref" case (not a silent 302->404).
  • No change to the public `/manifest.json` contract for healthy datasets.
  • Operator-visible signal (log line, audit row, or dashboard counter) when this happens in production.

Part of epic #449.

Activity

  1. added
    feature
    on May 14, 2026
  2. neuromechanist commented on May 16, 2026

    @neuromechanist
    ContributorAuthor

    Shipped via PR #519 (epic→dev). Code is on dev and will flow to main in the next dev→main cycle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions