Repository navigation
feat(notifications): subscribe channels to app incident categories - #608
Merged
RentnerKev merged 6 commits intoNov 28, 2026
Merged
RentnerKev merged 6 commits into
RentnerKev merged 6 commits into
Conversation
The personal channel editor lists the incident categories of installed apps that run an active generation and hold the incident grant, grouped by app display name, and lets the owner toggle them. Selecting any category adds the app_incident event to the channel and clearing all of them removes it, so the event is no longer a separate choice. Subscriptions of apps that are gone stay visible so they can be cleared. A new GET server function exposes the categories under the same permission as the app incident event and re-checks it in a read-only transaction. Names come from the app catalog when it answers and fall back to the app ID. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
…ent-subscriptions
…ent-subscriptions
…ent-subscriptions
…ent-subscriptions
5 of 13 tasks
RentnerKev
added a commit
that referenced
this pull request
Nov 28, 2026
…607) * feat(apps): record the incident categories an app declares Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(notifications): deliver app incidents through platform channels Apps with the notifications.incidents.manage.v1 grant assert incidents by key through POST /platform/v1/incidents/{incidentKey}. The platform keeps them in the notification engine as the app_incident category, deduplicated per installation and key, and delivers them through the existing mail and webhook channels. - Grants and routing: the capability is approvable for the installation in the core, the core gateway forwards setIncident, and the web gateway dispatches it with an idempotency key. The grant approval shows its name in all locales. - Endpoint: replays reuse app_runtime_messages (kind incident). Undeclared categories conflict, host categories need a covering host grant before the host is looked up, and notifications that are off or paused keep nothing. - Engine: repeated state is a no-op, text changes update in place, only a severity rise notifies again, and a resolution notifies the channels that got the failure notice. Channels subscribe with appCategories (appId/categoryId). - Delivery: the owner needs PROXY_HOSTS_VIEW for host incidents, the platform renders the host name when it sends, and app text is escaped plain text. - Reconcile: incidents of stopped installations, revoked grants and vanished hosts end with a recorded reason. Stop and uninstall resolve at once. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(notifications): keep app incidents open across restarts and updates Every start and update retires the running generation before it registers the next one, so resolving on retire closed every incident on each restart. Treat an installation as live while a generation is not revoked or a revoked one's lease still runs, drop the retire hook, and let the reconcile resolve a stopped app's incidents once its lease ends. Removing an installation still resolves them at once. Co-Authored-By: Claude Opus 5.5 <[email protected]> * style: apply automatic formatting * fix(apps): reject line separators in incident text and fold only ASCII case Mirror the contract: incident text also excludes the Unicode line and paragraph separators, and link detection lowercases only ASCII letters, like both contract SDKs. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(apps): keep incident category names to one plain line Follow the contract: category names exclude line and paragraph separators as well, and the marketplace pin moves to the contract revision with that rule. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(apps): store incident categories in a stable order Sort declared incident categories by ID before storing and comparing them, as for capabilities, permission keys and provider profiles, so a re-registration in a different order is no conflict. Cover an ordinary Unicode category name. Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(apps): declare the incident capability with Unicode category names Once the capability exists, categories are declared together with it. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(notifications): subscribe channels to app incident categories (#608) * feat(notifications): subscribe channels to app incident categories The personal channel editor lists the incident categories of installed apps that run an active generation and hold the incident grant, grouped by app display name, and lets the owner toggle them. Selecting any category adds the app_incident event to the channel and clearing all of them removes it, so the event is no longer a separate choice. Subscriptions of apps that are gone stay visible so they can be cleared. A new GET server function exposes the categories under the same permission as the app incident event and re-checks it in a read-only transaction. Names come from the app catalog when it answers and fall back to the app ID. Co-Authored-By: Claude Opus 5.5 <[email protected]> * style: apply automatic formatting --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * chore(core): pin the merged app incident contract Move the marketplace pin from the last head of RentnerProxy/marketplace#96 to its squash commit on main. The contract content is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(notifications): align app incident state with the contract and fix delivery edges - Validate stored app text exactly as the App API admits it: code points, no line or paragraph separators, ASCII-only case folding for links, and category names by the plain line rule alone. Text the endpoint accepted can no longer fail the state write. - Decide liveness by the lease alone, sampled before the reads: a crashed app stops counting once its lease ends, and a generation registered after the reads stays live. - Show an app incident's ID instead of its installation-derived resource ID in the status channel owners read. - Record the delivered severity as the channel's baseline, so a notice raised before it was sent is not escalated again, and keep a channel that received a failure notice owed its recovery after a failed escalation. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: rentnerproxy-pr-automation[bot] <353791173+rentnerproxy-pr-automation[bot]@users.noreply.github.com>
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
PR 3 of 3 for #593, stacked on #607. Users subscribe their notification channels to the incident categories that installed apps declare.
APP_ACCESSand the permission to select app incidents. App names come from the core catalog; if the catalog does not answer within 3 s, the app ID is shown instead.app_incidentevent to the channel, and clearing all removes it. Saving keeps the selection inappCategories.Related issue
Closes #593 together with #606 and #607.
Testing
Type of change
Checklist
🤖 Generated with Claude Code