Archive — history, not state. Kept for its reasoning and its evidence; its plan is closed.

Night log — chronological

Format: HH:MM state — event. Times are local (America/*, John’s machine).

  • 23:00-ish START — dev = 7c02555dd (join-types + outline-binding batch). lane/cp = 1d65dd7da: three merges staged (reader-miss CP9.6 fix, cp2b-program-streamline CP2b-L2+CP2-ph1/2, P7 closure) — BLOCKED on 3 disrupting tests in tests/mcode_link.cm on the merged tip (16/3; agent branch alone was 16/16; interaction suspected with reader-miss’s valid_mcode_object signature change). Wave 1 agents dispatched: linker-fix (critical path), L6-locate, seed-speed attribution, battery analysis, switch report.
  • Warm-store CP9.6 wedge confirmed FIXED live: make on pre-merge warm store succeeded on the reader-miss tip (previously wedged fatally).
  • L6 recon RETURNED. John’s understanding confirmed: L6 is ON DEV already (merge 3a40a86ed + cross-press afa83db3f); scripts/ci_local.sh drives a local docker amd64 container (image pit-ci:local already built); linux native + windows-via-mingw+wine builds, both with boot cart linked as a binary section + adjacent boot.qop sidecar — exactly the P-arc shape. Feasible tonight with hand-closable gaps: G1 no artifact escape from container (one-line mount edit), G2 committed linux seed is 81 commits stale/pre-P3-fusion (press fresh via make cross-check first), G3 amd64-on-arm64 emulation may trip slow-turn watchdogs in full lanes (build+extract path fine), G4 tmpfs /work ENOSPC risk, G5 macOS not in nightly matrix (use make dist-vm). Execution agent queued for after the press switch so artifacts embody the linked press.
  • Press-switch scout: pit-linker/mcode_link.cm is consumed ONLY by the fuzz diff_runner + tests; pit-shop never calls it. The “flip” is real wiring: insert semantic linking into shop_build.cm’s executable link stage under ship/program plans (dev path untouched). Gates: two-press self-identity (bytes will differ from BEFORE — that is the point) + linked/unlinked differential + full battery of suites.
  • Linker-fix RETURNED (d0041ce7f): the “16/3 of 16” was the test harness double-counting panicked tests (fixed in shop_tools/test.ce) and cp2b census asserts self-destructing on null (fixed). Underlying 3 failures were ENVIRONMENTAL: warm store served the PRE-cp2b linker.
  • NEW DEFECT (CP9.7 candidate): warm-store staleness across a source merge. Repro in lane-cp worktree: merge cp2b batch onto warm store → make → tests/mcode_link.cm census tests see OLD linker (counters -1); fresh daemon + fresh make seed boot press do NOT clear it; only a full store wipe does (then 16/0). Defeats the first-validation-per- daemon content pass somewhere. Night protocol is insulated (fresh worktrees, cold builds); root-cause agent dispatched. This defect would ALSO explain historical “worked cold, failed warm” mysteries.
  • Battery analysis RETURNED (cp/battery-speed c0471354f, report in battery-speed.md). Headline: tests are FREE (475 assertions = 2.3 µs); the battery IS the compiler — realize 59.4s cold vs 93ms warm. No redundant compiles (138/138 distinct miss keys). The stupid thing: graph_walk 57.8s TOTAL vs compile 34s — fetch_closure re-resolves the same ~35 shared modules once per test file (~1s/file even fully warm). Proposal P1 (session closure cache) ≈ 50s off make check — HELD until staleness root cause lands (same contract territory). P2: fuzz’s join_types arm is 46% of fuzz wall; sample it like link_shapes — mechanical, queued. Daemon measured single-threaded (99% of one core); process fan-out is the only parallel route (morning decision). Also found: 6 pre-existing ./pit test (extended) failures on dev including a 30s heap timeout — partially matches the known 2026-07-27 triage list; queued for morning review.
  • Batch LANDED: dev = 0c6f6aacd. Wave 2 dispatched: press-switch, join-linked, link-inline, warm-staleness.
  • Seed-speed attribution RETURNED (cp/seed-speed-probe 75c5e39a7, report seed-speed.md). SMOKING GUN: pit_runtime_mach_image_pin_count (source/registry.c:139, called from mach_vm.c:438 on EVERY image function call) takes a runtime-global mutex shared by all ~28-77 builder actors — one press = 181s user vs 532s SYS, 92.8% of runnable samples in mutex wait/drop, 16.3M involuntary context switches. The compiler itself is ~120 core-seconds for the 69k-line seed — the lock storm is the slowness.
  • Staleness RETURNED + merged to lane/cp (941006065): .pit/sources snapshot had NO freshness on the eval lane; realize-hit validation never runs on misses, and a compiler merge guarantees misses. Fixed at the file() seam per the ruled stat contract; regression test; closure-cache verdict: safe post-fix under 2 rules. Landing in progress. Closure-cache + fuzz-sampling agent dispatched on top.
  • link-inline RETURNED (cp/link-inline 5132d88b5): LANDABLE. Cross-unit inlining = 8.1% of linked instructions over finalization alone (765 vs 832 on the seam corpus); guards UNCHANGED (win is call directness, not guard collapse — the guarded residue is receiver- escape/polymorphism, not seams). fuzz 200×2 seeds clean; suites green; +5 linker tests. Three flags: (1) the random linked arm is single-unit — cross-unit path covered only by deterministic golden tests; the true differential gate needs realization state in mach_load (MORNING DECISION + queued work); (2) dominant inline blocker is panic-helper level-1 get in guard cold arms — CP2 whole-program motion is the unblocker; (3) compute_resolved_callees dead-block fix improves per-unit inlining precision too (blast radius reviewed, fuzzed). HELD for merge until join-linked returns (same files).
  • Press-switch RETURNED (p/press-switch a5a5a0c93): THE FLIP WORKS. Seam = pit-shop/boot_cart.cm pool_executable (the one point both make seed/forge and pit cement pass through); dev lane untouched. All 7 gates green incl. fixpoint + fuzz 100 + boot-from-linked-cart (hot ps 0.029s). Cart delta HONEST: −45,158 bytes across 68 shrunk sections, but +292,352 from 2 NEW sections (mcode_link + structured) because the shop closure IS the cart — importing the linker ships the linker. Non-shop cement (logger app) shrinks clean: −4,096 B, guards 9,627→9,459. TWO STRUCTURAL FINDINGS: (1) finalized_sites=0 on every press — press modules compile on the static lane (no link:“pool”), so P6 finalization has nothing to bite; the pressed win is linked-streamline ONLY. Enabling the pool lane for presses = cart section-shape redesign (function_ref across sections) — this is ALSO what gates CP2b finalization + cross-unit inlining from reaching the shipped cart. BIG MORNING DECISION: pool-lane press redesign. (2) 9 in-flight decisions listed in press-switch.md §5 (link failure refuses press, stripping inert pending CP7 ruling, mcode.hash names unlinked unit while mach names linked pool, shared fleet modules streamlined N× per seed). Loose thread: 3rd pit cement in one daemon hung (PLAN_IMAGE_MAX=256 suspicion — known gotcha class). Landing after staleness batch.
  • Staleness batch LANDED: dev = c252fb596. Press-switch merging through lane/p (cart conflict resolved by fresh press at merged tip).
  • Switch-report RETURNED (cp/switch-report af7ecb36a, report + bench tools + raw JSON committed). Headlines on clerk (99 mods, 59k lines): type_checks is THE pass (+23.3% instr/+47.8% guards if off, and compile gets SLOWER without it); panic_outline +10.7%; guardcse +4.9%; inline buys ZERO size (runtime case unmeasured); join_types = exactly 2.00x compile for −0.36% — misses John’s 5%-for-2x bar by ~14x, default-off RATIFIED; dev/ship/small differ ≤0.32% (dev is strictly worse AND slower — morning item: are three profiles real?); LINK is the only lever clearing the bar: −5.88% bytes, literal rows −58.6%, 1.65x compile, once per closure. CRITICAL: finalized_sites 0/1,334 AND export_summary=generic for 99/99 REAL modules — the recognizer’s control_safe rejects any module that branches while building its export record. So CP2b L2 + cross-unit inlining currently fire only on synthetic shapes. THE UNLOCK for the whole call-directness arc = teach the export recognizer branching construction (queued as tonight’s next optimizer task). Top guard reason everywhere: slot_type_unknown_at_join 41,670 = 37% of ship guards, moved <2% by everything tried — join-linked agent’s live result will adjudicate whether linked facts can touch it. Oddities recorded: cache-hit linked_plan hang after load_cached_executable (defect candidate), forge holding pit.pid after make exit (second independent sighting).
  • Pin-lock RETURNED (cp/pin-lock 29d424935): LANDABLE, the night’s biggest single number. Lock-free _Atomic pin_owner mirror on MachImageView; hot gate = one acquire load; authoritative locked count untouched for cold callers; 53 insertions. Soundness: a live pool binding holds its own pin — ownership keeps images alive, the locked read was never a sync point. A/B paired UNDER LOAD: press sys 135.2s→31.2s (−77%), invol ctx switches −87%, press wall −32%; cold make seed 607.8s→386.4s (−36.4%). Post-fix top leaf is the interpreter itself (honest workload). force-gc + validate-gc arms green (the pin-lifetime regressions), 2 concurrent suites green. Fleet-width cap (reseed-identity agent) is now the row that PAYS (RSS +23% once unblocked). Queued for next lane/cp batch.
  • PRESS SWITCH LANDED: dev = af0126485. Ship/boot presses now go through pit.mcode.program@1. Merged-tip gate chain green (fixpoint, vm, mcode_link 16/0, fuzz 1350/0, fresh press). P8 (native bake-in + direct C-calls) and L6 cross-build execution dispatched off this tip.
  • join-linked RETURNED: the 12k slot_type_unknown_at_join guards are LOCAL MERGES, not seams (0 of 39,426 sites have an import in reaching defs — the census reason names the shape, not the cause; earlier seam framing was a misread). Join at link buys −4.71% guards for 4.39x linked-streamline wall → INTEGRATOR FLIP: link default OFF (fails ruled 5%-for-2x); switch + fuzz coverage retained; MORNING DECISION with a size-gated-lattice follow-up that could earn it back. 4th confirmation: finalized_sites=0 on real corpus.
  • Optimizer batch assembled on lane/cp: pin-lock + switch-report + join-linked + link-inline (conflicts hand-resolved: plan carries both join_types and inline_budget; linked streamline runs lattice + budgeted cross-unit inline together) + the default flip. Full gate chain + fuzz 100 + suite + seed running.
  • Reseed-identity RETURNED (cp/reseed-identity 179b649d0): warm press after reseed 289.3s → 32.0s (9.0x), misses 112 → 0. Root cause was NOT promotion (press proven byte-deterministic): a fresh shop’s FIRST boot is source-less → pins coarse whole-closure identity that no sliced later boot matches; slice moved to press time (boot_cart.cm computes, cement.cm carries, builder_identity reads back). Width clamp: fleet_peak 77 → 15 at zero throughput cost. Gates green + 2 counter-based regression tests. Merges next batch (boot_cart.cm overlap with press-switch — hand-resolve expected).
  • Optimizer batch LANDED: dev = 5fa961f52. Export-recognizer agent dispatched (the 4x-confirmed unlock). Reseed-identity merged to lane/cp; gates running.
  • Closure-cache RETURNED (cp/closure-cache cacf1004d): closure walk 324.8s → 24.3s in-process (92% hits, 0 invalidations; both staleness rules implemented — file() always runs, stat revalidation per hit, links_stat_key folded). ATTRIBUTION CORRECTED: warm suite wall moves only ~8s (62.3→54.1) — graph_done telemetry wrapped BOTH lanes, and warm stores skip fetch_closure on realize hits; the ~300s is paid on realize-MISS loops (the compiler-edit dev cycle — where it matters). Fuzz join sampling 1-in-4: −29% fuzz wall, dimension counters intact. Agent caught+fixed its own metadata-pinning defect via cold gate and pinned it with an assertion. Cold ./pit test 2338/6 — exactly the 6 pre-existing extended failures, unchanged. Merges after reseed batch.
  • Reseed batch LANDED (dev 85b0c6f33), closure-cache batch LANDED (dev 2aa4146b5). One union slip on my side: closure-cache merge lost a closing brace in store_freshness.ce (same class as the outline-binding incident) — caught by the gate, fixed, and the brace oracle now runs before every hand-resolved union commit. Out: P8, cross-builds, export-recognizer.
  • P8 RETURNED + LANDED (dev 162205373): charter corrected by measurement — there IS no per-call registry hop (once-per-module at boot walk) and the member load is already slot-hoisted; the cost is the call SEQUENCE. Landed: pre-rooted native entry (kills second copy+root), open-coded GCRef push/pop at MACH_CALL, hoisted profile hook early-out, no per-call memset — native calls −8–9% overall, −11–12% overhead. Artifact-neutral: reseed pressed byte-identical carts. Full battery + force-gc green. The identity-stamp/fallback contract is written in p8-native.md §5 for future re-derivation; a fused MACH_CALLNATIVE floor measurement is the honest next step. THE NUMBERED P ARC IS COMPLETE.
  • benchmarks.md assembled from section reports (paired A/B numbers only; cross-report walls declared non-comparable).
  • L6 cross-artifacts LANDED (dev 4a0081890 after docs): 3-platform proof CONFIRMED — mac/linux/windows binaries + embedded cart + qop sidecar all boot standalone and answer ps; windows = Mac-pressed cart in a mingw PE under Wine. Two false-green gates fixed (bash-3.2 empty array killed the dev-content arm; wine smoke grepped its own error text). Stale linux seed refreshed 1.79→9.48MB. Artifacts + hashes in cross-builds.md; binaries uncommitted by design at .claude/worktrees/night-crossbuild/cross-artifacts/.
  • Export-recognizer RETURNED + LANDED: the real blocker was the stone gate, not control_safe — and module export records are NOT frozen at runtime (contra docs/spec/stone.md:54). Exactness is now proven per-member by a complete-covering link census: finalized_sites 0→142 on the real 99-unit closure (54/99 exact exports), fuzz 200 = 4,554/0, six new branching-provider shapes in the corpus. Contract change awaits ratification (morning decision 2); shipped cart UNAFFECTED (press still static-lane — decision 1). Bonus defect: dangling jump_false labels in 7/99 shipped modules (decision 10). Landing gates: link 27/0, compile 187/0, vm OK, fuzz 1719/0, seed fixpoint.
  • NIGHT COMPLETE. Final tip carries every workstream. TOC.md summary + 11 ranked morning decisions written. Daemons swept. Also: make seed presses the same 149 derivations 3x into empty shops (342s of 397s — sharing needs a design ruling to not defeat fixpoint independence); shop_fetch requirements_result walks serially (~40s/seed); fleet width unbounded (77 jobs on 15 cores); POST-RESEED IDENTITY LEAK: after seed promotion an identical press re-misses 108/108 keys (workspace artifact folded into compiler_identity) — every reseed costs a full extra recompile. CP9.5 hunt CLOSED: guilty change was callresolve extraction (0247a4147), already fixed by the parent-map cache; double-parse REFUTED in compiler.cm. New streamline #2: range_reconciliation at 22.4%. Fix agents dispatched: image-pin lock (C), identity-leak + width clamp.

Source: plans/archive/night-2026-08-04/NIGHT-LOG.md