Δ10-C1: t-shirt estimator at SolveSpec-assembly — sizeClass + offload suggestion (never auto-routes) - #179
Merged
Merged
Conversation
…34 C1) Faithful TS port of aws-infra@origin/staging examples/tshirt_sizing.py (A-v1): extract {N, levels, num_qudits} from the solve script, score N * prod(levels)^4 (unitary-trajectory knot-point block), sizeClass SMALL/MEDIUM at the reference's strict >12000 boundary — including the reference's fallbacks (absent/unresolvable levels contribute nothing). Offload suggestion signal: estimatedBytes (score x 8, Float64 count) vs local RAM (os.totalmem, AMICO_LOCAL_RAM_BYTES override for tests/CI), boolean + human-readable reason. Data only — nothing auto-routes (D7). Golden table in the test header quotes reference values produced by running the reference itself on the same inputs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
`amico-run estimate <script.jl> | --spec <solvespec.json>` prints one
JSON line {sizeClass, score, estimatedBytes, localRamBytes,
offloadSuggested, reason, inputs}. --spec runs the SAME solvespec schema
validation as the launch gate, then reads the spec's script_path
(relative paths resolve against the spec's directory). Output is data
only: no executor key, no file writes, nothing auto-routes — launch.ts
is untouched. Dispatched via trySubcommand with the existing
existing-file guard (a script literally named `estimate` still
launches). Pure core re-exported from the package index for direct
consumption by the routing UX (#63).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
) Delegates verbatim like resolve/sandbox — `amico estimate <args>` is exactly `amico-run estimate <args>` — and the verb surface lists it, so the #63 routing UX can call either bin for the same JSON signal. Co-Authored-By: Claude Fable 5 <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.
Closes #34 (C1 scope; C2 — the calibrated solver×integrator estimator — stays deferred per the issue).
New
amico-run estimate <script.jl> | --spec <solvespec.json>→ one JSON line{sizeClass, score, estimatedBytes, localRamBytes, offloadSuggested, reason, inputs}— exit 0, or 64 config-class. Sizing math ported bit-faithfully from aws-infra'stshirt_sizing.py(A-v1: score = N × prod(levels)⁴; > 12000 → MEDIUM), golden table generated by running the reference (provenance in the test header). Offload suggestion = estimatedBytes vs local RAM (AMICO_LOCAL_RAM_BYTESoverride, else os.totalmem) — suggestion only: no executor key in the output, the spec is never written, andlaunch.tshas a zero-line diff (D7's no-auto-routing stands). 291/291 package tests (32 new), tsc clean, both bins build.Consumer contract for #63 documented in the subcommand + exported from the package index.
🤖 Generated with Claude Code