Repository navigation
fix(bench): DRA replay resolved absolute transcript paths as ambiguous - #356
Merged
Merged
Conversation
Transcripts record absolute file_path under the runner temp workdir (.../hg-<taskId>-<rand>/...). inverseApply joined that absolute path verbatim onto the snapshot dir, so every lookup missed and the whole replay collapsed to ambiguous (22/23 units in the 2026-11-26 run). toSnapshotPath now strips everything through the hg-* segment; Write inverse also no longer reports applied when the file is missing. First valid attribution on the 2026-11-26 27B run: 23 units, 0 unneeded, 0 ambiguous, unneededRate 0 (below the 15% close line). Co-Authored-By: Claude Code <[email protected]>
This was referenced Nov 26, 2026
Merged
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.
Problem
dra.ts replay over the 2026-11-26 BENCH_DRA=1 run produced 22/23 ambiguous units — the dataset was unusable. Root cause: transcripts record absolute
file_path(/private/var/.../hg-T02-*/hello.py);inverseApplyjoined that verbatim onto the snapshot dir, so everyexistsSyncmissed.Secondary bug found in the same pass: the Write inverse reported
appliedwithout checking the file exists (T02 produced a falseunneeded=1).Fix
toSnapshotPath(file, dir)(exported from verify.ts so it is unit-testable without triggering dra.ts main): strips the transcript path through thehg-*workdir segment, falls back to raw join for relative paths.ambiguouswhen the file is missing instead of claimingapplied.tests/benchmarks/harness-gain-dra.test.ts(3 cases: absolute-with-hg-segment, relative, no-hg-segment fallback).First valid attribution (post-fix, same run)
15 resolved tasks replayed, 23 Edit/Write units: needed=23, unneeded=0, ambiguous=0, unneededRate 0.000 — below the 15% close line from the DRA-lite design. bashWrites blind spot unchanged (19 Bash-redirect writes out of replay scope v1, reported as coverage).
🤖 Generated with Claude Code