code-coordinator 0.5.483__py3-none-any.whl → 0.5.485__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {code_coordinator-0.5.483.dist-info → code_coordinator-0.5.485.dist-info}/METADATA +1 -1
- {code_coordinator-0.5.483.dist-info → code_coordinator-0.5.485.dist-info}/RECORD +8 -8
- coord/commands/drive_queue.py +91 -3
- coord/drive_queue.py +142 -8
- {code_coordinator-0.5.483.dist-info → code_coordinator-0.5.485.dist-info}/WHEEL +0 -0
- {code_coordinator-0.5.483.dist-info → code_coordinator-0.5.485.dist-info}/entry_points.txt +0 -0
- {code_coordinator-0.5.483.dist-info → code_coordinator-0.5.485.dist-info}/licenses/LICENSE +0 -0
- {code_coordinator-0.5.483.dist-info → code_coordinator-0.5.485.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
code_coordinator-0.5.
|
|
1
|
+
code_coordinator-0.5.485.dist-info/licenses/LICENSE,sha256=851BVZZwf_pEv2ydSlMmcZrwnwSS5YJ98wdLze7lyL8,4212
|
|
2
2
|
coord/__init__.py,sha256=3FN2qrrxtW87xSsSD557YcMwHLDahnFK8LvqQI7Wlf4,9783
|
|
3
3
|
coord/_board_mapping.py,sha256=dA5BmLcpDpy_JoK0SbZMUOklT9Dd5o5zxlNEeFM6JPE,12403
|
|
4
4
|
coord/acceptance.py,sha256=FHvFwstoJbFiGik-_a5FzKI5D5_kxSzWi2ePNKTM6hM,116533
|
|
@@ -45,7 +45,7 @@ coord/dist_name.py,sha256=XDhumYscJahwcaKjmSw135HYsnXQjwGGxRo0Qv4b0xM,5583
|
|
|
45
45
|
coord/dr_promote.py,sha256=xS9fFvzrY-EjSEj1XMSwD7RtjbBhhXZT76XFLnddDng,60329
|
|
46
46
|
coord/dr_verify.py,sha256=sIRNLFkDZFEv_kY2Z-shsoGiPIbeE17sccnoJG2-7mI,44757
|
|
47
47
|
coord/drive.py,sha256=m5LYxE9zsYf8o7lQEpF2a_TDc6Cr2Gymnp7j2S5Uqpc,314295
|
|
48
|
-
coord/drive_queue.py,sha256=
|
|
48
|
+
coord/drive_queue.py,sha256=LFecxK0TV1wWFc25AETu91hUlzBL7E8A4C6ZoU08qwQ,352957
|
|
49
49
|
coord/drive_state.py,sha256=kcXegGRbPQ1e6EA6ZJsJOE3lIHH4iU3-40-0b25rDPg,62015
|
|
50
50
|
coord/events.py,sha256=EJroWy2kahye59nRyIhAgyciO-Qe2eU0ktkqqDPkWx0,13565
|
|
51
51
|
coord/failure_class.py,sha256=sKSecojnNU7RMDPsMnV-Bk5590Dtzz-qAXghGNmyzR4,37653
|
|
@@ -150,7 +150,7 @@ coord/commands/dispatch.py,sha256=dXMU2NsztsPC_CME3C7SN7S6EagVaYp7r-_18bMGOFA,10
|
|
|
150
150
|
coord/commands/dispatch_workers.py,sha256=NDWx95R1YZ01iVMM0xGseLhLqVRXbLlZLhkorjMBGpw,220719
|
|
151
151
|
coord/commands/dr.py,sha256=dVPJN2eZypKBH-YfwXbceveju3noQROI2uPihN66l70,9012
|
|
152
152
|
coord/commands/drive.py,sha256=r0qNudGpVEHGfe_i9GDXRR6jBtpLP2H6yZgeqLbDMsM,29381
|
|
153
|
-
coord/commands/drive_queue.py,sha256=
|
|
153
|
+
coord/commands/drive_queue.py,sha256=5A-q9HCfATgjaMAl5u5ibMuhOfzm1Seq4XQ0gPkLWhE,275215
|
|
154
154
|
coord/commands/gate_a.py,sha256=A_QFAPWklA-WWARpKl1kgovEyRojpwnfdHsjnaCGRQo,12046
|
|
155
155
|
coord/commands/gates.py,sha256=qCMbmEOpxU12sS21nE9Ct2mPEslUCIRpyQniDpRtT5g,3685
|
|
156
156
|
coord/commands/issues.py,sha256=WzlD__t3VnkH_LcqgduMvc6tHt7THr_1yLn5QP8HGJw,34246
|
|
@@ -269,8 +269,8 @@ coord/skills/review-verdict-recovery/SKILL.md,sha256=Grg8GWkJLK20ct2YiigbTFfNOki
|
|
|
269
269
|
coord/skills/tui-quadraui-workflow/SKILL.md,sha256=4hUZza9wSSnPhf0eRAOh2r_MQZxK2pXYO5g-kxmJq-U,3832
|
|
270
270
|
coord/skills/update-issue/SKILL.md,sha256=VrPinEmLZrCSNDrnz96hQomyO403o5c4i0RdsnUnWA0,3642
|
|
271
271
|
coord/templates/deploy-cloudflare.node.yml,sha256=icsTiWn2ziQJnpZODhhFKYlnqjt2xAXsbwlQufdxhuM,2078
|
|
272
|
-
code_coordinator-0.5.
|
|
273
|
-
code_coordinator-0.5.
|
|
274
|
-
code_coordinator-0.5.
|
|
275
|
-
code_coordinator-0.5.
|
|
276
|
-
code_coordinator-0.5.
|
|
272
|
+
code_coordinator-0.5.485.dist-info/METADATA,sha256=uY2UTZqp8CTyYAeOHo80lZNP9Jync8Jr2DREYWfFRcg,27178
|
|
273
|
+
code_coordinator-0.5.485.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
274
|
+
code_coordinator-0.5.485.dist-info/entry_points.txt,sha256=o-Hq8pvG7ReGePvN_4iOKjLNqiq-MJ43HbPurqjNPZo,41
|
|
275
|
+
code_coordinator-0.5.485.dist-info/top_level.txt,sha256=w5sTrXesTCebhXyYv2qufOZGo0PoD1Lxgn0Q3MAXjh4,6
|
|
276
|
+
code_coordinator-0.5.485.dist-info/RECORD,,
|
coord/commands/drive_queue.py
CHANGED
|
@@ -1239,6 +1239,13 @@ def drive_queue_list(repo: str | None, output_json: bool, config_path: Path) ->
|
|
|
1239
1239
|
else {}
|
|
1240
1240
|
)
|
|
1241
1241
|
states = {e.key: e.state for e in all_entries}
|
|
1242
|
+
# #3368: `diagnose_blocked_after`'s `dep_reasons` param, threaded through
|
|
1243
|
+
# here too — so `list`/`status`'s re-derived `dependency_reason` (below)
|
|
1244
|
+
# never disagrees with what a live tick would compute for the same
|
|
1245
|
+
# `after=` graph: a dep whose OWN `last_reason` is #2806's "unconfirmed
|
|
1246
|
+
# probe failure" text must read the same way here as it does in
|
|
1247
|
+
# `coord.drive_queue._resolve_prereqs`.
|
|
1248
|
+
dep_reasons = {e.key: e.last_reason for e in all_entries}
|
|
1242
1249
|
cycle_keys: dict[str, str] = {}
|
|
1243
1250
|
cycle = find_cycle({e.key: list(e.after) for e in all_entries})
|
|
1244
1251
|
if cycle is not None:
|
|
@@ -1246,6 +1253,40 @@ def drive_queue_list(repo: str | None, output_json: bool, config_path: Path) ->
|
|
|
1246
1253
|
for key in cycle:
|
|
1247
1254
|
cycle_keys[key] = message
|
|
1248
1255
|
|
|
1256
|
+
# #3369: `states` above is a single static snapshot of the raw persisted
|
|
1257
|
+
# rows — sufficient for a dependent whose pre-req is DIRECTLY `blocked`
|
|
1258
|
+
# on #2806's unconfirmed-probe text (that shape is matched straight off
|
|
1259
|
+
# `dep_reasons`), but not for one two or more `after=` hops from it. A
|
|
1260
|
+
# live tick discovers that second hop in the SAME pass — position order
|
|
1261
|
+
# means `states[dep]` is already flipped to `waiting` by the time a
|
|
1262
|
+
# later entry's own verdict is derived (`plan_tick`'s `STATE_BLOCKED`
|
|
1263
|
+
# loop mutates `states` as it walks) — but `list` never runs a tick, so
|
|
1264
|
+
# without this it kept reporting "it will never satisfy" for every
|
|
1265
|
+
# entry beyond the first hop, contradicting what the very next real tick
|
|
1266
|
+
# would compute for the identical graph (the vimcode#1059..#1069
|
|
1267
|
+
# incident: six dependents chained behind one unconfirmed probe
|
|
1268
|
+
# failure). This mirrors `_reconcile_blocked_after`'s own resume guard,
|
|
1269
|
+
# entry by entry, walked in the same position order a real tick uses:
|
|
1270
|
+
# only a row whose OWN `last_reason` is already `_resolve_prereqs`'s
|
|
1271
|
+
# unsatisfiable-`after=` verdict (never a permanent #1844/#2019 refusal
|
|
1272
|
+
# or an unrelated cause) is a candidate, and it only cascades as
|
|
1273
|
+
# `waiting` here if a fresh `diagnose_blocked_after` — against this SAME
|
|
1274
|
+
# progressively-corrected view — agrees it is no longer unsatisfiable.
|
|
1275
|
+
cascaded_states = dict(states)
|
|
1276
|
+
if board is not None:
|
|
1277
|
+
for candidate in sorted(all_entries, key=lambda e: (e.position, e.key)):
|
|
1278
|
+
if candidate.state != STATE_BLOCKED or not candidate.after:
|
|
1279
|
+
continue
|
|
1280
|
+
if is_permanent_block_reason(candidate.last_reason):
|
|
1281
|
+
continue
|
|
1282
|
+
if not is_unsatisfiable_prereq_reason(candidate.last_reason):
|
|
1283
|
+
continue
|
|
1284
|
+
pre_diag = diagnose_blocked_after(
|
|
1285
|
+
candidate, board, cascaded_states, cycle_keys, dep_reasons=dep_reasons
|
|
1286
|
+
)
|
|
1287
|
+
if not pre_diag.unsatisfiable:
|
|
1288
|
+
cascaded_states[candidate.key] = STATE_WAITING
|
|
1289
|
+
|
|
1249
1290
|
for entry in entries:
|
|
1250
1291
|
diagnosed = (
|
|
1251
1292
|
board is not None and entry.state in _DIAGNOSABLE_STATES and bool(entry.after)
|
|
@@ -1253,7 +1294,9 @@ def drive_queue_list(repo: str | None, output_json: bool, config_path: Path) ->
|
|
|
1253
1294
|
unsatisfied = entry.after
|
|
1254
1295
|
dependency_reason = ""
|
|
1255
1296
|
if diagnosed:
|
|
1256
|
-
diagnosis = diagnose_blocked_after(
|
|
1297
|
+
diagnosis = diagnose_blocked_after(
|
|
1298
|
+
entry, board, cascaded_states, cycle_keys, dep_reasons=dep_reasons
|
|
1299
|
+
)
|
|
1257
1300
|
unsatisfied = diagnosis.unsatisfied
|
|
1258
1301
|
dependency_reason = diagnosis.dependency_reason
|
|
1259
1302
|
|
|
@@ -1327,8 +1370,32 @@ def drive_queue_list(repo: str | None, output_json: bool, config_path: Path) ->
|
|
|
1327
1370
|
if entry.hold_scope == HOLD_SCOPE_FLEET:
|
|
1328
1371
|
bits.append("scope=fleet")
|
|
1329
1372
|
click.echo(" ".join(bits))
|
|
1330
|
-
|
|
1331
|
-
|
|
1373
|
+
# #3369: a dependency-caused row's `last:` line is, by default, the
|
|
1374
|
+
# frozen `entry.last_reason` a PAST tick wrote — which can say "it
|
|
1375
|
+
# will never satisfy" about a pre-req whose OWN current state has
|
|
1376
|
+
# since turned out to be a retryable #2806 probe failure rather than
|
|
1377
|
+
# a confirmed-still-shut gate (#3368), or that only became true two
|
|
1378
|
+
# `after=` hops away from where the actual retry is happening (this
|
|
1379
|
+
# row's diagnosis cascades through `cascaded_states` above the same
|
|
1380
|
+
# way a live tick's own position-ordered walk would). `diagnosis.
|
|
1381
|
+
# dependency_reason` is already the CURRENT `_resolve_prereqs`
|
|
1382
|
+
# verdict against that same graph — showing it here instead of the
|
|
1383
|
+
# frozen text is the same "recomputed, never read off the frozen
|
|
1384
|
+
# last_reason" rule #2183 already applies to the `after=` list
|
|
1385
|
+
# itself (see `unsatisfied` above) and to which remedy note prints
|
|
1386
|
+
# below, just closing the one place that rule didn't yet reach: the
|
|
1387
|
+
# dependent's own headline reason. A row that is NOT dependency-
|
|
1388
|
+
# caused (no `after=`, or its real cause is unrelated to it) keeps
|
|
1389
|
+
# showing its own frozen `last_reason` exactly as before.
|
|
1390
|
+
using_fresh_reason = diagnosed and bool(dependency_reason)
|
|
1391
|
+
display_reason = dependency_reason if using_fresh_reason else entry.last_reason
|
|
1392
|
+
# The age suffix (#2133) times how long `entry.last_reason` has sat
|
|
1393
|
+
# unrevalidated — meaningless (and actively misleading, implying the
|
|
1394
|
+
# fresh sentence is itself stale) once that text has been swapped
|
|
1395
|
+
# for a diagnosis computed THIS call.
|
|
1396
|
+
age_suffix = "" if using_fresh_reason else _reason_age_suffix(entry, now)
|
|
1397
|
+
if display_reason:
|
|
1398
|
+
click.echo(f" last{age_suffix}: {display_reason}")
|
|
1332
1399
|
if diagnosed:
|
|
1333
1400
|
# #2183 point 4: `blocked`/`failed` is terminal — say so where the
|
|
1334
1401
|
# operator is already reading the row, not just in an unrelated
|
|
@@ -4215,6 +4282,27 @@ def _fetch_live_prereq_terminal(
|
|
|
4215
4282
|
if board.facts(e.key).landed:
|
|
4216
4283
|
continue
|
|
4217
4284
|
targets.add(e.key)
|
|
4285
|
+
# #3368: a `parked`/`blocked`/`failed` entry's OWN key gets the same
|
|
4286
|
+
# live re-check, bounded exactly like the #2850 `running` case just
|
|
4287
|
+
# above — the vimcode#1059 incident: a `blocked` row merged out of band
|
|
4288
|
+
# (an operator `coord drive` to completion) and stayed `blocked` forever
|
|
4289
|
+
# because `coord.drive_queue`'s #2055 re-check trusted only the cached
|
|
4290
|
+
# `board.facts(key).landed`, and this key was never added as a live-check
|
|
4291
|
+
# TARGET at all when no OTHER entry's `after=` happened to name it (a
|
|
4292
|
+
# leaf issue with no dependents chained behind it). Every dependent
|
|
4293
|
+
# ALREADY gets a live re-check of its pre-reqs via the loop above; a
|
|
4294
|
+
# `blocked`/`parked`/`failed` entry deserves the identical chance to
|
|
4295
|
+
# notice its OWN issue landed, whether or not anything is chained after
|
|
4296
|
+
# it — same "one question, one answer" reasoning the #2850 widening
|
|
4297
|
+
# above already established for `running`.
|
|
4298
|
+
for e in entries:
|
|
4299
|
+
if e.state not in (STATE_PARKED, STATE_BLOCKED, STATE_FAILED):
|
|
4300
|
+
continue
|
|
4301
|
+
if e.key in targets:
|
|
4302
|
+
continue
|
|
4303
|
+
if board.facts(e.key).landed:
|
|
4304
|
+
continue
|
|
4305
|
+
targets.add(e.key)
|
|
4218
4306
|
if not targets:
|
|
4219
4307
|
return {}
|
|
4220
4308
|
|
coord/drive_queue.py
CHANGED
|
@@ -2320,6 +2320,7 @@ def _resolve_prereqs(
|
|
|
2320
2320
|
cycle_keys: Mapping[str, str],
|
|
2321
2321
|
held_gates: Mapping[str, Hold] | None = None,
|
|
2322
2322
|
live_prereq_terminal: Mapping[str, bool] | None = None,
|
|
2323
|
+
dep_reasons: Mapping[str, str] | None = None,
|
|
2323
2324
|
) -> _Verdict:
|
|
2324
2325
|
"""Decide whether *entry* may launch now.
|
|
2325
2326
|
|
|
@@ -2365,6 +2366,22 @@ def _resolve_prereqs(
|
|
|
2365
2366
|
all. So it is now ALSO consulted there, for every ``dep_state`` other
|
|
2366
2367
|
than ``STATE_DONE``: a pre-req that demonstrably landed must satisfy
|
|
2367
2368
|
the dependent whatever its own queue row happens to claim.
|
|
2369
|
+
|
|
2370
|
+
*dep_reasons* (#3368) maps a dep key to its OWN current ``last_reason`` —
|
|
2371
|
+
the same "prefer this tick's fresh write over the frozen snapshot" map
|
|
2372
|
+
``plan_tick`` already threads to the backoff check
|
|
2373
|
+
(``effective_last_reason``). Consulted only in the ``dep_state in
|
|
2374
|
+
(STATE_BLOCKED, STATE_FAILED)`` branch below: a dep sitting `blocked` on
|
|
2375
|
+
:func:`is_unconfirmed_block_reason` — #2806's "gate could not be read
|
|
2376
|
+
this tick, not a confirmed-still-shut gate" verdict — is, by that
|
|
2377
|
+
verdict's OWN text, retryable, not terminal. Rendering the dependent's
|
|
2378
|
+
verdict as "it will never satisfy" (unsatisfiable, blocks and escalates)
|
|
2379
|
+
for that shape contradicts the very reason it is quoting; this instead
|
|
2380
|
+
returns an ordinary unsatisfied deferral ("waiting on ... retrying"),
|
|
2381
|
+
which keeps the dependent's position and re-derives a fresh verdict next
|
|
2382
|
+
tick — exactly like waiting on any other still-in-flight dep. A dep
|
|
2383
|
+
ABSENT here, or `blocked`/`failed` for any OTHER reason, keeps the
|
|
2384
|
+
pre-#3368 "it will never satisfy" verdict unchanged.
|
|
2368
2385
|
"""
|
|
2369
2386
|
if entry.key in cycle_keys:
|
|
2370
2387
|
return _Verdict(False, True, cycle_keys[entry.key])
|
|
@@ -2414,6 +2431,25 @@ def _resolve_prereqs(
|
|
|
2414
2431
|
# landed, whatever its queue row claims.
|
|
2415
2432
|
continue
|
|
2416
2433
|
if dep_state in (STATE_BLOCKED, STATE_FAILED):
|
|
2434
|
+
dep_reason = (dep_reasons or {}).get(dep)
|
|
2435
|
+
if dep_state == STATE_BLOCKED and _is_unconfirmed_block_reason(
|
|
2436
|
+
dep_reason
|
|
2437
|
+
):
|
|
2438
|
+
# #3368: *dep*'s own text already says its block is an
|
|
2439
|
+
# unconfirmed probe failure, not a confirmed-still-shut
|
|
2440
|
+
# gate (#2806) — rendering this dependent's verdict as
|
|
2441
|
+
# permanent would contradict the very reason it quotes.
|
|
2442
|
+
# An ordinary deferral, not a block: this entry keeps its
|
|
2443
|
+
# position and re-derives fresh next tick, same as
|
|
2444
|
+
# waiting on any other still-in-flight dep.
|
|
2445
|
+
return _Verdict(
|
|
2446
|
+
False,
|
|
2447
|
+
False,
|
|
2448
|
+
f"waiting on {dep} (queued, blocked, but its own gate "
|
|
2449
|
+
"reading is an unconfirmed probe failure, not a "
|
|
2450
|
+
"confirmed-still-shut gate — retrying, not blocked "
|
|
2451
|
+
"permanently, #3368)",
|
|
2452
|
+
)
|
|
2417
2453
|
return _Verdict(
|
|
2418
2454
|
False,
|
|
2419
2455
|
True,
|
|
@@ -2480,6 +2516,7 @@ def diagnose_blocked_after(
|
|
|
2480
2516
|
states: Mapping[str, str],
|
|
2481
2517
|
cycle_keys: Mapping[str, str],
|
|
2482
2518
|
live_prereq_terminal: Mapping[str, bool] | None = None,
|
|
2519
|
+
dep_reasons: Mapping[str, str] | None = None,
|
|
2483
2520
|
) -> BlockedAfterDiagnosis:
|
|
2484
2521
|
"""Re-check a `blocked`/`failed` row's `after=` graph against the CURRENT
|
|
2485
2522
|
board, fresh on every render (#2183).
|
|
@@ -2525,6 +2562,15 @@ def diagnose_blocked_after(
|
|
|
2525
2562
|
``unsatisfied`` here too, for the identical reason: a pre-req that a live
|
|
2526
2563
|
read just confirmed closed/merged is not a caption worth showing as
|
|
2527
2564
|
still-pending just because the cached board hasn't caught up yet.
|
|
2565
|
+
|
|
2566
|
+
*dep_reasons* (#3368) is passed straight through to
|
|
2567
|
+
:func:`_resolve_prereqs` — see its own docstring. Threading it through
|
|
2568
|
+
here (not just the launch walk) is what lets :func:`_reconcile_blocked_
|
|
2569
|
+
after` resume a dependent off an "it will never satisfy" verdict the
|
|
2570
|
+
moment the named pre-req's own block turns out to be an unconfirmed
|
|
2571
|
+
probe failure rather than a confirmed-still-shut gate, and what lets
|
|
2572
|
+
`coord drive-queue list`/`status` (#2183's rendering) compute the exact
|
|
2573
|
+
same verdict a live tick would.
|
|
2528
2574
|
"""
|
|
2529
2575
|
live_terminal = live_prereq_terminal or {}
|
|
2530
2576
|
unsatisfied = tuple(
|
|
@@ -2538,6 +2584,7 @@ def diagnose_blocked_after(
|
|
|
2538
2584
|
verdict = _resolve_prereqs(
|
|
2539
2585
|
entry, board, states, cycle_keys, held_gates={},
|
|
2540
2586
|
live_prereq_terminal=live_prereq_terminal,
|
|
2587
|
+
dep_reasons=dep_reasons,
|
|
2541
2588
|
)
|
|
2542
2589
|
return BlockedAfterDiagnosis(
|
|
2543
2590
|
unsatisfied,
|
|
@@ -2594,6 +2641,43 @@ def is_unsatisfiable_prereq_reason(text: str | None) -> bool:
|
|
|
2594
2641
|
return _is_unsatisfiable_prereq_reason(text)
|
|
2595
2642
|
|
|
2596
2643
|
|
|
2644
|
+
# #3368: the substring unique to `_reconcile_blocked_unreadable`'s #2806
|
|
2645
|
+
# verdict — "I probed this entry's merge gate this tick and the probe itself
|
|
2646
|
+
# failed" as opposed to "I probed it and it is still shut". A `blocked` dep
|
|
2647
|
+
# resting on THIS text is explicitly retryable, not terminal: #2230's sweep
|
|
2648
|
+
# tries again next tick rather than having confirmed anything is actually
|
|
2649
|
+
# still closed. `_resolve_prereqs` needs to tell the two apart for a
|
|
2650
|
+
# DEPENDENT's own verdict — see its `dep_state in (STATE_BLOCKED,
|
|
2651
|
+
# STATE_FAILED)` branch — so a chain stuck behind an unconfirmed probe
|
|
2652
|
+
# failure reads as "waiting, retrying" rather than "it will never satisfy".
|
|
2653
|
+
# Defined once here, and consumed by `_reconcile_blocked_unreadable`'s own
|
|
2654
|
+
# f-string below, so the marker text and the check for it can never drift
|
|
2655
|
+
# apart (one question, one answer).
|
|
2656
|
+
_UNCONFIRMED_BLOCK_MARKER = "NOT a confirmed-still-shut gate, only a failed probe"
|
|
2657
|
+
|
|
2658
|
+
|
|
2659
|
+
def _is_unconfirmed_block_reason(text: str | None) -> bool:
|
|
2660
|
+
"""Whether *text* is `_reconcile_blocked_unreadable`'s #2806
|
|
2661
|
+
"gate could not be read this tick" verdict — see
|
|
2662
|
+
:data:`_UNCONFIRMED_BLOCK_MARKER`.
|
|
2663
|
+
"""
|
|
2664
|
+
if not text:
|
|
2665
|
+
return False
|
|
2666
|
+
return _UNCONFIRMED_BLOCK_MARKER in text
|
|
2667
|
+
|
|
2668
|
+
|
|
2669
|
+
def is_unconfirmed_block_reason(text: str | None) -> bool:
|
|
2670
|
+
"""Public alias for :func:`_is_unconfirmed_block_reason`.
|
|
2671
|
+
|
|
2672
|
+
#3368: a pre-req's own `blocked` row can be resting on #2806's
|
|
2673
|
+
"gate_unreadable" verdict — an explicitly RETRYABLE probe failure, not a
|
|
2674
|
+
confirmed-still-shut gate. `coord.commands.drive_queue` and tests use
|
|
2675
|
+
this alias the same way they already use
|
|
2676
|
+
:func:`is_unsatisfiable_prereq_reason`.
|
|
2677
|
+
"""
|
|
2678
|
+
return _is_unconfirmed_block_reason(text)
|
|
2679
|
+
|
|
2680
|
+
|
|
2597
2681
|
# ── #2944: the guaranteed-false wait ─────────────────────────────────────────
|
|
2598
2682
|
#
|
|
2599
2683
|
# An entry with `attempts == 0` has never been dispatched: no `coord drive`
|
|
@@ -2792,6 +2876,7 @@ def _reconcile_blocked_after(
|
|
|
2792
2876
|
states: Mapping[str, str],
|
|
2793
2877
|
cycle_keys: Mapping[str, str],
|
|
2794
2878
|
live_prereq_terminal: Mapping[str, bool] | None = None,
|
|
2879
|
+
dep_reasons: Mapping[str, str] | None = None,
|
|
2795
2880
|
) -> Reconcile | None:
|
|
2796
2881
|
"""#2362: resume a `blocked` entry whose ONLY cause was an unsatisfiable
|
|
2797
2882
|
`after=` pre-req, once every named pre-req has since landed. #2756:
|
|
@@ -2872,7 +2957,7 @@ def _reconcile_blocked_after(
|
|
|
2872
2957
|
if not _is_unsatisfiable_prereq_reason(entry.last_reason):
|
|
2873
2958
|
return None
|
|
2874
2959
|
diagnosis = diagnose_blocked_after(
|
|
2875
|
-
entry, board, states, cycle_keys, live_prereq_terminal
|
|
2960
|
+
entry, board, states, cycle_keys, live_prereq_terminal, dep_reasons
|
|
2876
2961
|
)
|
|
2877
2962
|
if diagnosis.unsatisfiable:
|
|
2878
2963
|
return None
|
|
@@ -4591,7 +4676,7 @@ def _reconcile_blocked_unreadable(
|
|
|
4591
4676
|
return None
|
|
4592
4677
|
reason = (
|
|
4593
4678
|
f"{entry.key}'s merge gate could not be read this tick ({note}) — "
|
|
4594
|
-
"this is
|
|
4679
|
+
f"this is {_UNCONFIRMED_BLOCK_MARKER}; "
|
|
4595
4680
|
"#2230's sweep will try again next tick rather than guessing (#2806)"
|
|
4596
4681
|
)
|
|
4597
4682
|
return Reconcile(
|
|
@@ -5604,13 +5689,45 @@ def plan_tick(
|
|
|
5604
5689
|
# have no other re-check, so the board keeps reporting finished work as
|
|
5605
5690
|
# outstanding until someone notices and runs
|
|
5606
5691
|
# `coord drive-queue remove`. See #1956 for a live instance.
|
|
5692
|
+
#
|
|
5693
|
+
# #3368: `facts.landed` ALONE is the same periodic `/board` cache
|
|
5694
|
+
# `_resolve_prereqs`'s dependent-side check learned, via #2602/#2850, NOT
|
|
5695
|
+
# to trust unconditionally — a `parked`/`blocked`/`failed` row's OWN
|
|
5696
|
+
# issue can merge out of band (an operator's `coord drive` to
|
|
5697
|
+
# completion, same as the vimcode#1059 incident) and outrun that cache
|
|
5698
|
+
# exactly as easily as a dependent's pre-req can. Before this, the
|
|
5699
|
+
# dependent side had a live recovery path (`live_prereq_terminal`) and
|
|
5700
|
+
# THIS self-check did not — so a leaf `blocked` row with no dependent
|
|
5701
|
+
# naming it in `after=` had no live check racing for it at all, and even
|
|
5702
|
+
# a row WITH a dependent only got saved indirectly, by that dependent's
|
|
5703
|
+
# OWN `after=` re-derivation (`_reconcile_blocked_after`) rather than
|
|
5704
|
+
# this row's own state ever correcting. `live_prereq_terminal` is the
|
|
5705
|
+
# SAME per-tick live re-check both call sites already share — one
|
|
5706
|
+
# question ("has this key's issue actually landed?"), one answer,
|
|
5707
|
+
# whether asked on behalf of the row itself or a dependent chained
|
|
5708
|
+
# `--after` it.
|
|
5607
5709
|
for entry in ordered:
|
|
5608
5710
|
if entry.state not in (STATE_PARKED, STATE_BLOCKED, STATE_FAILED):
|
|
5609
5711
|
continue
|
|
5610
5712
|
facts = board.facts(entry.key)
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5713
|
+
live_landed = (live_prereq_terminal or {}).get(entry.key, False)
|
|
5714
|
+
if facts.landed or live_landed:
|
|
5715
|
+
if facts.landed:
|
|
5716
|
+
witness = "merged" if facts.merged else "closed"
|
|
5717
|
+
reason = f"done — issue already {witness} while {entry.state} (#2055)"
|
|
5718
|
+
else:
|
|
5719
|
+
# #3368: the cached board does not (yet) show this landed,
|
|
5720
|
+
# but a live re-check taken THIS tick confirms the issue is
|
|
5721
|
+
# closed or its PR merged — `github_ops.work_is_terminal`
|
|
5722
|
+
# (see `_fetch_live_prereq_terminal`) does not distinguish
|
|
5723
|
+
# which, so neither does this text; the honest claim is "the
|
|
5724
|
+
# live probe confirmed terminal", not a specific witness the
|
|
5725
|
+
# probe never actually observed.
|
|
5726
|
+
reason = (
|
|
5727
|
+
f"done — a live re-check this tick confirms the issue is "
|
|
5728
|
+
f"already closed or its PR merged while {entry.state} "
|
|
5729
|
+
"(#3368), independent of the cached board"
|
|
5730
|
+
)
|
|
5614
5731
|
reconciles.append(
|
|
5615
5732
|
Reconcile(
|
|
5616
5733
|
entry.key,
|
|
@@ -5645,7 +5762,12 @@ def plan_tick(
|
|
|
5645
5762
|
# shapes ("it will never satisfy", and #2602's "not queued, not
|
|
5646
5763
|
# merged and not open") — see :func:`_reconcile_blocked_after`.
|
|
5647
5764
|
blocked_reconcile = _reconcile_blocked_after(
|
|
5648
|
-
entry,
|
|
5765
|
+
entry,
|
|
5766
|
+
board,
|
|
5767
|
+
states,
|
|
5768
|
+
cycle_keys,
|
|
5769
|
+
live_prereq_terminal,
|
|
5770
|
+
effective_last_reason,
|
|
5649
5771
|
)
|
|
5650
5772
|
if blocked_reconcile is None:
|
|
5651
5773
|
# #2230: re-examine a `blocked` entry against the CURRENT gate
|
|
@@ -6243,7 +6365,13 @@ def plan_tick(
|
|
|
6243
6365
|
)
|
|
6244
6366
|
continue
|
|
6245
6367
|
verdict = _resolve_prereqs(
|
|
6246
|
-
entry,
|
|
6368
|
+
entry,
|
|
6369
|
+
board,
|
|
6370
|
+
states,
|
|
6371
|
+
cycle_keys,
|
|
6372
|
+
held_gates,
|
|
6373
|
+
live_prereq_terminal,
|
|
6374
|
+
effective_last_reason,
|
|
6247
6375
|
)
|
|
6248
6376
|
if not verdict.satisfied:
|
|
6249
6377
|
deferrals.append(
|
|
@@ -6329,7 +6457,13 @@ def plan_tick(
|
|
|
6329
6457
|
landed_keys.add(entry.key)
|
|
6330
6458
|
continue
|
|
6331
6459
|
verdict = _resolve_prereqs(
|
|
6332
|
-
entry,
|
|
6460
|
+
entry,
|
|
6461
|
+
board,
|
|
6462
|
+
states,
|
|
6463
|
+
cycle_keys,
|
|
6464
|
+
held_gates,
|
|
6465
|
+
live_prereq_terminal,
|
|
6466
|
+
effective_last_reason,
|
|
6333
6467
|
)
|
|
6334
6468
|
if verdict.unsatisfiable:
|
|
6335
6469
|
blocked.append(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|