feat(pack): plan --fleet — prediction → placement (Act-2 opener) - #36
Merged
Conversation
…ecision The predicted peak is computed from the index header alone (no run, no read I/O), is a conservative upper bound (sound since the Act-1 soundness fix), and is additive — so a scheduler can SUM predicted peaks across co-located jobs and PROVE a node fits before launching a byte. No emergent-peak caller (GATK, DeepVariant) can: their peak is only known after a possible OOM-kill, so every co-location is a gamble. - src/call/pack.rs: a pure, deterministic first-fit-decreasing bin-packer over predicted peaks. `Packed` is a proof — every node's summed peak <= capacity; a job larger than a node, or a set that needs more than --nodes, is NoFit. - `rosalind pack --jobs <tsv> --node-mb N [--nodes M]`: read each job's index header → predicted peak → pack onto nodes, or refuse (exit 3). Human or --json. - `rosalind plan --index --json`: the predicted-peak breakdown as one-line JSON for a workflow engine to read. - README "Pack a fleet: prediction → placement" + roadmap. Tests: 5 packer unit tests (incl. the proof property + determinism) + a pack integration test (fit / refuse exit 3 / json) + plan --json. Full suite green; rustc 0 warnings; additions clippy-clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Act 2 opener — the highest-moat feature (audit judge 43.3). The contract's prediction becomes a placement decision. Because the predicted peak is computed from the index header alone (no run, no read I/O — milliseconds), is a conservative upper bound (sound since the Act-1 soundness fix recorded
predicted_peak_rss_bytes), and is additive, a scheduler can sum predicted peaks across co-located jobs and prove a node fits before launching a byte.No emergent-peak caller (GATK, DeepVariant) can do this: their peak is only known after a possible OOM-kill, so every co-location is a gamble. Copying it requires first making peak predictable — which is the entire Rosalind thesis.
What's new
src/call/pack.rs— a pure, deterministic first-fit-decreasing bin-packer over predicted peaks.Packed(...)is a proof: every node's summed peak≤capacity. A job larger than a whole node, or a set that needs more than--nodes, isNoFit. Ties break by label → the schedule is reproducible (the contract's determinism extends to placement).rosalind pack --jobs <tsv> --node-mb N [--nodes M]— read each job's index header → predicted peak → pack onto nodes, or refuse (exit 3) with an actionable message. Human-readable or--json.rosalind plan --index --json— the predicted-peak breakdown as one line of JSON for a workflow engine to read programmatically.Test plan
≤capacity), determinism (order-independent), job-bigger-than-node refusal,--nodescaptests/pack.rsintegration — fit (proof line) / refuse (exit 3) /--jsonplan --index --jsonemits the machine-readable predictionWhy this, now
It's the single highest-leverage compounding move: it makes the contract a fleet property, and it's only sound because Act-1 PR-A made the predicted peak a true upper bound. Next Act-2 candidates (from the audit): ColumnKit SDK (46.3), bounded gVCF (42.7), verify-attest signed receipts (43).
🤖 Generated with Claude Code