Repository navigation
Preserve tool receipts across CLI repair, save and resume - #375
Merged
Brian Krabach (bkrabach) merged 3 commits intoOct 20, 2026
Merged
Conversation
Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add real repair/save/resume regression coverage against the installed Foundation
dependency, with the dependencies needed to run it from a clean locked install.
No CLI production Python, repair policy, runtime context default or CI exclusion
is changed.
SimpleContextManager, CLI SessionStore/Foundation storage, and the actual
resume initializer across four save/load cycles and backup rotation.
healthy no-op repair, late results, and parallel batches with a truly missing
result. Do not keep the old assertion that genuine late results are deleted.
mainbranch in the dev group only.The lockfile records the tested commit
db641363013ff906b656f49498a87ab01f5c506f for reproducible CI. Updating that
dependency's lock resolution will follow
main; the manifest is not pinnedto that commit.
a5f91fc4765dd3c6a1496b400c4fe428e5aa06f2. Keep Core 1.6.1 and every unrelated
package resolution unchanged. The only added package is context-simple.
Why the dependency repair matters
The previous cross-repo DTU run explicitly installed extra dependencies and
proved the regression behavior, but did not prove this repository's standard
locked setup. Its old lock still selected pre-fix Foundation, and the new real
context import was undeclared. A main-ref requirement alone does not advance an
existing Git lock. This PR repairs both gaps rather than skipping the tests,
injecting a neighboring checkout into sys.path, or adding a runtime module
dependency.
Upstream microsoft/amplifier-foundation#446 is already
merged and its six main CI jobs passed. That change owns receipt preservation:
it can move a genuine result next to its call, while preserving the whole
message; it does not promise immutable chronology. Ambiguous associations retain
their evidence and remain broken. This CLI PR adds regression coverage, not a
different repair algorithm.
Verification
After switching the dev dependency to
@main, a fresh workspace-local Python3.12.3 environment was created only through
uv sync --locked --all-extras --dev, with no supplemental dependency installs:requested_revision=mainand the exactlocked Foundation and context-simple commits. Foundation/context imports came
from the environment's site-packages, not neighboring checkouts. Core remained
1.6.1. Only requested-ref metadata changed in this follow-up; the resolved
context-simple commit and every other dependency stayed unchanged.
integration deselections, 1 existing xfail.
uv lock --check --offline, locked sync check anduv pip checkpassed.The lockfile did not change during installation or test execution.
The original dependency-repair full run had six failures because the isolated
TMPDIR made existing Unix handoff socket paths 128 bytes, above Foundation's
explicit 103-byte bound. Only the private workspace TMPDIR was shortened
(endpoint 96 bytes); all seven handoff tests and the entire default suite then
passed without source/test changes, new skips or guard changes. The original
failure is retained. This main-ref follow-up reused the corrected private
TMPDIR, without changing product or test code.
Offline test controls positively exercised local AF_UNIX IPC and rejected IPv4
and DNS before tests. All external network access remained denied during the
checks. No live model, vendor or desktop qualification is claimed.
Earlier isolated cross-repo DTU validation independently ran the same committed
regression with Core 2.0.2 (64 targeted passes). The dependency-only repair and
main-ref follow-up use the actual committed Core 1.6.1 resolution. No new DTU or
Gitea was launched for these packaging increments. Local Python 3.11/macOS/Windows
were not executed; hosted matrix and POSIX integration checks remain the PR
gates. The previous head's eight hosted CI jobs passed; new-head CI must be
evaluated separately after this update.
Review and limits
The prior regression/design was reviewed through second-opinion by Astra and
Fable on supplied code/evidence. Fable's dependency-resolution condition is
addressed by the fresh locked-install evidence above. A separate independent
source/lock/receipt review approved the dependency repair for publication;
these are not GitHub approvals or full live-application qualification.
The test-only AST helper extracts known definitions from trusted installed CLI
source, never user/transcript input; it carries a statement-local S102 rationale.
Construction is mocked and root_state=None for the repair/resume cases: this is
not a full interactive REPL or shared-root-lock acceptance claim. No public
fixture corpus or raw machine/session evidence is added.
No merge, normal user installation, global settings edit, Legacy migration, or
change to the separately open Managed/Chat Completions PRs is included.