Spaces:
Build error
Build error
Commit History
-
fix: store case_memory.json in app-data dir in desktop mode (P-1)
Root cause: CASE_STORE_FILE was always computed relative to this file's own location (effectively the install directory), regardless of deployment mode. case_memory.json is the one file in the audit's Track 2 Sec 10.3 path-handling finding that holds real, accumulated, non-regeneratable user data (investigation history, learned patterns, recorded false positives) -- everything else in that finding (scraped data, logs) can be regenerated or safely lost. Trigger condition: any desktop-build update process that replaces or reinstalls the app's install directory (the normal shape of a desktop app update) would silently delete this file with zero warning to the user, since it lived inside that directory. Fix: in desktop mode, store it via the existing get_app_data_dir() helper (built in D1, previously used only for the admin-secret config file) instead. Web-deployment behavior is unchanged when BHARATGRAPH_DESKTOP_MODE is unset -- same exact path as before. Verified: confirmed the web-mo…af4b9c1
-
fix(NEW-A3 part1): replace em-dashes/smart-quotes in 56+ Python files -- CI requires pure ASCII source
8a0fba4
-
feat(ai):complete — self-learning system and case memory
- ai/self_learning/schema_learner.py: detects new fields in scraper output against known NODE_SCHEMAS. Unknown fields written to pending_schema_additions.json for human review. Never auto-applies. - ai/self_learning/pattern_learner.py: runs 3 known pattern queries + discovers high-directorship motifs. Candidates written to pattern_candidates_YYYYMMDD.json for human review. - ai/self_learning/weight_optimizer.py: records confirmed/unconfirmed investigation outcomes. Adjusts indicator weights by delta=0.01/0.005 after minimum 3 confirmed cases. All changes pending human approval. - ai/self_learning/self_audit.py: imports all 20 scrapers and verifies the expected class exists. Flags failures as GitHub Actions warnings. - ai/case_memory/case_store.py: saves investigation cases with findings, outcome, and reasoning path. find_similar() retrieves past cases with overlapping finding types. Tracks false positive patterns. - .github/workflows/weekly_learn.yml: every Sunday 18:…9f48a3d