chore: hygiene pass — ruff clean, docs storage-model truth, replay /me, failSession log

Audit findings 6.1-6.4 + the audit's remediation plan itself
(docs/superpowers/plans/2026-07-20-full-audit-remediation-plan.md).

- ruff: 34 → 0 (unused imports/f-strings auto-fixed; E702 semicolon lines
  split in test files; one unused local dropped). Suite still 819 green.
- CLAUDE.md + PROJECT_STATE.md no longer claim "no database / settings in
  settings.json": the harness selects filesystem OR PostgreSQL session
  storage (repository.py, server mode), and settings flow through harness
  preferences with the JSON file as fallback only.
- tools/replay: stub /me (SPA boot was parsing the SPA's own HTML as JSON)
  and /runtime/prewarm.
- failSession best-effort persistence now logs its failure server-side
  instead of vanishing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-20 01:55:41 +02:00
co-authored by Claude Fable 5
parent 1ab0015460
commit c4951e2aa5
21 changed files with 283 additions and 43 deletions
@@ -9,7 +9,6 @@ Run: pytest -m l2 tests/l2/test_memory_save_one_real.py -s (needs .env + VPN +
"""
from datetime import datetime
from pathlib import Path
from unittest.mock import MagicMock
import pytest
+1 -1
View File
@@ -71,7 +71,7 @@ def test_ablazione_session_manual(l2_env, tmp_path):
["THT_DWH_API_KEY", "THT_VEC_API_KEY", "THT_VEC_WRITE_API_KEY"])
assert env_ok
assert WORKSPACE.exists()
print(f"\n[L2 manual] launch: pi --mode rpc (cwd=harness/)")
print("\n[L2 manual] launch: pi --mode rpc (cwd=harness/)")
print(f"[L2 manual] /nuova-domanda \"{QUESTION}\"")
print("[L2 manual] confirm: sql_final.sql present + ledger has value_grounded/"
"concept_formula_approved. Session dir:", tmp_path)
@@ -25,7 +25,6 @@ def test_ablazione_returns_multiple_columns(l2_env):
non-collapsing aggregation. Requires a built LSH index (tht lsh build)."""
if not WORKSPACE.exists():
pytest.skip(f"per-customer workspace repo not found: {WORKSPACE} (clone tht-workspace-psd)")
from tht.config import LshConfig
try:
from tht.lshindex import load_index, query_index # ported with the lsh build path
except ModuleNotFoundError: