Repository navigation
fix(runs): give each imported document a trial of its own, never renaming one already there - #404
Merged
Merged
Conversation
…collide OpenTelemetry traces sharing a root span name and the first 7 hex of their trace id, and ATIF paths that flatten to one name (a/b.json, a__b.json), were written into one trial folder while the job counted both. Names are now decided before writing: an unshared name is kept as it is, a shared one takes the full trace id (OpenTelemetry) or a digest of its path (ATIF), and a name still shared is refused. The OpenTelemetry trial records its full trace id.
…es with it Judgements are keyed by a trial's name, so a later conversion must not rename a trial already in the output job. Each importer now reads which document each existing trial folder holds (the recorded trace id or source path, or the trace a folder carries) and keeps that name for it; only a newcomer that collides takes the longer name. A folder an older conversion wrote two documents into is split, and a folder whose document cannot be told keeps its name for the first document that would take it.
…ocuments by real path and split only a folder listed twice A trial whose recorded document is known but no longer in the source keeps its name reserved: a newcomer with the same short name takes the longer one. ATIF documents are compared by real path, so one tree reached through a link keeps its trials. A folder counts as written by two documents when its job's config lists it twice; only a job without that list falls back to the trial count.
…der is pruned The job's config.json keeps each trial name with the document it was given to, across conversions. A later document never takes a name another document once held, even after a conversion without that document pruned its folder; the document itself gets its name back when it returns.
…nfig every conversion wrote
…t keeps its trial names A conversion rewrote config.json in place: a refresh stopped mid-write left it truncated, and with it the trial names kept for documents whose folders are gone. Each file is now written beside the old one and renamed over it.
…re kept, and from a longer name A job converted before trial_documents lost a gone document's name on its first refresh: the folder was pruned before its name was recorded. The names of every folder whose document is known are now recorded before pruning. A document whose short name was taken fell back to its longer name even when that name was kept for a gone document. Such a conversion is now refused before anything is written.
harenome
force-pushed
the
fix/import-trial-names
branch
from
November 25, 2026 14:12
55b1fc6 to
d062c10
Compare
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.
Closes #401
What
a/b.jsonanda__b.json.config.jsontrial_documentsbefore any pruning, even after its folder goes; never reused, even as a longer name.source_document.trace_id.Verified
ATIF
a__b.json, thena/b.jsonadded; OpenTelemetryabcdef1fff…, thenabcdef1000…, root spanagent run.Main: the second conversion overwrites the first trial.
Here:
Risk
Agents