Skip to content

feat(pm-orchestration): DSP-01 signed webhook fan-out to Fleet command acceptance (#9445) - #12875

Merged
dezren39 merged 1 commit into
mainfrom
lane-dn/9445-dsp01
Nov 23, 2026
Merged

dezren39 merged 1 commit into
mainfrom
lane-dn/9445-dsp01

Conversation

@dezren39

@dezren39 dezren39 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

DSP-01 implementation for #9445, landed once both packet gates cleared fresh (PR #9225 merged 2026-11-13; #9016 closed/completed 2026-11-23).

Projector — src/operation-forwarder.ts builds a signed-source operation envelope for /fleet commands in issue_comment events. The idempotency key is semantic (ghcmd:v1:<repo>#<issue>:comment:<id>:<verb>), never the delivery GUID. server.ts forwards on every verified delivery through an optional ServerDeps.operationSink: the already-applied duplicate branch retries the forward instead of suppressing it, and a forward failure after the projection is recorded applied answers 500 so GitHub's redelivery reconciles. With no sink configured, webhook behavior is exactly the prior projection-only behavior. The projector stores no acceptance state.

Fleet — work::operations is the canonical command-acceptance contract the queue-broker handler persists: authenticated principal first, per-verb/per-resource grants with typed refusals, and an acceptance ledger that appends exactly one effect per idempotency key and returns the stored receipt on repeats — the delivery GUID is provenance only, so projector delivery dedupe can neither create nor suppress an acceptance.

Verification

  • bun test test/webhook-delivery-id.test.ts test/hot.test.ts test/webhook-operation-forwarding.test.ts — 18 pass / 0 fail, including operation_forward_retries_after_projector_delivery_is_applied and pmo_dsp_01_existing_webhook_auth_fans_out_to_one_authorized_command (tampered/missing signature and oversized body yield zero Fleet effects).
  • cargo test -p fleet-queue --lib --features client,queue-broker pmo_dsp_01_command_acceptance_is_durable_separate_from_projection_delivery — listed first (not zero-test), then 1 passed; full work:: sweep 43 passed / 0 failed. rustfmt clean.

No production mutation, no second webhook/HMAC service; deployed fan-out liveness remains unverified per the slice's own runtime gate.


Proof this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…d acceptance (#9445)

Projector: add src/operation-forwarder.ts (semantic idempotency key
from repo+issue+comment+verb, never the delivery GUID) and forward on
every verified delivery through an injectable FleetOperationSink in
ServerDeps. The already-applied duplicate branch now retries the
forward instead of suppressing it; a forward failure after the
projection is recorded applied answers 500 so GitHub redelivery
reconciles. No sink configured = projection-only behavior unchanged.

Fleet: add work::operations, the canonical command-acceptance
contract — authenticated principal, per-verb/per-resource grants,
and an acceptance ledger whose stored receipt is returned on repeat
presentation regardless of delivery GUID.

Tests: operation_forward_retries_after_projector_delivery_is_applied
and pmo_dsp_01_existing_webhook_auth_fans_out_to_one_authorized_command
(bun, 18/18 across the three webhook files);
pmo_dsp_01_command_acceptance_is_durable_separate_from_projection_delivery
(cargo, listed then run; work:: sweep 43/43).
@dezren39
dezren39 requested a review from a team as a code owner November 23, 2026 04:14
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a1a74916-0b2c-449e-8ef8-064f1bcca4ca
Commits

Reviewing files that changed from the base of the PR and between 4656bfe and 07b790c.

Files selected for processing: 6

  • pkgs/fleet/crates/fleet-queue/src/work/mod.rs
  • pkgs/fleet/crates/fleet-queue/src/work/operations.rs
  • pm-stack/projector/src/operation-forwarder.ts
  • pm-stack/projector/src/server.ts
  • pm-stack/projector/test/webhook-delivery-id.test.ts
  • pm-stack/projector/test/webhook-operation-forwarding.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39
dezren39 merged commit 8e79a27 into main Nov 23, 2026
2 checks passed
@dezren39
dezren39 deleted the lane-dn/9445-dsp01 branch November 23, 2026 04:15
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.

1 participant