{
  "$schema": "./pull-request.schema.json",
  "id": "PR-EXAMPLE-017",
  "policyId": "PR-POLICY-EXAMPLE-001",
  "version": 3,
  "state": "author-ready",
  "title": "Expose bounded retry diagnostics",
  "repository": {
    "name": "juniper-vale/signal-bridge",
    "href": "https://code.example.test/juniper-vale/signal-bridge",
    "baseRef": "main",
    "headRef": "feature/retry-diagnostics"
  },
  "authorId": "PERSON-AUTHOR-001",
  "preparedAt": "2026-07-31",
  "workItems": [
    {
      "id": "WORK-EXAMPLE-314",
      "href": "https://work.example.test/items/WORK-EXAMPLE-314",
      "relationship": "motivates-change"
    }
  ],
  "context": {
    "problem": "Fictional coordinators could see a stalled handoff but not the bounded retry state needed to diagnose it.",
    "approach": "Add a read-only retry-state projection behind the existing permission guard and preserve the write path.",
    "expectedImpact": "The change may reduce diagnostic escalations; this fictional record does not claim a measured outcome."
  },
  "scope": {
    "includedAreas": [
      "src/retry/retry-diagnostic-projection.example.ts",
      "src/auth/retry-diagnostic-permission.example.ts",
      "test/retry/retry-diagnostic-projection.example.test.ts",
      "docs/operators/retry-diagnostics.example.md"
    ],
    "excluded": [
      "Retry execution",
      "Permission-model redesign",
      "Historical backfill",
      "Alert policy",
      "Release configuration"
    ],
    "nonGoals": [
      "Guarantee fewer support escalations",
      "Authorize deployment",
      "Replace repository review policy"
    ]
  },
  "evidence": [
    {
      "id": "EVIDENCE-PR-001",
      "type": "support-signal",
      "observedAt": "2026-07-24",
      "ownerId": "PERSON-SUPPORT-001",
      "href": "https://support.example.test/themes/EVIDENCE-PR-001",
      "finding": "Six synthetic support notes asked who could diagnose a stalled handoff.",
      "limitation": "Fictional notes are not representative customer evidence."
    },
    {
      "id": "EVIDENCE-PR-002",
      "type": "reproduction",
      "observedAt": "2026-07-29",
      "ownerId": "PERSON-AUTHOR-001",
      "href": "https://evidence.example.test/reproductions/EVIDENCE-PR-002",
      "finding": "A synthetic denied-role fixture reproduced the missing diagnostic projection before the change.",
      "limitation": "The fixture covers one fictional permission path."
    },
    {
      "id": "EVIDENCE-PR-003",
      "type": "test-result",
      "observedAt": "2026-07-31",
      "ownerId": "PERSON-AUTHOR-001",
      "href": "https://evidence.example.test/runs/EVIDENCE-PR-003",
      "finding": "The focused fictional unit suite reported 18 passing assertions in the stated environment.",
      "limitation": "Author-reported synthetic result; CI and repository policy remain authoritative."
    }
  ],
  "tests": [
    {
      "id": "TEST-PR-001",
      "category": "unit",
      "command": "pnpm test --filter retry-diagnostic-projection",
      "environment": "Node.js 22 on fictional Linux CI-compatible container",
      "result": "passed",
      "evidenceIds": ["EVIDENCE-PR-003"],
      "limitation": "Focused unit scope does not cover the entire repository."
    },
    {
      "id": "TEST-PR-002",
      "category": "typecheck",
      "command": "pnpm typecheck --filter signal-bridge",
      "environment": "Node.js 22 on fictional Linux CI-compatible container",
      "result": "passed",
      "evidenceIds": ["EVIDENCE-PR-003"],
      "limitation": "Type compatibility does not prove runtime authorization."
    },
    {
      "id": "TEST-PR-003",
      "category": "manual",
      "command": "manual: request retry diagnostics as the denied-role fixture",
      "environment": "Fictional local fixture with reserved example identities",
      "result": "passed",
      "evidenceIds": ["EVIDENCE-PR-002"],
      "limitation": "One synthetic role matrix is not a security assessment."
    }
  ],
  "risks": [
    {
      "id": "RISK-PR-001",
      "severity": "high",
      "scenario": "A diagnostic field becomes visible to a role without permission.",
      "mitigation": "Keep the existing permission guard as the only projection entry point and retain the denied-role test.",
      "ownerId": "PERSON-SECURITY-001",
      "evidenceIds": ["EVIDENCE-PR-002", "EVIDENCE-PR-003"]
    },
    {
      "id": "RISK-PR-002",
      "severity": "medium",
      "scenario": "A serializer consumer depends on the prior response shape.",
      "mitigation": "Version the projection and validate rollback against the prior response fixture.",
      "ownerId": "PERSON-AUTHOR-001",
      "evidenceIds": ["EVIDENCE-PR-003"]
    }
  ],
  "migration": {
    "required": true,
    "planId": "MIGRATION-EXAMPLE-017",
    "planHref": "https://delivery.example.test/migrations/MIGRATION-EXAMPLE-017",
    "validation": "Compare the versioned read-model projection with the synthetic prior-shape fixture.",
    "rollbackRef": "ROLLBACK-PR-001",
    "ownerId": "PERSON-DATA-001",
    "limitation": "This description does not authorize or schedule migration execution."
  },
  "rollback": {
    "id": "ROLLBACK-PR-001",
    "triggers": [
      "Denied-role fixture exposes any retry diagnostic field",
      "Versioned consumer fails prior-shape compatibility validation"
    ],
    "steps": [
      "Disable the read-only diagnostic projection through the owned configuration path",
      "Revert the serializer mapping for the versioned response",
      "Run the prior-shape and denied-role validation records again"
    ],
    "validation": "Confirm the prior response fixture and denied-role fixture both match their recorded safe shapes.",
    "ownerId": "PERSON-OPERATIONS-001",
    "limitation": "Rollback steps are fictional guidance and require separate operational authorization."
  },
  "documentation": [
    {
      "id": "DOC-PR-001",
      "state": "updated",
      "href": "https://docs.example.test/operators/retry-diagnostics",
      "rationale": "Operators need the bounded diagnostic meaning and escalation boundary."
    },
    {
      "id": "DOC-PR-002",
      "state": "not-needed",
      "href": "https://docs.example.test/api/public-change-log",
      "rationale": "The fictional endpoint is internal and does not alter the public contract."
    }
  ],
  "dependencies": [
    {
      "id": "DEPENDENCY-PR-001",
      "ownerId": "PERSON-PLATFORM-001",
      "state": "resolved",
      "href": "https://dependencies.example.test/records/DEPENDENCY-PR-001",
      "impact": "The versioned serializer supports the new read-only projection.",
      "limitation": "The dependency result is synthetic and does not prove production compatibility."
    }
  ],
  "reviewerGuidance": {
    "suggestedSequence": [
      "Existing permission guard",
      "Read-only projection mapping",
      "Denied-role and focused unit tests",
      "Migration reference",
      "Rollback validation"
    ],
    "focusAreas": [
      "Permission boundary remains centralized",
      "New fields cannot enter the write path",
      "Versioned response preserves prior-shape behavior"
    ],
    "generatedAreas": [],
    "contextOwnerIds": ["PERSON-SECURITY-001", "PERSON-DATA-001"]
  },
  "boundaries": {
    "codeReviewCompleted": false,
    "ciEnforced": false,
    "approvalGranted": false,
    "mergeAuthorized": false,
    "securityGuaranteed": false,
    "complianceCertified": false,
    "migrationAuthorized": false,
    "deploymentAuthorized": false,
    "rollbackAuthorized": false,
    "productionVerified": false
  }
}
