Skip to content

feat(cockpit): /helix2 v4-bake route, vessel CAP per-bake, and the measured v4 addressing plan - #151

Merged
AdaWorldAPI merged 8 commits into
mainfrom
claude/ndarray-simd-tract-o3jfrn
Sep 7, 2026
Merged

AdaWorldAPI merged 8 commits into
mainfrom
claude/ndarray-simd-tract-o3jfrn

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Sep 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Three related things, none of which touch the v3 bake or anything downstream of it:

# change files
1 /helix2 — a v4-bake sibling of /helix cockpit/src/BodyHelix2.tsx, cockpit/src/main.tsx
2 vessel CAP is per-bake — v3 keeps 2.0, v4 takes 1.2 crates/osint-bake/tools/fill_body_soa.py
3 v4 plan §10 + §11 — the addressing and vessel measurements claude-notes/plans/2026-09-06-fma-bake-v4-plan.md

No bake was produced or modified. No producer was run. There is still no v4 artifact; this ships the surface that will show one and the knob it will use.


1. /helix2

The fourth application of the repo's own #64 pattern, not a new idea — /helix is "Standalone so it can never break /body (#64)", GeoHelix is "a verbatim copy of BodyHelix, #64-style", GenomeHelix is "standalone so it can never break /cpic".

BodyHelix2.tsx is a verbatim fork whose only behavioural difference is the manifest key:

route manifest key
/helix helix_latest
/helix2 helix_v4_latest

Same loader, same BSO2 ver-6 decoder, same Signed360 shading — the renderer is held constant, so any visible difference between the routes is the bake, never the viewer. That is the whole point of having both.

Two safety boundaries, deliberately distinguished:

  • /helix is protected by the fork itself.
  • medcare-rs is protected by not re-baking over what it pins. It never loads q2 routes; it consumes the release artifact body.soa.gz, SHA256-pinned in its scripts/fetch-frontend-assets.sh where "a URL without a matching pin is a hard error". A new manifest key plus a new artifact leaves that untouched — replacing helix_latest's asset is what would break it, no matter how many routes exist.

fetchSoa's CANONICAL-ONLY rule is kept deliberately: falling back to the v3 artifact would make /helix2 a copy of /helix that looks like a successful v4 render.

Two defects fixed after review (codex P2 ×2, both confirmed against source, both resolved):

  • Server LOD is now off on this route. /api/body/lod cascades over the v3 bake's compile-time bounds (include_bytes!(".../assets/body.blocks")) and returns actions indexed by v3 concept rows. BodyHelix already disables it for geo scenes on exactly that argument; a v4 bake changes concept rows by construction, so folding v3 actions into d.vrow would hide visible structures silently, while looking like a successful v4 render. The toggle renders disabled with the reason rather than vanishing.
  • /helix2 added to the scene selector. The <select> falls back to /helix for any path absent from sceneOptions, so it claimed the v3 body was selected while rendering v4, with no way back.

2. Vessel CAP: 2.0 → 1.2, for v4 only

At CAP = 2.0 a ring may be twice the vessel's own calibre, which is the mechanism behind the over-thick arteries on the live /helix render. v4 uses 1.2 — bend allowance from +100 % to +20 % (a 0.004-calibre vessel's ceiling falls 0.0080 → 0.0048).

Implemented as CAP = float(os.environ.get("BODY_FILL_CAP", "2.0")). The default is the v3 value, so an unset variable reproduces the v3 artifact byte-identically. Nothing invokes the script from a driver, so the v4 procedure sets it explicitly (recorded in plan §11.1a):

BODY_FILL_CAP=1.2 python3 crates/osint-bake/tools/fill_body_soa.py <soa_dir>

Two limits stated rather than discovered later: it bounds the bend balloon only — min(RMAX, caliber * CAP) cannot make a vessel thinner than its measured calibre — and it narrows the damage without fixing the reconstructed centerline that causes it.

3. Plan §10 + §11 — measured, to be researched

Nothing is ruled; §6 stays unresearched. Headline figures, all from BodyParts3D 3.0:

  • is_a max depth is exactly 24. Overflow at today's 6 levels: 95.93 %; at 12: 48.60 %; at 24: 0.00 %.
  • is_a is a tree (104,696/104,698 single-parent), so parent = mask −1 is valid there; part_of is a DAG (536 of 1,522 multi-parent), so it is not. Sizing part_of at 12 makes the shortest-vs-deepest question moot.
  • The "uncle" edge reference works only on a part_of-ordered address (0 unreachable, max climb 5, one-byte encodable); on an is_a-ordered one it fails (23 unreachable). The ordering relation is the real decision, not the slot count.
  • The many2many hubs already exist as FMA region/Set of nodes, and Set of is a trigger, not a container: only 30 of 3,409 have any members, because the extent is the join { p ∈ parts(O) : p is_a T }.
  • Connectivity is recoverable, correcting an earlier claim in the same section: 74 % of labels are <Predicate> of <Object> and the object resolves by name — Tributary of 90 %, Branch of 46 % — yielding ~490 vessel edges with no new source.

Open items recorded: the 203/281/301 skeleton-baseline ambiguity, 23 empty-FMAID rows that collide at address 0, the post-mint one-byte reachability falsifier, and that 24 has zero headroom until P-5 runs against 4.0.

Verification

npx tsc --noEmit -p . → exit 0; npm run build (tsc && vite build) → green.

Stated plainly: this fork has no frontend CI. ts-test-suite.yml and hub-client-e2e.yml carry if: github.repository == 'quarto-dev/q2' and can never run in AdaWorldAPI/q2, so their permanent skipped status is structural, not a failure — and the local build plus the reviews are the only gates on the .tsx. The Rust test-suite.yml does run here and is the gate on everything else. No browser render was performed, so /helix2 is typechecked and built, not visually confirmed.

Bake artifacts verified byte-identical (9/9 checksums) before every commit.

🤖 Generated with Claude Code

https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht

Summary by CodeRabbit

  • New Features

    • Added a new /helix2 viewer for exploring the latest V4 visualization.
    • Supports anatomy, map, terrain, and Garmin scenes with orbit controls, layer filtering, x-ray mode, concept search, and focused navigation.
    • Added terrain decoding, relief and sky rendering, color data, and improved error reporting.
    • Added V4 vessel rendering with configurable caliber limits for more controlled visual proportions.
  • Documentation

    • Documented updated zipper addressing, vessel modeling, connectivity considerations, and open bake decisions.

BodyHelix2.tsx is a verbatim #64-style fork of BodyHelix.tsx differing in one
line of behaviour: it resolves `helix_v4_latest` from /body.manifest.json where
/helix resolves `helix_latest`. Same loader, same BSO2 ver-6 decoder, same
Signed360 shading, so a v4 bake is compared against v3 with the renderer held
constant and any visible difference is the bake rather than the viewer.

The CANONICAL-ONLY no-fallback rule is inherited deliberately: falling back to
the v3 artifact would make /helix2 a copy of /helix that looks like a successful
v4 render. Until a v4 bake is published it reports the missing manifest key.

Nothing existing is touched — `helix_latest` keeps serving /helix, and the
release asset medcare-rs SHA256-pins stays as published.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht
@coderabbitai

coderabbitai Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: 3eeee160-4392-4b21-90d5-ad222e2e4444

📥 Commits

Reviewing files that changed from the base of the PR and between 7c07315 and 04e899f.

📒 Files selected for processing (4)
  • claude-notes/plans/2026-09-06-fma-bake-v4-plan.md
  • cockpit/src/BodyHelix2.tsx
  • cockpit/src/main.tsx
  • crates/osint-bake/tools/fill_body_soa.py

📝 Walkthrough

Walkthrough

Adds measured V4 anatomy research, configurable vessel filling, and a standalone /helix2 viewer. The viewer decodes BSO2 artifacts, renders multiple scene types, loads canonical V4 manifests, and exposes search, layer, focus, and x-ray controls.

Changes

V4 anatomy research

Layer / File(s) Summary
Measured zipper addressing
claude-notes/plans/2026-09-06-fma-bake-v4-plan.md
Defines 24 is_a slots, additional part_of edge handling, taxonomy measurements, derived Set of joins, and open validation decisions.
Vessel way proposal
claude-notes/plans/2026-09-06-fma-bake-v4-plan.md, crates/osint-bake/tools/fill_body_soa.py
Documents ordered vessel ways, BODY_FILL_CAP, recovered connectivity, type relationships, and vessel-model validation conditions.

BodyHelix2 V4 viewer

Layer / File(s) Summary
BSO2 artifact decoding
cockpit/src/BodyHelix2.tsx
Adds version 8 radix-grid decoding, legacy BSO2 decoding, normal reconstruction, colors, concept metadata, and outlier filtering.
Scene rendering and interaction
cockpit/src/BodyHelix2.tsx
Adds Three.js scene setup, shaders, terrain handling, scene filtering, camera interaction, x-ray mode, focus movement, and disabled server LOD.
Artifact loading and route wiring
cockpit/src/BodyHelix2.tsx, cockpit/src/main.tsx
Loads canonical and Garmin artifacts, connects viewer state and controls, and exposes /helix2 with no V3 fallback.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Viewer as BodyHelix2
  participant Manifest as CanonicalManifest
  participant Decoder as BSO2Decoder
  participant Renderer as ThreeScene
  Viewer->>Manifest: request helix_v4_latest
  Manifest-->>Viewer: return artifact payload
  Viewer->>Decoder: decode BSO2 data
  Decoder->>Renderer: provide geometry and metadata
  Viewer->>Renderer: apply layers, focus, and scene controls
  Renderer-->>Viewer: render scene state
Loading

Suggested reviewers: claude

Poem

A rabbit maps the bake,
Vessels follow ordered ways,
Helix lights the scene,
Zippers hold the anatomy,
Clear paths guide each review.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Sep 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_2763bc16-d55b-461f-b72b-381a2685edb5)

Appends the 2026-09-07 measurements behind the operator's zipper proposal
(L1/L2 = is_a:is_a, part_of as parent-of-last, mask -1, edges then groups).
Marked MEASURED, TO BE RESEARCHED; §6 stays unresearched and nothing is ruled.

The load-bearing figures: is_a max depth is exactly 24 (0.00% overflow at 24,
95.93% at today's 6), and is_a is a tree (2 multi-parent of 104,698) so mask -1
is valid there, while part_of is a DAG (536 of 1,522) so it is not. Sizing
part_of at 12 makes the shortest-vs-deepest question moot. The uncle escape
works only on a part_of-ordered address (0 unreachable, max climb 5) and fails
on an is_a-ordered one (23 unreachable), so the ordering relation is the real
decision. The many2many hubs already exist as FMA region and Set-of nodes.

Adds four open items: the 203/281/301 baseline ambiguity, 23 empty-FMAID rows,
the post-mint one-byte reachability falsifier, and that 24 has zero headroom
until P-5 runs on 4.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht
…any hubs

§10.5 as written invited reading `Set of…` / `Subdivision of…` as many2many
markers. Measured, none of them is: `Subdivision of…` (537) and `Tributary of…`
(146) have zero multi-parent nodes and are strictly one-to-many, and is_a as a
whole has only 2 multi-parent nodes in 104,698 — so no is_a naming pattern can
be the many2many layer. Those nodes are the depth spine that produces the
24-level chain and makes mask -1 valid, not a violation of it; the genuine
many2many lives in part_of. Also records that `Set of…` is a poor hub marker:
79% are leaves with mean fan-out 1.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht
§11 records that fill_body_soa.py reconstructs each vessel centerline from an
unordered point cloud, and that all six of its constants are patches for that
reconstruction failing — CAP because "a finger artery balloons to aorta size at
a bend", PCTL because "two arms share one axial bin". An OSM way gives the
ordered centerline instead of inferring it, which is the same intra-family
failure kurvenlineal.rs already fixed for terrain: needle field, balloon field.

O-11b is corrected after checking both directions. The aorta containment chain
reads intact upward, so "arch of aorta has zero parts" was true downward but
misleading — it is a leaf. What is missing is a KIND of relation, not a
direction: the dataset carries taxonomy, containment and composition, and no
connectivity edge anywhere. Nothing leaves the arch. A way network is defined by
connectivity, so the centerline and the junction graph are two separate
acquisitions and neither derives from the shipped relations.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht
@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review September 7, 2026 05:03
…bels

O-11b claimed no connectivity could be derived from the shipped relations.
Wrong: 74% of FMA labels (77,677 of 104,697) are "<Predicate> of <Object>", and
the object half resolves back to a real node by name — Subdivision of 95%,
Tributary of 90%, Vasculature of 84%, Branch of 46%. That recovers ~490 vessel
connectivity edges (359 branch_of + 131 tributary_of) with no new source, so the
junction graph is partially derivable by a string join rather than unobtainable.
Branch of at 46% is the weak spot and is what actually gates the way model.

Still true: BodyParts3D ships one relation ("conventional inclusion") by design,
and 8 bifurcation NODES are not edges between ways.

Adds O-11d for the second half of the question: the same flattened predicates
name type pairs the substrate does not model — periosteum/compact/trabecular
bone on a bone, lumen of a tube, wall of an organ, tendon of a muscle,
vasculature of an organ — all derivable today from labels already in FMA.csv.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 57dfc0c2a5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cockpit/src/BodyHelix2.tsx
Comment thread cockpit/src/BodyHelix2.tsx
Measured over all 3,409 "Set of" nodes: only 30 have any part_of members, only
57 appear in conventional_part_of at all, and 79% have no is_a children — they
are edge-less declarations in both shipped relations. The extent is not stored
because it is derivable: Set of <T> of <O> is the join { p in parts(O) : p is_a
T }, verified against the heart's 10 parts (arteries -> the two coronaries,
veins -> the two cardiac veins, organ components -> the six chambers/wall/
myocardium). Naive label matching recovers only 32% with ~1 member each, so the
join is what works.

Consequence: do not mint a hub per Set node (3,409 empty containers) and do not
store the extent (a second source of truth for what the join yields). The set is
many-to-one into the taxonomy, so it costs nothing in the mask chain; only its
computed extent is many2many.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht
… /helix

Two defects from forking BodyHelix.tsx verbatim, both found by codex on #151.

Server LOD is now off on this route. /api/body/lod cascades over the v3 body's
compile-time block-bounds (include_bytes!("assets/body.blocks")) and returns
actions indexed by v3 concept-row position. BodyHelix already disables it for
geo scenes on exactly that argument; a v4 bake changes concept rows and geometry
by construction, so folding v3 actions into d.vrow would hide visible structures
and keep off-screen ones — silently, while looking like a successful v4 render,
which is the failure mode this route exists to avoid. The inherited comment
claiming "empty ?scene= -> helix_latest -> LOD stays ON" was wrong here, since
an empty scene resolves helix_v4_latest. The toggle renders disabled with the
reason rather than vanishing, so re-enabling is one line once a v4-matched
.blocks sidecar exists.

The scene selector now lists /helix2. Its <select> falls back to '/helix' for
any path absent from sceneOptions, so the control claimed the v3 body was
selected while rendering v4, and offered no way back to the comparison route.

Verified: npx tsc --noEmit exit 0, and npm run build (tsc && vite build) green —
this fork has no frontend CI (ts-test-suite.yml is gated to quarto-dev/q2), so
the local build is the only gate.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht
At CAP = 2.0 a ring may be twice the vessel's own caliber, which is the
mechanism behind the over-thick arteries on the live /helix render. The v4 bake
uses 1.2, tightening the bend allowance from +100% to +20% (a 0.004-caliber
vessel's ceiling falls from 0.0080 to 0.0048).

CAP now reads BODY_FILL_CAP with the v3 value as the default, so an unset
variable reproduces the v3 artifact byte-identically — helix_latest, the bake
/helix serves and the asset medcare-rs SHA256-pins, is untouched. Nothing
invokes this script from a driver, so the v4 procedure sets it explicitly; the
command is recorded in v4 plan §11.1a.

Recorded there too: this bounds the bend balloon only. min(RMAX, caliber * CAP)
cannot make a vessel thinner than its measured caliber, so residual size would
come from CORE/PCTL or the caliber estimate; and it narrows the damage without
fixing the reconstructed centerline that causes it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012wrzeZAdwGYTCKoxamwQht
@AdaWorldAPI
AdaWorldAPI merged commit 6aafd11 into main Sep 7, 2026
4 of 5 checks passed
@AdaWorldAPI AdaWorldAPI changed the title feat(cockpit): add /helix2, the v4-bake sibling of /helix feat(cockpit): /helix2 v4-bake route, vessel CAP per-bake, and the measured v4 addressing plan Sep 7, 2026
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