Skip to content

Add P104 designer toolkit v2: exact pricing and legality, #6030 rebuild with fold/hoist/retain, generators, sub-circuit tools (no kappa claim) - #6170

Open
DreamingOfClouds wants to merge 1 commit into
CrocSwap:mainfrom
DreamingOfClouds:tools/p104-designer-toolkit
Open

DreamingOfClouds wants to merge 1 commit into
CrocSwap:mainfrom
DreamingOfClouds:tools/p104-designer-toolkit

Conversation

@DreamingOfClouds

Copy link
Copy Markdown
Contributor

Description

What this is

research/p104-designer-toolkit-v2 packages the designer tooling behind the recent P104 frontier line as one command, tk, with a regression suite. It claims no kappa and no new word. The frozen predecessor research/p104-designer-toolkit is untouched; this package supersedes it (same exact-pricing core, plus everything below). Placement follows the repository convention (research/<slug> with README.md, TASK.json, SOURCES.json, VERIFY.json); it is registered through VERIFY.json.

What the toolkit does

How to run it

python3 -m pip install numpy scipy sympy       # ortools only for the CP-SAT commands
cd research/p104-designer-toolkit-v2
python3 -B tk.py --help
python3 -B tk.py price 6030                    # exact kappa .003125811557911897
python3 -B tk.py rebuild 6030 --post fold,hoist,retain --workdir /path/to/work
python3 -B tests/regress.py --fast             # about 80-160 s
python3 -B tests/regress.py --quick            # the full stdlib-fast suite (about 15 minutes)

README.md has the quickstart and per-command notes; MAP.md the command reference and module map. Heavy commands run synchronously by default; TK_HQ=/path/to/wrapper routes them through an optional job queue.

Evidence

  • scripts/research_package.py --package research/p104-designer-toolkit-v2 replays VERIFY.json (tests/regress.py --fast plus tests/retain_test.py) on Python 3.12 with numpy 2.2.6, scipy 1.14.1 and sympy 1.13.3 (the generic CI pins): PASS_REGISTERED_RESEARCH_PACKAGE; --check-only and check_research_commit.py --check-modes pass; tests/test_research_*.py (702 tests) pass.
  • --fast: 33 checks, 0 failed (exact kappa of PR5545/5551/5553/5561/5561s/5907/5827, native replay equality, localised legality mutants, screens executed on Improve conditional κ to 0.00310676333 with a four-gate contact rewrite #5660, shipcheck, surgery round trip on Conditional κ .003125804 (+5.22e-7 over #5907): remove helper 470's frame-593 rung, the twin of #5907's removal #6030, rebuild skeleton+hubs mini chain at exact kappa).
  • --quick: 104 checks, 0 failed on a clean git archive export of the final commit (Python 3.12, numpy 2.2.6, scipy 1.14.1, sympy 1.13.3, mpmath 1.3.0; no networkx, no ortools, no private inputs; the SKIP lines above apply). It additionally runs admit, incr/nincr, prims/macros/ctxmine, generators (FRONTGEN, MAINHUB, HUBGEN), accept of the adopted profiles, surgery and bulk tests.
  • tk rebuild 6030 --sides skeleton,hubs: 37/37 steps at exact kappa .003125811557911897 (about 1 minute).

Honest scope and limitations

  • Tooling only. Models are not oracles: retime/evretime/reorder objectives are linearised kappa and the reported kappa is always the exact re-price. Free helper start/final frames and the owned-inventory pins are verifier conventions, not maintainer-approved contract.
  • The rebuilt words are legal at the target kappa but are not program-identical to the swarm's hand-built words (for example 23346 events for the Conditional κ = 0.003128645 (+2.59e-7 over #6144): retain an operand to remove a root stop #6167-kappa word against 22821 in Conditional κ = 0.003128645 (+2.59e-7 over #6144): retain an operand to remove a root stop #6167). What is reproduced exactly is kappa, the pass sequence and the single-site edits (bit-identical for retain).
  • rebuild, surgery and anatomy carry Conditional κ .003125804 (+5.22e-7 over #5907): remove helper 470's frame-593 rung, the twin of #5907's removal #6030's register/frame numbering (alignbuild/data/); other words must share it or bring their own manifest. Steps that do not solve are logged GAP and skipped (one such step in the Conditional κ .003125804 (+5.22e-7 over #5907): remove helper 470's frame-593 rung, the twin of #5907's removal #6030 chain).
  • Not runnable from a clean clone because inputs are not shipped: tk gen (S4GEN trees), planbuild/plan.py and build.py (plan-search model trees; shipped as source only), hops --recomb, the BIT-side drivers that need adopted BIT packages, and the k2 engine tests that need unshipped nets (k2unify_test, k2levers_test print SKIP). tk adopt needs network access. leverbank_test/genpipe2_test need networkx, which generic CI lacks (they print SKIP there; the gen2 generators themselves need it). The CP-SAT legs need ortools (--solver).
  • Behavioural fix made while packaging: the rebuild builders' intermediate words are now judged under the input word's verifier profile (fold/hoist) and the newest profile of the family (retain, which adds a lifetime). Before this, once a Conditional κ = 0.003128645 (+2.59e-7 over #6144): retain an operand to remove a root stop #6167 profile existed, the unmodified chain judged every step under the 32-lifetime profile and logged 37/37 GAP. See alignbuild/api.py, rebuild.py, alignbuild/hoist.py, alignbuild/fold.py.
  • Other packaging changes: absolute paths replaced by package-relative ones; scratch state goes to TK_WORK (default: the package directory, git-ignored); a few tests that depended on private inputs were gated or rewritten (framegap uses a synthetic bad word, the speed test threshold counts the failing pairs a fresh cache has); helper modules that lived outside the toolkit were copied in (alignbuild/fold.py, iob2.py, foldcensus.py, subcirc/pdata.py, surgery/cen.py, surgery/s5lib.py, ledger.py). Unmodified swarm verifier sources are byte-pinned in SOURCES.json.

Credits

Built on the swarm's published work: the #6030 lineage (#6030, #6143, #6144) whose constructor steps fold/hoist reproduce; #5907 and #5827 (profile words and tests); #6167 (aliromman), whose retained-operand stop drop is retain; #6163 (petalas) and #6166 (Matarener); and the earlier P104 line (#5545, #5551, #5553, #5561, #5599, #5612, #5660) whose verifiers are vendored unmodified. Their headers and licenses are kept.

Open next questions

  1. Can the unshipped model inputs of planbuild/ be packaged so plan.py/build.py run from a fresh clone? First step: list the modules they import and vendor the minimal closure.
  2. Can fold (about 3 minutes per accepted site) be made fast enough for generic CI to replay Conditional κ .003125804 (+5.22e-7 over #5907): remove helper 470's frame-593 rung, the twin of #5907's removal #6030 -> Conditional κ .003128386 (+2.582e-6 over #6030): owned registers 770, 771 and 772 descend through the frames of helpers 705, 706 and 731, which no longer relay them; helper 732 reads 771 at frame 117 #6144 end to end? First step: profile alignbuild/iob2.py on one site and cache the rule matrices.
  3. Are free helper start/final frames and the owned-inventory pins part of the caller contract? Blocked on maintainer review; first step: tk retime 5551 --free starts against tk diff.

Prepared by DreamingOfClouds with Claude Opus 5.5 (Anthropic), via Claude Code.

🤖 Generated with Claude Code

…ild + fold/hoist/retain, generators, sub-circuit tools, floor LPs)

Packages the P104 designer toolkit as research/p104-designer-toolkit-v2 (the
frozen research/p104-designer-toolkit is untouched). No kappa claim and no new
word: exact pricing and legality oracle, verifier-profile adoption, the CrocSwap#6030
rebuild pipeline with the fold/hoist/retain constructor passes (reaches the
exact kappa of CrocSwap#6143, CrocSwap#6144 and CrocSwap#6167), gen2/gen3 generators, sub-circuit
extract/splice/re-solve tools, bulk evaluation, the floor LPs and the theory
and lemma write-ups. VERIFY.json replays tests/regress.py --fast and the
retain test on Python 3.12 with numpy, scipy and sympy.

Prepared by DreamingOfClouds with Claude Opus 5.5 (Anthropic), via Claude Code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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