fix(checker): give each voice preflight its own trace and span id - #847
Merged
Conversation
The preflight span carried a hardcoded traceId and spanId, and fi_verify.py carries the same pair. The span store replaces on (project_id, observation_type, service_name, hour, trace_id, id), so two probes in one project and hour collapse to one row: run both checkers against the same project and only one preflight survives, which is exactly what the trace-list capture caught. Fresh ids per send.
2 tasks
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 problem
fi_verify_voice.pysends its preflight span with a hardcoded trace id and span id, andfi_verify.pyon the same docs site sends the identical pair:default.spansis aReplacingMergeTreesorted on(project_id, observation_type, service_name, toStartOfHour(start_time), trace_id, id). Two spans that agree on that key are the same row, and the later one replaces the earlier.So two preflights in one project in one hour collapse into a single row. Run the text cookbook and the voice cookbook against the same project, or run either checker twice, and only one probe survives. Step 1 of both pages tells the reader a call named
futureagi.voice.preflightis now in their project's Voice tab, and that sentence can be false through no fault of theirs.No gate catches it, because
V1reads the receiptpreflightwrote to disk, not the row in the project.How it surfaced
The trace-list capture on #844 showed a probe row reading
futureagi.preflightin a project where only the voice checker had ever run. @khushalsonawat caught it in review. It was the text checker's probe, still holding the shared key from an earlier run in that hour.What
Fresh ids per send, two lines.
The printed
sha256in the page's install block moves with it, and the notebook's copy moves in future-agi/cookbooks#15.How it was tested
Three consecutive
send()calls captured against a local sink:Span name, shape and attributes unchanged, so every gate reads exactly as before.
preflightagainst an unreachable endpoint still fails closed.Notes for reviewers
public/fi_verify.pystill has the hardcoded pair. It is already published and itssha256is printed on the text cookbook, so changing it is a separate PR with its own page edit. Worth doing: the collision needs only one of the two to move, but the text checker has the same "run it twice" problem on its own.