Skip to content

Commit bf10deb

Browse files
os-litantclaude
andauthored
fix(pm): derive check-half-states' H32 seat specimens from the resolved sweep repo (#13006)
seatLane() judges an `@ <repo>` seat-title suffix against the LIVE resolved sweep repo (SWEEP_REPO), so self-test rows spelling `objectui` as the sibling board and `objectstack` as the own board asserted THIS BOARD rather than the property, and inverted wholesale in any install that is not objectstack. Run verbatim in objectui on 2026-08-28 the suite failed exactly four cases, forcing three name-swap-only entries into that repo's upstream-port parity pin. Both names are now derived: OWN_BOARD is the resolved repo's name half, and SIBLING_BOARD is a real neighbouring board picked so the two can never coincide. Specimen spelling only -- no predicate changes, suite count unchanged at 1551. own board (objectstack) 1551 pass (was 1551 pass) PM_SWEEP_REPO=.../objectui 1551 pass (was 4 of 1551 failed) PM_SWEEP_REPO=.../cloud 1551 pass (a board neither name anticipates) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4f14859 commit bf10deb

1 file changed

Lines changed: 24 additions & 6 deletions

File tree

scripts/pm/check-half-states.mjs

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12241,12 +12241,30 @@ function selfTest() {
1224112241
const busy = { unclaimed: 15, inFlight: 7 };
1224212242
const idleLane = { unclaimed: 15, inFlight: 0 };
1224312243

12244+
// The `@ <repo>` specimens below DERIVE both board names rather than spelling
12245+
// them, because `seatLane` judges an at-repo suffix against the LIVE resolved
12246+
// sweep repo — `SWEEP_REPO`, not a constant. A row that hard-codes `objectui`
12247+
// as the sibling and `objectstack` as the own board therefore asserts THIS
12248+
// BOARD instead of the property, and inverts wholesale wherever the file is
12249+
// installed next: run verbatim in objectui on 2026-08-28 the suite failed
12250+
// exactly the four rows those two names feed, which is the one thing a file
12251+
// adopted BY COPY (see `resolveSweepRepo`) may not do. `OWN_BOARD` is the
12252+
// resolved repo's name half — the same half the predicate compares, derived
12253+
// here rather than shared, so a predicate that switched to the OWNER half
12254+
// still goes red. `SIBLING_BOARD` is a real neighbouring board picked so the
12255+
// two can never coincide, which is what stops the FOREIGN rows going
12256+
// vacuously green on a board that happens to be named after the specimen.
12257+
const OWN_BOARD = SWEEP_REPO.repo.split('/')[1];
12258+
const SIBLING_BOARD = OWN_BOARD === 'objectui' ? 'objectstack' : 'objectui';
12259+
const ownLaneSeat = (status = '🟢 os-x') => seat(`[PM seat] domain:devx @ ${OWN_BOARD} — ${status}`);
12260+
const siblingLaneSeat = (status = '🟢 os-x') => seat(`[PM seat] domain:devx @ ${SIBLING_BOARD} — ${status}`);
12261+
1224412262
// The lane parse, across the three measured title shapes.
1224512263
t('H32 lane: a plain domain lane is own-board', seatLane(seat(HELD)).lane, 'domain:spec');
1224612264
t('H32 lane: …and not foreign', seatLane(seat(HELD)).foreign, false);
12247-
t('H32 lane: an `@ sibling` suffix is FOREIGN', seatLane(seat('[PM seat] domain:devx @ objectui — 🟢 os-x')).foreign, true);
12248-
t('H32 lane: an `@ own-repo` suffix is NOT foreign', seatLane(seat('[PM seat] domain:devx @ objectstack — 🟢 os-x')).foreign, false);
12249-
t('H32 lane: …and keeps the bare lane label', seatLane(seat('[PM seat] domain:devx @ objectstack — 🟢 os-x')).lane, 'domain:devx');
12265+
t('H32 lane: an `@ sibling` suffix is FOREIGN', seatLane(siblingLaneSeat()).foreign, true);
12266+
t('H32 lane: an `@ own-repo` suffix is NOT foreign', seatLane(ownLaneSeat()).foreign, false);
12267+
t('H32 lane: …and keeps the bare lane label', seatLane(ownLaneSeat()).lane, 'domain:devx');
1225012268
t('H32 lane: a repo-scoped seat has no countable lane', seatLane(seat('[PM seat] repo:cloud — 🟢 os-x')).lane, null);
1225112269
t('H32 lane: …and is foreign', seatLane(seat('[PM seat] repo:cloud — 🟢 os-x')).foreign, true);
1225212270
t('H32 lane: a lane-less seat (skills) is foreign', seatLane(seat('[PM seat] skills — 🟢 os-zhuang (session_x)')).foreign, true);
@@ -12255,7 +12273,7 @@ function selfTest() {
1225512273

1225612274
// The held/vacant gate — an unheld seat is a ROUTING gap, never 怠工.
1225712275
t('H32 held: 🟢 with a holder', seatIsHeld(seat(HELD)), true);
12258-
t('H32 held: ⏳ vacant is NOT held', seatIsHeld(seat('[PM seat] domain:devx @ objectui — ⏳ vacant')), false);
12276+
t('H32 held: ⏳ vacant is NOT held', seatIsHeld(siblingLaneSeat('⏳ vacant')), false);
1225912277
t('H32 held: 🔴 收班 vacant is NOT held', seatIsHeld(seat('[PM seat] domain:spec — 🔴 收班 vacant · 上一班 os-warren')), false);
1226012278
t('H32 held: ⏸️ paused is NOT held', seatIsHeld(seat('[PM seat] domain:spec — ⏸️ paused')), false);
1226112279
t('H32 held: a Routine seat is excluded (no claim cadence of its own)', seatIsHeld(seat('[PM seat] triage (objectstack-wide) — 🟢 Routine')), false);
@@ -12267,7 +12285,7 @@ function selfTest() {
1226712285
t('H32: work IN FLIGHT is a working seat -> clean', h32SeatIdleOverQueue(seat(HELD), marker('Round-start marker — R6.', 600), busy, NOW32), null);
1226812286
t('H32: an EMPTY queue is a finished lane -> clean', h32SeatIdleOverQueue(seat(HELD), marker('Round-start marker — R6.', 600), { unclaimed: 0, inFlight: 0 }, NOW32), null);
1226912287
t('H32: a vacant seat is out of scope however deep the queue', h32SeatIdleOverQueue(seat('[PM seat] domain:spec — ⏳ vacant'), marker('收班', 6000), idleLane, NOW32), null);
12270-
t('H32: a FOREIGN lane is out of scope (its inventory is unreadable here)', h32SeatIdleOverQueue(seat('[PM seat] domain:devx @ objectui — 🟢 os-x'), marker('Round-start marker', 600), idleLane, NOW32), null);
12288+
t('H32: a FOREIGN lane is out of scope (its inventory is unreadable here)', h32SeatIdleOverQueue(siblingLaneSeat(), marker('Round-start marker', 600), idleLane, NOW32), null);
1227112289
t('H32: a non-seat card is out of scope', h32SeatIdleOverQueue({ ...issue(['pm:queue']), title: HELD }, marker('x', 600), idleLane, NOW32), null);
1227212290

1227312291
// The threshold, at both edges of SEAT_IDLE_STALE_MINUTES.
@@ -12313,7 +12331,7 @@ function selfTest() {
1231312331

1231412332
// The gathering gate buys a fetch only for seats the row can speak about.
1231512333
t('H32 gate: a held own-board seat is a candidate', h32NeedsSeatComments(seat(HELD)), true);
12316-
t('H32 gate: a foreign-lane seat buys no fetch', h32NeedsSeatComments(seat('[PM seat] domain:devx @ objectui — 🟢 os-x')), false);
12334+
t('H32 gate: a foreign-lane seat buys no fetch', h32NeedsSeatComments(siblingLaneSeat()), false);
1231712335
t('H32 gate: a vacant seat buys no fetch', h32NeedsSeatComments(seat('[PM seat] domain:spec — ⏳ vacant')), false);
1231812336
t('H32 gate: a non-seat card buys no fetch', h32NeedsSeatComments(issue(['pm:queue'])), false);
1231912337

0 commit comments

Comments
 (0)