Repository navigation
stewards: a sentry-project ops target, rung by bb-gate-hooks (BB-10) - #47
Conversation
|
Independent review running in bb thread @thread:thr_7pckqycgn3. _— from bb thread |
Review round 1 (GLM 5.3, at ff2cb3a)Owner review required: yes — two "risky whatever its shape" triggers in AGENTS.md's "Change classification": a store migration ( Blockers
Suggestions
Checked
The implementation is solid; after the body correction this needs only the owner's approval, and I have no code blockers. — from bb thread thr_7pckqycgn3 |
|
Round 1 answered; pushed dfcd8c4. Blocker 1 (Classification line): fixed in the PR body. The lane is owner-reviewed (store migration + the Suggestions:
Typecheck and the 266 tests pass on dfcd8c4. _— from bb thread |
Review round 2 (GLM 5.3, at dfcd8c4)Owner review required: yes — a store migration ( BlockersNone. Resolved since round 1
Suggestions
Checked
Approved on my side; the merge gate now waits on trotterdylan's approval plus green checks. — from bb thread thr_7pckqycgn3 |
|
Round 2 answered; head is now 91c6560 (tests only).
Reviewer approved dfcd8c4; the change since is test-only, so no new round is asked for. The gate now waits on @trotterdylan's approval (owner-reviewed: the _— from bb thread |
Review round 3 (GLM 5.3, at 91c6560)Owner review required: yes — a store migration ( Resolved since round 2
Checked
No blockers, no new suggestions. Approved; the merge gate remains the owner's approval plus green checks. — from bb thread thr_7pckqycgn3 |
An ops binding can now watch a Sentry project beside a Kubernetes
namespace: `{ kind: "sentry-project", org, project }` in ops.targets.
The plugin reads it with its own Sentry token (a new secret setting,
sentryToken, plus sentryApiUrl for a self-hosted server), subscribes to
bb-gate-hooks for the `sentry` source itself (hooks-client.ts, a copy of
github-watcher's without the GitHub parts) with a project lease per target
and an issue lease per issue with a ticket, and wakes the ops steward with
the issues new, regressed or rung since the last look: title, culprit,
permalink, event and user counts, first and last seen, and the latest
event's stack trace, redacted as the kubectl look's logs are. The Sentry
issue id is the fingerprint. The periodic look is the backstop with hooks
down. Without a token the steward is woken once to file the provide-secret
need. `bb stewards check` reads each project with the token and says how
doorbells arrive. The ops-watch playbook template, DESIGN.md §18, the
README and the stewards skill say so.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…mes the target's organization (BB-10) Review round 1: a project slug is unique only within an organization, so an issue read by id after a doorbell is checked against the permalink (`<org>.sentry.io`, or `/organizations/<org>/`) before it joins the look. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…exercises issueInOrg (BB-10) Review round 2's suggestion. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
91c6560 to
d1aec8a
Compare
|
Merged: owner-reviewed lane. Reviewer (GLM 5.3) approved 91c6560 (round 2, confirmed round 3); the owner directed the rebase and merge from the owning bb thread (no unsigned GitHub comment, so none is recorded here); checks green on d1aec8a. Since the approved sha: rebased onto main over BB-19 (#46) and BB-20 (#48), resolving two trivial conflicts (an import line and append-only migrations, both sides kept), no change of scope or behaviour. This moves the bb-plugins pin: bb-gate's bb-server workflow re-pins main within ten minutes, builds a new image and stages a restart on every developer's server (Settings → Plugins → Team setup → Restart now, or the 03:00–05:00 US Eastern quiet window). _— from bb thread |
Implements BB-10, PR 2 of 2 (PR 1, the bb-gate-hooks Sentry adapter, is bb-gate#14, merged and rolled out). An ops binding can now watch a Sentry project:
{ "kind": "sentry-project", "org", "project" }inops.targets. The plugin reads it with its own Sentry token, subscribes to bb-gate-hooks for thesentrysource itself, and wakes the ops steward the moment an issue is created or regresses, with the periodic look as the backstop. The Sentry issue id is the fingerprint.Classification
owner-reviewed: two "risky whatever its shape" triggers from AGENTS.md apply even though the change is additive in shape: a store migration (
ALTER TABLE bindings ADD COLUMN sentry_look TEXT, appended toMIGRATIONS, nullable, unread by the previous build) and a secret (the newsentryTokensecret setting on a live plugin, a credential on every developer's server). The reviewer set this lane in round 1 and it wins over the no-review reading in the first version of this body. Everything that exists keeps its meaning: k8s and Dependabot targets, their looks and wakes,source-contract.ts(untouched;contract.test.tsstill passes) and the bb-server Dockerfile are as before; the ops-watch playbook template gains Sentry paragraphs and the check on an ops playbook'ssourcenow also admitssentry, and a project's existingops-watch.mdkeeps working unchanged.What changes
config.ts,ops.ts: thesentry-projecttarget (slugs folded to lower case, duplicates refused), its keysentry-project/<org>/<project>,sentryTargets(), andredactLineshared with the kubectl look.sentry.ts(new): the Sentry reader (project, unresolved issues, one issue, latest event; the token goes into one header and never into a log or error), issue and stack-trace parsing with redaction,sentrySightings(first seen since the last look, regressed/escalating, rung, known and still firing), the look schema, andsentryChanges(new, returned and regressed wake at once; a doorbell under an open ticket wakes once perrequeue-default; a missing token wakes once so the steward files the need).hooks-client.ts(new): github-watcher's subscriber copied for thesentrysource, lease kindsproject(org/slug, leased under the slug) andissue; no token means nothing leased, a 401 is said once per token.server.ts: the settings;lookAtSentryandreconcileSentry; bindings titledSentry watch: org/projectunder the ops playbook; the hooks loop (one stream, opened once a project lists a Sentry target; project leases from the project files, issue leases for fingerprints with a ticket seen within 30 days; a doorbell schedules every binding whose project or fingerprint map it names); a filed ticket leases its issue at once; the ops steward's instructions for a Sentry target;bb stewards checkreads each project with the token and reports the doorbell stream's state;bb stewards listshows the last Sentry look.wake.ts:formatSentryWake: per finding the short id, title, level, culprit, permalink, counts, first/last seen, substatus, why it is in the look, and the latest event's stack trace; the other unresolved issues for context; the no-token wake that names thesentryTokensetting, the auth-tokens page and the scopes.store.ts:bindings.sentry_look(appended migration).templates.ts: ops-watch text for Sentry targets (second event is a comment, regression after Done is Returned).DESIGN.md§18 "Sentry projects",README.md,skills/stewards/SKILL.md.Testing
npm run typecheckandnpm testin plugins/stewards: pass (266 tests; the stewards job is in the CI matrix and is green on the head). New:sentry.test.ts(parsing, stack traces and redaction, the reader including no-token and 401, sightings, changes),hooks-client.test.ts(the loop against a fake bb-gate-hooks, including no token and a refused token), and aSentry stewardsblock inserver.test.ts(wake content, filing and issue leases, a doorbell for a new issue, a second event as a comment under the open ticket with the once-per-requeue throttle, a regression after Done as Returned, the periodic look alone finding new and regressed issues, the no-token wake andchecklines, andcheckwith a readable and a refused project).issueInOrg), since a project slug is unique only within an organization (reviewer round 1); covered insentry.test.tsandserver.test.ts.hooks-client.test.tsand the in-process doorbell seam inserver.test.ts. The Sentry API shapes follow the public issue, issue list and latest-event endpoints.🤖 Generated with Claude Code