pretty-print: emit type-applied forms with [T A] syntax (eigentrust pitfall #14)#6
Conversation
a5037f3 to
c860097
Compare
…level EigenTrust pitfall #6 (2026-04-23) reported that a multi-line `spec` like spec eigentrust-step [List [List Rat]] ;; matrix C [List Rat] ;; pre-trust p Rat ;; damping [List Rat] ;; current t -> [List Rat] ;; next t defn eigentrust-step [c p alpha t] ... failed with `spec: spec type for eigentrust-step has no arrow but defn has 4 params`. The user attributed it to line comments, but those are stripped by the tokenizer; the real cause is indent grouping. Each continuation line with multiple tokens was wrapped via `wrap-stx-list` into a sub-list, so the line `-> [List Rat]` became `(-> (List Rat))`. `split-on-arrow-datum` only scans the top level of the spec body tokens, so the buried arrow was invisible and decompose-spec-type treated the body as a zero-arrow relation type. For nodes whose first token is `spec` or `spec-`, switch `tree-node->stx-elements` to a flatten variant that splices indent- grouped continuation lines directly into the parent token stream. Metadata-style continuations whose first token is a keyword-like symbol (`:doc`, `:where`, `:method`, ...) are still wrapped, so the existing process-spec metadata loop continues to recognize them. Bracket-grouped function-type parameters like `[-> A Bool]` are unaffected — they come from explicit brackets, not indent grouping, and remain sub-lists with `->` as the head. Other forms (`defn`, `def`, `match`, ...) are unchanged: only spec-form nodes take the new path. Test coverage in test-spec-multiline-ws.rkt covers the eigentrust reproducer, the metadata-continuation case, the bracketed prefix-arrow function-type case, and a non-regression check on `defn` body indent-grouping. https: //claude.ai/code/session_01MbncYJnrvjzhbVWw4xGi5x Co-authored-by: kumavis <1474978+kumavis@users.noreply.github.com>
…itfall #14) The reader accepts type applications like `[PVec Rat]`, `[Map Keyword Nat]`, `[Set Nat]`, etc. — per the Prologos syntax convention that `[]` is the universal functional/type-context delimiter while `()` is reserved for parser keywords (match, the, def, relational goals). Pre-fix, the pretty-printer emitted `(PVec Rat)`, `(Set Nat)`, `(Map K V)` in parens, producing a cosmetic divergence between how types are read vs printed. EigenTrust implementation (2026-04-23) flagged this as pitfall #14: "the reader accepts `@[1/4 1/4 1/4 1/4]` and the type-checker reports the value as `(PVec Rat)` — but the output ... writes `(PVec Rat)` in parens where the type signature of a `spec` would say `[PVec Rat]`." Choice: broad fix. The pitfall observation generalizes — the same `(T A)` printing was used by Map, Set, PVec, TVec, TMap, TSet (type forms) and by set-empty, set-insert, set-member?, set-delete, set-size, set-union, set-intersect, set-diff, set-to-list, pvec-empty annotation (operation forms). Per `.claude/rules/prologos-syntax.md` ALL functional contexts use `[]`, so all of these are switched together. Existing forms like `[Vec ...]`, `[Sigma ...]`, `[map-assoc ...]`, `[pvec-push ...]` already followed this convention; this brings the rest into alignment. Snapshot updates: 4 existing tests had hard-coded `(...)` snapshots: - tests/test-pvec.rkt (PVec type pp) - tests/test-set.rkt (Set type pp + "s : (Set Nat) defined" message) - tests/test-map.rkt (Map type pp + "m : (Map Keyword Nat) defined") - tests/test-implicit-map-02.rkt ("@[:admin :active] : (PVec Keyword)") All updated to the new `[T A]` form. New test file: tests/test-pretty-print-pvec.rkt covers the primary fix plus operation forms and nested type applications, with regression guards on already-correct forms (Vec, simple application). https: //claude.ai/code/session_01MbncYJnrvjzhbVWw4xGi5x Co-authored-by: kumavis <1474978+kumavis@users.noreply.github.com>
c860097 to
21ab665
Compare
hierophantos
left a comment
There was a problem hiding this comment.
LGTM. Aligns the pretty-printer with .claude/rules/prologos-syntax.md's "[] for all functional contexts" convention. 15 cases switched in pretty-print.rkt — type forms (Map, Set, PVec, TVec, TMap, TSet) and operation forms (set-*, pvec-empty annotation). Correctly took the broad fix over the narrow PVec-only one; the divergence affected every type application uniformly.
Snapshot updates complete for the test-suite-enforced assertions across test-pvec.rkt / test-set.rkt / test-map.rkt / test-implicit-map-02.rkt. New test-pretty-print-pvec.rkt (16 cases) covers type forms, nested types ([Map Keyword [PVec Nat]]), operation forms, and regression guards on already-correct forms ([Vec ...], [f x]).
Audit on our side: a few descriptive labels in test-map.rkt / test-set.rkt (lines 57/59/65, 34/36/41) still mention "(Map Keyword Nat)" / "(Set Nat)" but those are check-equal? failure-description strings (3rd arg), not expected values — no break, just cosmetic staleness. Some .prologos example files have expected-output comments referencing old (PVec ...) form — same: stale comment, not a test assertion. None of these block; could be a follow-up sweep.
Mergeable as-is, no conflicts.
Approving.
Five failing tests after the kumavis PR landings, two root causes:
(1) `current-mult-meta-store` retired by S2.e-iv-c (`d7bd97a4`,
2026-04-25). Three contributor tests (test-pvec-zip-with,
test-prim-op-firstclass, test-defn-multiarg-patterns) had manual
parameterize blocks referencing the retired parameter. The PR
branches predated S2.e-iv-c; CI on the PR branches passed. After
rebase + merge to current main, the tests hit an unbound-identifier
error at compile time.
Fix: replace the manual parameterize blocks with test-support.rkt's
canonical run-ns-last / run-ns-ws-last helpers (which know how to
set up the post-S2.e environment). Tests that lacked an `(ns ...)`
declaration in their strings (relying on the OLD shared fixture's
pre-loaded namespace) now have helpers that prepend `(ns test)`
before passing to run-ns-last.
(2) PR #6 (pretty-print: emit type-applied forms with `[T A]` syntax)
broadened the printer from `(PVec X)` to `[PVec X]`. PR #13's tests
had hardcoded `(PVec Rat)` snapshots; test-pvec.rkt:292 also had a
hardcoded `(PVec Nat)` snapshot. Both predate PR #6's broadening
and didn't get caught at merge time.
Fix: update three snapshot strings from `(PVec X)` to `[PVec X]`
to match the new pretty-print output.
Process gap that allowed this: after each kumavis PR merge, we trusted
PR-branch CI without running the affected test files against current
main. The contributor's CI ran on a stale base; rebase + merge moved
the tests to a context they hadn't been tested in. Worth codifying
"run merged test files against post-merge main before moving on" in
workflow.md after a few more data points.
All 5 tests now pass: 105 tests in 7.7s.
Categorized:
- test-pvec-zip-with.rkt: helper rewrite (Cat A)
- test-prim-op-firstclass.rkt: helper rewrite + ns-prepending (Cat A)
- test-defn-multiarg-patterns.rkt: helper rewrite + ns-prepending (Cat A)
- test-pvec.rkt:292: snapshot update (Cat B)
- test-rat-literal-in-list.rkt:114,119: 2 snapshot updates (Cat B)
… main
Codify the discipline after one data point rather than waiting for the
second. The 2026-04-27 PR-merge cascade across kumavis's eigentrust-
pitfall PRs surfaced 5 simultaneous failures with two distinct root
causes:
(1) Retired-parameter compile errors (3 tests) — kumavis PRs predated
S2.e-iv-c by hours; PR-branch CI ran against pre-retirement base;
rebase + merge landed tests in a context they hadn't been tested in.
(2) Snapshot drift between simultaneously-merging PRs (2 tests) — PR #6
broadened pretty-print while PR #13's tests had hardcoded paren forms;
each PR's own CI passed; the cascade surfaced only after both landed.
Both classes of failure would have been caught by running the new test
files individually against current main BEFORE moving on. The check is
lightweight (~5s per file) and would have prevented the noisy regression
surface that the user's full-suite run exposed.
Rule placed adjacent to "Targeted test runs for investigating failures"
in workflow.md (testing-discipline cluster).
Per user review of #0-#10: many entries were either out-of-scope (env limitations, not Prologos issues) or wrong (claims I never actually tested). Re-tested every claim against a real Racket and revised the doc. Numbers are reserved per the user's instruction — entries marked DELETED keep their slot so cross-refs don't drift. Detail: #0 DELETED — out-of-scope (Racket toolchain not in sandbox). Environment limitation, not a Prologos issue. #1 REFRAMED — was "capability subtype + promise resolution composition." Re-titled to honestly reflect what this actually is: an OCapN-side Phase 0 deferred-implementation note (eventual cross-vat receive isn't wired up yet). NOT a Prologos bug. #2 DELETED — false claim. Tested with a real Racket: WS-mode wildcard match `match | _ -> body` on user data types elaborates AND evaluates correctly when the function carries a proper `spec`. The `prologos::data::datum` comment I cited applies to a narrower polymorphic-context case, not a blanket wildcard ban as I asserted. Cleanup of behavior.prologos (~250 -> ~70 LOC) follows. #3 DELETED — false claim. Tested: `data Step step : [Nat -> Nat]` (with bracketed function type per the lseq-cell convention) accepts a function value, including closures with captured state. Open-world actor behaviour storage IS supported. The closed-enum BehaviorTag in our implementation was a needless workaround driven by this incorrect pitfall. Cleanup tracked separately. #4 KEPT, REFRAMED — real, narrowed claim. grammar.ebnf §6 lines 1153/1187/1199 promise `Mu` (sexp) and `rec` (WS) for recursive sessions. Both elaborate to `Unknown session type: rec` / `Mu`. So pitfall #4 is now: "rec/Mu in grammar but not in elaborator." CapTP's stream-level well-typedness is therefore the documented ceiling; per-exchange sub-protocols remain the workaround. #5 KEPT — `none`/`some` need explicit type args in some inference contexts. Real ergonomics tension, accurately documented. #6 DELETED — out-of-scope. WS-mode `let p := body` and sexp-mode `(let (p v) body)` are TWO surface forms by design (grammar.ebnf §7 line 1236). User-error, not a Prologos bug. #7 DELETED — was a quantitative restatement of #2. With #2 recanted, #7 evaporates: behavior modules can be wildcard-collapsed, dropping ~180 LOC. #8 DELETED — false claim. Tested: `data Box1 box1 : [Sigma [_ <Nat>] Bool]` and `data Table table : Nat -> [List [Sigma [_ <Nat>] Bool]]` both elaborate cleanly. The named-struct ActorEntry/PromiseEntry workaround in vat.prologos was unnecessary; can be simplified back. #9 DELETED — user error. `def` for value bindings vs `defn` for functions is documented (grammar.ebnf §3 lines 189-190, prologos-syntax rules). Mis-using `defn` for a 0-ary constant isn't a Prologos bug. #10 DELETED — out-of-scope. Network sandbox blocking external docs is an environment limitation. #11-#20 were not in scope of this review and remain as-is for the user to review next.
…alls #15) A two-line def with type annotation — def c : [List Int] := '[1 2 3] — silently suppressed evaluation: PHASE-TIMINGS reported reduce_ms=0 and the bound name elaborated but never reduced. The same def collapsed to one line worked normally. The silent-no-work shape was particularly bad for benchmarks (reported zero reduce time regardless of workload). Add a def-form-node? branch to tree-node->stx-elements and a flatten-with-boundaries/def variant that splices ONLY continuations whose first token is :=. All other continuations (bare body, bracketed application chain, etc.) stay wrapped, preserving today's def c + 1 2 → (def c (+ 1 2)) semantics for the bare-body idiom. Narrower than the spec splice rule (#4 / #6) on purpose: spec needs to expose -> from anywhere in a multi-line type signature, def only needs to expose := which is always the head of a natural line break. Test coverage in test-def-multiline-ws.rkt covers: - Datum equivalence between one-line and two-line shapes (12 cases). - Bare-body wrapping is preserved. - End-to-end via run-ns-ws-last (silent-suppression regression pin). - Multi-line BODY after :=, := alone on a line, and definitions spanning lines as bracketed groups. Three-level WS validation: - Level 1 (sexp): the test file uses run-ns-last where applicable. - Level 2 (WS string): ws-read / run-ns-ws-last cover the dispatch and elaboration paths. - Level 3 (WS file): process-file on a .prologos with the two-line form reports reduce_ms=5 / reduce_steps=39, matching the one-line shape exactly (was reduce_ms=0 / reduce_steps=0 before). https://claude.ai/code/session_01MbncYJnrvjzhbVWw4xGi5x Co-authored-by: kumavis <1474978+kumavis@users.noreply.github.com>
Per user review of #0-#10: many entries were either out-of-scope (env limitations, not Prologos issues) or wrong (claims I never actually tested). Re-tested every claim against a real Racket and revised the doc. Numbers are reserved per the user's instruction — entries marked DELETED keep their slot so cross-refs don't drift. Detail: #0 DELETED — out-of-scope (Racket toolchain not in sandbox). Environment limitation, not a Prologos issue. #1 REFRAMED — was "capability subtype + promise resolution composition." Re-titled to honestly reflect what this actually is: an OCapN-side Phase 0 deferred-implementation note (eventual cross-vat receive isn't wired up yet). NOT a Prologos bug. #2 DELETED — false claim. Tested with a real Racket: WS-mode wildcard match `match | _ -> body` on user data types elaborates AND evaluates correctly when the function carries a proper `spec`. The `prologos::data::datum` comment I cited applies to a narrower polymorphic-context case, not a blanket wildcard ban as I asserted. Cleanup of behavior.prologos (~250 -> ~70 LOC) follows. #3 DELETED — false claim. Tested: `data Step step : [Nat -> Nat]` (with bracketed function type per the lseq-cell convention) accepts a function value, including closures with captured state. Open-world actor behaviour storage IS supported. The closed-enum BehaviorTag in our implementation was a needless workaround driven by this incorrect pitfall. Cleanup tracked separately. #4 KEPT, REFRAMED — real, narrowed claim. grammar.ebnf §6 lines 1153/1187/1199 promise `Mu` (sexp) and `rec` (WS) for recursive sessions. Both elaborate to `Unknown session type: rec` / `Mu`. So pitfall #4 is now: "rec/Mu in grammar but not in elaborator." CapTP's stream-level well-typedness is therefore the documented ceiling; per-exchange sub-protocols remain the workaround. #5 KEPT — `none`/`some` need explicit type args in some inference contexts. Real ergonomics tension, accurately documented. #6 DELETED — out-of-scope. WS-mode `let p := body` and sexp-mode `(let (p v) body)` are TWO surface forms by design (grammar.ebnf §7 line 1236). User-error, not a Prologos bug. #7 DELETED — was a quantitative restatement of #2. With #2 recanted, #7 evaporates: behavior modules can be wildcard-collapsed, dropping ~180 LOC. #8 DELETED — false claim. Tested: `data Box1 box1 : [Sigma [_ <Nat>] Bool]` and `data Table table : Nat -> [List [Sigma [_ <Nat>] Bool]]` both elaborate cleanly. The named-struct ActorEntry/PromiseEntry workaround in vat.prologos was unnecessary; can be simplified back. #9 DELETED — user error. `def` for value bindings vs `defn` for functions is documented (grammar.ebnf §3 lines 189-190, prologos-syntax rules). Mis-using `defn` for a 0-ary constant isn't a Prologos bug. #10 DELETED — out-of-scope. Network sandbox blocking external docs is an environment limitation. #11-#20 were not in scope of this review and remain as-is for the user to review next.
W14 prime-count returned 1 instead of 4. Investigation traced to a load-bearing correctness bug in the hybrid kernel's callback protocol: callback wrappers' fire-fns call prologos_cell_write IMMEDIATELY (bypassing the BSP pending buffer), which tries to schedule subscribers; the subscriber is already in the current worklist so schedule() early-returns; the subscriber then fires in the same round reading from the SNAPSHOT (which still has bot for the cell that was just immediately-written); native fire-fns interpret bot's payload as 0. Net effect: any program that chains a callback fire-fn (e.g. int-mod, or any user-defined defn result that doesn't statically beta-reduce to a literal) into a native consumer in the same round silently miscomputes. Minimal repro: [int-eq [int-mod 7 3] 0] returns true (wrong; should be false since int-mod 7 3 = 1 != 0). The bug went undetected because: - The shape battery (A1-A8) tests int-binary ops in isolation. - The OCapN battery doesn't use int-mod. - The preduce-lite micro suite doesn't chain int-mod into native. - Existing tests of "defn result feeds native" only work because the elaborator statically beta-reduces simple defns to literals, masking the bug. Implication for Phase 7: int-mod migration was ranked #6 (trivial cleanup). This bug elevates it to a CORRECTNESS fix. Three candidate fixes ranked by invasiveness: - A: kernel-side, defer scheduling during fire-fn execution - A': kernel-side, track dirtied cells, schedule post-merge - B: Racket-side, fire-fns return value via a parameter, wrapper captures it instead of going through b-write - C: Racket-side, fire-fns return their value as their fire-fn return value (most invasive, cleanest) Recommendation in the doc: implement A' as the smallest fix that addresses ALL callbacks (not just int-mod). Defer C to alignment cleanup. This commit is documentation-only — the fix itself is deferred for a separate, focused commit. https://claude.ai/code/session_01Tycs6BWKG58Wo99YVPg6DF
…s + hard-fail caps ROOT CAUSE (see 2026-05-05_HYBRID_KERNEL_CALLBACK_BSP_BUG.md): Callback wrappers' fire-fns called prologos_cell_write IMMEDIATELY from inside the firing loop (via b-write -> backend.write-cell). The immediate write triggered schedule(subscriber), which early-returned because the subscriber's in_worklist flag was still set (subscriber was already in current round's worklist). Subscriber then fired same-round against an outdated snapshot, producing wrong results, and was never re-fired in next round (write_unchecked returns false on the redundant pending write). Repro: [int-eq [int-mod 7 3] 0] returned true (wrong, should be false since 1 != 0). KERNEL FIX (Fix A' from the plan, runtime/prologos-runtime-hybrid.zig): - Add `firing: bool` flag + `dirtied_cid: [MAX_CELLS]u32` buffer. - Wrap the worklist firing loop in run_to_quiescence with firing=true / firing=false. - Gate prologos_cell_write's subscriber scheduling: when firing, append cid to dirtied buffer; when not firing, schedule normally. - After firing loop, drain dirtied buffer and schedule subscribers. At this point all in_worklist flags for fired pids are cleared, so schedule() succeeds and queues for the next round. - Reset firing/dirtied_len in prologos_kernel_reset. HARD-FAIL CAPS (per user request "fail hard if we exhaust fuel or limited spaces like tags or callbacks"): - Dirtied buffer overflow: now @Panic("hybrid kernel: dirtied buffer overflow ...") instead of silent fall-through. - Fuel exhaustion: backend-hybrid's run-to-quiescence now reads prologos_get_stat(5) (= prof.fuel_exhausted) after the kernel returns and raises a Racket-level error if set. Previously Racket silently returned the partial result cell value when the kernel hit max_rounds. - Other limits already abort hard (next-tag! at 256 callback tags, MAX_PROPS, MAX_INPUTS, pending_len, next_worklist_len, fire_fn dispatch table). Audit confirmed. REGRESSION TESTS (5 new files in examples/hybrid-battery/): - R1: [int-eq [int-mod 7 3] 0] -> false (was: true) - R2: [int+ [int-mod 7 3] 100] -> 101 (was: 100) - R3: [int* [int-mod 7 3] 100] -> 100 (was: 0) - R4: [int-lt [int-mod 7 3] 1] -> false (was: true) - R5: def x := [int-mod 7 3]; def main := [int+ x 100] -> 101 (was: 100) WORKLOAD STATUS: - W14 prime-count now arithmetically correct: returns 3 at N=5 (primes 2,3,5). Bumped N down from 10 because the recursive defn structure allocates a fresh callback tag per call site and the kernel's 256-tag pool is exhausted around N>=7. That's a separate scaling limit unrelated to the BSP bug; expanding the pool or memoizing fire-fns by structure are independent future improvements. Documented in W14's header comment. - All 14 other workloads continue to pass with same results. REGRESSION SUITE STATUS (all post-fix): - preduce-lite: 7/7 OK (no change) - ocapn: 12/12 OK (no change) - shape: 42/42 OK + 4 known-fail Vec/Fin (no change) - workloads: 15/15 OK (W14 now correct) - R1-R5: 5/5 OK (new) PHASE 7 IMPACT: The bug temporarily elevated int-mod migration from #6 "trivial cleanup" to a CORRECTNESS fix. The fix subsumes that need; int-mod migration is back at #6 (small perf optimization, not correctness). Phase 7 ranking otherwise stands. DOCS UPDATED: - Bug doc: marked FIXED with date. - Plan doc: marked IMPLEMENTED with note on the hard-fail addition. - Phase 7 doc: int-mod ranking restored to #6, note that fix subsumes correctness need. https://claude.ai/code/session_01Tycs6BWKG58Wo99YVPg6DF
Closes the int-binary cluster. Tag 7 was unused; now hosts kernel_int_mod (using @Rem to match Racket's `remainder` / @divTrunc semantics, paired with kernel_int_div). Changes: - runtime/prologos-runtime-hybrid.zig: kernel_int_mod fn + fire_fn_2_1[7] = kernel_int_mod registration. - racket/prologos/preduce-backend-hybrid.rkt: 'int-mod -> 7 in NATIVE-OP-TAGS. - racket/prologos/preduce.rkt: expr-int-mod compile case routes through #:native-op 'int-mod. Verified: - W4 GCD profile shows 3 fires at tag 7 (native) — previously these were callback-tagged at 8+. - W14 prime-count N=10 still returns 4. - R1-R5 all correct. - Full battery 81 OK / 4 known-fail Vec-Fin. - 29 Racket hybrid tests pass. Phase 7 ranking: int-mod migration was #6 ("trivial; closes the int-binary cluster gap"). Done. The remaining ranks (1-5) are the architecturally-bigger ones (recursive call apparatus, match dispatch, ctor-N construction). https://claude.ai/code/session_01Tycs6BWKG58Wo99YVPg6DF
… findings persisted
Sub-phase 9b of Phase 9. Phase 9 substantively complete.
Sweep run: 4 concurrent per-domain processes (one per domain;
type domain further split per-relation for parallelism via mid-
flight --relation flag addition). Wall time ~34 min (type domain
dominated; per-relation parallelization halved vs sequential
estimate).
Captured 110 sd-finding records: 10 (domain × relation × depth)
tuples × 11 algebraic properties.
Variety-placement matrix populated in design doc § Phase 9 Findings.
10 rows × 7 hierarchy columns + Whitman's W. Mid-flight refactor
(--relation flag) honestly named in dailies + adversarial VAG.
Headline findings:
1. Whitman's W ✓ for ALL 10 (domain × relation × depth)
combinations. Every Prologos lattice is FL-embeddable per
Nation Theorem 5.55/6.9. Strong non-vacuity on type (83-99%
on the antecedent). Unified empirical claim.
2. Both type×equality AND type×subtype reach Heyting on the
ground sublattice. Phase 5a prediction validated
comprehensively. New beyond Track 2H's subtype-only Heyting
declaration.
3. Asymmetry at binder boundary: type×equality × wider is
SD + modular (not distributive); type×subtype × wider is
SD only (modular refutes with Pi-Pi-Pi witness). NEW finding
beyond Phase 4. Equality merge preserves modularity through
binders; subtype's GLB meet does not.
4. Stone identity refutes for ALL 10 — no Prologos lattice
reaches Stone-algebra level. Honest negative data.
5. breadth-bound (k=4) refutes at wider samples for type×{eq,sub},
session, form-cell. Most domains exceed 4-element antichain
bound at wider — relevant to parallel-decomposition fan-out.
6. Per-domain placements:
- type × eq × ground = Heyting; wider = modular SD
- type × sub × ground = Heyting; wider = SD-only
- session × eq = modular but not SD (M3-like; both depths)
- form-cell × eq = SD but not modular (both depths)
- spec-cell × eq = bottom (only W + breadth ✓)
7. Pseudo-complement decoupling on session × eq: has-pc-rel ✗
but has-pc-abs ✓. Validates Q1(b) Phase 5 disambiguation
empirically — they DO decouple in practice.
No 6th Scaffolding-Hides-Truth instance: drift risk #6
anticipated potential declared-vs-empirical mismatch. None
surfaced.
Raw per-domain findings markdown files persisted to
docs/tracking/2026-04-30_SRE_TRACK2I_PHASE9_FINDINGS_RAW/
(type-eq.md, type-sub.md, session.md, form-cell.md, spec-cell.md).
Phase 10 will consolidate + interpret for Nation report.
Adversarial VAG passed at phase close (P/R/M/S two-column).
Tracker: Phase 9 ⬜ → ✅. Phase 10 (Lattice Variety Report)
is next.
…sisted Phase 11 (has-complement empirical check; Boolean placement; Tier 1) opens with full Stage 4 mini-design + mini-audit dialogue. User-flagged refinements 2026-05-08: 1. YAGNI reversal on /detailed variant. Original scope said 'no /detailed per Phase 5 YAGNI discipline.' User pushback: 'YAGNI may prematurely preclude considerations vacuously, as an excuse to defer.' Reversal honors Completeness Over Deferral principle. Adding complement-evidence struct + test-has-complement/detailed. Non-vacuity ratio distinguishes strong-vs-weak empirical Boolean (Phase 4 SD-vee 3.5% vs SD-wedge 91.4% is precedent). Going-forward: each property check gets /detailed unless the decomposition is genuinely uninformative for that check. 2. In-phase sweep + report integration. Original scope said validation only; sweep deferred. User pushback: front-loading code and back-loading data is unprincipled. Revised: each phase = code + sweep findings + design doc + Nation report update, single commit. ~10-15 min wall per phase via 4-concurrent-process model. 3. Concurrent sweep parallelization. Extend harness with --properties flag; invoke 4 racket processes (one per domain) for Phase 11's has-complement-only sweep. Implementation plan: ~80-100 LoC code + ~10-15 min sweep + ~10 min report integration. Single commit ties code + sweep findings + design doc + Nation report all together. 6 drift risks named including potential Scaffolding-Hides-Truth #6 (form domain expected refutation per Track 2H decl) and potential type×subtype Boolean reach (parallel to Phase 5a Heyting reach finding).
…entation pending next session Strong checkpoint entry for 2026-05-20 session close: - Current HEAD: df9dacc (PM 13 + 2A.b mini-design captured) - Suite: 8228 / 109.1s / 0 failures (last measured 2A.a close) - Phase 2A.b: 🔄 mini-design + audit complete; implementation PENDING Includes: - Status matrix across all addendum phases - 3 NEW architectural deliverables summary (PM 13, Parent Design Doc Phase 4 update, §8.7.b) - Operational principle codified: "off-network ≡ scaffolding" - 8-step implementation plan from §8.7.b.9 with file:line references - 8 drift risks from §8.7.b.8 to scrutinize - Tasks status carried forward (#4 ✅ / #5 🔄 / #6 ⬜) - Key reference docs ordered for next-session hot-load - 4 critical context items NOT to lose (handler-as-scaffolding is PM 13 scope; box-bridge is structural scaffolding; adversarial 3-column framing discipline; operational principle for decision-making) - 6 codification candidates watching list Rationale for checkpoint: context budget pressure after substantial design work (mini-design + audit + PM 13 capture + Parent Design Doc update + §8.7.b persistence). Implementation requires another ~95-110 LoC + test rewrite + validation cycles. Cleaner to land in fresh session per Stage 4 "conversational implementation cadence" — checkpoint surfaces what was built, what's next. Next session: hot-load HANDOFF_PROTOCOL → read §8.7.b → execute 8-step implementation list → validate → close 2A.b.
…C pickup Cumulative session-end CHECKPOINT bridge per user direction: rewinding to a previous turn; this CHECKPOINT is the bridge for the rewound session to re-establish context via dailies + git log + design doc re-reads. Captures: - Current state at HEAD c17d508 (Phase 3B CLOSED at d81a04f; backfill c17d508) - Suite stability: 8242 / 111.4s / 0 failures (verified at 3B.A.6 close) - Session arc summary: 12 commits across Phase 3B.A + Phase 3B-VAG - Hot-load priorities for next session per HANDOFF_PROTOCOL.org Stage 2-4 - Phase 3C starting points: §9.5 (deliverables) + §9.5.A (Form C cross- reference UC1/UC2/UC3) + tropical-left-residual at tropical-fuel- primitives.rkt + algebraic property declarations + property-sweep empirical validation - Phase 3C scope preview per §9.5 with 6 deliverables + Q-A6 placement decision (Phase 3C vs Phase 11b diagnostic) - Form C UCs to deliver (UC1 fuel-exhaustion blame; UC2 cost-bounded elaboration via Galois bridge; UC3 per-branch cost tracking) - Key design questions for Phase 3C mini-design (per-branch fuel separation; cell-to-tagged promotion; derivation-chain-for API; LSP integration; bitmask subcube) - Critical context to retain: (1) Phase 3A architectural state (Realization B; R7; cell-17 FP3 guard) (2) Phase 3B.A M0 architectural state (NEW from this arc) (3) Tropical Quantale Addendum substrate (consumed by Phase 3C) (4) 3-column adversarial framing as methodology discipline (5) Methodology pattern reusability codification candidate - Codifications status carry-forward: 2 PROMOTION-READY + 4 candidates + 4 watching-list entries; user direction needed for graduation timing - Tasks status: all 5 session tasks completed; #6 deleted (you executed 3B-VAG in a separate context) - Open conversation threads with Claude: Phase 3C mini-design opening; codifications graduation; Phase 3V cumulative; Track 4D long-term Phase 3B summary: cross-arc VAG passed; 6 D-3B-* parent risks cleared; M0 substrate fix delivered; 5 multi-candidate consumers inherit for free; M1+M3 deferred to Track 4D; Conjecture's CHAMP-sharing claim bounded (mechanism-coupled); Variant B retired honestly. The negative empirical result was data, not failure.
Fixes pitfall #14 from
docs/tracking/2026-04-23_eigentrust_pitfalls.md.Summary
The pretty-printer was emitting type applications like
(PVec Rat)and(Map Keyword Nat)in parens, butspecsignatures (and the convention in.claude/rules/prologos-syntax.md§ "Delimiters") use[T A]. The reader accepts@[1/4 1/4 1/4 1/4]as aPVec Ratbut the printer round-trips it as(PVec Rat)— cosmetic divergence between read and print syntax.Choice — broad, not narrow
The pitfall observation was about PVec, but the same parens-vs-brackets divergence applied to every type application and several Set/Map operation forms. Per
prologos-syntax.md("[]for all functional contexts ...()only for parser keywords"), the broad fix is more correct.Switched 15 cases in
pretty-print.rkt:Map,Set,PVec,TVec,TMap,TSet— now[T A]([Map Keyword Nat])set-empty,set-insert,set-member?,set-delete,set-size,set-union,set-intersect,set-diff,set-to-list, thepvec-emptyannotation — now[op …]Existing forms like
[Vec …],[map-assoc …],[pvec-push …]already used[…], so this brings the rest in line.Test plan
tests/test-pretty-print-pvec.rkt— 16 cases covering PVec types, Map/Set type applications, and that round-tripping@[…]literals through pretty-print produces the[PVec …]formtest-pvec.rkt,test-set.rkt,test-map.rkt,test-implicit-map-02.rkt(4 lines total) — each documented in the commit messagethread #:pool 'ownfailure on Racket 8.10 — not related to these changes; the snapshot lines themselves were patched correctlyhttps://claude.ai/code/session_01MbncYJnrvjzhbVWw4xGi5x
Generated by Claude Code