Skip to content

v0.3.0 — Stack-Native Execution, Auto-Derived Scope & Batch Context

Choose a tag to compare

@xenups xenups released this 16 Oct 01:25

Highlights & Core Changes

1. Stack Lineage Verification (asha_verify_stack)

  • New 7th registered MCP tool: asha_verify_stack — ordered multi-branch (stack) verification, in place with zero competing worktrees.
  • Per branch: head_sha / parent_sha / merge_base, linear-ancestry check (merge_base == parent_sha), and re-verification of each head's sealed verify-tip evidence (evidence_sha256).
  • A drifted link returns the exact deterministic recovery recipe: git rebase --onto <parent_sha> <merge_base> <branch>.
  • stack_healthy is true only when EVERY branch is linear AND sealed. Report codes: STACK_ANCESTRY_DRIFT, STACK_EVIDENCE_MISSING, STACK_EVIDENCE_TAMPERED. Refusals: STACK_EMPTY, BRANCH_NOT_FOUND, BASE_REF_NOT_FOUND.

2. Git-Diff Auto-Scope ("@diff")

  • declared_scope, reads, and writes in asha_dispatch_task (and declared_scope in asha_verify_tip) accept ["@diff"] or ["@diff:<base_ref>"].
  • Deterministic expansion via git diff --name-only <base_ref>...HEAD; reads grow automatically by the AST dependency closure of the changed files.
  • Protected governance paths (.github/, .jspace/) never enter implicitly; an empty or unresolvable diff fails closed as SCOPE_AUTO_EMPTY with nothing executed.

3. Batch Surgical Context

  • asha_get_surgical_context accepts targets: [{target_file, target_symbol}, ...]: the repository AST index and code graph are built ONCE per call and sliced for every requested symbol in a single pass.
  • Single (target_file, target_symbol) calls remain byte-identical (100% backward compatible); mixing both forms fails closed as ambiguous.

4. Atomic In-Place Dispatch (execution_mode="in_place_atomic")

  • New optional execution_mode on asha_dispatch_task: "worktree" (default, existing behavior untouched) or "in_place_atomic".
  • In-place mode runs cmd on the CURRENT branch tip during rebase loops: dirty/conflicted trees are refused immediately (TIP_DIRTY, TIP_CONFLICTED), observed changes must stay strictly inside declared_scope, and ANY failure (non-zero exit, timeout, scope violation) triggers git reset --hard <pre_head> + git clean -fd — exact pre-execution state restored, zero unsealed residue.
  • Success seals digest-bound evidence (evidence_sha256) with authorized_to_ship: false — execution evidence is never ship authority.

5. Quality & Baseline

  • Version bump: 0.2.0 -> 0.3.0 (pyproject.toml, SERVER_INFO, test assertion).
  • New Phase 10 regression suite (tests/test_mcp_phase10.py) covering stack lineage (linear / drift / missing / tampered evidence), @diff expansion and fail-closed refusals, batch vs single surgical context, and in-place atomic pass + rollback paths.
  • 0 lint and 0 type issues (ruff, mypy); zero regressions across the existing baseline (900+ tests).
  • Docs updated: README tool reference (7-tool surface, Phase 10 roadmap row) and docs/LINUX_SERVER_DEPLOY.md (stack verification, auto-scope, in-place dispatch runbook).

6. Operations

  • Linux remote server deployment guide (docs/LINUX_SERVER_DEPLOY.md) and node health smoke verification script (scripts/verify_linux_node.py).
  • Active GitHub branch protection enforcing the fail-closed governance gate.