Spaces:
Sleeping
Sleeping
Commit History
-
docs: stale-references sweep β align legacy docs with ADR-044 + 8-gate stateβ
11 files fixed per 2026-05-27 docs-audit (P0 / P1 / P2 / one P3): P0 β Upload pipeline most-likely-to-mislead: - 70-docs/20-data-pipeline/ingestion-policy.md: wholesale Β§"Exception β user uploads" rewrite; dual-write table row; date bumped + ADR-044 cross-ref - kb/security/INDEX.md: "5 gates" β "8 gates" with full table extension P1 β Status inversions: - 70-docs/60-decisions/ADR-003-curated-corpus.md: "Locked" banner now says "partially superseded by ADR-044"; counts 190/19 β 148/21; quarantine-only framing flipped to dual-write - 70-docs/60-decisions/README.md: ADR-003 status row updated - 70-docs/10-architecture/safety-architecture.md: F-13 "Not applicable β D-003" β "LIVE per ADR-044, mitigated by 8 gates" (resolved internal contradiction) - 70-docs/00-overview/problem-statement.md: Β§5.4 qualified as v1 intent + ADR-044 update; Β§7 non-goal bullet replaced with cross-session-retrieval caveat P2 β Architecture summaries omitted dual-write: - ARCHITECTURE.md: explicitβ¦21e4b2a
-
feat(llm+docs): KI-177 + KI-179 + KI-183 + ADR-040 docs cascadeβ
THREE-TIER LLM CHAIN β Google Gemini PRIMARY, NIM Tier 1, OR Tier 2. Live audit (KI-178) of OpenRouter's free-tier catalog killed my earlier recommendation: gemini-2.0-flash isn't in OR's catalog, llama-3.3-70b- :free and hermes-3-405b:free don't expose response_format. So OR's free-with-JSON pool is only nemotron-3-super-120b / qwen3-next-80b / gemma-4-31b. User obtained a Google AI Studio key, set up billing ($0 historical spend, $10 cap, free 1500/day quota active), confirmed working live on gemini-2.5-flash + gemini-2.5-flash-lite. NEW MODEL TIERS: Brain Fast (sales_brain): Tier 0 Google gemini-2.5-flash-lite (KI-183 β 2.0-flash retired) Tier 1 NIM qwen3-next-80b β mistral-large-3 β llama-4-maverick Tier 2 OR nemotron-3-super-120b:free β qwen3-next-80b:free β gemma-4-31b:free Last NIM nemotron-super-49b (only when all else dies) Brain Main (orchestrator): Tier 0 Google gemini-2.5-flash Tier 1+ same NIM/OR cascade Judgβ¦132a829
-
docs: KI-101..KI-107 β audit + CLAUDE.md + ADR syncβ
Document the seven KIs landed today across the production-readiness register, project memory, and affected ADRs: - KI-101 (66eb4ed) β drop 6 function-local `import logging` lines from orchestrator.py; module-level import is the sole binding so the asyncio wait_for TimeoutError branch no longer raises UnboundLocalError. - KI-102 (4bb8da0) β profile RAG cross-session isolation. session_id stamped on every chunk; main retrieve() excludes doc_type=profile; per-session lookup triple-checks meta.session_id == session_id in Python; legacy chunks without session_id fail-closed. ADR-022 extended with a session-isolation subsection. - KI-103 (8ef5c43) β _canonical_fallback no_trailer loop-breaker. New session._ff_failed_attempts + _ff_skipped_slots; after 2 failed attempts on the same slot, mark skipped and advance. - KI-104 (407f2a1) β voice_format.tts_preprocess strips chain-of-thought leakage: <think> blocks, **Reasoning:** labels, [INTERNAL] blocks, sentence-anchored CoTβ¦1d10432 -
fix(admin): KI-096 + KI-097 β public /api/version + password-only adminβ
KI-096: add unauthenticated GET /api/version (git SHA + uptime). Lets any caller verify which commit HF Space is serving without admin auth. KI-097: rip out admin IP allowlist. ADMIN_IP_ALLOWLIST env, _ip_allowed(), and the dual-gate 404-to-hide-existence behavior are gone. _check_admin now only verifies the X-Admin-Password header; bad/missing password β 401 Unauthorized. Operational rationale: changing networks locked the operator out without adding meaningful security beyond a strong password. ADR-023 superseded; ADR-010 secret count 8 β 7. Also includes test_name_persistence.py (4 deterministic regression cases pinning KI-091/094/095) and the KI-094 mistakes-log entry. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>d37a6cf -
docs: KI-091 + KI-094 β extractor gates + None-guard added to audit + CLAUDE + ADR-032β
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>d547d5a -
docs: final sync β backend/README post-KI-070 + ADR-032 cross-links in README Β§4.3 + ENTERPRISE_AUDIT KI-080 rowβ
Three small completeness fixes surfaced by the end-of-session audit: - backend/README.md β `needs_finder.py` row now correctly described as "safeguard fallback only" post-KI-070 (was still labelled the primary fact-find driver, pointing to ADR-027). Added new row for `fact_find_brain.py` (the actual KI-070 driver). Marked `question_paraphraser.py` as deleted. - README.md Β§4.3 β opening sentence reframed from "fallback chain" to "candidate pool with probe-driven sticky primary election"; ADR-031 + ADR-032 cross-links added inline so a reviewer can jump straight to the architecture reference. - ENTERPRISE_AUDIT.md KI-080 row β added inline link to ADR-032 so the audit table's KI-080 entry routes through to the end-to-end architecture spec (was already linking ADR-031, now both). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>088ff0b -
docs: KI-088 + KI-089 + KI-090 β audit rows + CLAUDE.md sync (semaphore / test-fix / lenient parser)
2e5de93 -
docs: ADR-032 LLM chain architecture reference + KI-080..KI-087 doc syncβ
Adds new architecture reference ADR consolidating KI-079..KI-087: - 70-docs/60-decisions/ADR-032-llm-chain-architecture.md (NEW, 435 lines) - TL;DR + ASCII data flow diagram - Component reference (every ModelHealth field) - Election algorithm pseudo-code + score formula - Probe loop cadence + OpenRouter credits polling - Per-provider credit signal table (Groq headers / OR endpoint / NIM rate-meter) - Per-phase httpx timeout justification - Failure classification table - KI-079 escalation path - Telemetry surface (brain_used variants) - Performance characteristics + operational runbook Updated docs: - CLAUDE.md "LLM stack" section: KI-080..KI-087 full coverage + NIM-first preference (KI-087), credit gating (KI-085), per-phase timeouts (KI-084), admin tab (KI-086), HF Space secrets (KI-081) - 80-audit/ENTERPRISE_AUDIT.md: 5 new rows (KI-081, KI-084, KI-085, KI-086, KI-087) appended to "Fixes shipped today" table - backend/proviβ¦6a47549 -
docs: KI-080 β sync CLAUDE.md + ENTERPRISE_AUDIT + new ADR-031 + 11 stale KI-025/50-50 surface sweepβ
Documents the KI-080 architectural shift from "iterate every chain candidate per call" (ADR-026 / KI-025 50/50 NIM β Groq rotation) to "probe-elected sticky primary with cross-provider backup" (ADR-031). Files updated: - CLAUDE.md β "LLM stack" section rewritten for KI-080 election; KI-025 rotation marked deprecated. - 80-audit/ENTERPRISE_AUDIT.md β KI-078/KI-079/KI-080 rows added to "Fixes shipped today" table; executive-scorecard UX-latency + test- coverage rows updated to cite KI-080 (supersedes KI-025). - 70-docs/60-decisions/ADR-031-sticky-primary-election.md β NEW. Full ADR following ADR-030 shape: Context, Decision, Alternatives, Consequences, Files touched, Revisit at scale. - 70-docs/60-decisions/ADR-026-provider-load-balancing.md β header updated to "Superseded by ADR-031"; body retained as historical record per ADR convention. - 70-docs/60-decisions/ADR-030-llm-driven-fact-find.md β pointer to ADR-026 swapped for ADR-031. - READMEβ¦c592055 -
docs: sync KI-071..KI-077 to ENTERPRISE_AUDIT + CLAUDE.md (post-KI-070 safeguards + Name field)β
After KI-070 shipped the single-LLM-call fact-find, six follow-up KIs landed to make the experience robust under real-world LLM degradation and to surface the captured profile in the UI. Recording them in canonical docs so they're traceable across the repo. ENTERPRISE_AUDIT.md "Fixes shipped today" β added 7 rows: - KI-071 β 12-file docs reconciliation against actual code reality - KI-072 β P0 fallback captures user's answer to last-asked slot - KI-073 β Clear chat resets profile-completeness chip synchronously - KI-074 β P0 greedy multi-slot capture + slot-trigger guards - KI-075 β Brain timeout 12s β 25s (root cause of "still robotic") - KI-076 β HF Dataset viewer disabled (CastError gone) - KI-077 β Name field + profile-panel pre-fill from chat state CLAUDE.md "Fact-find loop" section extended with two new bullets documenting the safeguards added since KI-070: - KI-072/074 β fallback path no longer dead-ends; greedy multi-slot capture with trigger guards - KIβ¦dd6172a -
fix(fact-find): KI-072 β canonical fallback now captures user's answer + doc sync (CLAUDE.md / ADR-030 / ENTERPRISE_AUDIT)β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ KI-072 β P0 fallback wedge fix (backend/fact_find_brain.py) βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ Live user screenshot showed the bot stuck asking "First β what should I call you? I'll save your profile so the next time you visit, you won't have to answer all this again." FOUR times in a row while the user answered "I am Don" / "Don" / "Don Jon". Every answer dropped on the floor. Root cause: when KI-070's `drive_fact_find()` brain call fails (timeout, malformed JSON trailer, chain exhaustion), it falls back to a canonical question via `next_question(profile).prompt_en`. But the original fallback just returned the question text β it never tried to APPLY the user's current message to whichever slot was last being asked. So under any sustained LLM degradation (NIM rate limit / pool timeout), fact-find wedges into an infinite re-ask. Fix: `_canonical_fallback` now takes `session` + `user_text`, reβ¦e098e1b -
refactor + feat: KI-050b/053/054 β rename completeness + eval speed + tax questionsβ
Combines three logically-related changes into one push-clean commit (rewrites the prior 67bdd3a + 866fb24 to drop accidentally-swept-in binaries + runtime state that tripped HF Space's pre-receive hook). KI-050b β data/ β 40-data/ rename completeness across docs: β’ 40-data/ internal docs (README, corpus_urls.md, info_source_map, illustrative_premiums.json, llm_health.json, profiles/README, reviews/icici-lombard.json) β’ kb/ β AUDIT_TRAIL, INDEX, all 218 kb/policies/*.md mirror sheets, kb/research/corpus_acquisition.md, kb/reviews/* leaderboards β’ tools/ β info_source_map.py, build_kb_mirror.py, full_pipeline.sh, README, ~12 other scripts touching data/ paths in prose β’ eval/info_source_map.json (2772 source-provenance entries) + README entrypoint.sh preserved β its `/data/` paths are absolute HF Space persistent-disk mounts, NOT references to the repo folder. KI-053 β eval/run.py --no-extract flag. Skips the orchestrator's free-form profile_extractor LLM call β¦57ef382 -
refactor: KI-047 β bucket reorg (Option A safe subset)β
User picked numbered-bucket layout. Executing the SAFE subset that does NOT touch Python imports or string path refs: β’ docs/ β 70-docs/ β’ audit_results/ β 80-audit/ Kept as-is (renaming would need ~25 Python files of string-path updates β deferred to follow-up): β’ data/ β code-referenced (backend/{premium_calculator, session_state, profile_store, scorecard, admin, llm_health, main}, rag/build_kb, tools/{check_link_rot, info_source_map, curate_*, refresh_premiums, generate_policy_facts}). β’ backend/, frontend/, rag/, tools/, eval/, tests/, kb/ β Python directly forbids leading-digit / hyphen package names. All references to the moved folders updated in one sed pass across *.md, *.py, *.sh, *.ts, *.tsx, *.json, Dockerfile. Verified by: β’ tests/test_routing_regression.py β 15/15 still pass. β’ No residual (docs/ or [docs/ or /docs/ or ^docs/ refs. β’ Same for audit_results/. Docβ¦e2d09f9