dow-prod-tracker/scripts
DJP 200228f79d Workflow test: cover arbitrary shapes (linear, fan-out, fan-in,
diamond, long chain) + rework reset for any pipeline graph

Expands the smoke test from one canonical shape to every pattern a
producer might build:

  - linear A → B → C → D (4 stages, full cascade)
  - fan-out A → {B, C, D} (all branches open simultaneously)
  - fan-in {A, B, C} → D (D stays BLOCKED until *all* parents finish)
  - diamond A → {B, C} → D (both legs must finish before convergence)
  - long chain (10 stages, full cascade walk)
  - rework D → A (full reset of intermediate stages, head spared)
  - rework D → A with B SKIPPED (SKIPPED stays SKIPPED across rework)
  - rework D → C single-step (only D resets)
  - user's pipeline: rework Declined → Inputfile resets
    Internal-Approval + Approved + Declined; Inputfile untouched
  - state-machine: all 7 new shortcut edges + 2 rejection guards

Plus a pure `planReworkReset` helper that mirrors applyRework's
where-clause math, so any pipeline + rework target combination can
be asserted offline without a DB.

Run: npx tsx scripts/test-workflow-logic.ts
57/57 passing at HEAD.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 20:30:24 -04:00
..
backfill-embeddings.ts Phase 0: fork rebrand from hp-prod-tracker 2026-04-20 18:21:39 -04:00
backfill-org-ids.ts feat: add pipeline stage resolver and organization access control 2026-03-14 22:43:43 -05:00
backup-db.sh L'Oréal rebuild: restore review workflow, full rename, /api/v1, Box integration 2026-05-12 17:51:53 -04:00
clean-slate.ts Phase 1: Dow-customized Prisma schema + strip HP-only features 2026-04-20 18:35:14 -04:00
create-admin.ts Phase 5: unified versioning + single-asset-per-revision + holding pen 2026-05-12 19:37:06 -04:00
migrate-to-dynamic-pipelines.ts feat: add pipeline stage resolver and organization access control 2026-03-14 22:43:43 -05:00
recompute-deliverable-statuses.ts Keep Deliverable.status in sync with stage state 2026-04-21 19:55:39 -04:00
seed-dates-catalog.ts feat(calendar): implement calendar view with event filtering and detail display 2026-03-12 21:20:11 -05:00
seed-dates.ts feat(calendar): implement calendar view with event filtering and detail display 2026-03-12 21:20:11 -05:00
test-workflow-logic.ts Workflow test: cover arbitrary shapes (linear, fan-out, fan-in, 2026-05-15 20:30:24 -04:00