myxce/.kiro/specs
Rongsong Shen f854d9facd
docs(scheduler-sim-reconcile-terminal-guard): add approved spec (requirements/design/tasks)
Formalizes the fix for bug-1764 through this project's TDD process:
sim_reconcile_unaccounted_jobs() (sim_loop.c:664) triggers on
job->accounts == NULL alone, with no check on job->state -- a
deliberate widening from scheduler-sim-eager-reconciliation to catch
a PEND job's early-recorded DISPATCH before its RUN confirmation
replays, but one that never excluded jobs already at a terminal state
(DONE/EXIT). Since xce_core_push_events() correctly frees allocs/
accounts on a terminal transition (leaving accounts == NULL, the same
trigger signal), a later round's leftover/duplicate DISPATCH entry for
that job id gets misread as something to reconcile, resurrecting the
allocation on an already-dead job -- directly observable via info
worker's assigned-jobs listing showing a completed job as still
consuming a worker's resources.

Requirement 1 adds a terminal-state exclusion to the trigger check,
mirroring job_state_regresses_terminal()'s existing "terminal is
permanent" invariant (core_events.c). Requirement 2 captures the
resulting REPL-visible outcome without requiring any REPL code change.
The JOBS_PUSH resync-merge branch (core_events.c, bug-1734/bug-1738)
was investigated during design and confirmed to already guard against
this exact problem -- explicitly out of this spec's scope.

Generated via kiro-spec-quick with an inline requirements review gate,
an inline design review gate, and an independent task-graph sanity
review (one NEEDS_FIXES round, repaired: task 2.2's REPL-level
verification mechanism was underspecified, now pins down the exact
capture_dispatch()-driven harness and stray-DISPATCH-injection
technique to use).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAWMhfRJFnmmnG8h97yUDd
2026-09-03 06:43:02 +00:00
..
admin-config-tool test(admin-config-tool): update standby-redirect E2E for bug-1700/1701 2026-08-29 12:10:28 +00:00
build-time-versioning chore(specs): reconcile stale phase/checkbox metadata across 4 specs 2026-08-24 13:04:11 +00:00
clusterconfig-schema-split update documents 2026-08-10 17:51:51 +08:00
commit-batch-window docs: mark scheduler-dispatch-commit tasks complete; add parked commit-batch-window spec 2026-09-01 07:08:43 +00:00
component-failover-adoption chore(specs): reconcile stale phase/checkbox metadata across 4 specs 2026-08-24 13:04:11 +00:00
component-rejoin-resync docs(kiro): reconcile spec metadata, promote 3 new specs, fix template path 2026-08-16 11:02:06 +00:00
config-upgrade-snapshot docs(kiro): reconcile spec metadata, promote 3 new specs, fix template path 2026-08-16 11:02:06 +00:00
controller-status update documents 2026-08-10 17:51:51 +08:00
dirty-content-fingerprint chore(specs): reconcile stale phase/checkbox metadata across 4 specs 2026-08-24 13:04:11 +00:00
election-iomgr-refactor update documents 2026-08-10 17:51:51 +08:00
eliminate-frontend-makefile docs(spec): promote eliminate-frontend-makefile backlog item to a brief 2026-08-27 08:27:55 +00:00
ha-commit-barrier-rollout update documents 2026-08-10 17:51:51 +08:00
ha-commit-durability update documents 2026-08-10 17:51:51 +08:00
ha-commit-engine update documents 2026-08-10 17:51:51 +08:00
ha-config-bootstrap docs(kiro): close 3 stalled specs whose follow-up work already landed 2026-08-16 12:13:15 +00:00
ha-consistency-invariants update documents 2026-08-10 17:51:51 +08:00
ha-convergence-recovery update documents 2026-08-10 17:51:51 +08:00
ha-elect-ctx-lifecycle update documents 2026-08-10 17:51:51 +08:00
ha-entity-snapshots update documents 2026-08-10 17:51:51 +08:00
ha-heartbeat-committed-propagation update documents 2026-08-10 17:51:51 +08:00
ha-heartbeat-liveness update documents 2026-08-10 17:51:51 +08:00
ha-peer-connection-reuse update documents 2026-08-10 17:51:51 +08:00
ha-prevote update documents 2026-08-10 17:51:51 +08:00
ha-repl-hardening update documents 2026-08-10 17:51:51 +08:00
ha-single-leader-role docs: fix unchecked group-header checkboxes across 8 fully-implemented specs 2026-07-07 08:45:41 +00:00
ha-term-safety docs(raft-adapter-conformance): extend controller conformance record with this feature's findings 2026-07-30 03:39:56 +00:00
ha-wal-replication update documents 2026-08-10 17:51:51 +08:00
job-array-single-wal-record fix: bug-1445 -- first-boot promotion check races its own first replay 2026-07-17 10:42:13 +00:00
libxce-failover docs(specs): kiro-validate-impl GO closure for 8 HA/raft specs 2026-07-18 13:27:36 +00:00
raft-adapter-conformance docs(kiro): reconcile spec metadata, promote 3 new specs, fix template path 2026-08-16 11:02:06 +00:00
raft-apply-decoupling fix(controller): bug-1433 async-thread fdatasync block + bug-1434 committed_lsn CAS race 2026-07-11 12:16:28 +00:00
raft-commit-safety docs: promote raft-apply-decoupling spec family from /kiro-discovery 2026-07-03 02:41:11 +00:00
raft-drive-async fix(netio): bug-1447 same-batch endpoint use-after-free in io_worker dispatch 2026-07-18 13:28:04 +00:00
raft-ha-core-safety fix(controller): bug-1433 async-thread fdatasync block + bug-1434 committed_lsn CAS race 2026-07-11 12:16:28 +00:00
raft-library checkpoint: bug-851 root cause + raft TLA+ conformance spec family 2026-06-21 14:02:15 +00:00
raft-log-replication docs: promote raft-apply-decoupling spec family from /kiro-discovery 2026-07-03 02:41:11 +00:00
raft-sim-conformance docs(specs): kiro-validate-impl GO closure for 8 HA/raft specs 2026-07-18 13:27:36 +00:00
resource-distribution-mapping add resource distribution map project 2026-07-23 09:20:26 +00:00
resource-value-verification chore(specs): reconcile stale phase/checkbox metadata across 4 specs 2026-08-24 13:04:11 +00:00
resval-id-decoupling docs(kiro): close 3 stalled specs whose follow-up work already landed 2026-08-16 12:13:15 +00:00
scheduler-allocation chore(specs): add scheduler-sim-eager-reconciliation spec, weekly report, cross-spec sequencing notes 2026-08-24 12:56:35 +00:00
scheduler-config-version-tag docs: save scheduler-config-version-tag spec (requirements/design/tasks) 2026-08-29 11:47:28 +00:00
scheduler-controller-msg-gap docs(kiro): close 3 stalled specs whose follow-up work already landed 2026-08-16 12:13:15 +00:00
scheduler-core chore(specs): reconcile stale phase/checkbox metadata across 4 specs 2026-08-24 13:04:11 +00:00
scheduler-dispatch-commit fix(scheduler): wire mem reservation reconciliation into live rusage event path 2026-09-01 07:08:37 +00:00
scheduler-framework add scheduler related projects 2026-07-31 17:42:13 +08:00
scheduler-preemption chore(specs): add scheduler-sim-eager-reconciliation spec, weekly report, cross-spec sequencing notes 2026-08-24 12:56:35 +00:00
scheduler-sim-decision-parity chore(scheduler-sim-decision-parity): mark feature complete 2026-08-22 13:11:34 +00:00
scheduler-sim-diagnostics docs(kiro): reconcile spec metadata, promote 3 new specs, fix template path 2026-08-16 11:02:06 +00:00
scheduler-sim-eager-reconciliation test(scheduler-sim-eager-reconciliation): task 3.3 full regression confirmation 2026-08-27 06:13:12 +00:00
scheduler-sim-reconcile-terminal-guard docs(scheduler-sim-reconcile-terminal-guard): add approved spec (requirements/design/tasks) 2026-09-03 06:43:02 +00:00
scheduler-sim-repl-verbosity docs(scheduler-sim-repl-verbosity): fix two documentation gaps from final validation 2026-09-02 21:55:50 +00:00
scheduler-sim-step-verbosity docs(scheduler-sim-step-verbosity): task 2.2 - final regression and transcript verification 2026-09-03 05:15:45 +00:00
scheduler-snapshot-job-allocation docs(scheduler-snapshot-job-allocation): sync spec.json phase to implementation-complete 2026-08-30 15:08:00 +00:00
worker-join-refactor checkpoint: bug-851 root cause + raft TLA+ conformance spec family 2026-06-21 14:02:15 +00:00
worker-rejoin-resync fix(worker-rejoin-resync): task 4.4 - gate periodic load-indices send on resync_pending 2026-09-02 03:01:56 +00:00
xce-test-cli-ux docs: save scheduler-snapshot-job-allocation and xce-test-cli-ux spec docs, sync OpenWolf state 2026-08-28 06:30:37 +00:00
xce-test-e2e-primitives fix(controller): bug-1433 async-thread fdatasync block + bug-1434 committed_lsn CAS race 2026-07-11 12:16:28 +00:00
xce-test-rc-file test(xce-test-rc-file): task 3.3 confirm existing automation unaffected 2026-08-26 17:34:17 +00:00
.gitignore chore: baseline snapshot — prior-session work + ha-consistency-invariants spec family 2026-06-11 13:21:50 +00:00