Skip to content

fix: cognitive-stack OGAR deps path -> git; ndarray left path (real hazard found) - #1021

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/fix-cognitive-stack-ogar-git-deps
Aug 24, 2026
Merged

fix: cognitive-stack OGAR deps path -> git; ndarray left path (real hazard found)#1021
AdaWorldAPI merged 1 commit into
mainfrom
claude/fix-cognitive-stack-ogar-git-deps

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Follow-up to #1019

crates/cognitive-stack carried the identical escaping-path shape as
lance-graph-ogar before #1019ogar-vocab/ogar-ontology/
ogar-adapter-surrealql all path = "../../../OGAR/crates/...", from the
same 2026-07-07 "NO-PIN" policy note that also covered symbiont
(confirmed out of scope — deprecated in favor of the kanban + ogar-loco
stack).

Fix

Switched to git = "https://github.com/AdaWorldAPI/OGAR", branch = "main"
— identical URL+branch to lance-graph-ogar's own pin (also a dependency
of this crate), so Cargo unifies both into ONE resolved OGAR source.
Verified: both resolve to the same rev (719471db), and
cargo check -p cognitive-stack is clean (4m52s build).

Safe specifically because lance-graph (also path-dep'd here) has no
OGAR dependency at all — nothing else in the graph could bring in a
competing OGAR source.

ndarray deliberately left as path — a real hazard found, not an oversight

A first attempt switched cognitive-stack's own ndarray dep to git
too. That directly demonstrated why not to: lance-graph (path-dep'd
here) has its own escaping path dep on ndarray behind its default
ndarray-hpc feature, unfixed. Switching only cognitive-stack's direct
dep produced two distinct ndarray v0.17.2 package instances in one
build — visible directly in cargo check's package list
(git...?rev=0129b5c8... alongside a new git...#80f0b01f), with the
fractal sub-crate duplicated the same way. Cargo treats path and git
sources as different identities even at the same version — a real
type-identity hazard if any code path ever passes a value between the two
instances, not a naming inconsistency. It compiled anyway (Rust
tolerates multiple crate instances until a signature unifies them
directly) — the trap: a clean cargo check does not prove dependency
source unification. Reverted before this commit; ndarray stays path.

The real fix is upstream, out of scope here: lance-graph's own
ndarray-hpc feature (in its default feature set) still path-deps
ndarray the same escaping way — meaning the main lance-graph crate
itself is latently exposed to the identical break lance-graph-ogar had,
for any external consumer that ever enables that feature. Currently
dormant (no observed consumer has needed it — MedCare-rs's break was
specifically about ogar-loco, an unconditional dependency). Flagged in
the board entry, not fixed — a bigger, more sensitive change than this
follow-up's scope.

Board hygiene

EPIPHANIES.md — follow-up entry to
E-GIT-SOURCED-CRATE-CANNOT-PATH-DEP-OUTSIDE-ITS-REPO-1.

🤖 Generated with Claude Code


Generated by Claude Code

…azard found)

Same escaping-path shape as lance-graph-ogar before PR #1019: ogar-vocab/
ogar-ontology/ogar-adapter-surrealql all path-depped OGAR crates via
../../../OGAR/crates/..., unresolvable for any external git consumer.
Switched to git deps at the exact same URL+branch as lance-graph-ogar's
own pin (also a dependency of this crate), so Cargo unifies both into one
resolved OGAR source. Safe because lance-graph has no OGAR dependency at
all - nothing else in the graph could bring in a competing source.

ndarray was deliberately NOT switched. A first attempt was, and directly
demonstrated why not: lance-graph (path-depped here) has its own escaping
path dep on ndarray behind its default ndarray-hpc feature, unfixed.
Switching cognitive-stack's own ndarray dep to git while lance-graph's
stayed path produced two distinct ndarray v0.17.2 package instances in
one build (visible in cargo check's package list, plus a duplicated
fractal sub-crate) - a real type-identity hazard, since Cargo treats path
and git sources as different identities even at the same version. It
compiled anyway, which is the trap: a clean cargo check does not prove
dependency source unification. Reverted before this commit.

The real fix is upstream and out of scope here: lance-graph's own
ndarray-hpc feature (in its default set) still path-deps ndarray the same
escaping way, making the main crate itself latently exposed to the same
break lance-graph-ogar had, for any external consumer that ever enables
that feature. Flagged in the board entry, not fixed - a bigger change
than this follow-up's scope.

Verified: cargo check -p cognitive-stack green (4m52s clean build).
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 110d0184-288f-40c2-aa1c-96bb917e50f9


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.

@cursor

cursor Bot commented Aug 24, 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_d754538d-03c9-420c-b8cb-bfb9988a9a71)

@AdaWorldAPI
AdaWorldAPI merged commit 0322eb7 into main Aug 24, 2026
7 checks passed

@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: ccf7a59de9

ℹ️ 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".

# inconsistency. Fixing that properly means fixing lance-graph's own
# `ndarray-hpc` feature's path dep (`crates/lance-graph/Cargo.toml`) — out
# of scope here; flagged, not silently worked around.
ogar-vocab = { git = "https://github.com/AdaWorldAPI/OGAR", branch = "main" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove the remaining escaping path before enabling git consumers

When cognitive-stack is consumed as a Git dependency—the scenario this change is intended to fix—Cargo still fails while loading its manifest because the unconditional ndarray = { path = "../../../ndarray" } dependency on line 53 resolves outside the fetched lance-graph checkout. Switching only the OGAR dependencies therefore cannot make any external Git consumer build; the ndarray dependency (including lance-graph's copy) must first be moved to a source that exists inside or is fetchable from that checkout.

Useful? React with 👍 / 👎.

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