# Local 33-Story API Coverage Report

- generated_at: `2026-05-07`
- latest_refresh_at: `2026-05-10`
- mode: `api-only`
- environment: `local bootstrap`
- frontend: `http://127.0.0.1:5177`
- backend: `http://127.0.0.1:3103`
- run_id: `local-api-33-full-final-v2`
- report_json: `.runtime/watchdog/runs/api/local-api-33-full-final-v2/report.json`
- report_md: `.runtime/watchdog/runs/api/local-api-33-full-final-v2/report.md`

## Summary

- stories: `33`
- executed: `33`
- passed: `21`
- failed: `12`
- blocked: `0`
- infra_error: `0`
- pass_rate: `63.6%`

## Latest/Latest Blocker Refresh

Latest recheck used:

- downstream `origin/main`: `b01bb6f6be548698a975d3821bc355210fd1ea1a`
- upstream `origin/main`: `2526ced686cf43eaf8b3e1676ec2cefaa7e8f7ac`

Observed result under this pair:

- `overlay-readiness-api`: `passed`
- several old readiness `500` / setup-object failures collapsed into more precise blocked or upstream-runtime outcomes

### Current Blocked Case -> Issue Mapping

| Case | Linked product issues | Latest local outcome | Current blocker classification | Current blocker issue |
| --- | --- | --- | --- | --- |
| `approval-definition-readiness-api` | `#1118`, `#1124` | `infra_error` | upstream runtime gap: `ProcessDefinition` seed/query/create path no longer matches current runtime contract and still cannot create through generic sObject path | `#1192` |
| `reporting-definition-readiness-api` | `#1118`, `#1111` | `blocked` | mixed gap: case still uses stale `DashboardFolder` query contract; deeper runtime gap blocks `Report` / `Dashboard` fixture materialization through generic sObject path | `#1194` |
| `integration-pack-readiness-api` | `#1118`, `#170` | `skipped` | still waiting on downstream webhook/config fixture materialization; direct `_System_Webhook` create probe also exposed the same generic setup-object key-prefix runtime gap | none filed yet |
| `security-bootstrap-readiness-api` | `#1118`, `#730`, `#731`, `#732`, `#761` | `infra_error` | downstream seed intent is clear, but `PermissionSetAssignment` create now fails on runtime key-prefix handling before readiness assertions run | none filed yet |
| `users-roles-sharing-admin-api` | `#731`, `#1138` | `failed` | `UserRole` / `Group` create succeeds, but `GroupMember` create fails on runtime key-prefix handling | none filed yet |

### Net Effect On Issue Association

- approval blockers are no longer just “missing downstream fixture”; they now map to upstream runtime blocker `#1192`
- reporting blockers are no longer just “missing report rows”; they now map to upstream runtime blocker `#1194`
- security / sharing still map to the original story issues, but the current failing edge is runtime create-path behavior rather than simple downstream absence
- integration is still primarily tracked as a downstream fixture gap in story terms, but latest probing shows a likely upstream runtime gap if we try to materialize `_System_Webhook` through the generic API path

## Scene Breakdown

| Scene | Passed | Failed | Total |
| --- | ---: | ---: | ---: |
| `account` | 1 | 0 | 1 |
| `campaign` | 3 | 1 | 4 |
| `integration` | 0 | 1 | 1 |
| `lead` | 4 | 1 | 5 |
| `login-auth` | 0 | 1 | 1 |
| `opportunity` | 4 | 1 | 5 |
| `quote-approval-order-contract` | 4 | 2 | 6 |
| `reports-dashboards` | 0 | 1 | 1 |
| `security-and-visibility` | 2 | 1 | 3 |
| `setup-admin-metadata` | 3 | 3 | 6 |

## Test-Owned Fixes Applied In This Pass

- `quote-create-api`: fixed seed contact selector from `watchdog+contact@example.invalid` to `watchdog.contact@example.invalid`
- `quote-line-items-api`: narrowed seeded quote selector to `ExpirationDate = '2030-12-15'` to avoid draft-quote state bleed between runs
- result: no remaining `infra_error`; all `12` remaining failures are usable product/config findings

## Confirmed Product Gaps

| Story | Case | Evidence | Conclusion |
| --- | --- | --- | --- |
| `#763` | `campaign-add-members-api` | older locked-ref local run returned `400 INSERT_FAILED` with `validation error on field 'Status': validator with ID 'runtime_scoped_picklist' not found`; fresh validation against upstream `origin/main` now passes for both create and same-`run-id` replay | current downstream blocker is ref-lock lag, not an active upstream mainline capability gap |
| `#780` | `oauth-compatibility-api` | `/services/oauth2/token` returns `200` and an `access_token`, but no `refresh_token`, so refresh/revoke steps cannot execute | OAuth password grant does not currently satisfy refresh-token compatibility expected by the story |
| `#745` | `opportunity-stage-progress-api` | `PATCH Opportunity` persists `StageName=Technical Validation` and `CloseDate=2026-12-31`, but queried `Probability` is still `null` | Opportunity stage progression lacks expected derived side-effect fields after stage change |

## Confirmed Config / Seed / Bootstrap Gaps

| Story | Case | Missing Runtime Asset | Evidence |
| --- | --- | --- | --- |
| `#170` | `integration-hubspot-sync-api` | webhook config rows | `_System_Webhook` query returns `0` rows |
| `#761` | `lead-admin-config-api` | lead record types | `RecordType WHERE SobjectType = 'Lead'` returns `0` rows |
| `#160` | `approval-submit-tab-api` | approval definitions | `ProcessDefinition` query returns `0` rows |
| `#771` | `quote-approval-submit-api` | quote approval definitions | `ProcessDefinition` query returns `0` rows |
| `#171` | `reports-dashboards-api` | report metadata / seeded reports | `Report` query returns `0` rows |
| `#732` | `security-effective-access-api` | restricted visibility fixture data | `Opportunity WHERE Name = 'Watchdog Visible Restricted Opportunity'` returns `0` rows |
| `#159` | `approval-criteria-admin-api` | approval process definitions | `ProcessDefinition` query returns `0` rows |
| `#167` | `page-layout-admin-api` | profile layout rows | `ProfileLayout` query returns `0` rows |
| `#731` | `users-roles-sharing-admin-api` | group / sharing rows | `Group` query returns `0` rows |

## Passed Case Inventory

| Scene | Passed Cases |
| --- | --- |
| `account` | `account-detail-actions-api` |
| `campaign` | `campaign-create-edit-api`, `campaign-list-customize-api`, `campaign-member-status-admin-api` |
| `lead` | `lead-browse-search-view-api`, `lead-convert-api`, `lead-create-persist-api`, `lead-status-progress-api` |
| `opportunity` | `opportunity-field-updates-api`, `opportunity-products-api`, `opportunity-tabs-actions-api`, `opportunity-weekly-update-api` |
| `quote-approval-order-contract` | `contract-management-api`, `order-create-api`, `quote-create-api`, `quote-line-items-api` |
| `security-and-visibility` | `activity-timeline-api`, `labels-validation-feedback-api` |
| `setup-admin-metadata` | `flow-admin-authoring-api`, `object-schema-admin-api`, `permission-set-admin-api` |

## Failure Matrix

| Story | Scene | Case | Type | Current State |
| --- | --- | --- | --- | --- |
| `#763` | `campaign` | `campaign-add-members-api` | `ref-lock-gap` | upstream `origin/main` is green after `NexusCRM#499`; downstream locked ref still needs upgrade |
| `#170` | `integration` | `integration-hubspot-sync-api` | `config-gap` | webhooks not seeded / configured |
| `#761` | `lead` | `lead-admin-config-api` | `config-gap` | lead record types absent |
| `#780` | `login-auth` | `oauth-compatibility-api` | `product-gap` | refresh token flow missing |
| `#745` | `opportunity` | `opportunity-stage-progress-api` | `product-gap` | derived probability/forecast side effects absent |
| `#160` | `quote-approval-order-contract` | `approval-submit-tab-api` | `config-gap` | approval definitions absent |
| `#771` | `quote-approval-order-contract` | `quote-approval-submit-api` | `config-gap` | approval definitions absent |
| `#171` | `reports-dashboards` | `reports-dashboards-api` | `config-gap` | reports absent |
| `#732` | `security-and-visibility` | `security-effective-access-api` | `config-gap` | restricted opportunity fixture absent |
| `#159` | `setup-admin-metadata` | `approval-criteria-admin-api` | `config-gap` | approval definitions absent |
| `#167` | `setup-admin-metadata` | `page-layout-admin-api` | `config-gap` | profile layouts absent |
| `#731` | `setup-admin-metadata` | `users-roles-sharing-admin-api` | `config-gap` | groups absent |

## Next Actions

1. Fix the `2` active product gaps first: OAuth refresh-token contract and opportunity stage side-effect derivation.
2. Extend local/bootstrap seed so the `9` config-gap stories have concrete rows for `ProcessDefinition`, `Report`, `_System_Webhook`, `RecordType`, `ProfileLayout`, `Group`, and the restricted visibility opportunity fixture.
3. Upgrade downstream `stack.lock.json` to a ref that contains `NexusCRM#499`, then rerun `campaign-add-members-api` on the locked stack to retire the historical scoped-picklist failure from local reports.
4. Treat `approval-definition-readiness-api` and `reporting-definition-readiness-api` as upstream-runtime tracked blockers first, not pure downstream seed work.
