KSE-0199 draft: identity-owned steer subscriptions (CEL-over-SQL) #274

Closed
devex wants to merge 0 commits from devex/kse-0199-steer-subscriptions into main
Member

KSE-0199: identity-owned dispatcher steer subscriptions (CEL-over-SQL), hub control-plane half.

Tracks Redmine #46. Implementation counterpart: dispatch PR #23 (devex/steer-subscriptions-impl @ 913a8fe).

Contract (matches final dispatch revision/CAS):

  • resident_subscription_list — self-identity subscriptions with revision + paused.
  • resident_subscription_set — pause/resume by id requires {id, paused, revision} (If-Match CAS against /control/subscriptions); stale id → 404 → re-list.
  • resident_subscription_removeby id requires {id, revision}; forwarded explicitly.
  • No GoAlert/cmd/main content in this lane (verified absent).

Evidence:

  • bun test 5/5 pass (services/mcp-hub/src/resident-subscriptions.test.ts), incl. regression test pinning revision in signed pause/remove bodies.
  • bun build index.ts --packages=external bundles clean.
  • Dispatch side: 26/26 TestSubscription* green incl. -race -count=2; full PG-backed run TestSubscriptionQuotaPostgres passes against scratch PG 18.4. Only failures in the full package are pre-existing/environmental (TestClaudeClient... needs unshare, blocked in sandbox; TestLoadRepoOrganizationTOMLAgentRuntime expectation stale vs current org registry) — both untouched by this change.

Branch head: 27867dad. No merge without review.

KSE-0199: identity-owned dispatcher steer subscriptions (CEL-over-SQL), hub control-plane half. Tracks Redmine #46. Implementation counterpart: dispatch PR #23 (`devex/steer-subscriptions-impl` @ `913a8fe`). Contract (matches final dispatch revision/CAS): - `resident_subscription_list` — self-identity subscriptions with revision + paused. - `resident_subscription_set` — pause/resume **by id requires `{id, paused, revision}`** (If-Match CAS against `/control/subscriptions`); stale id → 404 → re-list. - `resident_subscription_remove` — **by id requires `{id, revision}`**; forwarded explicitly. - No GoAlert/`cmd/main` content in this lane (verified absent). Evidence: - `bun test` 5/5 pass (`services/mcp-hub/src/resident-subscriptions.test.ts`), incl. regression test pinning `revision` in signed pause/remove bodies. - `bun build index.ts --packages=external` bundles clean. - Dispatch side: 26/26 `TestSubscription*` green incl. `-race -count=2`; full PG-backed run `TestSubscriptionQuotaPostgres` passes against scratch PG 18.4. Only failures in the full package are pre-existing/environmental (`TestClaudeClient...` needs `unshare`, blocked in sandbox; `TestLoadRepoOrganizationTOMLAgentRuntime` expectation stale vs current org registry) — both untouched by this change. Branch head: `27867dad`. No merge without review.
KSE-0199 draft: identity-owned steer subscriptions (CEL-over-SQL)
Some checks failed
Build: KaiOS / Build (KaiOS) (pull_request) Successful in 24s
Build: sqlite3mc / sqlite3mc smoke (Linux x86_64) (pull_request) Successful in 37s
Build: Apple / Check (SwiftLint) (pull_request) Failing after 1m6s
Build: Apple / Build (macOS) (pull_request) Has been skipped
Build: Apple / Build (iOS) (pull_request) Has been skipped
Build: Apple / Build (visionOS) (pull_request) Has been skipped
Build: sqlite3mc / sqlite3mc smoke (macOS) (pull_request) Has been skipped
Build: Linux / Build (Linux x86_64) (pull_request) Successful in 3m57s
Build: Web / Build (Web) (pull_request) Successful in 2m59s
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been skipped
80424a3d69
Redmine #46. Normalized envelope, self-identity list/add/remove/pause,
restricted CEL compiled to parameterized SQL, durable per-subscription
dedup, preserved source trust. Received event is not authorization.
KSE-0199: align draft with owner-first matching, idle wake, shared HMAC control contract
Some checks failed
Build: sqlite3mc / sqlite3mc smoke (macOS) (pull_request) Has been skipped
Build: Apple / Check (SwiftLint) (pull_request) Failing after 19s
Build: Apple / Build (macOS) (pull_request) Has been skipped
Build: Apple / Build (iOS) (pull_request) Has been skipped
Build: Apple / Build (visionOS) (pull_request) Has been skipped
Build: KaiOS / Build (KaiOS) (pull_request) Successful in 39s
Build: sqlite3mc / sqlite3mc smoke (Linux x86_64) (pull_request) Successful in 39s
Build: Web / Build (Web) (pull_request) Successful in 41s
Build: Linux / Build (Linux x86_64) (pull_request) Successful in 4m19s
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been skipped
fd7677d579
- Constitution refs to numbered sections 3 (Infrastructure), 4
  (Contributor Conduct).
- Section 2 schema: record sql_args, filter_version, *_ns columns
  as implemented.
- Section 4: management is POST /control/subscriptions on the shared
  HMAC control contract (dispatch PR #22): hub-derived owner,
  HMAC-SHA256 over stamp/path/body, loopback-only, fail-closed 403s,
  cross-owner records read as 404, add conflicts as 409, 64/owner cap
  with post-insert recount, pause with no backfill.
- Section 5: delivery authorization before filtering (owner-first
  match pinned per subscription row), always-kick copies with verbatim
  agent_originated, relay/self-authorship/pending-copy guards,
  single-transaction copy+claim dedup.
devex force-pushed devex/kse-0199-steer-subscriptions from fd7677d579
Some checks failed
Build: sqlite3mc / sqlite3mc smoke (macOS) (pull_request) Has been skipped
Build: Apple / Check (SwiftLint) (pull_request) Failing after 19s
Build: Apple / Build (macOS) (pull_request) Has been skipped
Build: Apple / Build (iOS) (pull_request) Has been skipped
Build: Apple / Build (visionOS) (pull_request) Has been skipped
Build: KaiOS / Build (KaiOS) (pull_request) Successful in 39s
Build: sqlite3mc / sqlite3mc smoke (Linux x86_64) (pull_request) Successful in 39s
Build: Web / Build (Web) (pull_request) Successful in 41s
Build: Linux / Build (Linux x86_64) (pull_request) Successful in 4m19s
Build: Linux / Build (keystore-forge x86_64) (pull_request) Has been skipped
to dafd185de1
Some checks failed
Build: sqlite3mc / sqlite3mc smoke (macOS) (pull_request) Has been skipped
Build: sqlite3mc / sqlite3mc smoke (Linux x86_64) (pull_request) Successful in 38s
Build: Apple / Check (SwiftLint) (pull_request) Failing after 2m22s
Build: Apple / Build (macOS) (pull_request) Has been skipped
Build: Apple / Build (iOS) (pull_request) Has been skipped
Build: Apple / Build (visionOS) (pull_request) Has been skipped
2026-09-14 02:00:25 +00:00
Compare
KSE-0199: require revision on resident_subscription_set/remove by id
Some checks failed
Build: sqlite3mc / sqlite3mc smoke (macOS) (pull_request) Has been skipped
Build: sqlite3mc / sqlite3mc smoke (Linux x86_64) (pull_request) Failing after 51s
Build: Apple / Check (SwiftLint) (pull_request) Failing after 4m26s
Build: Apple / Build (macOS) (pull_request) Has been skipped
Build: Apple / Build (iOS) (pull_request) Has been skipped
Build: Apple / Build (visionOS) (pull_request) Has been skipped
27867dad00
Match the final dispatch CAS contract (If-Match revision): pause/remove
by id now take {id, paused?, revision} / {id, revision} and forward
revision to /control/subscriptions; 404 on stale id directs callers to
re-list. Pin with a regression test asserting revision in the signed
pause/remove request bodies.
Owner

Superseded by merged PR283. The original signed DevEx history is preserved, with the actual MCP schema and final KSE-0199 behavior repaired. Deployment acceptance remains open under #46/#51.

Superseded by merged PR283. The original signed DevEx history is preserved, with the actual MCP schema and final KSE-0199 behavior repaired. Deployment acceptance remains open under #46/#51.
founder closed this pull request 2026-09-14 05:00:45 +00:00
Some checks failed
Build: sqlite3mc / sqlite3mc smoke (macOS) (pull_request) Has been skipped
Build: sqlite3mc / sqlite3mc smoke (Linux x86_64) (pull_request) Failing after 51s
Build: Apple / Check (SwiftLint) (pull_request) Failing after 4m26s
Build: Apple / Build (macOS) (pull_request) Has been skipped
Build: Apple / Build (iOS) (pull_request) Has been skipped
Build: Apple / Build (visionOS) (pull_request) Has been skipped

Pull request closed

Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
key-store/key.store!274
No description provided.