Skip to content

Refactor contradiction guard and resolve optional dependencies fallback bugs#458

Open
borjamoskv wants to merge 1 commit into
mainfrom
refactor-contradiction-guard-17771564063581644036
Open

Refactor contradiction guard and resolve optional dependencies fallback bugs#458
borjamoskv wants to merge 1 commit into
mainfrom
refactor-contradiction-guard-17771564063581644036

Conversation

@borjamoskv

Copy link
Copy Markdown
Owner

This PR fixes a monolithic file to strictly follow LOC <= 500 module sizes and resolves two bugs concerning the fallback of optional dependencies (AtmsAdapter and sqlite_vec), thus enforcing better architecture logic overall.


PR created automatically by Jules for task 17771564063581644036 started by @borjamoskv

Split `contradiction_guard.py` into a package with multiple focused modules
(`core.py`, `models.py`, `detector.py`, `batch_scanner.py`, `scoring.py`) to
comply with Entropic Asymmetry ($\Omega_2$) axiom (LOC $\le$ 500). Ensured
`__init__.py` exposes the original API for backward compatibility.

Fixed runtime issues related to optional dependencies:
- Handled `AtmsAdapter` (`cortex/engine/causality.py`) failure cases elegantly gracefully degrading by catching `ImportError`, `AttributeError`, `RuntimeError`.
- Fixed tracked `sqlite_vec` state (`_vec_loaded`) in `cortex/memory/hdc/store.py` explicitly defining the slot and gracefully bypassing missing extension scenarios.

Co-authored-by: borjamoskv <82632764+borjamoskv@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions

Copy link
Copy Markdown
Contributor

∞ MÖBIUS — PR Analysis

Metric Value
Files changed 9
Total changes 1222 (+/-)
Complexity critical
Est. review time 60 min
Has tests? ⚠️ Missing
Has Rust changes? No

Labels applied: engine, security

Warning

No test files detected in this PR. Consider adding tests.

Caution

This PR has >500 lines of changes. Consider splitting into smaller PRs.


Generated by MÖBIUS (Clojure/Babashka) — where code IS data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant