Skip to content

osint: bake the dual-use facet edges into osint_scene.soa (fix free-floating dimensions)#45

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/osint-soa-rebake
Jun 23, 2026
Merged

osint: bake the dual-use facet edges into osint_scene.soa (fix free-floating dimensions)#45
AdaWorldAPI merged 1 commit into
mainfrom
claude/osint-soa-rebake

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Problem

main already has PR #44's facet-edge code — the bake emits entity to SchemaValue edges (rel 10-15) and the cockpit client renders them — but the served osint_scene.soa was baked before #44, so it carries 0 facet edges. The dual-use dimension cluster (127 SchemaValue + 12 SchemaAxis) is therefore a 139-node island: connected only to itself via VALID_FOR, touching the entity graph at zero points. The cockpit's force layout has nothing to pull it in, so the dimensions float free regardless of the dimensions toggle.

Why a new crate instead of just re-running the bake

The bake lives in cockpit-server (osint_gotham.rs::osint_soa_bytes), invoked only by the #[ignore]d bake_osint_soa test. Re-running it requires compiling cockpit-server's full closure (lance + datafusion + arrow + deno/V8), which OOMs at the disk cap here. But the bake's true closure is light: aiwar-ingest + zero-dep lance-graph-contract.

So this lifts the pure bake into a small tool crate, crates/osint-bake/, and regenerates the asset through the real Rust path — not a Python splice, which would have diverged (the real bake emits 431 facet edges; an earlier label-join estimate said 438, because it couldn't reproduce the id-keyed join over the enriched node set).

osint-bake's logic is verbatim-identical to osint_gotham.rs's pure bake (single source of truth until cockpit-server is wired to delegate to it — see "Follow-ups").

Result (verified by decoding the bytes, before to after)

before after
nodes 920 920 (GUID section byte-identical)
edges 3344 3775 (+431 facet, rel 10-15)
original edges changed - 0 (purely additive)
dimension to entity bridges {} (island) System 297, Stakeholder 122, Hist 12
BFS reach from a System 0 dims 118/127 SchemaValues, 10/12 SchemaAxes

The 12 SchemaAxis nodes are the family/category nodes; the facet edges make them connective tissue (entity to value to VALID_FOR to axis) instead of a detached legend. Sample: Large Geospatial Models -militaryUse-> Intelligence, -civicUse-> AR/Games, -purpose-> PredictiveMapping, -capacity-> ImageGeneration.

osint-bake: builds clean, 7/7 tests pass (incl. the keystone facet test), clippy-clean. cockpit-server is untouched.

Verification

  • Verified at the SoA asset level (the bytes the cockpit renders): decode + connectivity analysis above.
  • Not verified by running live cockpit-server (disk cap blocks its build). Railway preview is the end-to-end check.

Follow-ups (not in this PR)

  • DRY: point osint_gotham.rs at osint-bake and delete its duplicate bake. Deferred because verifying that edit needs a cockpit-server build (disk-blocked here).
  • Stale test: osint_gotham.rs::soa_bytes_have_a_parseable_header hard-equates byte length to the fixed node+edge records — it predates the OSO1 label tail and is stale (would fail if run). Corrected in the mirror; the original needs the same one-line >= fix.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF

The served OSINT asset predated PR #44's entity->SchemaValue facet edges
(rel 10-15), so the dual-use dimension cluster (127 SchemaValue + 12
SchemaAxis) rendered as a 139-node island: connected only to itself via
VALID_FOR, touching the entity graph at zero points. In the cockpit it
floated free regardless of the dimensions toggle.

cockpit-server's own re-bake OOMs at the disk cap (lance+datafusion+arrow+
deno/V8), so lift the pure bake (aiwar-ingest + zero-dep lance-graph-
contract, no heavy closure) into a light tool crate, osint-bake, and
regenerate the asset through the REAL Rust path -- not a Python splice,
which would have diverged (the real bake emits 431 facet edges; an earlier
label-join estimate said 438).

Verified by decoding the bytes (before -> after):
- nodes 920 unchanged, GUID section byte-identical
- edges 3344 -> 3775 (+431 facet edges, rel 10-15; 0 originals changed)
- dimension<->entity bridges: {} -> System 297, Stakeholder 122, Hist 12
- BFS from a System now reaches 118/127 SchemaValues, 10/12 SchemaAxes
  => the dimensions share the entity graph's connected component

The 12 SchemaAxis nodes are the family/category nodes; the facet edges make
them connective tissue (entity -> value -> VALID_FOR -> axis) rather than a
detached legend.

osint-bake's bake is verbatim-identical to osint_gotham.rs's (single source
of truth until cockpit-server delegates to it -- deferred; that edit needs a
cockpit-server build to verify, blocked by the disk cap). Builds clean,
7/7 tests pass, clippy-clean. cockpit-server itself is untouched.

Incidental: osint_gotham.rs's soa_bytes_have_a_parseable_header test
hard-equates byte length to the fixed records and is stale (predates the
OSO1 label tail); corrected in the mirror, original still needs the fix.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@AdaWorldAPI, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 6 minutes and 49 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b22040a9-d426-4d6d-a888-2d12310edfbc

📥 Commits

Reviewing files that changed from the base of the PR and between 91b18e3 and f7d4a14.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • crates/cockpit-server/assets/osint_scene.soa
  • crates/osint-bake/Cargo.toml
  • crates/osint-bake/src/lib.rs
  • crates/osint-bake/src/main.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@AdaWorldAPI AdaWorldAPI merged commit 2308e10 into main Jun 23, 2026
4 checks passed
AdaWorldAPI pushed a commit that referenced this pull request Jun 23, 2026
Slice 1 of the dual-use "both layers" plan: keep the materialized facet
edges (PR #45 — the reference layer) AND add the dynamic per-node tenant
(the residual layer the cockpit groups by live).

Bake (osint-bake):
- Emit value[1..=6] (militaryUse, civicUse, airo:type, MLType, purpose,
  capacity) as an additive OSO1 tenant tail: 6 bytes/node after the label
  tail. Old readers stop after labels; new readers consume it.
- Fix a non-deterministic bake. >15 enrichment themes clamp to ti=15, so
  their (15<<4)|nib basins collide in anchor_of_basin and a HashMap
  iteration let the surviving hub label depend on the hash seed (the asset
  SHA varied run-to-run in the basin-hub label tail only; node GUIDs/family/
  edges/tenants were already stable). Iterate themes sorted -> reproducible
  asset. osint-bake now leads osint_gotham.rs (legacy copy) on the tenant
  tail and this fix; both land there at the delegation de-dup.

Cockpit (OsintGraph.tsx):
- Decode the tenant tail.
- Facet lens: 6 axis chips recolour every node by its tenant code on the
  chosen axis (a live group-by across all nodes), with a value->count
  legend named from the facet edges. Coexists with the dimensions toggle,
  so both layers show at once.

Verified: osint-bake 8/8 tests + clippy clean; asset deterministic across
3 regens (920 nodes, 3775 edges, 431 facet edges, 183 nodes carry a tenant);
cockpit `tsc && vite build` clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TzqvDqbFRzyx17EkLKBoZF
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