Operant Studio
OPER-186

D-29: WRITE_TEST kind added to notify vocabulary

Suggested
Justin Cooke

Body

---
feature_id: FEAT-studio-qa
---

> D-29 ticket 3: WRITE_TEST notify vocabulary. Target FEAT-studio-qa-write-test-tasks (child).

## Context

(PDT decision-memo lineage; see source line below.)

**Source: PDT D-29 (coverage by construction), ticket 3 of 5.**

## What
Extend `packages/qa/src/notify-body.ts`:
- Add `WRITE_TEST: "Write test"` to `KIND_LABEL` (becomes 7th kind alongside RUN_TEST, RETEST_BUG, REVIEW_FAILURE, ANSWER_CLARIFICATION, REVIEW_EVIDENCE, ATTEST_PHASE_COMPLETE)
- Add `WRITE_TEST_LABEL = "write-test"` for Ledger label discrimination
- Add `buildWriteTestBody(cell)` helper alongside `buildRunTestBody`

In `packages/qa/src/notify.ts`:
- After coverage materializer runs, enumerate required cells whose only TestCase is DRAFT
- For each such cell, mint a WRITE_TEST TestAssignment (or create a Ledger Task with WRITE_TEST kind, per current notify.ts pattern)
- Routes to the same inbox as RUN_TEST — inbox distinguishes by KIND_LABEL badge, not separate UI surface (per D-29 amended open question 2 recommendation)

## Acceptance Criteria
- [ ] `notify-body.ts` KIND_LABEL includes WRITE_TEST
- [ ] `buildWriteTestBody` generates a body with the required cell details (feature, runtime, kind, why-required)
- [ ] `notify.ts` mints WRITE_TEST tasks for DRAFT-only cells
- [ ] Idempotency: rerun doesn't create duplicates (same idempotency label pattern as RUN_TEST)

## Feature
FEAT-studio-qa-write-test-tasks (add via feature-map + depmap two-PR sequence FIRST)

## Blocked-by
None (dispatches in parallel with tickets 1 and 2).

## Size / Band
SMALL / assurance.

Attachments

Loading attachments…

Comments

Loading comments…