v3.2.2

p-e-w/hereticv3.2.2Jun 24, 2026by github-actions[bot]

AI Summary

A patch release focused on stabilizing coordination/primary surface resolution (split-brain remediation), hardening CI test coverage, and decomposing the monolithic agent/tasks.py module.

Key Highlights

  • Single, kind- and topology-aware artifact-surface authority to resolve split-brain file-location issues
  • CI test-coverage hardening with static gate checks and orphan ratchet flags
  • Decomposition of the 4633-LOC agent/tasks.py god-module into five cohesive seam modules
  • Test-flakiness handling policy with a non-blocking quarantine marker

Breaking Changes

  • orchestrator-api CONTRACT_VERSION bumped to 1.1.0
  • New additive fields in start-implementation response (lane_id, lane_branch, lane_base_ref)
  • Changed meaning of workspace_path in orchestrator-api (now the lane worktree)
  • New error code LANE_ALLOCATION_FAILED

New Features

  • Single artifact-surface authority for planning and status artifacts
  • CI test-coverage hardening with static gate checker
  • Decomposition of agent/tasks.py into cohesive modules
  • Test-flakiness policy implementation
  • Coordination-topology orchestration fixes for WPs and merge logic

Full Release Notes

Patch release continuing the post-3.2.0 stabilization, focused on the
**coordination/primary surface-resolution ("split-brain" / file-location)
remediation**. Remediation of these recent file-location issues is **ongoing**, but
progress is significant enough to warrant a new release — we will continue stabilizing
the functionality. This release also adopts a coherent test-flakiness policy, hardens
CI test coverage, and decomposes the `agent/tasks.py` god-module.

### ✨ Added

- **Single, kind- and topology-aware artifact-surface authority (split-brain remediation).**
  Mission planning artifacts and reads/writes now resolve through one canonical surface
  authority instead of drifting between the coordination worktree and the primary checkout:
  - `MissionTopology` SSOT + `routes_through_coordination` route every decision site through
    one classifier; a single read-surface resolver and a single **write-surface** authority
    replace the parallel derivations (#2070, single-authority topology cleanup).
  - Planning + identity artifacts are placed by a kind-aware `MissionArtifactKind` partition —
    planning/identity kinds land on the primary `target_branch` for all topologies; status/
    bookkeeping stays on coordination (#2090 write-surface coherence; ADR for kind- and
    topology-aware placement, #2101).
  - The planning-lifecycle **gate/verify commands** (`setup-plan`, `accept`, `map-requirements`,
    `record-analysis`, `research`, and the `finalize-tasks` commit) now read/commit planning
    artifacts via that seam — closing the case where a coord-topology mission authored on
    primary but verified from coordination (#2113; closes #2107, #2085, #2102). A default-deny
    architectural literal-ban ratchet prevents the class from regrowing.
- **CI test-coverage hardening.** A static gate-coverage checker + orphan ratchet flags tests
  selected by zero CI gates and ratchets the backlog down (#2067, folds #1933); hot
  churn-magnet orphans and `tests/runtime/` are now gated and run on every PR (#2108, #2109, #2111).
- **Maintainability:** the 4633-LOC `agent/tasks.py` god-module is decomposed into five cohesive,
  one-way-import seam modules with a byte-identical CLI surface; the three planning-commit tails
  are centralized through `commit_for_mission` (#2058 / #2114; follow-up body-thinning + FR-007
  consolidation tracked in #2116).
- **Test-flakiness handling policy (#2038):** a suite-wide policy (`docs/development/testing-flakiness.md`)
  — never retry-to-green; three tiers (budget / correctness / environmental), each with one sanctioned
  response — plus an env-gated, **non-blocking** `quarantine` pytest marker (held out of every normal/
  blocking run unless `SPEC_KITTY_RUN_QUARANTINE=1`), distinct from the mutmut-deselection `flaky` marker.

### 🐛 Fixed

- **Surface-resolution "split-brain" / file-location fixes (coordination vs primary).**
  - Mission-identity reads (mid8 / `mission_id`) are anchored on the **primary** surface, so a
    coord-topology mission no longer builds a malformed coordination branch from an empty mid8 (#2091).
  - `finalize-tasks` aligns on the primary planning surface and the ownership-overlap validator is
    **lane/dependency-aware** — dependency-ordered WPs that legitimately share `owned_files` are no
    longer falsely rejected (#2087, #2088).
  - The read path no longer returns a stale coordination "husk" for a flattened/single-branch mission:
    the stored topology gates the husk short-circuit (#2062); `map-requirements` and `finalize-tasks`
    share one WP-frontmatter read surface (#2064).
  - Write-branch resolvers (`get_feature_target_branch`, `resolve_target_branch`, the `finalize-tasks`
    commit) read `meta.json` on the **primary** surface, so commits no longer silently fall back to the
    repo default `main` under coordination topology.
- **Coord-topology orchestration: WPs reached `done` with nothing committed or integrated.** Three fixes,
  all on the external `orchestrator-api` path for coordination-topology missions:
  - `start-implementation` no longer crashed with `TypeError: transactional status batch only supports one
    feature/mission/wp` — the transactional batch guard now anchors the per-request consistency check on the
    first request's canonicalized dir (matching the non-transactional sibling) instead of the resolved primary
    anchor, which legitimately differs from the coord-worktree request surface.
  - `append-history` now commits the WP prompt file from the coordination worktree (via the canonical
    `resolve_placement_only` target) instead of the primary checkout, fixing a `SAFE_COMMIT_PATH_POLICY`
    refusal that stalled the orchestrate loop.
  - `start-implementation` now allocates the **real lane worktree** (lane branch on the coordination branch,
    with dependency-lane tips merged) instead of returning a bare legacy path, so `merge-mission` has a lane
    branch to integrate and dependent WPs see their dependencies' code. Its response now carries `lane_id`,
    `lane_branch`, and `lane_base_ref`, and `workspace_path` now means that lane worktree. The `for_review`
    transition is gated on a real commit existing beyond the lane base (shared with the native `move-task`
    gate), so "done without a commit" is impossible via the API too.
  - Both `spec-kitty merge` and `orchestrator-api merge-mission` now resolve the target branch from the
    **primary-checkout** meta.json (`merge_target_branch` then `target_branch`) via one shared resolver
    (`core.paths.resolve_merge_target_branch`), instead of the coord-aware read surface — which under
    coordination topology has no meta.json and made the resolver silently fall back to the repo default
    (`main`), merging the mission into the wrong branch (and tripping a downstream `SafeCommitHeadMismatch`).
    Explicit `--target` still wins; the repo default is only used when no mission target is set.
- **Non-deterministic xdist collection in `tests/specify_cli/shims/test_registry.py` (#2038):** the
  frozenset-derived parametrize sets are now `sorted()`, so workers collect an identical order
  (root-cause fix — no retry).

### ⚠️ Contract

- `orchestrator-api` `CONTRACT_VERSION` bumped to **1.1.0**: additive `start-implementation` response fields
  (`lane_id`, `lane_branch`, `lane_base_ref`) and a changed meaning for `workspace_path` (now the lane
  worktree). New error code `LANE_ALLOCATION_FAILED`.