Skip to content

docs(threat-model): describe the agent-stopped push - #204

Merged
gregpriday merged 1 commit into
developfrom
feature/issue-190-describe-the-agent-stopped-push-in-the
Nov 19, 2026
Merged

gregpriday merged 1 commit into
developfrom
feature/issue-190-describe-the-agent-stopped-push-in-the

Conversation

@gregpriday

Copy link
Copy Markdown
Contributor

Adds the owner-desktop-only agent-stopped push (POST /push/agent-stopped, agent-stopped-push-v1) to docs/threat-model.md, which until now covered push only as "Compromised push endpoint". Each row names the threat, the control, and the tests that cover it, and follows docs/protocol.md section 11 and docs/security-claims.md.

Resolves #190

Changes

Six rows after "Compromised push endpoint":

  • Who may ask: owner-desktop role only (403 for a phone, tablet or Remote Host), a strict body of the protocol version alone, no route from a pane's bearer, and a Remote Host's bridge refusing before it sends. Which stops count and whether the person is away stay with the host app.
  • What the request and push reveal: the request names nothing and the bridge call takes no arguments; the push is the type alone under the strict PushPayload; the service worker fixes the lock-screen text.
  • Phones that cannot show it: the per-subscription declaration, its withdrawal when an older app subscribes again, endpoints from before the feature starting unable, and the relay rechecking before each send.
  • Floods and stale pushes: one accepted a minute for the whole relay, quiet hours dropping a request rather than deferring it, the fixed topic and 600 s TTL, and every outcome being final with no retry.
  • What the relay learns: that some agent on the computer stopped, and when, so the person was likely away; never which agent, pane or project, why or how many. It keeps only when it last accepted one, besides ordinary request metadata.
  • What a push service learns: the endpoint, time, size, TTL, urgency and the relay's VAPID key, and the fixed Topic: agent-stopped tells it the kind, while the payload stays encrypted.

Each cell stays within the table's existing column widths, so the other rows are untouched.

Testing

Docs-only; no source or test file changed.

  • prettier --check docs/threat-model.md passes.
  • The impact selector found nothing to run: 0 of 144 test files, since no source is touched.
  • A Codex review checked every Control cell against the worker routes, the push sender, the client bridge and the app, and every cited test file against its row. It found wording problems only, all fixed in this PR: the retention claim needed "besides request metadata", the push-service row omitted the VAPID key, and the quiet-hours and per-endpoint replacement wording was too broad.
  • The relay's daily cleanup of the stop window (DELETE FROM rate_limits WHERE window_start < ? in worker/src/jobs/alarm.ts) has no test. The row says so in its Test cell.

docs/security-claims.md says what the relay learns but not what a push service sees; that file is unchanged here.

- Add rows for who may ask for it, what the request and the push reveal, which phones receive it, how it is rate limited and dropped, and what the relay and a push service learn from it
@gregpriday
gregpriday merged commit 046d904 into develop Nov 19, 2026
2 checks passed
@gregpriday
gregpriday deleted the feature/issue-190-describe-the-agent-stopped-push-in-the branch November 19, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Describe the agent-stopped push in the threat model

1 participant