# Observed production-provider before/after runtime transcript

Worktree: `/home/ubuntu/wt/pr-24406`. Base `6e792117436662208bf2b6eb71ee8d0d88817e43`; candidate `f78d4efb83406ee495171e1252d176384a5aa582`.

40 deterministic matrix cases plus one real public GitCafe payload. Every case calls the actual `GitCafePullRequestProvider.make` → `getChangeRequest` with production GitCafeApi/credential layers, replacing only HttpClient via the existing fakeGitCafe boundary. No copied check normalization or aggregate algorithm. No servers, browser, or live T3 data.

All 12/12 matrix rows R1–R6, A1–A2, P1–P4 captured before and after. Candidate assertions verify returned rows, aggregate value AND property presence, HTTP check-request counts, and absence of writes. Equal-ID first-encounter behavior is observed implementation behavior, not an upstream ordering guarantee.

Deterministic fixtures deliberately send contradictory `failing:1` counts for complete listings. P3/P4 instead use the four explicit counts tables. `matrix-fixtures.json` contains every input and hand-specified expectation; `proof-driver.test.ts` contains complete synthetic pull/status/auxiliary routes.

## Exact regression and suite results

Base command (candidate tests with only the two production source files swapped to base):
```sh
vp test run packages/source-control-gitcafe/src/server/gitCafePullRequestJson.test.ts packages/source-control-gitcafe/src/server/GitCafePullRequestProvider.test.ts -t "keeps only the newest run of a re-run check|reads the checks state from each check’s newest run"
```
Observed: exit 1, **2 failed / 47 skipped**. Converter actual `[failure,success]`, expected `[success]`; provider actual `[[Check,failure],[Check,success]]`, expected `[[Check,success]]`. Exact original ASCII command, full failures and stacks are in `base-regressions.log` and `commands.json`.

Candidate command:
```sh
vp test run packages/source-control-gitcafe/src/server/gitCafePullRequestJson.test.ts packages/source-control-gitcafe/src/server/GitCafePullRequestProvider.test.ts
```
Observed: exit 0, **49 passed**. Separate matrix driver: base exit 0 (observation mode); candidate exit 0 (all expected outputs asserted). The driver writes JSON from returned provider values because vp suppresses successful test stdout.

## Principal stale-count regression: actual JSON

before/base
```json
{
  "checks": [
    {
      "name": "Check",
      "status": "cancelled"
    },
    {
      "name": "Check",
      "status": "success"
    }
  ],
  "checksState": "failing"
}
```
after/candidate
```json
{
  "checks": [
    {
      "name": "Check",
      "status": "success"
    }
  ],
  "checksState": "passing"
}
```

Input: completed cancelled `99`, completed success `100`, same `Check` identity; status counts `{total:2,failing:1,pending:0}`. **Deterministic incident-shaped fixture**, not a claim of a captured live stale aggregate.

## Expanded matrix: actual rows and aggregate

| Case | Before checks | Before state | After checks | After state | Checks GETs before/after |
|---|---|---|---|---|---|
| R1-failure-reverseFalse | Check:failure; Check:success | failing | Check:success | passing | 1/1 |
| R1-failure-reverseTrue | Check:failure; Check:success | failing | Check:success | passing | 1/1 |
| R1-cancelled-reverseFalse | Check:cancelled; Check:success | failing | Check:success | passing | 1/1 |
| R1-cancelled-reverseTrue | Check:cancelled; Check:success | failing | Check:success | passing | 1/1 |
| R2-reverseFalse | Check:failure; Check:success | failing | Check:failure | failing | 1/1 |
| R2-reverseTrue | Check:failure; Check:success | failing | Check:failure | failing | 1/1 |
| R3-queued | Check:failure; Check:pending | failing | Check:pending | pending | 1/1 |
| R3-in_progress | Check:failure; Check:pending | failing | Check:pending | pending | 1/1 |
| R3-action_required | Check:action-required; Check:failure | failing | Check:action-required | pending | 1/1 |
| R4-githubApp | Check:failure; Check:success | failing | Check:failure; Check:success | failing | 1/1 |
| R4-provider | Check:failure; Check:success | failing | Check:failure; Check:success | failing | 1/1 |
| R4-name | A:failure; B:success | failing | A:failure; B:success | failing | 1/1 |
| R5-status | Check:failure; Check:success | failing | Check:failure; Check:success | failing | 1/1 |
| R5-missing | Check:failure; Check:success | failing | Check:failure; Check:success | failing | 1/1 |
| R5-null | Check:failure; Check:success | failing | Check:failure; Check:success | failing | 1/1 |
| R5-nondecimal | Check:failure; Check:success | failing | Check:failure; Check:success | failing | 1/1 |
| R5-mixed | Check:failure; Check:success | failing | Check:failure; Check:success | failing | 1/1 |
| R6-bigint | Check:failure; Check:success | failing | Check:success | passing | 1/1 |
| R6-equal-reverseFalse | Check:failure; Check:success | failing | Check:failure | failing | 1/1 |
| R6-equal-reverseTrue | Check:failure; Check:success | failing | Check:success | passing | 1/1 |
| R6-null-absent | Check:failure; Check:success | failing | Check:success | passing | 1/1 |
| A1-failure | A:failure; Check:success; Pending:pending | failing | A:failure; Check:success; Pending:pending | failing | 1/1 |
| A1-cancelled | A:cancelled; Check:success; Pending:pending | failing | A:cancelled; Check:success; Pending:pending | failing | 1/1 |
| A1-queued | A:pending; Check:success | failing | A:pending; Check:success | pending | 1/1 |
| A1-action_required | A:action-required; Check:success | failing | A:action-required; Check:success | pending | 1/1 |
| A2-success-neutral-skipped | neutral:neutral; skipped:skipped; success:success | failing | neutral:neutral; skipped:skipped; success:success | passing | 1/1 |
| A2-empty | [] | failing | [] | omitted | 1/1 |
| A2-neutral-skipped | neutral:neutral; skipped:skipped | failing | neutral:neutral; skipped:skipped | omitted | 1/1 |
| P1-cross-page | Check:failure; Check:success | failing | Check:success | passing | 2/2 |
| P2-limit | Check:failure ×10; Check:success ×10 | failing | Check:success | failing | 10/10 |
| P2-repeat | Check:failure ×2; Check:success ×2 | failing | Check:success | failing | 2/2 |
| P2-empty | [] | failing | [] | failing | 1/1 |
| P3-zero | Check:success ×2 | omitted | Check:success | omitted | 2/2 |
| P3-failing-pending | Check:success ×2 | failing | Check:success | failing | 2/2 |
| P3-pending | Check:success ×2 | pending | Check:success | pending | 2/2 |
| P3-neither | Check:success ×2 | passing | Check:success | passing | 2/2 |
| P4-zero | [] | omitted | [] | omitted | 0/0 |
| P4-failing-pending | [] | failing | [] | failing | 0/0 |
| P4-pending | [] | pending | [] | pending | 0/0 |
| P4-neither | [] | passing | [] | passing | 0/0 |

## Real GitCafe cancelled/rerun response

Captured read-only using `cafe api` from public [#24508](https://git.cafe/pingdotgg/t3code/pulls/24508), head `ca3661c314bc03e2fede54d1c666fd0082694133`; checks page `next:null`, 32 items. The uploaded sanitized fixture preserves check records and status counts; author identity is replaced by an unavailable actor. Auxiliary reviewer/label/change routes are empty deterministic fixtures. Replay route namespace is remapped to owner/repo/7. No credentials or headers are captured.

Actual `Native fingerprint diff`: older `120937060075` cancelled, newer `120937063370` success, provider github, app github-actions. Base returns both; candidate returns success only. Total returned rows: **32 → 30** (also another replaced run). Status counts already report `{total:30,pending:0,failing:0}`, so both aggregates are passing. This real response proves row cleanup; it does **not** reproduce live stale failing counts.

```json
{
  "before": {
    "id": "LIVE-cancelled-rerun",
    "checks": [
      [
        "Build and Typecheck",
        "success"
      ],
      [
        "Changes",
        "success"
      ],
      [
        "Check",
        "success"
      ],
      [
        "CodeRabbit",
        "success"
      ],
      [
        "Collect PR targets",
        "success"
      ],
      [
        "Deploy relay preview",
        "skipped"
      ],
      [
        "Deploy web preview",
        "skipped"
      ],
      [
        "EAS Preview",
        "skipped"
      ],
      [
        "Label PR 24508",
        "success"
      ],
      [
        "Label PR size",
        "success"
      ],
      [
        "Lint",
        "success"
      ],
      [
        "Macroscope - Approvability Check",
        "neutral"
      ],
      [
        "Macroscope - Correctness Check",
        "success"
      ],
      [
        "Macroscope - Effect Service Conventions",
        "skipped"
      ],
      [
        "Macroscope - Effect Service Conventions",
        "skipped"
      ],
      [
        "Mobile Native Static Analysis",
        "skipped"
      ],
      [
        "Native fingerprint diff",
        "cancelled"
      ],
      [
        "Native fingerprint diff",
        "success"
      ],
      [
        "Prepare PR size config",
        "success"
      ],
      [
        "Release Smoke",
        "skipped"
      ],
      [
        "Rust",
        "skipped"
      ],
      [
        "Sync PR size label definitions",
        "skipped"
      ],
      [
        "Test Server 1",
        "success"
      ],
      [
        "Test Server 2",
        "success"
      ],
      [
        "Test Server 3",
        "success"
      ],
      [
        "Test Server 4",
        "success"
      ],
      [
        "Test Server 5",
        "success"
      ],
      [
        "Test Server 6",
        "success"
      ],
      [
        "Test Server 7",
        "success"
      ],
      [
        "Test Server 8",
        "success"
      ],
      [
        "Test Web",
        "skipped"
      ],
      [
        "Test",
        "success"
      ]
    ],
    "checksState": "passing",
    "checksStatePresent": true,
    "checkRequests": 1,
    "writes": []
  },
  "after": {
    "id": "LIVE-cancelled-rerun",
    "checks": [
      [
        "Build and Typecheck",
        "success"
      ],
      [
        "Changes",
        "success"
      ],
      [
        "Check",
        "success"
      ],
      [
        "CodeRabbit",
        "success"
      ],
      [
        "Collect PR targets",
        "success"
      ],
      [
        "Deploy relay preview",
        "skipped"
      ],
      [
        "Deploy web preview",
        "skipped"
      ],
      [
        "EAS Preview",
        "skipped"
      ],
      [
        "Label PR 24508",
        "success"
      ],
      [
        "Label PR size",
        "success"
      ],
      [
        "Lint",
        "success"
      ],
      [
        "Macroscope - Approvability Check",
        "neutral"
      ],
      [
        "Macroscope - Correctness Check",
        "success"
      ],
      [
        "Macroscope - Effect Service Conventions",
        "skipped"
      ],
      [
        "Mobile Native Static Analysis",
        "skipped"
      ],
      [
        "Native fingerprint diff",
        "success"
      ],
      [
        "Prepare PR size config",
        "success"
      ],
      [
        "Release Smoke",
        "skipped"
      ],
      [
        "Rust",
        "skipped"
      ],
      [
        "Sync PR size label definitions",
        "skipped"
      ],
      [
        "Test Server 1",
        "success"
      ],
      [
        "Test Server 2",
        "success"
      ],
      [
        "Test Server 3",
        "success"
      ],
      [
        "Test Server 4",
        "success"
      ],
      [
        "Test Server 5",
        "success"
      ],
      [
        "Test Server 6",
        "success"
      ],
      [
        "Test Server 7",
        "success"
      ],
      [
        "Test Server 8",
        "success"
      ],
      [
        "Test Web",
        "skipped"
      ],
      [
        "Test",
        "success"
      ]
    ],
    "checksState": "passing",
    "checksStatePresent": true,
    "checkRequests": 1,
    "writes": []
  }
}
```

## Live search bounds and environment

Requested candidate commit checks endpoint returned 0 items. Remote PR head had advanced to `8c1fe57e57479a8dc9eb053ab0d61ae7791a035a`; that head had passing counts. `cafe ci status --pr 24406` reported NOT_FOUND/no CI runs and `cafe ci list --limit 50` returned no items; checks themselves remained accessible. A bounded scan of 20 open PR heads through cafe found the cancelled/rerun above. No GitHub API/gh reads were used.

Environment: machine marker fs-18, Linux x86_64, Node v26.12.1, vp v1.3.0, Vitest v5.0.5, Effect 4.0.5, installed worktree dependencies. Only the specified worktree was used for execution. Base production source files were restored byte-for-byte in finally; no branch checkout or HEAD change. Temporary untracked package driver removed. No tracked diff at completion; no commit/push/watch/comment/body edit.

Unverified matrix rows: **none**. Bounded provenance gap: no accessible live payload with stale failing status counts was found; the principal aggregate regression is proven with a clearly labeled deterministic fixture and the existing production provider. UI/other clients are outside this server-only dispatcher scope.

FRICTION category|happened|prevention
Upstream drift|Remote PR advanced after task brief; requested local SHA remained unchanged|Pin local candidate and base, record remote observation separately.
Payload provenance|Live cancelled/rerun existed but aggregate counts were already corrected|Keep real row-cleanup proof distinct from deterministic stale-count reproduction.
CLI coverage|CI listing returned no runs although commit checks were readable|Use typed cafe first, then cafe api for raw commit-check response bodies.
Test stdout|vp suppresses successful test stdout|Driver writes exact returned-value JSON artifacts in addition to logging.
