[ka:cli-build-out] ka-promote: implement resolver + cumulative + manifest.lock (closes #22) #23

Merged
marfrit merged 2 commits from claude-noether/kernel-agent:noether/ka-promote into main 2026-05-18 08:57:15 +00:00

2 Commits

Author SHA1 Message Date
claude-noether 3c6d3567f0 README: reflect ka-promote implementation + ka-import rename (Phase 8 of #22)
CLI verb table updates:
- ka-promote: new signature `<host>` (read fleet/<host>.yaml → cumulative.patch +
  manifest.lock). Marked [bin/ka-promote — implemented Phase 6, issue #22].
- ka-import: new verb name carrying the original ka-promote semantic
  (`<campaign> <patch-or-glob> --to <scope>`, promote patches into the
  scope-tagged tree). Unimplemented; today this is the regular git+PR workflow.
- ka-build / ka-install: signatures elaborated, marked as the next two verbs
  to implement (issues TBD).

Bootstrap reference build section:
- Header reframed: "before ka-* verbs existed" → ka-promote replaces step #1
  as of 2026-05-18.
- Baseline corrected: torvalds/linux not mmind/linux-rockchip (mmind doesn't
  ship plain v7.0 tag — caught in ka-promote Phase 3, fleet/fresnel.yaml fixed
  in the implementation commit).
- "Manual substitute" table gets a Status column. Row for ka-promote split
  into the old "import" semantic vs the new "manifest resolve" semantic, with
  the latter marked **automated 2026-05-18**.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 08:54:22 +00:00
claude-noether 91fe815c4c bin/ka-promote: implement resolver + cumulative + manifest.lock (Phase 6 of #22)
First of the three [ka:cli-build-out] verbs (umbrella #21). Reads
fleet/<host>.yaml, resolves includes[] (single-file + series-dir),
concatenates in apply order, emits build/<host>/<ref>/{cumulative.patch,
manifest.lock}. Phase-3 ground truth on fresnel parity: b2sum
4d9d93c655ea701b… matches bit-for-bit.

Five tests in tests/ka-promote/ (fresnel parity, series-dir resolver,
bad-include, missing-patch, dup-include) all pass.

Validator (--validate-against <linux-checkout>) hard-fails on: missing
.git, baseline.ref not in checkout, HEAD-tree != baseline.ref tree,
or uncommitted/untracked changes. Verified on boltzmann against the
torvalds v7.0 worktree (all 3 negative paths exit 3 with clear errors).

Side fix: fleet/fresnel.yaml baseline.tree mmind/linux-rockchip → torvalds/linux.
mmind doesn't ship a plain v7.0 tag; baseline was actually torvalds the
whole time. mmind kept as informational patch_authoring_context.

Phase-5 reviewer (sonnet outside-look, #22 comment 1135) followups
addressed: series-dir fixture count 7 (not 6), divergence = hard error,
raw-bytes manifest hash, duplicate-include pre-flight check, explicit
yaml.dump(sort_keys=True).

Language choice (vs ka-status's bash): pure python3 — YAML round-trip,
dict construction, and per-file hashing made bash+heredoc python quoting
hell with no readability gain.

Phase 7 (verify on ampere parity) + Phase 8 (close + README rewrite +
PR) to follow.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-18 08:52:42 +00:00