From cbd57d7a4e2a77d8df38492bdc821f222bb89808 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 24 Aug 2026 07:00:39 +0000 Subject: [PATCH] fix: lance-graph-ogar OGAR deps switch path -> git (external-consumer resolution) Any external repo pulling lance-graph-ogar via a git dependency fails to resolve OGAR's crates: lance-graph-ogar's path deps escape lance-graph's own repo (../../../OGAR/crates/...), and Cargo's git checkout cache has no OGAR sibling at that relative location regardless of what exists on GitHub or on the builder's disk. This is a hard Cargo constraint on git-sourced crates with escaping path deps, not a missing sibling-checkout step, and it made the crate unconsumable by any external repo whatsoever. Switches ogar-vocab, ogar-class-view, ogar-ontology, ogar-loco, and ogar-adapter-surrealql from path to git deps pinned at AdaWorldAPI/OGAR#main. Verified: cargo check/test green standalone (72+ lib tests incl. the codebook COUNT_FUSE), both this crate's OGAR deps and the existing [patch] section resolve to the identical rev. Accepts the tradeoff the 2026-07-07 "no pins" policy explicitly avoided (a Cargo.lock rev pin) since the alternative is total external unconsumability. symbiont and cognitive-stack carry the same escaping-path shape and are left unfixed here, recorded so it isn't assumed covered. --- .claude/board/EPIPHANIES.md | 57 ++++++++++++++++++++++++++++++ crates/lance-graph-ogar/Cargo.toml | 57 +++++++++++++++++++++--------- 2 files changed, 98 insertions(+), 16 deletions(-) diff --git a/.claude/board/EPIPHANIES.md b/.claude/board/EPIPHANIES.md index 0350098a8..2cc98b6cc 100644 --- a/.claude/board/EPIPHANIES.md +++ b/.claude/board/EPIPHANIES.md @@ -1,3 +1,60 @@ +## 2026-08-24 — E-GIT-SOURCED-CRATE-CANNOT-PATH-DEP-OUTSIDE-ITS-REPO-1 — `lance-graph-ogar`'s OGAR path deps could not resolve for ANY external `git` consumer; the "sibling-checkout" mental model does not survive a `git` dependency + +**Status:** FIX — [MEASURED] (verified: `cargo check` + `cargo test` +green, 72+ lib tests including the codebook COUNT_FUSE, all under the new +`git` deps). + +**Root cause, generic to every external consumer, not one project:** +`crates/lance-graph-ogar/Cargo.toml` depended on five OGAR crates via +`path = "../../../OGAR/crates/..."` — an escaping relative path, +justified by a documented "operator policy (2026-07-07): NO PINS" note +for this sandbox's local multi-repo layout. That policy is correct for a +LOCAL build (this session, tesseract-rs CI's sibling-checkout precedent) +but cannot survive `lance-graph-ogar` being pulled as a `git` dependency +by ANY external repo (`some-consumer -> lance-graph-ogar` via +`git = "https://github.com/AdaWorldAPI/lance-graph", branch = "main"`). +Cargo clones a git-sourced crate into its own opaque checkout cache +(`~/.cargo/git/checkouts/lance-graph-//`); a `path = +"../../../OGAR/..."` inside it resolves relative to THAT cache directory, +which has no OGAR sibling — nothing ever puts one there, regardless of +how fresh either repo is on GitHub or on the builder's disk. **A crate +with an escaping path dependency cannot be consumed via `git` by any +external repo, ever — this is a hard Cargo constraint, not a missing +setup step, and it affects every one of `lance-graph-ogar`'s consumers +identically**, not a single project's build. First checked "is OGAR +stale?" and ruled it out: local `/home/user/OGAR` matched `origin/main` +exactly, `ogar-loco` has been on `origin/main` since 2026-08-05 +(`89d0d3a9`). + +**Fix:** switched all five OGAR deps (`ogar-vocab`, `ogar-class-view`, +`ogar-ontology`, `ogar-loco`, `ogar-adapter-surrealql`) from `path` to +`git = "https://github.com/AdaWorldAPI/OGAR", branch = "main"`. +Verified `cargo check`/`cargo test` green standalone (this crate owns its +own `[workspace]` root); both git deps resolved to the identical rev +(`#719471db`) already referenced by the existing `[patch]` section, so no +new contract-source divergence was introduced. Tradeoff accepted +explicitly: the 2026-07-07 policy's "always current sibling, no +Cargo.lock pin" property is gone for this crate — a pin is now unavoidable +for external consumability. Local/in-sandbox dev is unaffected (same +public repo, still fetched/cached). + +**Known residue, NOT fixed here:** `symbiont` and `cognitive-stack` +(named in the same superseded comment as sharing this pattern) carry the +identical escaping-path shape and were left untouched — `symbiont` is +separately marked deprecated/operator no-go; `cognitive-stack` is +unaudited for external git-consumers. Tracked here so a future session +does not assume this fix covers them. + +**Fences:** no behavior change to OGAR's contract surface, only the +dependency SOURCE type; the `[patch]` section (already redirecting +`ogar-class-view`'s transitive `lance-graph-contract` onto the path copy) +is untouched and still correct, since patches redirect FROM a git source +TO a path source — the broken direction was the reverse (a path +dependency escaping a git-sourced crate), which `[patch]` cannot fix at +all (path dependencies are not patchable). + +**Files:** `crates/lance-graph-ogar/Cargo.toml`. + ## 2026-08-23 — E-ONE-RECEIPT-MANY-BORROWED-CONSUMERS-1 — the integration half of #1012: one versioned tokenization drives Tantivy, DeepNSM-v2 and a forward surface with zero re-tokenization, and the four gaps that stand between that and a carrier **Status:** FINDING — [MEASURED] (`PROBE-TOKEN-SEAM-1`, 37 gates, **13 diff --git a/crates/lance-graph-ogar/Cargo.toml b/crates/lance-graph-ogar/Cargo.toml index b6c30e01c..338d2eb6f 100644 --- a/crates/lance-graph-ogar/Cargo.toml +++ b/crates/lance-graph-ogar/Cargo.toml @@ -91,30 +91,55 @@ lance-graph-contract = { path = "../lance-graph-contract" } # against live in lance-graph-ontology (OGIT). OGIT does NOT depend on OGAR. lance-graph-ontology = { path = "../lance-graph-ontology" } -# ── OGAR Active-Record forks: git deps @ main (the canonical superset; matches -# symbiont's + cognitive-stack's pins so ALL golden-image roots resolve to -# ONE OGAR source) ── +# ── OGAR Active-Record forks: git deps @ main ── # -# NO PINS — operator policy (2026-07-07): OGAR resolves as a PATH dep to the -# local sibling checkout /home/user/OGAR (clone of AdaWorldAPI/OGAR main), the -# same pattern as the ndarray path dep. A git dep always writes a rev pin into -# Cargo.lock; a path dep never does — the fuse (COUNT_FUSE) then always checks -# against the sibling's CURRENT state. symbiont / cognitive-stack use the same -# sibling paths, so all three resolve ONE OGAR copy (codex P2 on #648 intent -# preserved). CI that builds these excluded crates must sibling-check-out OGAR -# (tesseract-rs CI precedent for lance-graph/ndarray). -ogar-vocab = { path = "../../../OGAR/crates/ogar-vocab" } -ogar-class-view = { path = "../../../OGAR/crates/ogar-class-view" } -ogar-ontology = { path = "../../../OGAR/crates/ogar-ontology" } +# ⊘ SUPERSEDED (2026-08-24, `medcare-rs` PR #565 Railway build failure — +# `error: no matching package named 'ogar-loco' found, location searched: +# Git repository https://github.com/AdaWorldAPI/lance-graph?branch=main`). +# The prior "NO PINS — operator policy (2026-07-07)" note below is a REAL +# policy this repo's own local/CI builds relied on, but it does not survive +# `lance-graph-ogar` being consumed as a `git` dependency by an EXTERNAL +# repo (medcare-analytics -> lance-graph-ogar via +# `git = "https://github.com/AdaWorldAPI/lance-graph", branch = "main"`). +# Cargo clones a git-sourced crate into its own opaque checkout cache +# (`~/.cargo/git/checkouts/lance-graph-//`); a `path = +# "../../../OGAR/..."` dependency inside it resolves relative to THAT +# cache directory, which has no OGAR sibling — nothing ever puts one +# there, regardless of how fresh either repo is on GitHub or on the +# builder's disk. This is a hard Cargo constraint (git sources cannot +# contain path dependencies that escape the fetched repository), not a +# missing sibling-checkout step. Fixed by switching to `git` deps here — +# the tradeoff the 2026-07-07 policy explicitly declined (a Cargo.lock rev +# pin, so the local "always current sibling" property is gone for THIS +# crate) is accepted because the alternative is "unconsumable by any +# external repo, ever." Local/in-sandbox development still resolves fine +# (Cargo fetches/caches the same public GitHub repo); what is lost is only +# the zero-lag reflection of uncommitted local OGAR edits. +# +# Prior text, retained for the historical record (regraded, not deleted): +# "matches symbiont's + cognitive-stack's pins so ALL golden-image roots +# resolve to ONE OGAR source. NO PINS — operator policy (2026-07-07): OGAR +# resolves as a PATH dep to the local sibling checkout /home/user/OGAR... +# A git dep always writes a rev pin into Cargo.lock; a path dep never +# does — the fuse (COUNT_FUSE) then always checks against the sibling's +# CURRENT state. symbiont / cognitive-stack use the same sibling paths, so +# all three resolve ONE OGAR copy (codex P2 on #648 intent preserved)." +# `symbiont` and `cognitive-stack` carry the SAME escaping-path shape and +# are NOT fixed by this commit (symbiont is separately marked deprecated / +# operator no-go; cognitive-stack is unaudited for external git-consumers) +# — tracked as a follow-up, not silently assumed fixed. +ogar-vocab = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" } +ogar-class-view = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" } +ogar-ontology = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" } # The call ABI the 34 NARS recipes lower onto (`recipe_vocab`, D-ACR-9). # ogar-loco is zero-dep and lance-graph-contract is zero-dep; neither may # import the other, so the vocabulary that needs both lives HERE. -ogar-loco = { path = "../../../OGAR/crates/ogar-loco" } +ogar-loco = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" } # ⊘ DEPRECATED IR-Arm (Operator, 2026-08-22): "SurrealQL wird gar nicht # verwendet, auch nicht ogar-*surreal*". OPTIONAL und aus dem unbedingten # Dependency-Satz heraus — ein Build, der das Feature nicht nennt, zieht die # Crate nicht mehr, und der Re-Export existiert dann nicht. -ogar-adapter-surrealql = { path = "../../../OGAR/crates/ogar-adapter-surrealql", optional = true } +ogar-adapter-surrealql = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main", optional = true } # Fold ogar-class-view's transitive `lance-graph-contract` (git # AdaWorldAPI/lance-graph#main) onto the SAME path copy this crate uses, so there