Consumer upgrade story: tags, a migrations file, and onboard.sh upgrade that renders + diffs everything a pin bump touches #209

Closed
opened 2026-10-15 02:59:26 +00:00 by ben · 3 comments
Owner

Filed from the 2026-10-14 infrastructure review (Claude Code session on Ben's workstation; four parallel read-only review passes over the root harness). Line anchors are against main at 3e50274.

Symptom

git tag is empty; no CHANGELOG; FACTORY_REF is a raw SHA (README.md:39). The only release notes are STATUS.md paragraphs and close reports — which GOTCHAS 17/18 explicitly lean on. The self-copy is 120 commits behind HEAD (#131/#132). Six consumers at six pins means six manual reading jobs per bump. The compat mechanism covers only the vendored layer (IDENTITY_CONTRACT advisory check-harness-drift.sh:149-155, closed policy keys, render refusal on a missing slot). What nothing checks: workflows (check-harness-drift.sh:199 admits they are uncomparable; GOTCHAS 43, 62, 64 each needed a hand re-render across every consumer), the Dockerfile harness layer, host cron (reaches hosts only at host-cron install), slot widening (GOTCHAS 18, quiet).

Proposed change

  • Tag main at each consumer-worthy point (v2026.10.14); FACTORY_REF may name a tag (resolved to a SHA and both recorded).
  • onboarding/MIGRATIONS: one line per pin-crossing event (<sha> rerender-workflows, <sha> extend-slot <name>, <sha> bump-dockerfile), appended in the same commit as the change (CLAUDE.md rule). onboard_vendor prints the entries in the old→new range.
  • onboard.sh upgrade <sandcastle-dir> <ref> = vendor + render-prompts + dry-run workflows render diffed against .forgejo/workflows/ (ignoring the label params) + Dockerfile harness-layer diff + identity contract + policy key check, ending in a printed checklist. Closes the GOTCHAS 10 render-vs-template gap for consumers (today only the factory's own self-workflows-drift-test.sh has it).
  • onboarding/tests/onboard-lib-test.sh: upgrade on a fixture consumer two pins back prints exactly the expected checklist.
_Filed from the 2026-10-14 infrastructure review (Claude Code session on Ben's workstation; four parallel read-only review passes over the root harness). Line anchors are against `main` at 3e50274._ ## Symptom `git tag` is empty; no CHANGELOG; `FACTORY_REF` is a raw SHA (README.md:39). The only release notes are STATUS.md paragraphs and close reports — which GOTCHAS 17/18 explicitly lean on. The self-copy is 120 commits behind HEAD (#131/#132). Six consumers at six pins means six manual reading jobs per bump. The compat mechanism covers only the vendored layer (`IDENTITY_CONTRACT` advisory `check-harness-drift.sh:149-155`, closed policy keys, render refusal on a missing slot). What nothing checks: workflows (`check-harness-drift.sh:199` admits they are uncomparable; GOTCHAS 43, 62, 64 each needed a hand re-render across every consumer), the Dockerfile harness layer, host cron (reaches hosts only at `host-cron install`), slot widening (GOTCHAS 18, quiet). ## Proposed change - Tag `main` at each consumer-worthy point (`v2026.10.14`); `FACTORY_REF` may name a tag (resolved to a SHA and both recorded). - `onboarding/MIGRATIONS`: one line per pin-crossing event (`<sha> rerender-workflows`, `<sha> extend-slot <name>`, `<sha> bump-dockerfile`), appended in the same commit as the change (CLAUDE.md rule). `onboard_vendor` prints the entries in the old→new range. - `onboard.sh upgrade <sandcastle-dir> <ref>` = vendor + render-prompts + dry-run `workflows` render diffed against `.forgejo/workflows/` (ignoring the label params) + Dockerfile harness-layer diff + identity contract + policy key check, ending in a printed checklist. Closes the GOTCHAS 10 render-vs-template gap for consumers (today only the factory's own `self-workflows-drift-test.sh` has it). - `onboarding/tests/onboard-lib-test.sh`: upgrade on a fixture consumer two pins back prints exactly the expected checklist.

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime.

  • Ruling: ready-for-agent.
  • Why this is a two-way door: tags, a MIGRATIONS ledger, and a new onboard.sh upgrade subcommand are additive tooling/docs — revertible by a commit (tags by git tag -d) — with no secret, spend, or posture surface; the pull-only topology and byte-identical vendored-layer contract are untouched.
  • What proves it: onboard.sh upgrade on a fixture consumer two pins back prints exactly the expected checklist, asserted offline in onboarding/tests/onboard-lib-test.sh.

Agent Brief

Category: enhancement

Summary: Give consumers a real upgrade story: taggable pins, a per-event migrations ledger, and one onboard.sh upgrade command that re-renders and diffs everything a pin bump actually touches — not just the byte-comparable vendored layer.

Current behavior: Pins are raw SHAs; there are no tags or changelog, only STATUS.md paragraphs and close reports. The drift check covers only the vendored layer; workflows, the Dockerfile harness layer, host cron, and slot widening are admitted as uncomparable, so each has needed a hand re-render across every consumer. Multiple consumers at multiple pins means a manual reading job per bump.

Desired behavior: (1) Tag main at each consumer-worthy point (e.g. v2026.10.14); FACTORY_REF may name a tag, resolved to a SHA with both recorded. (2) An onboarding/MIGRATIONS ledger, one line per pin-crossing event (<sha> rerender-workflows, <sha> extend-slot <name>, <sha> bump-dockerfile), appended in the same commit as the change; onboard_vendor prints the entries in the old→new range. (3) onboard.sh upgrade <sandcastle-dir> <ref> = vendor + render-prompts + a dry-run workflows render diffed against .forgejo/workflows/ (ignoring label params) + a Dockerfile harness-layer diff + the identity-contract and policy-key checks, ending in a printed checklist.

Key interfaces: FACTORY_REF resolution accepting either a tag or a SHA and recording both (the drift comparison still keys on the resolved SHA, unchanged); a MIGRATIONS line grammar <sha> <verb> [arg]; an upgrade subcommand that composes the existing render/vendor/contract/policy steps and emits a deterministic checklist. No change to the pull-only topology or the byte-identical vendored-layer contract.

Acceptance criteria:

  • A tag can be named as FACTORY_REF; drift resolves it to its SHA and both are recorded.
  • onboarding/MIGRATIONS exists; onboard_vendor prints exactly the entries in the crossed range.
  • onboard.sh upgrade on a fixture consumer two pins back prints exactly the expected checklist (workflow render diff, Dockerfile harness-layer diff, identity contract, policy keys), verified in onboarding/tests/onboard-lib-test.sh.
  • Full offline suite green.

Out of scope: Auto-applying any migration (upgrade reports; a human/agent still lands the re-render per consumer); pushing into any product repo (pull-only, ADR 0001); changing the vendored-layer drift semantics.

> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** - **Ruling:** `ready-for-agent`. - **Why this is a two-way door:** tags, a MIGRATIONS ledger, and a new `onboard.sh upgrade` subcommand are additive tooling/docs — revertible by a commit (tags by `git tag -d`) — with no secret, spend, or posture surface; the pull-only topology and byte-identical vendored-layer contract are untouched. - **What proves it:** `onboard.sh upgrade` on a fixture consumer two pins back prints exactly the expected checklist, asserted offline in `onboarding/tests/onboard-lib-test.sh`. ## Agent Brief **Category:** enhancement **Summary:** Give consumers a real upgrade story: taggable pins, a per-event migrations ledger, and one `onboard.sh upgrade` command that re-renders and diffs everything a pin bump actually touches — not just the byte-comparable vendored layer. **Current behavior:** Pins are raw SHAs; there are no tags or changelog, only STATUS.md paragraphs and close reports. The drift check covers only the vendored layer; workflows, the Dockerfile harness layer, host cron, and slot widening are admitted as uncomparable, so each has needed a hand re-render across every consumer. Multiple consumers at multiple pins means a manual reading job per bump. **Desired behavior:** (1) Tag `main` at each consumer-worthy point (e.g. `v2026.10.14`); `FACTORY_REF` may name a tag, resolved to a SHA with both recorded. (2) An `onboarding/MIGRATIONS` ledger, one line per pin-crossing event (`<sha> rerender-workflows`, `<sha> extend-slot <name>`, `<sha> bump-dockerfile`), appended in the same commit as the change; `onboard_vendor` prints the entries in the old→new range. (3) `onboard.sh upgrade <sandcastle-dir> <ref>` = vendor + render-prompts + a dry-run `workflows` render diffed against `.forgejo/workflows/` (ignoring label params) + a Dockerfile harness-layer diff + the identity-contract and policy-key checks, ending in a printed checklist. **Key interfaces:** `FACTORY_REF` resolution accepting either a tag or a SHA and recording both (the drift comparison still keys on the resolved SHA, unchanged); a MIGRATIONS line grammar `<sha> <verb> [arg]`; an `upgrade` subcommand that composes the existing render/vendor/contract/policy steps and emits a deterministic checklist. No change to the pull-only topology or the byte-identical vendored-layer contract. **Acceptance criteria:** - [ ] A tag can be named as `FACTORY_REF`; drift resolves it to its SHA and both are recorded. - [ ] `onboarding/MIGRATIONS` exists; `onboard_vendor` prints exactly the entries in the crossed range. - [ ] `onboard.sh upgrade` on a fixture consumer two pins back prints exactly the expected checklist (workflow render diff, Dockerfile harness-layer diff, identity contract, policy keys), verified in `onboarding/tests/onboard-lib-test.sh`. - [ ] Full offline suite green. **Out of scope:** Auto-applying any migration (upgrade reports; a human/agent still lands the re-render per consumer); pushing into any product repo (pull-only, ADR 0001); changing the vendored-layer drift semantics.

swarm-claim host=bens-mac-04 run=21817
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=21817 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #209 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 209,
  "status": "success",
  "commits": [
    "061326fa02d9de368861aace31bfaa829ce64f6d"
  ],
  "changed_files": [
    "README.md",
    "STATUS.md",
    "check-harness-drift.sh",
    "onboarding/MIGRATIONS",
    "onboarding/onboard-lib.sh",
    "onboarding/onboard.sh",
    "onboarding/tests/onboard-lib-test.sh",
    "onboarding/vendor-exclude",
    "tests/check-harness-drift-test.sh"
  ],
  "tests": [
    {
      "command": "bash onboarding/tests/onboard-lib-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/check-harness-drift-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash onboarding/tests/vendor-manifest-coverage-test.sh",
      "exit_code": 0
    },
    {
      "command": "for t in tests/*.sh onboarding/tests/*.sh; do case \"$t\" in *fakebin*|*fixtures*) continue;; esac; bash \"$t\" || echo FAIL: $t; done",
      "exit_code": 0
    }
  ],
  "criteria": {
    "A tag can be named as FACTORY_REF; drift resolves it to its SHA and both are recorded": "onboard_vendor records both (sha line + tag= line) when the pin is named by a tag (onboard-lib.sh, onboard_is_sha/FACTORY_REF write); check-harness-drift.sh parses either form, keys the byte-comparison on the sha unchanged, and surfaces 'FACTORY_REF pin is tag <tag> (resolved <sha>)'. Proven: onboard-lib-test.sh 'vendor by tag' + ref_sha/ref_tag cases; check-harness-drift-test.sh T11 (tag-only file) and T12 (two-line sha+tag form).",
    "onboarding/MIGRATIONS exists; onboard_vendor prints exactly the entries in the crossed range": "Added onboarding/MIGRATIONS (append-only <sha> <verb> [arg] ledger, classified in vendor-exclude). onboard_migrations_in_range computes 'in new ledger but not old' (shallow-safe), printed by onboard_vendor only on a real bump. Proven: onboard-lib-test.sh migrations_in_range unit cases + 'vendor migrations' end-to-end (seed two pins back, prints exactly the two crossed entries, header comment excluded, same-pin rerun crosses none).",
    "onboard.sh upgrade on a fixture consumer two pins back prints exactly the expected checklist (workflow render diff, Dockerfile harness-layer diff, identity contract, policy keys), verified in onboarding/tests/onboard-lib-test.sh": "onboard_upgrade = vendor + render-prompts + dry-run diff of the four blind surfaces, ending in a one-line-per-surface OK/REVIEW checklist (onboard-lib.sh; onboard.sh 'upgrade' subcommand). Proven: onboard-lib-test.sh upgrades a consumer seeded two pins back and asserts all four checklist lines exactly (workflows REVIEW naming the drifted render while the label-substituted swarm.yml is not flagged; dockerfile/identity/policy OK), plus the REVIEW-needed and all-clean summaries, and no stray RETURN trap.",
    "Full offline suite green": "for t in tests/*.sh onboarding/tests/*.sh (excluding fakebin/fixtures) — 90 files, 0 failed."
  },
  "summary": "Added tag-named pins (recorded with the resolved sha), an onboarding/MIGRATIONS ledger onboard_vendor prints across a bump, and onboard.sh upgrade that re-renders and diffs the four surfaces the vendored-layer drift check cannot see.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #209 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 209, "status": "success", "commits": [ "061326fa02d9de368861aace31bfaa829ce64f6d" ], "changed_files": [ "README.md", "STATUS.md", "check-harness-drift.sh", "onboarding/MIGRATIONS", "onboarding/onboard-lib.sh", "onboarding/onboard.sh", "onboarding/tests/onboard-lib-test.sh", "onboarding/vendor-exclude", "tests/check-harness-drift-test.sh" ], "tests": [ { "command": "bash onboarding/tests/onboard-lib-test.sh", "exit_code": 0 }, { "command": "bash tests/check-harness-drift-test.sh", "exit_code": 0 }, { "command": "bash onboarding/tests/vendor-manifest-coverage-test.sh", "exit_code": 0 }, { "command": "for t in tests/*.sh onboarding/tests/*.sh; do case \"$t\" in *fakebin*|*fixtures*) continue;; esac; bash \"$t\" || echo FAIL: $t; done", "exit_code": 0 } ], "criteria": { "A tag can be named as FACTORY_REF; drift resolves it to its SHA and both are recorded": "onboard_vendor records both (sha line + tag= line) when the pin is named by a tag (onboard-lib.sh, onboard_is_sha/FACTORY_REF write); check-harness-drift.sh parses either form, keys the byte-comparison on the sha unchanged, and surfaces 'FACTORY_REF pin is tag <tag> (resolved <sha>)'. Proven: onboard-lib-test.sh 'vendor by tag' + ref_sha/ref_tag cases; check-harness-drift-test.sh T11 (tag-only file) and T12 (two-line sha+tag form).", "onboarding/MIGRATIONS exists; onboard_vendor prints exactly the entries in the crossed range": "Added onboarding/MIGRATIONS (append-only <sha> <verb> [arg] ledger, classified in vendor-exclude). onboard_migrations_in_range computes 'in new ledger but not old' (shallow-safe), printed by onboard_vendor only on a real bump. Proven: onboard-lib-test.sh migrations_in_range unit cases + 'vendor migrations' end-to-end (seed two pins back, prints exactly the two crossed entries, header comment excluded, same-pin rerun crosses none).", "onboard.sh upgrade on a fixture consumer two pins back prints exactly the expected checklist (workflow render diff, Dockerfile harness-layer diff, identity contract, policy keys), verified in onboarding/tests/onboard-lib-test.sh": "onboard_upgrade = vendor + render-prompts + dry-run diff of the four blind surfaces, ending in a one-line-per-surface OK/REVIEW checklist (onboard-lib.sh; onboard.sh 'upgrade' subcommand). Proven: onboard-lib-test.sh upgrades a consumer seeded two pins back and asserts all four checklist lines exactly (workflows REVIEW naming the drifted render while the label-substituted swarm.yml is not flagged; dockerfile/identity/policy OK), plus the REVIEW-needed and all-clean summaries, and no stray RETURN trap.", "Full offline suite green": "for t in tests/*.sh onboarding/tests/*.sh (excluding fakebin/fixtures) — 90 files, 0 failed." }, "summary": "Added tag-named pins (recorded with the resolved sha), an onboarding/MIGRATIONS ledger onboard_vendor prints across a bump, and onboard.sh upgrade that re-renders and diffs the four surfaces the vendored-layer drift check cannot see.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/dev-factory#209
No description provided.