Skip to content

feat: arena/ outer loop (basilisp) + tick/ inner loop (hy) + bcf-0059 pipeline doc - #25

Open
bmorphism wants to merge 1 commit into
mainfrom
arena-tick-pipeline
Open

feat: arena/ outer loop (basilisp) + tick/ inner loop (hy) + bcf-0059 pipeline doc#25
bmorphism wants to merge 1 commit into
mainfrom
arena-tick-pipeline

Conversation

@bmorphism

Copy link
Copy Markdown
Member

Adds arena basilisp scripts, hy tick loop, and separates bcf-0058 conflict: IRB stays as bcf-0058, GraphQL pipeline doc becomes bcf-0059.

- tick/dt26.hy: 26-letter color 2AFC trial runtime, SplitMix64→CIEDE2000→trit, ZMQ PUB :7069
- tick/theory_tiles.hy: 26×3=78 Brick tiles for catcolab theories
- arena/theories.lpy: 26 letter registry + 4 invariant clusters
- arena/arena.lpy: pyzmq SUB + core.async ingest, GF(3) conservation state
- arena/witness.lpy: rolling-window coherence gate, GAY accrual, 2× cluster bonus
- arena/catcolab_post.lpy: HTTP POST wrapper (dry-run)
- arena/outer_wilds.lpy: 22-min loop ≅ 26-trial window, supernova reset, Eye terminal coalgebra
- arena/smoke_test.lpy: full-alphabet + cluster-resonance scenarios
@bmorphism

Copy link
Copy Markdown
Member Author

Review: build + functorial conservation analysis

Built and analyzed this branch on an isolated VM (forester 4.3.1, linux-x86_64). Treating the forest as a functorial database (schema category C: object Tree, morphisms transclude, ref : Tree→Tree, attribute taxon), this PR is an instance migration from its merge-base 04b5862 to head ad997f8.

What was done

  • Full forester build of the branch → 40,376 output XML trees, forester build exit 0.
  • Extracted the node + edge graph from source .tree files; ran Δ/Σ/Π (pullback / left-Kan / right-Kan) diff vs merge-base.
  • Validated XML well-formedness with an independent strict parser; ran DuckDB queries over the rendered forest.

What was discovered

  • Conservative migration — Δ∘Σ ≅ id. Objects: +1 / −0. The single freely-adjoined tree is bcf-0059 "Pipeline 7: gh CLI GraphQL Streaming into DuckLake Snapshots" (architecture). Taxon retypings: 0 / 1794 shared. Transclusion diagram unchanged (2913 → 2913 edges); ref graph +4. The forest functor is conserved exactly.
  • The +774 lines are arena/ (basilisp) + tick/ (hy) — an orthogonal code fibration over the forest, not the tree olog, so the database migration is essentially the identity.
  • Validity: all 88/88 authored bcf/bci/horse trees are well-formed XML.
  • Co-mergeable with alt: navigable atomic forest (de-inlined root) — comparison to #29 read-through #30: the two PRs have disjoint addr-supports — the pushout #25 ⊔_main #30 is a clean coproduct, 0 semantic conflicts.
  • Pre-existing H¹ (not introduced here): 7 dangling edges — the forest root bcf-0001 is never rendered to bcf-0001.xml (transcluded by mat-0001/index), plus template placeholders (X, ..., namespace-XXXX) in bcf-0046/lc-000C.
  • Housekeeping: branch is BEHIND main — a rebase will pick up newer trees (this is why a raw diff vs main-HEAD over-reports; the merge-base comparison above is the correct one).

How to reproduce

git clone -b arena-tick-pipeline https://github.com/plurigrid/place && cd place
# forester 4.3.1; if no TeX toolchain, stub the math pipeline (metadata-only, read-only):
printf '#!/bin/bash\nfor a in "$@";do case "$a" in *.tex) b="${a%.tex}";;esac;done; : > "${b:-texput}.dvi"\n' > latex
printf '#!/bin/bash\nexit 0\n' > dvisvgm   # forester pipes math via --stdin --stdout
chmod +x latex dvisvgm; export PATH="$PWD:$PATH"
./forester build bci-forest.toml --no-theme --no-assets    # -> output/*.xml, exit 0

# functorial graph (nodes/edges) + frontmatter, then DuckDB:
#   nodes: addr,taxon,title,date   edges: src,dst,kind in {transclude,ref}
duckdb -c "SELECT taxon,count(*) FROM read_json_auto('nodes.jsonl') GROUP BY 1 ORDER BY 2 DESC;"
# Σ added vs merge-base:  SELECT addr FROM head WHERE addr NOT IN (SELECT addr FROM base);
# H¹ dangling:            SELECT * FROM edges WHERE dst NOT IN (SELECT addr FROM universe);

XML validity (independent of build): python3 -c "import xml.etree.ElementTree as ET,glob;[ET.parse(f) for f in glob.glob('output/bcf-*.xml')]".

Net: a clean, safe extension. No structural objections.

@bmorphism

bmorphism commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

Stable link: these now go through a GitHub Pages redirect (bmorphism.github.io/bci-preview) that survives preview-host restarts — the raw cloud URLs are ephemeral. git clone points at canonical github.com.

🌲 Live render — view this branch in your browser

This branch is built and hosted so anyone can see the actual rendered forest (no clone, no install — the browser applies the XSLT client-side):

The PR branch is also git-cloneable from the same host:

git clone -b arena-tick-pipeline https://github.com/plurigrid/place

Please open the links and click around — the portal, the device ledger, the TOC/backlink sidebar all work. If anything looks off (broken transclusion, missing tree), reply here with the address.

Notes: this is a fast preview build — \tex math renders fine via client-side KaTeX; everything else (text, tables, links, navigation) is live. Served from an ephemeral build VM, so links are good now; ping if a link 404s and I'll relaunch.

@bmorphism

bmorphism commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

Stable link: these now go through a GitHub Pages redirect (bmorphism.github.io/bci-preview) that survives preview-host restarts — the raw cloud URLs are ephemeral. git clone points at canonical github.com.

📑 Browsable index (easier than guessing addresses)

One entry point listing every BCI tree in this branch, grouped by taxon, each a clickable render link:

https://bmorphism.github.io/bci-preview/pr25/index.html (110 trees)

Compare against:

(Build state is snapshotted, so the renders persist. Inline math renders via client-side KaTeX (only complex tikz/xy diagrams in imported math trees may be placeholder).)

@zubyul

zubyul commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Built this locally against origin/main (8b466b2). There are two independent blockers, and the net effect today is that none of this PR's content reaches the site — including on a build that exits 0.

1. The branch is 20 commits behind main

Base is 04b5862. At that commit trees/bcf-0058.tree is the pre-fix version and fails to parse; main fixed it in b3c6c37. So building this branch drops bcf-0058 too — collateral damage that disappears on rebase. Rebase onto main first, or the build log will show an error that has nothing to do with your work.

2. bcf-0059.tree embeds source code without verbatim

All four code blocks open with \pre{% and there is no \startverb anywhere in the file. Forester parses the contents of \pre{}, so the Elisp/Babashka source is being read as forester markup — its braces, brackets and % are all interpreted:

./trees/bcf-0059.tree
165 | }                                                    <- unexpected `}`
226 | syrup (:olc t) (esc (or (:content t) "")))]          <- unexpected `]`
237 | }                                                    <- unexpected `}`

Also note % comments out the rest of its line in forester, so \pre{% is silently eating the first line of each block.

Code has to go inside a verbatim span, which is not parsed at all:

\pre{\startverb
(defun bcf-query-olc (olc)
  "Find trees authored near an OLC."
  (interactive "sOLC: ")
  (bcf-query
    (format "SELECT tree_id, title FROM bcf.trees
WHERE olc = '%s' ORDER BY committed_at DESC LIMIT 20" olc)))
\stopverb}

\startverb must be followed by whitespace, or it lexes as one unknown command. The one thing you cannot put inside a verbatim span is the literal stop keyword — if the code ever contains it, split into two spans.

Why the build still "passes"

This is the trap worth internalising. These are parser errors, which forester recovers from: it silently drops the offending tree and carries on. My build of this branch exited 0 and emitted 40,398 pagesbcf-0059.xml simply was not among them. A green build is not evidence your tree rendered.

(Contrast #42, which hits a lexer error — unrecognized token — that aborts the run at zero pages. Different failure shape, same root cause: unescaped content being read as markup.)

3. Nothing transcludes it

Independent of the parse errors: bcf-0059 is referenced by no other tree — not transcluded, not even [[linked]]. Once it parses it will get a standalone page, but this forest reads as one page via index.tree -> bcf-0001 -> ..., so an un-transcluded tree is invisible in the main read. Add a \transclude{bcf-0059} from whichever parent it belongs under.

Also worth saying plainly: arena/*.lpy and tick/*.hy are not trees and will never render. If you want that code on the site, it has to be transcluded into a tree as verbatim.

Checking it compiles

./forester build forest.toml 2>&1 | tee /tmp/build.log
grep -c 'Parse_error' /tmp/build.log   # must be 0 — this is the gate, not $?
ls output/bcf-0059.xml                 # your page must actually exist

Build inside nix develop (the flake pins texliveFull) — \quiver / \tex shell out to latex, and without it the run dies at the resource stage having emitted nothing, which looks identical to a content bug. CI runs nix build .#forest.

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.

2 participants