Skip to content

v0.7.1 — environment diagnosis and a lock guard for governed runs

Choose a tag to compare

@xenups xenups released this 14 Nov 10:31
· 14 commits to main since this release
b664846

What this fixes

An independent audit of v0.7.0 reproduced two failures and classified them:
one genuine Asha defect, one a robustness gap in the git lifecycle.

1. comparison_inconclusive:baseline_failures_unparsed

A governed run's baseline check matrix ran under Asha's own interpreter
because the target project had no service-local environment, so pytest aborted
in collection on a missing dependency. Asha correctly refused to pass — but
every cause collapsed into the same opaque unparsed detail, so an operator
could not tell an environment gap from a worker who broke the suite.

Now:

  • asha.governance.check_diagnosis classifies each failed check from its own
    output: environment_unresolved, missing_dependency, tool_unavailable,
    collection_error, test_failures, timeout, crashed, unknown. A
    stdlib or repository-local module is a collection error, not a missing
    dependency.
  • Every check entry records interpreter, hermetic, service_root,
    failure_mode, failure_module.
  • The comparison reports baseline_missing_dependency (with diagnosis and an
    actionable hint) instead of a bare unparsed, and refuses to compute a
    delta across two different interpreters (INTERPRETER_MISMATCH).
    performed stays false in both cases.
  • Acceptance exits 2 (interrupted / collection error) and 3 (internal
    error) are inconclusive, not failed: the runner produced no verdict.
    4/5 unchanged; 1 still means the tests ran and failed.

2. fatal: Unable to create '.git/index.lock'

git add -A failed instantly when another git process — usually the worker's
own — held the index, aborting the run before acceptance was evaluated.

git add now waits up to INDEX_LOCK_WAIT_S (3s) for the lock and retries,
then refuses with the lock path and safe recovery instructions. No lock is
ever deleted
: Asha cannot prove the owning process is gone, and removing a
live lock corrupts the index. The lock path is read from the filesystem, so no
git subprocess is added to the evidence budget.

Fail-closed rules are unchanged

DONE still requires a demonstrated pass; an inconclusive comparison still
writes no seal; every non-passed acceptance outcome still blocks the run.

Verification

  • Full suite on Windows (this machine), same revision: 33 failed, 1451
    passed, 3 skipped
    vs the v0.7.0 baseline 33 failed, 1417 passed, 3
    skipped
    — identical failure sets (pre-existing Windows environment
    failures: worktree seal paths, CRLF, restart durability), zero new
    failures
    , 34 new tests.
  • CI on the exact release commit: fail-closed governance gate pass, verify
    (full Linux suite, ruff, mypy) pass.
  • New regression tests: test_environment_diagnosis.py,
    test_index_lock_guard.py, test_mcp_dag_parity.py, plus the acceptance
    no-verdict cases in test_acceptance_gate.py.

Wheel

asha-0.7.1-py3-none-any.whl
SHA-256 5f3a722de0c00522745fad56f9c9e0a22574d81c1883cd4b473a2aa384b8918f

Docs: docs/ENVIRONMENT-DIAGNOSIS.md.