Skip to content

feat: reconcile persisted Slurm state - #913

Open
nabinchha wants to merge 1 commit into
feat/slurm-executionfrom
codex/869-observation-reconciliation
Open

feat: reconcile persisted Slurm state#913
nabinchha wants to merge 1 commit into
feat/slurm-executionfrom
codex/869-observation-reconciliation

Conversation

@nabinchha

@nabinchha nabinchha commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

📋 Summary

Reconcile a persisted Slurm run from normalized active-queue and accounting observations in a fresh process. The status composition preserves bounded accounting lag and terminal evidence, validates readiness and generation records, and refuses to report a winner when scheduler evidence contradicts it.

🔗 Related Issue

Part of #869 (869#3).

🔀 Merge Order

PR #910 has merged into feat/slurm-execution. This PR is now the direct follow-up slice on that branch and is rebased onto the merged #910 commit (b98c043e). Child PR #915 remains based on this branch and must stay open.

🔄 Changes

  • Add a public scheduler-observation collector over the normalized squeue/sacct client contract, including array-task and ordinary collection-job identities.
  • Persist canonical per-attempt scheduler snapshots with restrictive permissions and atomic replacement.
  • Add fresh-process run, shard, attempt, readiness, generation, and winner status composition through SlurmStateReconciler.
  • Keep accounting lag nonterminal with a fixed reconciliation deadline and make reviewed terminal evidence immutable.
  • Reject concurrent persisted-state changes and winner/scheduler contradictions instead of guessing status.
  • Keep the reconciliation workflow composed across observation, storage, reading, derivation, and orchestration modules; no sibling imports of underscore-prefixed implementation names.
  • Add package-install coverage for the new public APIs.

🧪 Testing

  • Full Slurm suite after feat: finalize Slurm shard winners #910 merged: 1,265 passed
  • make check-slurm
  • Focused state, launcher, and package tests: 272 passed
  • Isolated wheel build/install/import verification
  • Unit tests added/updated
  • E2E tests added/updated (not applicable to this state-only slice)

✅ Checklist

  • Follows commit message conventions
  • Commits are signed off (DCO)
  • Architecture docs updated (not applicable; no architecture contract changed)

Description updated with AI

@nabinchha
nabinchha requested a review from a team as a code owner September 2, 2026 22:27
@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds fresh-process reconciliation of persisted Slurm runs using normalized queue and accounting evidence.

  • Adds collection and persistence of canonical scheduler observations with bounded accounting-lag handling.
  • Adds attempt, shard, generation, and run status composition from persisted state.
  • Adds concurrency and winner-consistency checks plus public package exports and installation coverage.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains from the provided follow-up-review context.

No blocking failure remains.

Important Files Changed

Filename Overview
packages/data-designer-slurm/src/data_designer/slurm/state/observation.py Adds normalized scheduler collection with accounting precedence, immutable terminal evidence, and bounded accounting-lag transitions.
packages/data-designer-slurm/src/data_designer/slurm/state/observer.py Adds orchestration for loading persisted state, collecting and persisting observations, validating shard evidence, and composing run status.
packages/data-designer-slurm/src/data_designer/slurm/state/reader.py Adds optional validated reads for readiness, scheduler observations, and generation-result pairs.
packages/data-designer-slurm/src/data_designer/slurm/state/status.py Adds validated attempt, shard, generation, and run status models and deterministic aggregation helpers.
packages/data-designer-slurm/src/data_designer/slurm/state/storage.py Adds restrictive atomic storage operations for per-attempt scheduler observations.
packages/data-designer-slurm/src/data_designer/slurm/launcher/client.py Adopts the public scheduler-job identity type across queue, accounting, cancellation, and result-correlation APIs.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Load persisted run, plan, shards, and attempts] --> B[Load previous scheduler observations]
    B --> C[Query normalized squeue and sacct evidence]
    C --> D[Resolve current observation per scheduler identity]
    D --> E[Lock and reconcile each shard]
    E --> F[Persist scheduler observations]
    F --> G[Validate readiness, generation results, and winner]
    G --> H[Derive attempt and shard statuses]
    H --> I[Compose complete RunStatus]
Loading

Reviews (7): Last reviewed commit: "feat: reconcile persisted Slurm state" | Re-trigger Greptile

@nabinchha
nabinchha force-pushed the codex/869-observation-reconciliation branch from 28e7efe to 1300bc0 Compare September 3, 2026 13:58
@nabinchha
nabinchha force-pushed the codex/869-candidate-winner branch from a3eac05 to 37ed0f4 Compare September 3, 2026 15:29
@nabinchha
nabinchha force-pushed the codex/869-observation-reconciliation branch from 1300bc0 to a4f4035 Compare September 3, 2026 15:29
@nabinchha
nabinchha force-pushed the codex/869-candidate-winner branch from 37ed0f4 to b17e493 Compare September 3, 2026 15:40
@nabinchha
nabinchha force-pushed the codex/869-observation-reconciliation branch from a4f4035 to 91129f8 Compare September 3, 2026 15:41
@nabinchha
nabinchha force-pushed the codex/869-observation-reconciliation branch from 91129f8 to 57e9671 Compare September 3, 2026 20:21
@nabinchha
nabinchha force-pushed the codex/869-candidate-winner branch from cf749b6 to 10353c8 Compare September 3, 2026 20:39
@nabinchha
nabinchha force-pushed the codex/869-observation-reconciliation branch from 57e9671 to b00ccb1 Compare September 3, 2026 20:40
@nabinchha
nabinchha changed the base branch from codex/869-candidate-winner to feat/slurm-execution September 3, 2026 22:13
Persist normalized scheduler observations and compose fresh-process run, shard, attempt, readiness, generation, and winner status. Preserve bounded accounting lag and immutable terminal evidence for status and benchmark refresh consumers.

Part of #869

Signed-off-by: Nabin Mulepati <nmulepati@nvidia.com>
@nabinchha
nabinchha force-pushed the codex/869-observation-reconciliation branch from b00ccb1 to 506de48 Compare September 3, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant