What to do next, in order. Built from the Pastel triage, tonight's adversarial verification, and a read of the 24-hour medusa-core push against the actual repos.
The push describes _distributor-link.ts, distributor-hierarchy.ts and “37 tests” as already coded. They are — but only in _worktrees/medusa-core, on no branch, tracked by nothing. One git worktree remove or a disk hiccup and it's gone, and WS-P, WS1 and WS3 all sit behind it. It also carries edits to approve/route.ts and the NPI routes, which WS-N and the #60 board fix will both touch.
cd ~/Projects/Path/path2-src/_worktrees/medusa-core git checkout -b ws0/pairs-and-hierarchy git add -A && git commit -m "WS0: pair-aware links, hierarchy validation, commission plan" git push gh ws0/pairs-and-hierarchy
Run it in the medusa-core terminal — I stayed out of that working tree while it's live.
order_shop_* orders be editable in the admin at all?
Their line values are 100× inflated; 40,530 of 51,497 lines still cents-scaled.repair-migrated-line-cents.ts runs. Editing them today produces wrong money.ETIMEDOUT upstream failures — do this before WS6 starts redeploying core repeatedly, or every deploy degrades live shoppers.repair-migrated-line-cents.ts (after #36) and backfill-native-onaccount-invoices.ts. Dry-run, back up, record in the verification log.| Claim | Verdict | What's actually true |
|---|---|---|
| WS0 already coded | uncommitted | Exists only in a local worktree, on no branch. See the callout above. |
| “Tier ladder rates — not in these 24h” | mis-scoped | It isn't a rate decision. Tier-1 customers are paying retail today; it's a same-day data sync. |
Engine order_payment_status | wrong source | Reads raw Shopify status; must go through deriveSettlement() or store-credit-settled orders drop out. |
| Portal read-path handoff | will break KPIs | The portal has no pagination and sums KPIs client-side over the full array. Adding limit/offset without shipping the portal change silently under-reports every total. |
portal.payout in core | absent | Zero references in core. WS5 needs raw SQL and a check that core's role can write the portal schema. |
| “67 duplicate groups” | unfounded | That figure appears nowhere. The register says 72 pairs / 153 excess rows / ≈$4,630. |
has_distributor / NPI gate approval | advisory only | Both are computed and shown, but approve/route.ts never enforces them. D6 is new server-side work. |
Finance settings via POST | it's PUT | Minor, but the route exports GET and PUT only. |
| Migration name collision | already fixed | Remediated and now CI-guarded. Still verify the credit CHECK constraints actually exist. |
| Comment | Action | Why |
|---|---|---|
| SF #7 | reopened | Resolved 8 minutes after posting with zero replies — and the section was never removed. Assigned to Alfie. |
| SF #15 | reopened | Closed as a “Pastel proxy” artifact with no log evidence; Maria's #61/#62 today are the same shape. |
| SF #27 | corrected | Closed as “video intentionally not wired” — Alfie contradicted that 53 minutes later. Left closed, record fixed. |
| SA #49 #43 #42 | corrected | All three were reported fixed to Carlos. None were. |
| SA #5 | corrected | “Couldn't reproduce” was wrong — his two failing requests are in the 22:01 log. |
| SA #47 #44 #51 #16 | corrected | Wrong retest steps, wrong timing, partial fixes described as complete. |
| SF #48 · SA #65 | root cause | Tier pricing explained honestly, including retracting “Tier 1 = standard price”. |
| SA #61 #62 | re-diagnosed | I guessed a restart; the logs showed impersonation sessions ending. Corrected in-thread within minutes. |