From 4ba0f327665916e942ab01ddab8124094e723505 Mon Sep 17 00:00:00 2001 From: Rongsong Shen Date: Fri, 25 Sep 2026 10:03:10 +0000 Subject: [PATCH] chore(scheduler-allocation): mark implementation complete All 16 subtasks were already done; check the 6 parent tasks and set phase implementation-complete. Verified 2026-09-24/25: scheduler suite 87/87 (ASAN), live multi-host e2e PASS, HA soak sequential + chaotic PASS. Out-of-scope follow-ups stay open: bug-1766, bug-1768, bug-1769, bug-1771, bug-1860. Co-Authored-By: Claude Opus 5.5 (1M context) --- .kiro/specs/scheduler-allocation/spec.json | 7 ++++--- .kiro/specs/scheduler-allocation/tasks.md | 12 ++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.kiro/specs/scheduler-allocation/spec.json b/.kiro/specs/scheduler-allocation/spec.json index 505f3875..ed96982b 100644 --- a/.kiro/specs/scheduler-allocation/spec.json +++ b/.kiro/specs/scheduler-allocation/spec.json @@ -1,9 +1,9 @@ { "feature_name": "scheduler-allocation", "created_at": "2026-07-27T00:00:00Z", - "updated_at": "2026-09-04T00:00:00Z", + "updated_at": "2026-09-25T00:00:00Z", "language": "en", - "phase": "tasks-generated", + "phase": "implementation-complete", "parent_spec": "scheduler-framework", "description": "Lazy iterator-driven allocation architecture with parallel job support and resreq caching for the XCE scheduler", "approvals": { @@ -34,5 +34,6 @@ "implementation": 196, "validation": 197 } - } + }, + "completion_note": "Verified 2026-09-24/25 (kiro-verify-completion): scheduler suite 87/87 ASAN; live multi-host e2e PASS (33-task plain + array element split across 2 hosts, DONE) after bug-1857 fixture fix e216cb9a; HA soak sequential PASS + chaotic PASS (after bug-1858 393a07c2, bug-1859 444fd504, bug-1862 f0762962); bug-1770 (no parjob production path) fixed by resreq-maxtasks-wiring. Out-of-scope follow-ups remain open: bug-1766, bug-1768, bug-1769, bug-1771 (adjacent allocation defects), bug-1860." } diff --git a/.kiro/specs/scheduler-allocation/tasks.md b/.kiro/specs/scheduler-allocation/tasks.md index c491caf7..06b2e0cc 100644 --- a/.kiro/specs/scheduler-allocation/tasks.md +++ b/.kiro/specs/scheduler-allocation/tasks.md @@ -1,6 +1,6 @@ # Implementation Plan -- [ ] 1. Foundation: allocation data types and extension points +- [x] 1. Foundation: allocation data types and extension points - [x] 1.1 Add the lazy plan-generation and host-candidate iterator contracts - Define the plan representation as a partition of a job's task count into per-host slot buckets, most-preferred ordering to be produced by whichever component generates plans - Define the plan-iterator and host-iterator contracts (initialize, produce next candidate, release resources) as reusable abstractions any allocator can adopt @@ -22,7 +22,7 @@ - Observable: a passing test shows debit-then-reverse leaves provisional usage unchanged from baseline - _Requirements: 4.2_ -- [ ] 2. Core: shared allocation infrastructure +- [x] 2. Core: shared allocation infrastructure - [x] 2.1 (P) Implement and test the lazy host-candidate iterator - Implement the shared host-candidate iterator against the existing select-expression evaluator and resource-availability check, with no allocator-specific logic - Ensure each call advances a real cancellation point so a long-running scan can be safely interrupted @@ -38,7 +38,7 @@ - _Requirements: 7.1, 7.3, 7.4, 7.5_ - _Boundary: alloc_cache.c_ -- [ ] 3. Core: seqjob allocator rewrap +- [x] 3. Core: seqjob allocator rewrap - [x] 3.1 Rewrap seqjob's allocation onto the shared iterators - Restructure seqjob's allocation to use the shared plan-iterator and host-iterator contracts as a trivial single-bucket case, replacing its own inline worker-collection loop - Add a guard so seqjob's resource-request preparation only ever acts on single-task jobs, closing the fan-out gap this creates for the parallel allocator's later fix @@ -50,7 +50,7 @@ - _Requirements: 9.1_ - _Depends: 3.1_ -- [ ] 4. Core: parjob combinatorial allocation +- [x] 4. Core: parjob combinatorial allocation - [x] 4.1 Implement parjob's lazy combinatorial plan generation - Generate candidate plans as a pure function of a job's task count: ascending host-count order, one balanced partition per host-count, descending bucket order within each plan - Ensure each call advances a real cancellation point and that plan generation never inspects live worker state (a pure function of the task count alone) @@ -71,7 +71,7 @@ - Observable: a successfully allocated multi-host job's allocation record correctly lists every claimed host with its own slot count - _Requirements: 4.3_ -- [ ] 5. Integration: dispatch and cache wiring +- [x] 5. Integration: dispatch and cache wiring - [x] 5.1 (P) Wire the unsatisfiable-resreq cache around the allocator dispatch - Before running full allocation for a primary resource request (whether the job's own request is a primary, or one nested inside a compound or an alternative), look up its fingerprint in the cache; on a hit, pend the job immediately using the stored reason category without invoking either allocator - When an allocator exhausts every candidate plan, populate the cache with the job's fingerprint and the resulting reason category before pending the job @@ -91,7 +91,7 @@ - _Requirements: 4.1, 4.2, 4.3_ - _Depends: 5.1, 5.2, 4.3_ -- [ ] 6. Validation: regression and soak +- [x] 6. Validation: regression and soak - [x] 6.1 Full existing scheduler regression pass - Run the existing scheduler test suite, updating only the assertions that directly exercised the eager-one-shot or stub-return behavior this feature replaces - Confirm the compound and alternative resource-request dispatch paths remain exercised, unmodified, by their existing tests