Watch Production watch-production
Watch Sentry for new production errors that merged pull requests may have caused, or start a watcher session that does so on a schedule.
Use it when asked to monitor Sentry or production for regressions from merged work, when a project's first pull request has merged, or when a brief names you as a production watcher.
- Our test
- 8/10✓ Verified
- tested Dec 6, 2026
- GitHub stars
- 56k
- tryghost/ghost
- Added by
- 0
- members
- Updated
- Dec 6
- commit fea511f
- Content
- 1 file
- no scripts · 11 KB
- License
- MIT
- free to use
What our test found
The skill provides unusually precise, cautious procedures for scheduled Sentry regression monitoring, though it depends on access to several external systems and session scheduling.
Limits spotted
- The instructions are highly specific to Ghost, its Sentry organization, and repository paths, limiting reuse in other projects.
- Starting the watcher requires integrations for session scheduling, Sentry, GitHub, and the tracked-work source; their availability is not addressed.
name: watch-production description: Watch Sentry for new production errors that merged pull requests may have caused, or start a watcher session that does so on a schedule. Use when asked to monitor Sentry or production for regressions from merged work, when a project's first pull request has merged, or when a brief names you as a production watcher.
Watch production
A watcher is one session that checks Sentry on a schedule for new production errors that a set of merged pull requests may have caused. It reports only when it finds one.
If you are starting a watcher, read . If a brief or a schedule names you as the watcher, read .
Start a watcher
Start one separate session for the watch. Most runs find nothing, and in its own session they stay out of the history of the session doing the work.
Give it:
- the tracked work: where it reads the list of merged pull requests on every run, such as the completed issues of a Linear project and the pull requests attached to them. Name a source it can read, not a list you keep yourself;
- any paths, modules or error messages that would point to this work, beyond the files the pull requests changed;
- who it reports to, and how to reach them;
- "Load the
watch-productionskill and watch as the watcher."
Schedule the watcher's session, not your own, to run twice a day on weekdays, with the same brief as the schedule's saved prompt. Ask it to run once straight away and to report that first result even when nothing matched, so you know it can reach Sentry, the source of tracked work and GitHub.
A watcher's report is a claim to check. Read the Sentry issue and the pull request yourself before you act on it.
Clear the schedule and archive the watcher when the watch is no longer wanted.
Watch as the watcher
You only read. Do not resolve, assign, ignore or comment on Sentry issues, and do not open pull requests or create or comment on issues.
On each run:
- List the tracked pull requests from the source your brief names. Count only pull requests, not links to commits, and only merged ones. For each one you have not examined in an earlier run, get its merge commit and changed files with
gh pr view <n> -R TryGhost/Ghost --json state,mergeCommit,files. - Find which builds contain each tracked pull request. Ghost's Sentry organisation is
ghost-foundation. Projectghostis the server and projectadminis Ghost Admin, the browser client. Production runs more than one server build at a time, and Admin deploys separately from the server, so judge each issue by the builds its events came from, not by one live version. To see the builds, group the period's production events byrelease, and Admin's also byadmin_build.
When an event names a build's commit, the build contains a pull request when the pull request's merge commit is an ancestor of that commit: git merge-base --is-ancestor <merge commit> <build commit>. Run git fetch origin main --tags first, and unshallow a shallow checkout, so that both commits exist locally. A released version, such as ghost@6.81.2, is the build at its tag, v6.81.2. When an event names neither, or names a commit that is not in this repository, the build is unknown. An unknown build does not rule a pull request out. An unknown server build counts as containing every pull request that merged before the event, in the event's version or an earlier one, going by ghost/package.json at the merge commit. A <major>.<minor> version covers every patch and -rc version in it. An unknown Admin build counts as containing every pull request that merged before the event, whatever the version: release is the server's version, and Admin deploys separately.
- Admin events name the Admin build when Admin is hosted apart from the server:
admin_buildis its commit, as describes. An event with noadmin_buildcame from an Admin that Ghost served itself, so its Admin build is its server build. Once a staff user has signed in, Admin events also name the server build:releaseis the server's version and build commit, such asghost@6.81.3-rc.0+079f7ab. Before sign-in,releaseis onlyghost@<major>.<minor>and the server build is unknown. - Server events name only the version, as
ghost@<version>. Every server build frommainbetween two releases has the same-rcversion, so the build behind an-rcversion is unknown. Production Admin events in the period can support a match without identifying the event's build: one whosereleasenames a build of that version containing the pull request shows that such a build ran. Admin reports only errors, so a build can run without an Admin event naming it.
Ignore issues whose events have no release starting with ghost@, such as metric alerts.
- Collect candidates. A candidate is an issue that was first seen in the period to check or regressed in it. In both projects, with
environment:production, search for every issue last seen since the period started, whatever its status now: an issue that someone resolved or archived again before the run still counts. Sentry cannot search by when an issue regressed, and a gap in an issue's events does not show it, so read every issue's activity: the issue regressed in the period when aset_regressionrecord is dated in it. When a search returns as many issues as its limit, split the period and search each part. If a search still returns its limit, or you cannot read an issue's activity, you have not completed the check. Each tracked pull request has its own period: - If your last completed run checked the pull request, the period starts one hour before that run started. Sentry can receive an event some time after it happened, so an event from just before a run may reach Sentry only after that run searched. Neither project's Sentry client holds events back while offline, so the delay is short. A run that could not complete the check is not a completed run.
- Otherwise the period starts when the pull request merged, or at the start time your brief gives if that is later. This is the case on a first run, and for a pull request that joined the tracked work after it merged, for example because its Linear issue was completed later.
Match a candidate only against the pull requests in whose period it was first seen or regressed.
- Match each candidate against the tracked work. Judge a candidate by the issue's production events in the pull request's period: the builds they came from, their stack traces, culprit and message, and for Admin their failing requests. No single event stands for the candidate: Sentry does not say which event reopened an issue, and one Admin issue can group failing requests to different endpoints.
Take the builds from every event, by grouping the events by release and admin_build, never from a sample. A pull request can match a candidate only when one of those builds contains it, counting unknown builds as step 2 says. The build that matters is the one the suspected change runs in: the server build when you suspect the pull request's server changes, and the Admin build when you suspect its changes under clients/. The evidence must come from an event of such a build: a frame, failing request or screen from an event whose build does not contain the pull request does not point to that pull request.
Stack traces and failing requests can only be read one event at a time. When an issue has more events than you can read, read the earliest and the latest in the period and a sample between them. The candidate is then partly checked, not unmatched, against every pull request that its builds allow and that nothing you read matched, even when what you read matched another pull request. Step 5 says how to report it.
- Likely: a frame or the culprit is in a file the pull request changed, or the issue matches a path, module or message your brief lists.
- Possible, server: the issue fails in the part of Ghost the pull request changed. When that part runs under everything, such as boot, composition or the helpers every service is defined with, the issue must fail while Ghost starts, sets up a service or an adapter, or writes a log. An error in a request handler that only runs on top of that code is not a match.
- Possible, Admin, from a server change: a failing request goes to an API endpoint whose server code the pull request changed. Admin stack traces are bundled code, so the failing request in the breadcrumbs is usually better evidence than the frames.
- Possible, Admin, from an Admin change: the error is on a screen whose files under
clients/the pull request changed. Every Admin event names its screen in theroutetag, so group the events by it and by build instead of reading them.
Run Sentry's Seer analysis only on likely matches.
- Report.
- For each likely or possible match, send whoever your brief names one message: the Sentry link and short ID, the project, the events and users affected, the builds its events in the period came from, which of them are unknown, any Admin event showing that a server build of that version containing the pull request ran, whether the issue is new or regressed, its status now, the pull request and issue it may come from, the evidence and the events it came from, and whether you think the next step is a revert, a fix, or nothing because it is unrelated.
- For each partly checked candidate, send them one message: the Sentry link and short ID, how many events it had in the period, how many you read, and the pull requests it is partly checked against.
- Report an issue against a pull request once as a match and once as partly checked, and again only when the issue regresses after that report. As soon as you send a report, write one line in your own session naming the issue, the pull requests, which of the two reports it was, and the time. Before you send one, look for those lines in every earlier run, including runs that did not complete.
- When no candidate matched or was partly checked, send them nothing.
- When you could not complete the check, for example because Sentry or GitHub could not be reached, tell them what failed and what you had checked up to that point.
- End every completed run with one line in your own session: when the run started, which tracked pull requests it checked, the server builds that production Admin events named, how many candidates you checked in each project, and how many matched. The next run reads from that line when to start from and which pull requests a completed run has already checked.