docs(scheduler): correct stale bug-1611 status and driver-equivalence steering
The dimension-1 audit (previous commit) reported bug-1611 as only "partially fixed" -- but that assessment worked from bug-1611's own stale narrative text without checking scheduler-sim-eager-reconciliation (a separate spec, completed 2026-09-11, predating this session's audit). That spec already decoupled sim_reconcile_unaccounted_jobs()'s trigger from the JOB_IS_RUN gate, so a job's DISPATCH decision is captured in the same round it is recorded, never deferred to a later confirmation event -- closing bug-1611's original motivating scenario for good. The "residual gap" my own first correction pass invented (an already-RUN-at-snapshot-load job) is also not real: such a job's allocation comes from the snapshot directly (confirmed field-complete by this session's dimension-4 audit), so it's never a reconciliation candidate in the first place. Corrected bug-1611's buglog entry to FIXED and updated scheduler-driver-equivalence.md's stale "Known violations" section (still described both bug-1611 and bug-1613 as open) to reflect current reality, with a pointer to re-verify rather than re-trust either framing. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RLSNJhNoULvVcUhXEFafQC
This commit is contained in:
parent
a643966f50
commit
984a686974
2 changed files with 11 additions and 9 deletions
|
|
@ -20,9 +20,10 @@ Similarly, a `ReplaySession` carries a `decisions` list — the recorded decisio
|
|||
|
||||
## Known violations (evidence trail)
|
||||
|
||||
- **bug-1613** (confirmed): `sched_account_jobs()` is called by `driver.c` but never by `sim_loop.c`, which still uses the older monolithic `xce_core_go()` with no interleaving point for it. Compounding this, `sched_account_jobs()`/`sched_charge_account()`/`sched_update_account()`/`sched_update_res_accounts()` are signatured on `xce_scheduler_t*` (the normal-mode-only driver struct) even though their bodies only ever touch `sched->core` — `xce_sched_sim_driver_t` deliberately has no `xce_scheduler_t*` field (Req 5 AC 17, simulation-isolation boundary), so these functions cannot even be called from the sim driver today without a signature change. `sched_resolve_job_picker()` went through this exact `xce_scheduler_t*` → `xce_sched_core_t*` relocation already (scheduler.h documents it) — the precedent to follow, not a new pattern to invent.
|
||||
- **bug-1611** (suspected same root cause): `sim_loop.c` only reads `decoded_session->decisions` when `sim->verify` is set, purely to compare against freshly-drained live decisions. It is never applied to reconstruct state for a job the live picker in this replay isn't independently re-deciding. This plausibly explains both bug-1611 (no `DISPATCH` decision ever visible for such jobs) and the accounting gap in bug-1613 (their usage is never counted, not even transiently) as one underlying gap, not two.
|
||||
- Both are tracked in `.wolf/buglog.json`; a dedicated fix spec is scoped separately (see `.kiro/specs/` — do not fix inline as a drive-by patch, per the testing discipline below).
|
||||
**UPDATE 2026-09-19 (`/xce-audit-invariants scheduler`, re-run after `scheduler-sim-live-allocation`): both violations below are now FIXED.** The `scheduler-sim-live-allocation` feature made `driver.c`'s and `sim_loop.c`'s per-round sequence call the identical, single-implementation election/allocation/accounting chain (see `.kiro/specs/scheduler-sim-live-allocation/`); `sim_reconcile_unaccounted_jobs()` was independently narrowed to a timing-gap safety net whose own trigger no longer requires a job to have reached `JOB_IS_RUN` (`scheduler-sim-eager-reconciliation`, completed 2026-09-11, predating this update) — closing bug-1611's original real-world scenario (a dispatch and its confirmation landing many rounds apart) for good. See `.wolf/buglog.json`'s bug-1611/bug-1613 entries for full evidence. This section is kept as a historical record of the violation and its resolution — do not re-flag either as open without first re-verifying `sim_loop.c`'s current per-round sequence against `driver.c`'s, per the Testing discipline below.
|
||||
|
||||
- **bug-1613** (FIXED, 2026-08-24 / confirmed still fixed 2026-09-19): `sched_account_jobs()` is called by `driver.c` but never by `sim_loop.c`, which still uses the older monolithic `xce_core_go()` with no interleaving point for it. Compounding this, `sched_account_jobs()`/`sched_charge_account()`/`sched_update_account()`/`sched_update_res_accounts()` are signatured on `xce_scheduler_t*` (the normal-mode-only driver struct) even though their bodies only ever touch `sched->core` — `xce_sched_sim_driver_t` deliberately has no `xce_scheduler_t*` field (Req 5 AC 17, simulation-isolation boundary), so these functions cannot even be called from the sim driver today without a signature change. `sched_resolve_job_picker()` went through this exact `xce_scheduler_t*` → `xce_sched_core_t*` relocation already (scheduler.h documents it) — the precedent to follow, not a new pattern to invent.
|
||||
- **bug-1611** (FIXED, 2026-09-11 via `scheduler-sim-eager-reconciliation`, general case additionally superseded by `scheduler-sim-live-allocation`'s live election/allocation path): `sim_loop.c` only read `decoded_session->decisions` when `sim->verify` was set, purely to compare against freshly-drained live decisions — never applied to reconstruct state for a job the live picker in that replay wasn't independently re-deciding. Same underlying root cause as bug-1613 (both traced to `sim_loop.c` not mirroring a per-round obligation `driver.c` upholds).
|
||||
|
||||
## Testing discipline
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue