Operant Studio
OPER-QA-14-CORRECT

[OPER-QA-14-CORRECT] Split PR #296 into 4 stages; fix reconciliation logic

Suggested
Justin Cooke

Body

## Context

`OPER-QA-14` was dispatcher-reconciled to DONE because PR #297 (the publish pipeline half) merged. But PR #296 (the actual `packages/qa-inbox-ui/` package, 1,249 LOC) is stuck OPEN, failing the `Check PR size` gate (size/XL is a hard block per `rules/pr-size-budget.md`) and still marked draft.

The package doesn't exist on `main`. That means:
- `@operant/qa-inbox-ui` cannot be published (nothing to publish)
- `POR-QA-2` (Portico QATaskInbox mount, PR #1702) is stuck as `[WIP]` because its import target doesn't exist
- OPER-9D (npm publish ticket I just filed) is premature until this lands

Fix: split PR #296 into 4 stages of ~300 LOC each, following the same PR-size-budget pattern OPER-127 used successfully (9 stages). Also update dispatcher's reconciliation logic so it doesn't mark a multi-PR ticket DONE when only some PRs merged.

## Goal

`packages/qa-inbox-ui/` exists on `operant-studio` `main` at 0.1.0. All 4 split PRs merged. OPER-QA-14 status accurately reflects reality.

## Human-gate steps

None — pure agent work.

## Agent-owned steps (dispatcher)

1. Close PR #296 with a comment explaining the split.
2. Open 4 new PRs off `main`, sized ~300 LOC each:
   - **Stage 1**: `packages/qa-inbox-ui/{package.json, tsconfig*.json, README.md}` + empty `src/index.ts` — the package skeleton (< 200 LOC)
   - **Stage 2**: `src/types.ts` + `src/theme.ts` — types and theme (~200 LOC)
   - **Stage 3**: `src/inbox.tsx` + `src/index.ts` exports — the component itself (~400 LOC; if still > 300, split component into subcomponent files)
   - **Stage 4**: `src/__tests__/inbox.test.tsx` + `vitest.config.ts` — tests (~300 LOC)
3. Each PR uses `[BLOCKED]` pattern: 2 blocks on 1, 3 blocks on 2, 4 blocks on 3.
4. Verify `pnpm --filter @operant/qa-inbox-ui build` and `pnpm --filter @operant/qa-inbox-ui test` pass at each stage.
5. After stage 4 merges, verify `packages/qa-inbox-ui/dist/` builds cleanly.

## Reconciliation-logic fix (also agent-owned)

- `packages/dispatcher/src/merged-pr-precheck.ts`: when reconciling a multi-PR ticket, only mark DONE if ALL PRs referencing the ticket ID are merged. Currently marks DONE on any merge.
- Vitest `packages/dispatcher/src/__tests__/merged-pr-precheck.test.ts`: a ticket with 2 open + 1 merged PR stays IN_REVIEW, not DONE.
- Backfill: after this ticket's stages merge, verify OPER-QA-14 shows DONE only when stage 4 lands.

## Acceptance Criteria

- 4 PRs opened, each < 300 LOC, all pass `Check PR size` gate
- All 4 PRs merged into `operant-studio` `main`
- `packages/qa-inbox-ui/package.json` present on main at version `0.1.0`
- `pnpm --filter @operant/qa-inbox-ui build` produces `dist/` locally
- Dispatcher reconciliation logic no longer prematurely marks multi-PR tickets DONE (Vitest passes)
- OPER-9D (npm publish) now has a real package to publish

## Why this matters

**This is the actual Fiesta UAT unblock.** POR-QA-2 cannot merge until this ships. Every other Fiesta ticket depends on the QA Inbox rendering, which depends on this package existing.

blocked_by: []


---
<!-- admission-rejected -->
**Admission rejected (missing_feature_id):** ticket body is missing `feature_id: FEAT-...` frontmatter — declare which feature this ticket implements

Attachments

Loading attachments…

Comments

Loading comments…