Why: the completion doc N2 requires old tool results to become file paths (ZCode compact pattern) and cache-friendly prefix rules; today the micro-compactor only left a transcript pointer, nothing pinned prefix stability, and alignToolTail had no direct edge tests.
What:
session.ClearOldToolResultsTo: spill cleared results to /.txt with a path placeholder; write failure or empty dir falls back to the legacy transcript pointer byte-identically.
loop Config.ResultsDir plumbed; the native adapter wires it to /.agentx/results.
Direct alignToolTail edge tests (multi-call assistant tail, boundary, all-tool degenerate).
Cache-stability contract test: identical build sequence → byte-identical system text; direct tools in registration order; deferred tools excluded; meta-tools present.
Evidence: GOWORK=off go vet + go test -count=1 ./... green; legacy behavior pinned by TestClearOldToolResultsEmptyDirKeepsLegacyPlaceholder.
Impact: opt-in via ResultsDir; no behavior change for hosts that do not set it.
Refs: Agent-System-Documents#42 (N2 plan WP1)
Why: the completion doc N2 requires old tool results to become file paths (ZCode compact pattern) and cache-friendly prefix rules; today the micro-compactor only left a transcript pointer, nothing pinned prefix stability, and alignToolTail had no direct edge tests.
What:
- session.ClearOldToolResultsTo: spill cleared results to <dir>/<toolCallID>.txt with a path placeholder; write failure or empty dir falls back to the legacy transcript pointer byte-identically.
- loop Config.ResultsDir plumbed; the native adapter wires it to <workDir>/.agentx/results.
- Direct alignToolTail edge tests (multi-call assistant tail, boundary, all-tool degenerate).
- Cache-stability contract test: identical build sequence → byte-identical system text; direct tools in registration order; deferred tools excluded; meta-tools present.
Evidence: GOWORK=off go vet + go test -count=1 ./... green; legacy behavior pinned by TestClearOldToolResultsEmptyDirKeepsLegacyPlaceholder.
Impact: opt-in via ResultsDir; no behavior change for hosts that do not set it.
Refs: Agent-System-Documents#42 (N2 plan WP1)
Why: the completion doc's N2 requires old tool results to become file
paths (ZCode compact pattern) and cache-friendly prefix rules; today the
micro-compactor only left a transcript pointer and nothing pinned prefix
stability. alignToolTail had no direct edge tests.
Evidence: GOWORK=off go vet + go test -count=1 ./... green; new
TestClearOldToolResultsSpillsToDisk / TestSpillResultSanitizesCallID /
TestAlignToolTailEdges / TestSystemTextDeterministicAcrossIdenticalBuilds;
legacy placeholder bytes unchanged when ResultsDir is empty
(TestClearOldToolResultsEmptyDirKeepsLegacyPlaceholder).
Impact: opt-in via Config.ResultsDir; the native adapter wires it to
<workDir>/.agentx/results. No behavior change for other hosts.
Refs: 2026-10-07-agent-stack-n2-plan WP1
weichen
merged commit 64b8bd4c98 into main2026-10-07 13:05:02 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why: the completion doc N2 requires old tool results to become file paths (ZCode compact pattern) and cache-friendly prefix rules; today the micro-compactor only left a transcript pointer, nothing pinned prefix stability, and alignToolTail had no direct edge tests.
What:
Evidence: GOWORK=off go vet + go test -count=1 ./... green; legacy behavior pinned by TestClearOldToolResultsEmptyDirKeepsLegacyPlaceholder.
Impact: opt-in via ResultsDir; no behavior change for hosts that do not set it.
Refs: Agent-System-Documents#42 (N2 plan WP1)