Repository navigation
Promote successful attempts so 7.6 can measure anything - #196
Merged
Merged
Conversation
The prerequisite found while preparing the run: the Agent Framework provider recalls reasoning traces and never writes one, so the procedural arm would have recalled procedures while nothing stored any. Both arms would have behaved identically and the harness would have reported "no benefit" while describing a wiring gap. MafAgentTaskRunner now promotes a completed attempt to a stored procedure, and the three ways that could quietly reopen are each pinned by a test. Successful attempts only. Promoting a failure teaches the wrong chain; 7.7's wrong-procedure rate would then correctly punish it, and the benchmark would be measuring a bug introduced here rather than the feature. Written as TraceKind.Procedure, never Episode. Owner-scoped procedural recall filters on procedures, so an episode-kinded trace is stored, recalled by nothing, and presents as exactly the same false negative. Promotion is the arm switch: the control arm is constructed without a repository and therefore never promotes. If both arms promoted they would share a procedure store and the comparison would measure nothing. The tests assert the promotion decision directly rather than driving a stub agent. The decision is the part that can be quietly wrong; routing through an agent would have tested the plumbing around it, and it also kept the Agent Framework types out of a test project that has no reason to reference them. 4,370 unit and 449 LongMemEval tests green (+6). What remains for 7.6 is the measured run itself. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PgDgctPpbTziBNE2RT8VdE
There was a problem hiding this comment.
Pull request overview
Adds procedure-promotion to the LongMemEval MAF runner so repeated-attempt benchmarks can actually persist a successful tool chain as a reusable procedure and measure procedural-memory benefit.
Changes:
- Extend
MafAgentTaskRunnerwith optionalIReasoningTraceRepository+ owner id and promote successful runs toTraceKind.Procedure. - Persist a promoted trace containing the invoked tool chain (as
Outcome) after each completed attempt when procedural memory is enabled. - Add unit tests that pin the promotion decision (success-only, procedure kind, control arm doesn’t promote, chain is recorded).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tools/AgentMemory.LongMemEval/MafAgentTaskRunner.cs | Promotes completed attempts into stored procedures via IReasoningTraceRepository. |
| tests/AgentMemory.Tests.Unit.LongMemEval/MafAgentTaskRunnerTests.cs | Adds unit coverage for the promotion decision and stored trace shape. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+145
to
+157
| await _traces.AddAsync( | ||
| new ReasoningTrace | ||
| { | ||
| TraceId = $"proc-{Guid.NewGuid():N}", | ||
| SessionId = "procedural-benchmark", | ||
| Task = _taskPrompt, | ||
| Outcome = chain, | ||
| Success = true, | ||
| Kind = TraceKind.Procedure, | ||
| OwnerId = _ownerId, | ||
| StartedAtUtc = DateTimeOffset.UtcNow, | ||
| CompletedAtUtc = DateTimeOffset.UtcNow, | ||
| }, |
Comment on lines
+145
to
+158
| await _traces.AddAsync( | ||
| new ReasoningTrace | ||
| { | ||
| TraceId = $"proc-{Guid.NewGuid():N}", | ||
| SessionId = "procedural-benchmark", | ||
| Task = _taskPrompt, | ||
| Outcome = chain, | ||
| Success = true, | ||
| Kind = TraceKind.Procedure, | ||
| OwnerId = _ownerId, | ||
| StartedAtUtc = DateTimeOffset.UtcNow, | ||
| CompletedAtUtc = DateTimeOffset.UtcNow, | ||
| }, | ||
| cancellationToken).ConfigureAwait(false); |
Comment on lines
+203
to
+211
| public async Task TheProcedureRecordsTheToolChain() | ||
| { | ||
| // What makes it reusable rather than a note that something worked once. | ||
| var (repo, added) = Traces(); | ||
|
|
||
| await PromoteAsync(repo, completed: true, enabled: true); | ||
|
|
||
| added.Single().Outcome.Should().Be("LookUpTraveller -> PlaceHold -> Book"); | ||
| } |
This was referenced Aug 27, 2026
Open
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.
The prerequisite found while preparing the run: the MAF provider recalls reasoning traces and never writes one. The procedural arm would have recalled procedures while nothing stored any — both arms identical, harness reporting "no benefit" while describing a wiring gap.
MafAgentTaskRunnernow promotes a completed attempt to a stored procedure. The three ways that could quietly reopen are each pinned by a test:TraceKind.Procedure, neverEpisode. Owner-scoped procedural recall filters on procedures, so an episode-kinded trace is stored, recalled by nothing, and presents as the same false negative.Tests assert the promotion decision directly rather than driving a stub agent — the decision is what can be quietly wrong, and routing through an agent would test the plumbing around it while dragging Agent Framework types into a test project with no reason to reference them.
4,370 unit and 449 LongMemEval green (+6). What remains for 7.6 is the measured run.
🤖 Generated with Claude Code
https://claude.ai/code/session_01PgDgctPpbTziBNE2RT8VdE