Add trace annotation API foundation - #307
Merged
johnnygreco merged 3 commits intoJun 17, 2026
Merged
Conversation
This was referenced Jun 17, 2026
Owner
Author
Review RecordFrozen target: Panel:
Skipped Review-Standard lenses:
Accepted findings fixed:
Rejected findings:
Validation after fixes:
Final status: all rerun reviewers clean; all required local validation and CI passed on the reviewed head. |
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.
Summary
Adds the foundation for first-class trace/session annotations.
Closes #302
This PR adds the canonical annotation model, ClickHouse storage table, store helpers, typed JSON API routes, shared API contract entries, and focused tests for session/event annotation CRUD. Annotation schema is intentionally extensible with structured target, author, source, category, outcome, score, confidence, follow-up, label, note, metadata, status, and schema fields.
Schema decision: this is a real schema change. Beacon schema version is bumped from 9 to 10. There are no compatibility ALTERs, legacy shims, or old-schema upgrade paths.
Validation
make generate-check-> passed, templ updates=0make fmt-check-> passedmake test-> passednpm run test:frontend-> passedgit diff --check-> passedRisks
Annotation APIs are intentionally target-bound for this foundation PR. Broad annotation discovery/export is left to #305 so the storage/API contract can settle before dataset workflows build on it.
The schema version bump means existing older Beacon schemas are not supported by this build. That is intentional per the goal direction.
Reviewer Notes
Focus on the annotation data contract, validation bounds, target resolution, soft-delete semantics, and whether the API shape is sufficient for #303 UI and #304 MCP without duplicating models. Backward compatibility was explicitly not required and should not be added.