docs(scheduler-snapshot-job-allocation): close final invariant-audit follow-up, feature complete

Task 4.5: scheduler dimension-4 field-completeness audit run against the
finished implementation -- clean, no undocumented gap. Corrects the one
remaining stale premise in snapshot.c's "internal_state contents" comment
(claimed job->allocs/accounts were still unrestored; they are now, per
task 2.2) while preserving its still-valid sharedInUse/resInUse rationale.

All tasks (1.1-4.5) for scheduler-snapshot-job-allocation are complete.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSuXfK6nD1Nue5EjjdhjNZ
This commit is contained in:
Rongsong Shen 2026-08-28 05:12:41 +00:00
parent 93d791c688
commit 5948e07964
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
2 changed files with 8 additions and 7 deletions

View file

@ -83,7 +83,7 @@
- _Depends: 2.2_ - _Depends: 2.2_
- _Boundary: snapshot.c (scope-decision header comment only)_ - _Boundary: snapshot.c (scope-decision header comment only)_
- [ ] 4.5 Run the project's scheduler design-invariant audit as final validation - [x] 4.5 Run the project's scheduler design-invariant audit as final validation
- Run the scheduler component's field-completeness invariant audit dimension (or manually re-check it) against the finished implementation. - Run the scheduler component's field-completeness invariant audit dimension (or manually re-check it) against the finished implementation.
- Confirm the audit finds no undocumented gap introduced or left behind by this feature. - Confirm the audit finds no undocumented gap introduced or left behind by this feature.
- Observable completion: the audit dimension reports clean, with this feature's fields correctly classified as fixed or documented. - Observable completion: the audit dimension reports clean, with this feature's fields correctly classified as fixed or documented.

View file

@ -215,12 +215,13 @@
* (core.h) documents that it resets "shared resval" at the start of * (core.h) documents that it resets "shared resval" at the start of
* EVERY session, and the driver's sched_account_jobs() unconditionally * EVERY session, and the driver's sched_account_jobs() unconditionally
* re-sums them from currently RUNNING jobs' accounts immediately after. * re-sums them from currently RUNNING jobs' accounts immediately after.
* Since this task also does not restore job->allocs/accounts (see * This still holds even though job->allocs/accounts ARE now restored on
* "Scope decisions" below), restoring stale in-use numbers with no * load (see "Scope decisions" below): capturing sharedInUse/resInUse
* accounts to justify them would be actively inconsistent, and they * directly anyway would be redundant with, and could silently drift
* would be wiped by the very next session anyway -- the Observable this * from, those restored accounts, since sched_account_jobs() re-derives
* task proves is specifically about the NEXT session's decisions, which * the in-use totals from them on the very next session regardless --
* never observes pre-session in-use state. * the Observable this task proves is specifically about the NEXT
* session's decisions, which never observes pre-session in-use state.
* - core->session_start / core->session_duration_ns: pure diagnostics * - core->session_start / core->session_duration_ns: pure diagnostics
* (core.h's own field comment: "nothing in the scheduling/decision path * (core.h's own field comment: "nothing in the scheduling/decision path
* reads them"), but cheap and harmless to round-trip, so they ARE * reads them"), but cheap and harmless to round-trip, so they ARE