Skip to content

Commit 593b7b7

Browse files
authored
Merge pull request #658 from AdaWorldAPI/claude/happy-hamilton-0azlw4
NO-PIN OGAR path deps + plug-and-play contract arming + roundtrip green light
2 parents dc79f9c + dd46ad2 commit 593b7b7

17 files changed

Lines changed: 586 additions & 29 deletions

File tree

.claude/board/EPIPHANIES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 2026-07-07 — E-HOTPLUG-MIGRATION-1 — the generic hot-plug pattern is the migration target for ALL consumers; migration doc is board discipline
2+
**Status:** RULING (operator, 2026-07-07; shipped OGAR #174/#175 + lance-graph #658 + tesseract-rs #13/#14)
3+
4+
**Every consumer migrates onto the generic hot-plug pattern** — one `HOT_PLUG` const (socket type `lance_graph_contract::hotplug::HotPlug`) + one activation test against `ogar_vocab::capability_registry::resolve_hotplug`; the consumer tells OGAR which classids are hot-plugged and receives BOTH the vocab rows and the action surface. No bespoke per-consumer plug crates, no git pins (sibling path deps only), no ontology payload in lance-graph, contract stays zero-dep (member path deps kill CI workspace load — burned once), classid low u16 = APP prefix, never a shape ordinal.
5+
6+
**Board discipline:** `.claude/knowledge/hotplug-consumer-migration.md` (mirrored in OGAR `.claude/knowledge/`) is MANDATORY READING before (a) migrating any consumer onto the capability surface, (b) adding a new authoritative domain table (thinking-styles next), (c) any cross-repo capability wiring. It carries the 5-step recipe, the 5 drift arms, the burned-once anti-pattern list, and the evaluated ruff synergies (ActionDef lift via `ogar-from-ruff::lift_actions` + a future C++ arm; `walk_enums` param fidelity; ontology plug-and-play over the exports→OGIT→imports tier; thinking-styles as a one-entry `domain_tables()` addition).
7+
18
## 2026-07-07 — E-OCR-FACET-HOME-CORRECTION-1 — operator ruling: domain substrate does NOT live in agnostic lance-graph — textord facets removed; the facet producer is ruff→OGAR
29
**Status:** RULING (operator-corrected same day; code removed in this commit)
310

.claude/board/LATEST_STATE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# LATEST_STATE — What Just Shipped (read this FIRST)
22

3+
4+
> **2026-07-07 — NO-PIN + plug-and-play OGAR arming:** all OGAR deps
5+
> (symbiont / lance-graph-ogar / cognitive-stack) switched from
6+
> `git+branch=main` (which always pins a rev in Cargo.lock) to PATH deps on
7+
> the local sibling `/home/user/OGAR` — operator policy: "wenn's knallt,
8+
> dann einmal — nicht 200 Pins monitoren". `lance-graph-contract` gained the
9+
> optional `ogar` feature (`ogar_codebook::armed`): arming pulls `ogar-vocab`
10+
> transitively and activates a contract-side compile-time `COUNT_FUSE`
11+
> (+ per-entry parity test). lance-graph-ogar arms it; the contract stays
12+
> zero-dep by default. Fuse verified green vs OGAR main `68d85f02` (84==84,
13+
> entry-for-entry).
14+
315
> **Auto-injected at session start via SessionStart hook.**
416
> Updated after every merged PR.
517
> **Last updated:** 2026-05-14 (PR #372 merged: sprint-10 spec sprint, 12-worker CCA2A fleet + Opus meta-review + 8 knowledge docs, governance-only (zero .rs changes), mirrors PR #365 pattern. Sprint-11 implementation wave gated on 5 spec patches + 4 user ratifications: CSI-1 CausalEdge64 bit-reclaim Option, OQ-1 Σ4-Σ5 banding, OQ-3 plasticity granularity, OQ-5 rayon vendor. **Major findings:** (1) dual `CausalEdge64` types in workspace — `causal_edge::CausalEdge64` SPO-palette layout ≠ `thinking_engine::layered::CausalEdge64` 8-channel cascade, same name different semantics, surfaced as duplication entry #13 in TYPE_DUPLICATION_MAP and E-META-7 in EPIPHANIES; (2) p64 drift origin pinpointed at `crates/lance-graph-planner/src/cache/convergence.rs:18-22 #[allow(unused_imports)]` annotation — wiring intended for hot-path convergence never finished; (3) three-zone hot-path mental model corrects prior framing — Zone-1 thinking-engine MatVec 200-500ns + AriGraph entity_index O(1) ~20-200ns is the actual cycle-speed path, not DataFusion. Prior: 2026-05-13 (PR #366 merged: sprint-7 7-worker implementation wave for the sprint-5/6 specs + AuditSink trait unification, ~5 KLOC across 5 crates +2 new (`lance-graph-supervisor`, `lance-graph-consumer-conformance`), ~70 new tests, workspace clippy --tests --no-deps -D warnings exits 0; Opus meta verdict 4A/2B/1B-minus; OQ-7-1/2/3 all locked pre-merge; `UnifiedAuditSink` D-SDR-4 placeholder dropped, all sinks unified on `AuditSink` trait; `UnifiedBridge::with_jsonl_audit()` ergonomic constructor added for MedCare-rs sprint-2 item 5. **Adjacent landings (same day):** MedCare-rs sprint-1 10-PR sweep (#113-#122) including E1-1 OQ-3 direct migration (6 RoleGroups) consuming our `0d725d4` decision. MedCare-rs sprint-2 (5 PRs) is queued on user "go" — item 5 consumes this PR's new constructor. Prior same-day: PR #365 (13 sprint-5/6 specs + meta). Prior: PR #364 (D-SDR-3/4/5 + sprint-log-4 governance + sprint-5-9 roadmap + codex P1/P2 fixes). lance-graph #364 ships D-SDR-3/4/5 + sprint-log-4 governance + sprint-5-9 roadmap + codex P1/P2 surgical fixes (OwlIdentity 3-byte canonical, UnifiedAuditEvent 26 bytes, OgitFamilyTable sparse `HashMap<u16, FamilyEntry>`, audit super_domain via AuditChain). MedCare-rs#112 (PR-B) wires `UnifiedBridge<MedcareBridge>` + medcare-rbac + medcare-realtime substrate (+2963 LOC, 17 files, §73 SGB V + BMV-Ä §57 + BtM regulatory tests). smb-office-rs#31 (PR-C) wires `UnifiedBridge<OgitBridge>` (+111 LOC). ndarray#142 ships VBMI gate for `permute_bytes` (P0 SIGILL fix on Skylake-X / Cascade Lake / Ice Lake-SP) + Inf clamp for `simd_exp_f32`. D-SDR-5 `UnifiedBridge` surface is now consumed end-to-end across MedCare + smb-office. Prior: 2026-05-07 (PR #354). Prior: 2026-05-07 (PR #353). Prior: 2026-05-07 (PR #352). Prior: 2026-05-06 (splat-osint-ingestion-v1 PR 1+2 of 6 in flight). Prior: 2026-04-21 post PR #243.
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# Hot-Plug Consumer Migration — the generic plug-and-play pattern
2+
3+
> READ BY: any session migrating a consumer (woa-rs, medcare-rs,
4+
> smb-office-rs, odoo-rs, tesseract-rs, osm-website-rs, …) onto the
5+
> OGAR-authoritative capability surface; any session adding a new
6+
> authoritative domain table (thinking-styles best practices, …);
7+
> integration-lead / baton-handoff-auditor before any cross-repo
8+
> capability wiring.
9+
>
10+
> Shipped 2026-07-07 (operator-ruled same day). Reference PRs:
11+
> OGAR #174 (ocr_actions) + #175 (resolve_hotplug), lance-graph #658
12+
> (hotplug socket + OgarAuthority + CI fuse gate), tesseract-rs #13/#14
13+
> (executor + HOT_PLUG migration — the template consumer).
14+
15+
## The model — three roles, three homes, one binary
16+
17+
Everything links into ONE binary (lance-graph + OGAR + consumer +
18+
ndarray). Nothing serializes; every check is a compile-time const or a
19+
test in the consumer's own suite. "Wenn's knallt, dann einmal — nicht
20+
200 Pins monitoren."
21+
22+
| Role | Home | Surface |
23+
|---|---|---|
24+
| **SOCKET** (agnostic, zero-dep) | `lance_graph_contract::hotplug` | `HotPlug { consumer, classids, covered }`, `Activation`, `ActivationDrift`, trait `CapabilityAuthority` |
25+
| **AUTHORITY** (declares + resolves) | OGAR `ogar_vocab` | domain action tables (e.g. `ocr_actions`) + `capability_registry::{domain_tables, resolve_hotplug, HotplugDrift}` |
26+
| **BRIDGE** (socket ⇄ authority) | `lance-graph-ogar` (workspace-EXCLUDED) | `OgarAuthority: CapabilityAuthority`; also owns COUNT_FUSE + per-entry mirror parity + the roundtrip green light |
27+
| **CONSUMER** | your repo | ONE `HOT_PLUG` const + ONE activation test + your executor |
28+
29+
The classid is the join key on BOTH sides: the consumer says "these
30+
canon-high ids are hot", the authority returns BOTH the vocab rows and
31+
every capability whose subject is one of those ids.
32+
33+
## Migration recipe (per consumer, ~1 hour)
34+
35+
1. **Authority side (OGAR PR #1):** declare your domain's action table
36+
in `ogar-vocab` next to `ocr_actions` — one `ActionDef` per
37+
capability on YOUR already-minted canon-high concepts (mint via the
38+
normal codebook process if missing; hi u16 = concept, lo u16 = APP
39+
render prefix, NEVER a shape ordinal). Export `<DOMAIN>_ACTION_NAMES`
40+
(const fingerprint), `<DOMAIN>_SUBJECT_CLASSIDS`,
41+
`<DOMAIN>_EXPECTED_EXECUTORS = ["<your-crate>"]`. Register ONE entry
42+
in `capability_registry::domain_tables()` mapping
43+
`(capability, subject classid)`. That's the whole authority change.
44+
2. **Consumer side:** add path deps (NO PINS — local siblings):
45+
`ogar-vocab = { path = "<rel>/OGAR/crates/ogar-vocab" }` and
46+
`lance-graph-contract = { path = "<rel>/lance-graph/crates/lance-graph-contract" }`.
47+
3. Declare the plug:
48+
```rust
49+
pub const HOT_PLUG: lance_graph_contract::hotplug::HotPlug =
50+
lance_graph_contract::hotplug::HotPlug {
51+
consumer: "<your-crate>",
52+
classids: ogar_vocab::<domain>_actions::<DOMAIN>_SUBJECT_CLASSIDS,
53+
covered: COVERED_CAPABILITIES, // your executor's arms
54+
};
55+
```
56+
4. Close the loop with ONE test:
57+
```rust
58+
let (concepts, capabilities) = ogar_vocab::capability_registry::resolve_hotplug(
59+
HOT_PLUG.consumer, HOT_PLUG.classids, HOT_PLUG.covered,
60+
).expect("hot-plug drifted from the authoritative OGAR tables");
61+
```
62+
(Or through the socket: `OgarAuthority.activate(&HOT_PLUG)` via
63+
`dyn CapabilityAuthority` when you want authority-agnostic code.)
64+
5. **CI:** your workflows need the sibling checkouts (OGAR +
65+
lance-graph), same as tesseract-rs `rust.yml` / lance-graph
66+
`rust-test.yml`. Sibling layout: check the repo out into a subdir
67+
(`path: <repo>`) so `path: OGAR` lands as a true sibling.
68+
69+
## The drift arms (each one named bang, test-time, in YOUR binary)
70+
71+
| Arm | Meaning |
72+
|---|---|
73+
| `UnknownClassid(id)` | plugged id not minted in the codebook |
74+
| `NoCapabilitiesFor(id)` | id resolves to no capability — the table/ontology was forgotten |
75+
| `UnexpectedConsumer` | you are not in the table's expected-executor list |
76+
| `Uncovered(cap)` | authority declares it, your executor has no arm |
77+
| `Undeclared(cap)` | your executor claims it, authority doesn't declare it |
78+
79+
Plus, CI-side (lance-graph `rust-test.yml`): COUNT_FUSE + per-entry
80+
mirror parity + the roundtrip green light run against the real OGAR
81+
sibling on every push.
82+
83+
## What NOT to do (each burned once, 2026-07-07)
84+
85+
- **No bespoke per-consumer plug crate/mechanism.** The registration
86+
surface is the `HOT_PLUG` const + one test. (tesseract-ogar's first
87+
`CapabilityRegistration` draft was replaced for exactly this.)
88+
- **No path/optional deps on `lance-graph-contract` toward OGAR.** The
89+
contract is a workspace MEMBER; any path dep there (even optional) is
90+
resolved at workspace-load time and kills every CI cargo invocation.
91+
The contract stays zero-dep; armed things live in excluded crates.
92+
- **No shape ordinals in the classid low u16.** Low half = APP render
93+
prefix (`PortSpec::APP_PREFIX`). Distinct shapes are distinct hi-u16
94+
concepts or ClassView payload readings.
95+
- **No ontology payload in lance-graph.** lance-graph carries the wire
96+
mirror + the green light, nothing else. Authority checks live in OGAR.
97+
- **No git deps on OGAR.** git+branch always writes a rev pin into
98+
Cargo.lock. Path deps to the sibling, always.
99+
100+
## Future synergies (evaluated 2026-07-07 — next arcs, not shipped)
101+
102+
1. **ActionDef plug-and-play from ruff (HIGH, near-term).**
103+
`ogar-from-ruff::lift_actions` already lifts ActionDefs from
104+
Rails/Python model graphs — the OCR table is hand-declared only
105+
because tesseract has no AR source. The generic path: ruff harvest
106+
(`ruff_*_spo`) → fuzzy-recipe codebook (`(verb, criteria)` recipes,
107+
ruff `.claude/knowledge/fuzzy-recipe-codebook.md`) → `lift_actions`
108+
the domain table auto-derives instead of being hand-written; a
109+
consumer migration then starts with a harvest, not an authorship
110+
session. Missing piece: a C++ arm for `lift_actions` (ruff_cpp_spo
111+
has walk_tu/walk_free_functions/walk_enums; an action-lift over the
112+
method-body facts is the natural fourth arm) and a
113+
`derive_domain_table!`-style bridge from lifted ActionDefs into
114+
`domain_tables()`.
115+
2. **Param-enum fidelity via `walk_enums` (MEDIUM).** Capability params
116+
that are C/C++ enums (PSM modes, connectivity 4/8, …) can carry
117+
their variants from the ruff enum harvest instead of free-form
118+
names — the same shapes-from-ruff discipline the dawg/dict arc used.
119+
3. **Ontology plug-and-play (MEDIUM, design needed).** Today
120+
`resolve_hotplug` returns vocab rows + capability names. The same
121+
join can return ONTOLOGY fragments per classid: OGAR's
122+
`vocab/exports → OGIT promote → vocab/imports` pipeline already
123+
stages TTL per domain, and `ogar-adapter-ttl` renders it. A
124+
`resolve_hotplug_with_ontology` returning the OGIT NTO fragment
125+
references for the plugged classids would let a consumer pull
126+
concepts + actions + ontology in one activation — still zero
127+
serialization in-binary; the TTL stays an OGAR-internal artifact
128+
(imports/ tier), never hauled through lance-graph. Gate: needs the
129+
imports/ tier populated for the domain (ontologies, not harvests —
130+
harvests stay in the consumer repo).
131+
4. **Thinking-styles best practices (HIGH, planned all along).** One
132+
`domain_tables()` entry + a `<STYLES>_EXPECTED_EXECUTORS` list arms
133+
the thinking-style table for whichever engine executes styles —
134+
same recipe as step 1 above, zero new machinery.

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ jobs:
5252
with:
5353
repository: AdaWorldAPI/ndarray
5454
path: ndarray
55+
- uses: actions/checkout@v4
56+
with:
57+
repository: AdaWorldAPI/OGAR
58+
path: OGAR
5559
- name: Setup rust toolchain
5660
run: |
5761
rustup toolchain install ${{ matrix.toolchain }}

.github/workflows/jc-proof.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ jobs:
2323
timeout-minutes: 5
2424
steps:
2525
- uses: actions/checkout@v4
26+
- name: Clone AdaWorldAPI/OGAR as parent-level sibling (NO-PIN path deps)
27+
run: git clone --depth 1 https://github.com/AdaWorldAPI/OGAR ../OGAR
2628
- name: Setup Rust
2729
run: |
2830
rustup toolchain install stable

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636

3737
- name: Checkout repository
3838
uses: actions/checkout@v4
39+
- name: Clone AdaWorldAPI/OGAR as parent-level sibling (NO-PIN path deps)
40+
run: git clone --depth 1 https://github.com/AdaWorldAPI/OGAR ../OGAR
3941
with:
4042
ref: main
4143
token: ${{ secrets.LANCE_RELEASE_TOKEN }}

.github/workflows/rust-test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ jobs:
6464
# dequantize_i8_to_f32, quantize_f32_to_i2, dequantize_i2_to_f32
6565
# publicly (ndarray PR #115, merged 2026-04-30). Pin retired.
6666
path: ndarray
67+
- name: Checkout AdaWorldAPI/OGAR (sibling dependency, NO-PIN path deps)
68+
uses: actions/checkout@v4
69+
with:
70+
repository: AdaWorldAPI/OGAR
71+
path: OGAR
6772
- name: Setup rust toolchain
6873
run: |
6974
rustup toolchain install ${{ matrix.toolchain }}
@@ -108,6 +113,14 @@ jobs:
108113
run: cargo test --manifest-path crates/lance-graph-contract/Cargo.toml --tests
109114
- name: Run contract doctests
110115
run: cargo test --manifest-path crates/lance-graph-contract/Cargo.toml --doc
116+
# lance-graph-ogar is the workspace-EXCLUDED armed tier: it owns the
117+
# mirror<->live-vocab fuses (COUNT_FUSE, per-entry parity, the
118+
# authoritative-table roundtrip green light) against the OGAR sibling
119+
# checked out above. Without this step those fuses only ever ran on a
120+
# developer machine — a same-sized codebook remap would ship green
121+
# (codex/coderabbit finding on PR #658). One scoped step closes it.
122+
- name: Run lance-graph-ogar fuse tests (armed tier, OGAR sibling)
123+
run: cargo test --manifest-path crates/lance-graph-ogar/Cargo.toml
111124
# deepnsm: standalone 0-dep codec crate, workspace-excluded, so the
112125
# lance-graph test steps above never reached it. ~217 lib + integration +
113126
# doctests, fast (no lance/datafusion/ndarray deps). Gating.
@@ -155,6 +168,11 @@ jobs:
155168
# dequantize_i8_to_f32, quantize_f32_to_i2, dequantize_i2_to_f32
156169
# publicly (ndarray PR #115, merged 2026-04-30). Pin retired.
157170
path: ndarray
171+
- name: Checkout AdaWorldAPI/OGAR (sibling dependency, NO-PIN path deps)
172+
uses: actions/checkout@v4
173+
with:
174+
repository: AdaWorldAPI/OGAR
175+
path: OGAR
158176
- name: Setup rust toolchain
159177
run: |
160178
rustup toolchain install stable

.github/workflows/style.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ jobs:
4949
# dequantize_i8_to_f32, quantize_f32_to_i2, dequantize_i2_to_f32
5050
# publicly (ndarray PR #115, merged 2026-04-30). Pin retired.
5151
path: ndarray
52+
- name: Checkout AdaWorldAPI/OGAR (sibling dependency, NO-PIN path deps)
53+
uses: actions/checkout@v4
54+
with:
55+
repository: AdaWorldAPI/OGAR
56+
path: OGAR
5257
- name: Setup rust toolchain
5358
run: |
5459
rustup toolchain install stable
@@ -101,6 +106,11 @@ jobs:
101106
# dequantize_i8_to_f32, quantize_f32_to_i2, dequantize_i2_to_f32
102107
# publicly (ndarray PR #115, merged 2026-04-30). Pin retired.
103108
path: ndarray
109+
- name: Checkout AdaWorldAPI/OGAR (sibling dependency, NO-PIN path deps)
110+
uses: actions/checkout@v4
111+
with:
112+
repository: AdaWorldAPI/OGAR
113+
path: OGAR
104114
- uses: actions-rust-lang/setup-rust-toolchain@v1
105115
with:
106116
components: rustfmt

Cargo.lock

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)