3.0 KiB
3.0 KiB
JOURNAL — phase prevb (Builder reasoning; append-only)
2026-06-17 — Bootstrap + recon
Read SSOT (plan-phase-prevb), plan.md §6.1/§7/§9, Adversary's REVIEW-prevb (live, idle awaiting M1 claim).
Mapped the harness upgrade flow (runner/run_recipe_ci.py, harness/lifecycle.py,
harness/generic.py, harness/meta.py, harness/canonical.py):
- Base decision:
upgrade_base(stages, meta, recipe)→Noneif upgrade∉stages or EXPECTED_NA[upgrade], elsemeta.UPGRADE_BASE_VERSION or lifecycle.previous_version(recipe)(=recipe_versions[-2]).base = prev or target;prevalso gates whether the upgrade tier runs. - Deploy:
deploy_app(version=base)→ pinnedrecipe_checkout(version)+ (auto-chaos if overlay/lightweight tag);version=None→ chaos deploy of the current (head) checkout. - Overlay
compose.ccci.yml: copied into the checkout (provide_ccci_overlay), referenced byEXTRA_ENV.COMPOSE_FILE, persists untracked across the head re-checkout → applies to ALL deploys. - Upgrade op (
generic.perform_upgrade):recipe_checkout_ref(head_ref)then chaos redeploy; the ccci overlay persists → leaks version-specific pins onto the head. That is the bug. - Last-green source:
canonical.read_registry(recipe)→{version, commit, status}(promoted only on GREEN LATEST cold runs forWARM_CANONICALrecipes). No separate "last-green" file.
Ground-truth discourse facts (gitea API, verified — see STATUS for the table). Key correction vs
plan §3 prose: main is bitnamilegacy/discourse:3.5.0 (not 3.3.1 — main advanced). Thesis holds: base
(last-green/main = bitnamilegacy 3.5.0, deployable) → head (PR #4 = official discourse/discourse:3.5.3,
sidekiq dropped). So discourse needs NO previous/; the env overlay shrinks to order: stop-first.
Design decisions (WHY):
- Resolution order last-green → main-tip → skip. main-tip = the recipe's
mainbranch HEAD = the true predecessor the PR merges onto (more faithful than the oldvers[-2], which could span 2 version jumps). This intentionally changes EVERY recipe's default base fromvers[-2]to main-tip — plan-mandated, not a regression; M2 spot-check validates representative recipes still go green. - Keep
UPGRADE_BASE_VERSIONas an optional explicit override (still wins when set), but remove it from discourse and make the DEFAULT dynamic. Rationale: fully deleting the meta field would breakplausible(its meta sets it) and the documented "PR adds a version above newest tag" escape hatch, without a deploy test — risk vs guardrail "don't regress other recipes". The plan's "UPGRADE_BASE_VERSION removed" is in the discourse-migration context; the normal/discourse path is now hardcode-free. Recorded in DECISIONS. previous/scoped to last-green (published-version) base only — version-guarded by a declared target; on a main-tip base or version mismatch it is skipped + flagged stale. Discourse ships none (base deploys clean).