Skip to content

Guard model-v2 binding inputs and build admission - #29

Merged
MaxGhenis merged 5 commits into
model-v2from
model-v2-binding-guards
Oct 14, 2026
Merged

MaxGhenis merged 5 commits into
model-v2from
model-v2-binding-guards

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Addresses items 2–4 of Vahid Ahmadi's 12 October review, branching from model-v2. Item 1 is handled separately.

  • Rounding and vintage: replace the fixed CPI/AWE tolerance with growth bounds implied by D7BT's 0.1 index rounding and KAB9's £1 level rounding, then account separately for published rates' 0.1 percentage-point rounding. Record both intervals and precision. Pin KAB9 and matching KAC3 to the 15 September 2026 release, record the vintage, and document archived ONS downloads and header verification.
  • Build admission and workers: jobs.py applies the existing host.assess rule before uncached engine batches and after acquiring each slot. Floors match Part J: 40 GiB before Enhanced FRS batches, 40 GiB per configured Microcosm worker before their batches, and 40 GiB at each launch. Decisions reach job-cache records and model provenance; cache reuse is identified without a launch. Refused launch decisions survive aggregated exceptions. The CLI and binding runbook default to one Microcosm worker.
  • Budget date: derive source-date matching, diagnostics and binding help from C2_BUDGET_DATE; regressions move the constant and accept full month, abbreviated month, ISO date and ISO timestamp sources while rejecting the old date.

Invariants: the rounding interval contains the true unrounded growth rate. For finite host readings, admission refuses if and only if available memory is below the floor or one-minute load is above the per-CPU limit × CPUs; non-finite readings also refuse. Admission does not change fiscal cache keys or computed fiscal values. Explicit Part J admission callbacks and injected runners retain their own guards.

The requested rehearsal logs contain no measured Microcosm worker peak memory. They show two cold paths run sequentially on one worker (556 s and 675 s); the receipt's 66.42, 66.60 and 83.82 GiB observations are available host memory, not worker peaks. The historical 31.8 GB Microcosm peak predates the net-support changes and does not support increasing concurrency. Sources: rehearsal-sample-1-1791792698.log under the scheduled-job logs and .cache/J-rehearsal/sample-receipt.json in the rehearsal worktree.

Validation: tests cover all 16 committed CPI Septembers and 17 AWE windows, deliberately wrong rates, 500 randomized rounding examples, vintage revisions, scheduler thresholds and slot rechecks, cached provenance, and moved Budget dates. The initial focused suite passed 222 tests; the review-fix suite passed 166 tests, including six actual bridge-to-scheduler regressions. The final rounding suite passed 13 tests. The hard-tier independent review's callback conflict is fixed and committed. Final full pytest -n 4, follow-up independent review, and CI on head 905a3ae are pending; results will be updated before this task finishes. This PR is draft because the three documented stale-results checks require the later binding rebuild. CI permits only those existing exceptions for draft PRs targeting model-v2; every other failure remains blocking.

The REBUILD.md changes are a self-contained guards block plus the worker-count and admission corrections. They may need a trivial rebase after #28. No merges or direct writes to model-v2.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
uk-triple-lock Ready Ready Preview Oct 12, 2026 7:46pm UTC

Request Review

@MaxGhenis
MaxGhenis marked this pull request as ready for review October 14, 2026 20:43
@MaxGhenis
MaxGhenis merged commit 2c2dcd2 into model-v2 Oct 14, 2026
4 checks passed
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Merged into model-v2 at the reviewed head 905a3ae.

  • Review: independent hard-tier, APPROVE on the code (~/reviews/uk-triple-lock-2026-09-29/out/review-pr29.md). The reviewer's lane had no shell, so its approval was conditional on the tests. GitHub CI on this exact head ran the full Pipeline suite and passed, with only the documented stale-results exceptions, plus Dashboard lint, test and build. That covers the condition.
  • Follow-up: the review's low-severity points go into a separate PR:
    • the Microcosm batch floor counts workers, not the uncached jobs left;
    • the sensitivity_workers=2 defaults in pipeline.build, expected_value.build and rehearsal_sample;
    • the two exception types for a refused job;
    • a ±0.2pp wrong-rate test;
    • the hard-coded vintage date in one message.
  • CI note: this PR's python.yml change also applies ALLOW_PREBUILD_STALE to draft PRs based on model-v2. That's intended for the draft rebuild branch while results are stale, and it's recorded here as the review asked.

vahid-ahmadi added a commit that referenced this pull request Oct 15, 2026
…ged)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — 905a3ae2 Deployed Oct 12, 2026 by vercel[bot]
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