Skip to content

ship-queue train land: bind slots and merged entries to GitHub state; validate t.head and the resume journal #3603

Open

Description

@capy-ai

Follow-ups from the final review pair on #3595 (GSTA-154 PR B) at d414d9d. Under GStack Minder's ruling these are outside the verified-chain logic, so they are listed in B's READY rather than fixed in B. Each one needs a forged or corrupted train record (local, or rebuilt from refs/notes/gstack-trains), a stale journal, or an operator mistake.

  1. Slot ↔ PR binding (fix-check, CRITICAL). The slot index comes from the record's t.slots[].pr. If the PR numbers in the record are swapped and main already equals S1, train land --pr 2 confirms the open PR refactor: reorganize codebase into modular structure #2 as merged. Fix: before confirmMerged, require GitHub to report the PR as MERGED, or its head as the verified pin or the stamp commit.
  2. t.merged trusted (fix-check, CRITICAL). confirmMerged (lib/ship-queue-train-verify.ts:236) counts record entries, so a forged entry marks the train merged and can clear a repair train's freeze. stopped() also reads it, so a forged entry turns a pre-landing mismatch into a freeze. Fix: count only entries that GitHub reports as MERGED.
  3. t.head not validated (adversarial). Require isSha(t.head) && chain[k].commit === t.head before checkRun, which passes it raw into a gh API path.
  4. Journal resume (both reviewers). Before gh pr merge, check j.stamp_commit^{tree} === s.tree, or recompute the deterministic stamp commit.
  5. Intermediate S_i not re-checked at land (adversarial, investigate). The up-front check proves structure only. stampMismatch against T_i is not re-run, and t.prefixes[1..k] are not checked.
  6. required_checks matching (adversarial, investigate). Names match any app or status context and any <name> ( job. When a CHANGELOG conflict means no pull_request CI runs, a PR-added workflow job with a required name could satisfy it. Path-filtered workflows never run and need a manual dispatch.

Tests: one forged-record case per item (swapped slot PRs, a forged merged entry, head as a ref name, a stale journal).

Activity

  1. added
    S3
    on Oct 31, 2026
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

    S3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions