Files
automaton/tasks/complete/parametrize-base-branch/IMPLEMENTATION.md
T

1.3 KiB

Implementation: parametrize-base-branch

SCOPE

Replace hardcoded "main" in _gate_worktree_drift with blast_radius.base_branch config field. Source: add-status-brakes/BUG_REPORT.md O3.

FILES TOUCHED

  • scripts/status.py
    • Added _base_branch(cfg) -> str: reads cfg.get("blast_radius", {}).get("base_branch") → "main".
      • None (missing key) → "main" (silent).
      • Empty string → "main" with stderr WARNING.
      • Non-string type (int, bool, etc.) → str(value) with WARNING.
    • _gate_worktree_drift: replaced "main...HEAD" with f"{base}...HEAD" where base = _base_branch(cfg).
  • templates/loops/self-improvement/loop.json: added "base_branch": "main" to blast_radius.

BUGS FOUND

None. The bad-revision path and empty-file_scope checks are unchanged from v1.

DECISIONS LOCKED

  • D-B1: one base branch per loop (not a list).
  • D-B2: default "main".
  • D-B3: bad-revision → WARNING skip (not halt), preserved from v1.
  • D-B4: empty string → "main" with WARNING (not silent).
  • D-B5: no backfill on v1 loops (helper default covers them).
  • D-B6: tests mock subprocess.run.
  • D-B7: template is the public-facing default.

TESTS

New file tests/test_base_branch.py — 13 tests across 2 classes.

Test count: 495 passed (482 + 13).