Repository navigation
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.
This branch has not been deployed
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
Two imported documents could land in one trial folder while the job counted both:
a/b.jsonanda__b.json.Trial names are now decided before anything is written, with this rule:
agent/trace.json. For ATIF it is the recorded source path.The OpenTelemetry trial's
result.jsonnow records the full trace id undersource_document.trace_id. ATIF already recordedsession_idand the source path there.Touches
app/nullius/importers/__init__.py:existing_trialsandunique_names, shared by both importers.app/nullius/importers/otel.py,app/nullius/importers/atif.py: what an existing folder holds, names chosen before writing, the trace id recorded.app/tests/harnesses/test_otel_import.py,app/tests/harnesses/test_atif.py: per importer, a collision in one conversion and a colliding document added later. For ATIF, also the old merged folder.Verified
Importer CLI on crafted inputs. OpenTelemetry: trace
abcdef1fff…, thenabcdef1000…added, both with root spanagent run. ATIF:a__b.json, thena/b.jsonadded.On upstream/main, the added documents overwrite the first trial:
With this branch, the first trial keeps its name and content, and the newcomer gets the longer name:
Upgrade: the first conversion ran with upstream/main and the second with this branch. Same result:
a__bandagent_run__abcdef1kept, the newcomers ata__b__6c45d4feandagent_run__abcdef1000….Risk