Repository navigation
[Klaud Cold] Make golden_al_distribution a Python package with a query CLI - #3482
Conversation
The golden AL lookup (curve resolution + committed value) moves from
infx/srt_slurm/synthetic_acceptance.py into infx.golden_al_distribution,
which synthetic acceptance now imports. python -m infx.golden_al_distribution
{list,show,lookup} queries the same data. Behaviour is unchanged: 11,880
lookup combinations match the previous implementation.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
There was a problem hiding this comment.
Looks good, straightforward refactor with no behavior change. Reviewed the extraction of curve-resolution logic into infx/golden_al_distribution/curves.py against the old inline synthetic_acceptance.py code — confirmed the moved golden_length/curve_name logic is byte-for-byte identical (only the missing-curve error message wording changed, plus a new isinstance(modes, dict) guard). Also checked the new CLI's show subcommand for a path-traversal read risk — it forces a .yaml suffix under a fixed dir and is a local-shell tool anyway, not a new exposure. Test file covers curve validation, curve-name resolution special cases (MTP/EAGLE/NEXTN, MiniMax GQA, DSv4/Kimi DSpark), and the CLI.
Extended reasoning...
Refactor moves existing golden-AL-curve lookup logic from infx/srt_slurm/synthetic_acceptance.py into a new infx/golden_al_distribution package (curves.py + CLI + docs), with a new test file. No security-sensitive surface beyond a local YAML-reading CLI restricted to a fixed directory and *.yaml suffix. Verified via diff that the moved logic is unchanged (equivalence claim in the PR checks out), tests are non-trivial and cover the special-case branches, and there are no outstanding reviewer objections in the timeline, so a human need not re-review this one.
Summary
Turns
infx/golden_al_distribution/into theinfx.golden_al_distributionPython package and adds a query CLI.curves.py:load_curve,list_curves,curve_name(model prefix + speculative config → curve file) andgolden_length(the value AgentX synthetic acceptance applies). The resolution rules move here verbatim frominfx/srt_slurm/synthetic_acceptance.py, which now importsGOLDEN_DIRandgolden_lengthfrom the package.__main__.py:python -m infx.golden_al_distribution--jsonon every command; errors (missing curve, cell or Kimi sampler) exit 1.No curve data changes.
Test plan
utils/test_golden_al_distribution.py: every committed curve loads with values in[1, tokens + 1], curve resolution for every special case, lookup errors, and the CLI (list,show,lookup, error exit)utils/test_synthetic_acceptance.py+utils/test_srt_single_node.py(excluding the macOS-only pool-launcher cases): 93 passed together with the new testsgolden_length: 11,880 combinations of model prefix × method × draft model/sampler × tokens × thinking mode, 0 differences (values exact; errors same type — only the missing-curve message wording now names the file and directory)ruff check infxandruff format --check infxclean🤖 Generated with Claude Code