Task — engineering-spec@1

End-to-end mechanical smoke test

doneTASK-IMP-107
module improvement · class product · priority p1 · created 2026-07-17 · shipped null
depends on none · blocks none

TASK-IMP-107: End-to-end mechanical smoke test

Summary

Twenty-five suites cover install hygiene, channels, payload shape, the helper CLIs, the renderer, and workflow doctrine. None runs the three workflows end to end, because the middle two need a model. Add a suite that exercises the MECHANICAL spine - install, lint, insert, every lifecycle flip, coverage-scope, reconcile, uninstall - on a scratch repo with no model in the loop.

Problem

The proof that the loop works is a session transcript. That is evidence, but it is not a gate: nothing re-runs it, and nothing fails when a helper's contract drifts from the workflow that calls it. Each helper is tested in isolation and the workflow doctrine is tested as prose; the seam between them is tested by hand, once, by whoever happened to run the loop that day.

The batch-4 seed-shape break is the shape of the gap: it was caught by the awh gate, one layer late and only because a goldenset existed. A mechanical spine test would have caught it earlier and without one.

Proposed Solution

test_e2e_skeleton.sh: create a scratch repo, install the built payload, write a fixture task@1 spec by hand, lint it clean, insert its row via backlog-mutate, flip it through every lifecycle status with the real helper, run coverage-scope against a stub report, run task-reconcile and assert the expected recommendation, uninstall, and assert the corpus survives. No model, no LLM, no network; target under 30 s to stay inside the sandbox cap. It tests the plumbing, not the judgment - which is 100 % more than zero.

Alternatives Considered

Success Metrics

Scope

In scope: the new suite and its wiring into run_all.sh.

Out of scope / Non-Goals

Dependencies

None - every helper it drives exists on main.

AI Authorship Disclosure

1. Description (normative)

2. Acceptance criteria

3. Edge cases

Audit

§1 - Verdict summary

Spec is 76 lines, 6 §1 clauses, 5 ACs, 5 edge cases. Closes the one seam that 25 suites leave untested: the plumbing between helpers. Passes after 6 findings.

§2 - Findings (all resolved)

ISS-001 - Suite could assert exit code rather than behavior

task-reconcile exiting 0 says nothing about reaching the right recommendation. Resolved: §1 #1.3 requires asserting the recommendation against the constructed state; AC 2 covers it.

ISS-002 - A model-dependent test would be flaky by construction

An e2e test calling a model fails for reasons unrelated to plumbing - the definition of a flaky gate. Resolved: §1 #1.5 forbids model, network, credentials; Alternatives records why.

ISS-003 - 30 s target could creep past the 45 s sandbox cap

A suite that cannot finish gets disabled, which is worse than not having it. Resolved: §3 edge case requires splitting by phase rather than raising the cap.

ISS-004 - Suite could pollute the working corpus

An e2e test writing to docs/tasks/ corrupts the repo it tests. Resolved: §1 #1.1 confines it to scratch; AC 4 asserts the working corpus is untouched.

ISS-005 - Corpus survival after uninstall was untested anywhere

It is the one outcome an operator cannot recover from. Resolved: §1 #1.4 + AC 3 make it a gate.

ISS-006 - Missing git would fail rather than skip

A machine without git would red the suite for an environmental reason. Resolved: §3 adopts the existing skip-with-reason discipline.

§3 - Resolution

All 6 concerns addressed. The machine floor (task-lint) ran FIRST and was clean before any judgment family was applied, per TASK-IMP-084. Score = 10/10.


End of TASK-IMP-107 audit.