Skip to content

fix(capsule): clear stale maker patch before author reset - #353

Merged
Brian Krabach (bkrabach) merged 1 commit into
mainfrom
lane/reset79-source
Sep 8, 2026
Merged

fix(capsule): clear stale maker patch before author reset#353
Brian Krabach (bkrabach) merged 1 commit into
mainfrom
lane/reset79-source

Conversation

@bkrabach

Copy link
Copy Markdown
Collaborator

Summary

Clear the stale .ai/hypothesis.patch scratch artifact during the capsule pipeline's author_reset, while preserving feedback and making cleanup failure loud. The change is one line in the shipped author_reset command plus three regression tests that extract and execute the shipped command rather than duplicating it. This is part of cross-repo dot-runner#79; it does not close that issue before the port ships. No engine-fidelity core or extension behavior changes, and no paid LLM semantic pipeline claim is made.

This is a toward-spec / graph-owned lifecycle hygiene fix: the surrounding attractor lifecycle describes reset/restart and context updates, while the graph owns this scratch-state cleanup. The change does not alter engine lifecycle semantics or imply an engine change. The relevant local context is the canonical lifecycle/reset description in specs/canonical/attractor-spec-canonical.md §3.1 and the repo's recorded graph-owned idempotency/lifecycle policy in SPEC_CONFORMANCE.md (ATX-2 and ATX-12). The reset remains loud: failure to prove the pinned clean state routes to reset_fail.

Verification checklist

  • nlspec evidence: cited section(s) + holistic-context note (spec silence ≠ support; silence → extension process or design guidance)
  • Unit tests pass (pytest modules/loop-pipeline/)
    • Applicable source-only invocation: uv run --isolated --with pyyaml --with pytest pytest -q tests/test_capsule_author_reset.py3 passed. The source-root prerequisite was supplied only for this test invocation; no production dependency was changed.
  • Live pipeline run exercising changed code path — not applicable: this is a graph-owned shell reset command and regression fixture, with no engine code or handler change. Independent DTU validation extracted and executed the shipped command.
  • AGENTS.md reviewed; repo-specific gates met
  • Backward-compat path unchanged (if applicable)
  • If this PR changes an observable contract — dispatch semantics, event contracts, admission/validation behavior, or anything else a pipeline author or downstream consumer could observe — it includes a specs/EXTENSIONS.md entry (new or updated), or this box is checked with an explicit one-line reason the change doesn't need one (e.g. "internal refactor, no observable change"). This changes only capsule scratch cleanup and adds no engine/extension contract.
  • If this PR adds or changes a doc claim about code behavior (a number, default, vocabulary, or contract), it ships a guard test pinning that claim to its source of truth in code (see docs/OPERATIONS.md), or this box is checked with a one-line reason none is needed. No docs changed.
  • Pre-publication leak review — no new public content class in this diff; fresh independent review found no public fixture leaks. Deterministic changed-file review found no local paths, credentials, or secrets.
  • PR body includes verification evidence, not just "tests pass"
  • CI is green before merge — on every path (auto-merge, manual/UI merge, or agentic/CLI merge). Confirm with gh pr checks <n> and look for CI Gate (all checks passed) reporting pass. This is checked after opening the PR; merge will not bypass red or pending CI.

Verification evidence

  • RED control (pre-fix graph): CAPSULE_AUTHOR_RESET_DOT=<parent graph> python -m pytest tests/test_capsule_author_reset.py -q3 failed.
  • GREEN control (c330 graph): python -m pytest tests/test_capsule_author_reset.py -q3 passed.
  • Independent DTU validation: source test 3 passed, source root guards 253 passed, 2 skipped, source lint OK (no findings), Graphviz parse exit 0. The combined DTU validation also recorded port checks separately, but this PR publishes source only.
  • The three fixtures cover regular stale patch deletion, dangling symlink deletion, and a directory cleanup failure that remains present and yields reset_unproven; feedback bytes are asserted unchanged in all cases.
  • No raw logs or secrets are uploaded. Evidence source retained locally at .amplifier/evaluation/finish-round-20260908/dtu/validation-attempt3-independent.log.

Notes for reviewers

  • Experience captured by this fix: repeated rounds must not reuse a previous patch; feedback is retained; cleanup failure is loud rather than silently absorbed.
  • Scope is intentionally source-only. Do not publish the dot-runner port or make resolver changes as part of this PR.
  • No paid LLM semantic pipeline run was used or claimed; the independent validation used deterministic tools and real container execution.
  • Breaking changes: none.

Observations

None arose.

Part of dot-runner#79; do not close that issue until the port ships.

Clear the stale maker patch at author reset while preserving feedback.

Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
@bkrabach
Brian Krabach (bkrabach) merged commit 6d301c6 into main Sep 8, 2026
6 checks passed
@bkrabach Brian Krabach (bkrabach) changed the title fix(capsule): clear stale maker patch before reset fix(capsule): clear stale maker patch before author reset Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant