Skip to content

feat(spo): add causal trajectory hydration layer (Phase 6) Bridge rustynum-bnn's CausalTrajectory with ladybug's NARS system: - TrajectoryHydrator: feeds SpoDistanceResult into BNN trajectory pipeline - HydratedEdge/HydratedStatement: SigmaEdge enriched with canonical TruthValue - HydratedTrajectory: finalized result with gestalt, growth path, gate decision - NarsTruth ↔ TruthValue conversion (nars_to_truth, truth_to_nars) - Growth path inference from causal chain (6 paths through B₃ lattice) - Gate combination: trajectory + shift detector bias (conservative merge) - DN mutation guidance: weakest plane from EWM saliency - apply_causal_inference: BPReLU direction → NARS inference rule selection Also fixes pre-existing test calibration in test_spo_distance_random (random vectors classified as Strong, not Noise, by SigmaGate thresholds). 17 new tests, all passing. 40 total SPO tests green. https://claude.ai/code/session_0152b2NJYnjCJjvMAmgsTx3p#160

Merged
AdaWorldAPI merged 10 commits into
mainfrom
claude/review-rustynum-pr-80-2zNy5
Mar 2, 2026

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

No description provided.

claude and others added 4 commits March 1, 2026 18:11
… 2-3)

spo_harvest.rs — cosine replacement at 238× less cost:
- spo_distance(): 3-plane XOR+popcount → per-plane Hamming + cross-plane vote
- TypedHalo: 7 disjoint halo types extracted FREE from XOR bitmasks
- harvest_to_truth(): returns crate::nars::TruthValue (canonical NARS type)
- harvest_to_nars(): bridge to rustynum_bnn::NarsTruth for BNN operations
- AccumulatedHarvest: compounding context across searches via NARS revision
- feed_sigma_graph(): emit typed SigmaEdge from every non-trivial distance
- TypedInference: action guidance from dominant halo type

shift_detector.rs — 0.5σ stripe migration:
- SpoShiftDetector: wraps BNN ShiftDetector with SPO per-plane semantics
- gate_bias() → CollapseGate: noise→Hold, foveal→Flow, bimodal→Hold
- cross_validate_shift(): CHAODA anomaly × shift direction confirmation

Cargo.toml: spo added to default features (BNN/SPO now first-class)

https://claude.ai/code/session_0152b2NJYnjCJjvMAmgsTx3p
…r_bridge

- context_crystal.rs: rename duplicate `depth` field to `closeness` in QualiaVector
- cypher_bridge.rs: add Serialize derive to CypherValue enum
- cypher_bridge.rs: update `ref` patterns to Rust 2024 edition syntax

https://claude.ai/code/session_0152b2NJYnjCJjvMAmgsTx3p
Bridge rustynum-bnn's CausalTrajectory with ladybug's NARS system:
- TrajectoryHydrator: feeds SpoDistanceResult into BNN trajectory pipeline
- HydratedEdge/HydratedStatement: SigmaEdge enriched with canonical TruthValue
- HydratedTrajectory: finalized result with gestalt, growth path, gate decision
- NarsTruth ↔ TruthValue conversion (nars_to_truth, truth_to_nars)
- Growth path inference from causal chain (6 paths through B₃ lattice)
- Gate combination: trajectory + shift detector bias (conservative merge)
- DN mutation guidance: weakest plane from EWM saliency
- apply_causal_inference: BPReLU direction → NARS inference rule selection

Also fixes pre-existing test calibration in test_spo_distance_random
(random vectors classified as Strong, not Noise, by SigmaGate thresholds).

17 new tests, all passing. 40 total SPO tests green.

https://claude.ai/code/session_0152b2NJYnjCJjvMAmgsTx3p
@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.

SPO, BNN, and CLAM are no longer experimental. They are the core cognitive
substrate, always-on with no feature gates.

Moves:
- src/extensions/spo/*.rs → src/spo/ (6 core files)
- src/extensions/{context_crystal,meta_resonance,nsm_substrate,
  codebook_training,deepnsm_integration,cognitive_codebook,
  crystal_lm,sentence_crystal}.rs → src/spo/ (8 spo-gated modules)

Updates:
- lib.rs: add `pub mod spo`, remove "spo" from extensions cfg gate
- extensions/mod.rs: strip all #[cfg(feature = "spo")] entries
- Cargo.toml: rename "spo" feature to "spo_jina" (only reqwest needs gating)
- Fix crate::extensions::spo:: → crate::spo:: in shift_detector + crystal_lm
- Fix super::spo::jina_embed_curl → super::jina_embed_curl in sentence_crystal

Zero compilation errors. All SPO tests pass (40+ tests green).

Note: sentence_crystal.rs and grammar.rs flagged as future promotion
candidates to rustynum — their encoding logic overlaps with what the
SPO harvest pipeline now provides natively at the BNN level.

https://claude.ai/code/session_0152b2NJYnjCJjvMAmgsTx3p
@AdaWorldAPI AdaWorldAPI force-pushed the claude/review-rustynum-pr-80-2zNy5 branch from cdcf2c5 to 60eca42 Compare March 1, 2026 18:18
@AdaWorldAPI AdaWorldAPI merged commit 4b8bef4 into main Mar 2, 2026
8 of 12 checks passed
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