Skip to content

PY-PORT-2f: port model_ladder_cells_produce.py to aprender-ci-tools ladder-cells-produce (C301) #5225

Closed

Description

@noahgift

Sub-ticket of #4741 (PY-PORT-2, C301: the build is Rust only; Python stays only as an external oracle). Carries #4986.

Port scripts/lib/model_ladder_cells_produce.py (494 lines; stdlib argparse/hashlib/json/os/re/signal/socket/subprocess/time/urllib, plus the judge model_ladder_cells.py for the owed-set enumeration) to an aprender-ci-tools ladder-cells-produce subcommand, same shape as #4799.

Why now: #4986 (measure_code must read apr code's backend.ran / backend.fell_back, the shape measure_chat reads) cannot be committed to the .py. The pre-commit complexity check refuses any staged copy of the file on functions already over the limits on main (measure_item, cmd_measure, finish; the test double's main). The fix is written and passes scripts/check_ladder_cells_producer.sh (all cases and mutants, plus a new case and a new mutant for the code verb); it lands in the port instead.

Acceptance:

  • Same subcommands and argv, byte-identical stdout (Python json.dumps key order and escaping) and the same exit status as the .py on a case table: every verb (run, chat, code, serve), every fake-apr mode (good, fellback, noneedle, refuse, noclose, undercount), and bad inputs.
  • The ladder producer: measure_code should read apr code JSON backend.ran and backend.fell_back like measure_chat #4986 behaviour is in the port from the start: code cells carry backend (cuda/cpu from backend.ran) and fallback (backend.fell_back), never None when the document has them; a case and a mutant pin it.
  • The parity harness scripts/tests/ci_tools_py_parity_test.sh gains the cases, with the .py side run on the ladder producer: measure_code should read apr code JSON backend.ran and backend.fell_back like measure_chat #4986 fix so the two agree; cargo-mutants on the module: 0 missed. Every function under the complexity limits (cyclomatic 30, cognitive 25).
  • The .py and its callers stay (N-1): scripts/model_ladder.sh calls it on a certification path, and scripts/check_ladder_cells_producer.sh mutates it. They switch once a released aprender-ci-tools carries the port.

Refs #4986, #3597

Activity

  1. added this to the 0.71.1 milestone on Oct 12, 2026
  2. modified the milestones: 0.71.1, 0.72.0 on Oct 14, 2026
  3. noahgift commented on Oct 14, 2026

    @noahgift
    MemberAuthor

    Folded into #4741 as a checklist row (TRIAGE-100, 2026-10-14): the open-ticket cap is 100, so this ticket is now tracked on that master and closed as not planned. Nothing is lost: reopen it when its work resumes, and an open PR for it reopens it. Pushed branch: PMAT-5225-ladder-cells-produce-port.

    Agent: aprender-clerk

  4. noahgift commented on Oct 14, 2026

    @noahgift
    MemberAuthor

    0.72 floor row, closed in error

  5. noahgift commented on Oct 15, 2026

    @noahgift
    MemberAuthor

    Folded into #4741 by the cop batch at 10:31Z (triage cap 100; clerk proposal 1015 row). Tracked as a checklist row there; reopen if it needs its own owner.

  6. noahgift commented on Oct 15, 2026

    @noahgift
    MemberAuthor

    Reopened by the cop: this is a protected 0.72 floor row (handoff/protected-072-floor.txt), so it must not be folded. The 10:30Z fold was the cop's error. Its master link stays as a cross-ref.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions