Skip to content

fix: resolve 8 codebase inconsistencies from Feb 2026 audit - #41

Merged
ARC345 merged 19 commits into
mainfrom
fix/inconsistencies
Feb 28, 2026
Merged

ARC345 merged 19 commits into
mainfrom
fix/inconsistencies

Conversation

@ARC345

@ARC345 ARC345 commented Feb 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes all actionable inconsistencies from the Feb 2026 codebase audit (docs/system/INCONSISTENCIES.md).

Python Sidecar (critical/high):

  • IC-001 — toggle_plugin() was writing .vault.toml as JSON, corrupting it on every toggle. Fixed to use tomli_w.dump.
  • IC-002 — VaultBrain singleton init guard was always-False (_initialized set to False then immediately checked). Fixed with hasattr check.
  • IC-006 — register_command(override=False) warned but still overwrote. Now raises CommandRegistrationError.
  • IC-005 — Malformed plugin config entry (non-dict) silently discarded. Now logs a warning with plugin name and actual type.
  • IC-003 — Removed all 14 kwargs.get("p") or kwargs.get("params") fallback blocks. Flat kwargs is now the only calling convention.

Rust Backend:

  • IC-008 — Removed search_plugins and get_plugin_details stub commands (returned empty/error, never implemented).
  • IC-011 — Removed is_running() dead method; removed #[allow(dead_code)] from get_active_windows() (kept — exercised by a unit test).

Frontend:

  • IC-012 — loadHistory() accessed res.result without checking for error responses. Added early-return guard.

Test Plan

  • 142 Python tests pass (pixi run test)
  • 8 Rust tests pass (pixi run test-rust)
  • 53 frontend tests pass (npm run test)
  • All 8 fixed ICs struck through in docs/system/INCONSISTENCIES.md with commit refs

🤖 Generated with Claude Code

ARC345 and others added 19 commits February 28, 2026 15:17
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace self._initialized = False / if self._initialized pattern with
hasattr check so the guard actually fires on re-initialization.
Also adds reset_singleton fixture to TestIntegration to prevent
cross-test singleton leakage now that the guard is effective.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…003)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ARC345
ARC345 merged commit a244ff1 into main Feb 28, 2026
2 checks passed
@ARC345
ARC345 deleted the fix/inconsistencies branch February 28, 2026 15:26
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.

1 participant