Skip to content

feat(pm-aggregator): gate conflict-ruling writes behind the IdP write-role check (#13798) - #17054

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
lane/2037g-13798-rulings-idp-gate
Nov 30, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
lane/2037g-13798-rulings-idp-gate

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

What

Gates the two conflict-ruling write routes behind the IdP write-role check, completing the aggregator's IdP integration for #13798.

POST /api/conflicts/rulings and DELETE /api/conflicts/rulings were the remaining asserted-drew write routes that enforced only the Cloudflare Access author derivation. Every sibling drew write family — reports resolve / late-update, roadmap annotations (+alias), comments, actions (+batch) — already runs enforceIdpWriteRole first (landed under #13799 / #14411 in src/idp-identity.ts).

Change

+4 lines in pm-stack/aggregator/src/server-write-routes.ts: both ruling routes now run the same gate first, in the same shape as the sibling routes.

  • IdP configured (IDP_PROVIDER_ISSUER set): missing/invalid access token → 401; valid token without the owner/orchestrator role → 403. Roles are read only from the verified token.
  • IdP unconfigured: the gate is inert — behavior byte-identical to today (the module's standing rollout posture).
  • The impl(pm-stack): break-glass — outage queueing + local owner token CLI (#1253 split 6) #9608 break-glass owner token path is untouched (it lives on the identity/outage routes, not these).

Verification

  • Full diff read against the issue's acceptance: this is the last ungated human write family in server-write-routes.ts (machine callback routes — prompt submission/answer, comment triage/github-result, action result, stack-token exchange, outage-queue confirm/reject — keep their own existing auth models and are unchanged).
  • The gate itself is covered by pm-stack/aggregator/test/idp-identity.test.ts (401 missing/malformed, 403 read-only role, owner/orchestrator pass, wrong iss/token_use/exp/signature rejected, discovery outage fails closed).
  • Edited file transpiles clean (Bun.Transpiler, syntax-only).

Refs #13798 (the close-out adjudication + the #13416/#1253 records are posted by lane 2037-G on the issues), #13416, #1253.

Lane: 2037-G (alpha DRIVE author lane, 2026-11-29).


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

…-role check (#13798)

POST and DELETE /api/conflicts/rulings were the remaining asserted-drew write routes enforcing only the Cloudflare Access author derivation; every sibling drew write family (reports resolve/late-update, roadmap annotations, comments, actions) already runs enforceIdpWriteRole first. Add the same gate to both ruling routes: when IDP_PROVIDER_ISSUER is configured, a missing/invalid IdP access token is 401 and a valid token without the owner/orchestrator role is 403; when unconfigured the gate is inert and behavior is unchanged. Roles are read only from the verified token, never the request body.

Lane 2037-G (alpha DRIVE). Refs #13798, #13416.
@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

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: 3c224b08-182d-4698-9604-5b59969ea53f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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

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.

0 participants