Repository navigation
Conversation
…ive (#1004) Revocation detection (#812) only runs when a Linear event needs a token, so an idle workspace or a dead webhook never re-detects a dead grant, and an unused refresh token simply expires: observed live, a workspace sat with an expired refresh token for months with one ERROR log line. - The concurrency reconciler (already every 15 min) async-invokes the Linear webhook processor with {grant_health_probe: true} on exactly one tick per 12 h (isProbeTick). Best-effort: a failed invoke never affects reconciliation. - In probe mode the processor resolves a token for every active registry workspace. That refreshes expiring tokens (keeping idle grants alive) and sends a rejected grant down the existing latch-and-announce path to OperationalAlerts. Its summary logs any workspace without a usable token. - Zero new CloudFormation resources (an invoke IAM statement and two env vars): the root stack is at its 490-resource budget in some census profiles, so a rule of its own did not fit. - LINEAR_SETUP_GUIDE troubleshooting documents the probe, the alert topic (which ships without subscribers) and the recovery command.
This was referenced Nov 18, 2026
4 of 5 tasks
Contributor
Author
|
Superseded by #1067, which carries this change (its commits are kept as they were, followed by one commit that adapts the combined set to current main). Closing to keep one place for review. |
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.
Closes #1004.
Main already alerts on a dead Linear grant (#812/#831): a rejected refresh is latched as revoked and announced once to the OperationalAlerts SNS topic. But detection only runs when a Linear event needs a token. A workspace with no traffic, or whose webhook has stopped delivering, never re-detects a dead grant, and that's how a dev workspace stayed dead for over two months unnoticed. Separately, an unused refresh token can expire on its own, because nothing refreshes it.
This PR adds a periodic grant health probe.
How it works
isProbeTick). The reconciler async-invokes the Linear webhook processor with{grant_health_probe: true}, best-effort.lambda:InvokeFunctionon the processor only.bgagent linear setup <slug>).Tests
Limits