Repository navigation
ref: Kill heartbeat and aorta - #44
Merged
Merged
Conversation
mitsuhiko
approved these changes
Aug 16, 2018
* ref: Remove most mentions of heartbeat * feat: Add basic key manager
Previous version would never actually attempt to pass event through a relay. Now hits unimplemented!() Also fix a minor bug in authentication
Member
Author
|
@untitaker @mitsuhiko Merging this now, since it's feature-complete. Let's clean up and fix tests on Monday. |
BYK
added a commit
to getsentry/junior
that referenced
this pull request
Nov 25, 2026
) An Annotation kept a copy of its object's label, state, description, and facts, and only webhooks kept that copy current. Now it stores the subject, the title, and the link. A card reads every other fact live, and the plugin makes the short label from the link. This closes the "An Annotation keeps a copy…" Gap in `design/annotations.md`. The Gap line is removed in its own commit. ## Storage - `junior_conversation_annotations` gets the `title` and `url` columns. The migration fills them from the JSON and removes `title`, `url`, `label`, `status`, `description`, `facts`, `sourceUpdatedAt`, `warning`, `trigger`, and `displayType` from `annotation_json`. - Old workers keep writing the old JSON during rollout. A new trigger, `junior_conversation_annotations_stored_fields`, moves the title and the link to the columns and removes the dropped keys. Triggers run in name order, so it runs after the legacy subject trigger, which still reads the old JSON. That trigger now also reads the link from the `url` column. - Search and the subject filter read the `title` and `url` columns. `storedAnnotationTitle` and `storedAnnotationUrl` are gone. - **The primary key stays `(conversation_id, plugin, kind, key)`, and there is no unique index on the subject.** Old workers' `ON CONFLICT` targets that key. Also, two rows of one Conversation can share a subject: a renamed repository gives a new key for the same object, and a `link` subject comes from the URL, so an attached link and a typed object can name the same thing. Legacy Slack card refs (a plugin + key digest) and old Message refs `{plugin, key}` resolve by key, so `key` stays. ## Plugin API and writers (hard cutover) - `objectAnnotations` entries and `PluginConversationAnnotations.upsert` take `savedObjectAnnotationSchema`: `{kind, key, subject?, objectType, title, url}`. `resourceLinkAnnotationSchema` is `{kind, objectType?, key, url}`. Both are strict, so a plugin that still sends a dropped field fails at the boundary. - `ObjectAnnotation` stays the live card shape that link types return. The new `LiveAnnotation` is the card or the label fallback that a viewer sees, and the sidebar hook gets it. - Updated writers: GitHub (create/update issue and pull request), Linear MCP, Google Calendar (create, update, cancel), Vercel deployments, core Automations, and attach. GitHub's live card comes from `githubObjectCard` in `issue-links.ts`. The create-tool replay states still accept the old fact fields as optional, because states saved before this change can still be replayed. - `build-a-plugin.md` describes what an Annotation stores. ## Readers - **Fallback card** (no access, provider down, failed read): the label from the plugin's link type, or else the link's host, or else the object type name, plus the link. The delivered Message card snapshot also posts the stored title, as before. - **Model metadata** (prompt tags and tool results that list Annotations) and search results get the label from the plugin. The label loads lazily (`chat/conversations/annotation-labels.ts`), because the link types import the app and the app imports the tools that save Annotations. - **Automations get a live source.** A new core link type (`api/objects/automation.ts`, `/automations/*`, not cached) reads the Automation from the database with the Automations view's access rule. The card shows the live status, trigger, and warning. `automationCardStatus` moved to `chat/automations/card.ts`. - **Legacy untyped `link` rows, and plugins without a link type, get the label-only fallback.** Today that means Vercel deployments, and Linear until its link type (#4331) lands. - The dashboard Linked work list shows a `resource_link` row as the label and the link, and asks for its live card. The client no longer reads the dropped fields. ## `annotation-fields:check` `scripts/check-annotation-fields.mjs` runs with the other checks in `scripts/check.mjs`. Its baseline is `scripts/annotation-fields-baseline.json`. It fails when: - a table column or a saved-schema field is not in the baseline, or - source reads a dropped field from the stored JSON (`annotation_json->>'status'`, `${annotations.annotation}->'facts'`, and so on). The baseline-growth check finds the baseline by its name, so the baseline can only shrink. ## Screenshots Linked work on a mock Conversation. #2201 and getsentry/relay#44 are label-and-link rows. getsentry/payments#91 is a live card. | | Light | Dark | | --- | --- | --- | | Desktop |  |  | | Mobile |  |  | ## Rollout risks - The migration removes the fields from the JSON. Until the deploy finishes, old readers show Annotations without the label, state, or facts. - Vercel deployment cards show only the link's host, because Vercel has no link type. - Linear cards show only the link's host until #4331 merges. Expect a conflict in `junior-linear/src/plugin.ts`. - A delivered Automation card reads the Automation with the access of the person who started the Conversation. An Automation run Conversation has no such person, so its delivered card uses the fallback. <!-- junior-request-attribution:start --> via @BYK. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3A883547fc43df31312aaeda4c4dbbb06a --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3A883547fc43df31312aaeda4c4dbbb06a) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3A883547fc43df31312aaeda4c4dbbb06a/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: BYK <[email protected]>
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.
TODO