feat: deep-think toggle, i18n, followup removal, storage hardening - #1
Conversation
Chat UX: - Deep Think toggle (Qwen hybrid-thinking): reasoning_content streamed as `event: thinking` SSE frames before the answer body; 400-fallback retries without enable_thinking for model tiers that reject the param; frontend toggle persists in localStorage, collapsible reasoning block with timing. - Follow-up question chips removed end-to-end (model field, API path, SSE done-frame, frontend chips/handler/css, tests, eval gold case). - ChatPage UI translated to Chinese (timing chip, sources, feedback, errors). Storage / ops: - docker-compose: bypass chromadb 0.4.18 entrypoint's `pip install --force-reinstall chroma-hnswlib` (pulls numpy 2.x → np.float_ removed → crash loop); run uvicorn directly. Real bind-mount persistence to ./data/chromadb; ./data/neo4j bind-mounts for graph data. - scripts/rebuild_chroma.py: zero-API-cost vector rebuild from SQLite chunks + embedding_cache (md5-keyed). Reuses get_chroma_client so collection name/cosine/upsert match ingestion; metadata fields mirror documents.py:287-296 verbatim. Recovery path for future vector loss. Infra (earlier batch): - SSE client util + doc_status service + rate_limit middleware. - Embedding cache self-heal (corrupt JSON/pickle blobs pruned). - Neo4j batch chunk/link writes (UNWIND) replacing per-chunk round-trips. - entity_extractor refactor; progress_tracker; reranker. - tests: +conftest, +test_doc_status, +test_sse; -test_followups, -eval/06. Verified: 54 chunks repopulated into Chroma (0 cache misses, 0 API calls); collection count=54; metadata user_id/document_id/prev_next intact.
|
Analysis CompleteGenerated ECC bundle from 1 commits | Confidence: 55% View Pull Request #2Repository Profile
Changed Files (35)
Top hotspots
Top directories
Analysis Depth Readiness (evidence-backed, 36%)ECC Tools uses this to decide whether recommendations should stay at commit-history/setup guidance or expand into CI, security, harness, reference-set, AI-routing, and team backlog work.
Reference Set Readiness (0/7, 0%)
Likely Future Issues (10)
Suggested Follow-up Work (10)
Copy-ready bodies test: add regression coverage for backend/app/api/auth.py + backend/app/api/chat.py ## Summary
- Add regression coverage for the recently touched code paths before more changes stack on top.
## Why
- Backfill regression coverage before another change set lands on the touched code paths.
## Touched paths
- `backend/app/api/auth.py`
- `backend/app/api/chat.py`
## Validation
- Add or extend focused tests that exercise the touched paths.
- Run the affected test suite and verify the new coverage closes the gap.test: add integration coverage for backend/app/api/auth.py + backend/app/api/chat.py ## Summary
- Add integration or end-to-end coverage for the recently changed API surface.
## Why
- Backfill integration or end-to-end coverage for the changed API surface before more contract changes land.
## Touched paths
- `backend/app/api/auth.py`
- `backend/app/api/chat.py`
## Validation
- Add or extend integration / e2e coverage for the changed API, route, or contract surface.
- Exercise the touched endpoints or route handlers against realistic request / response flows.docs: sync API contract for backend/app/api/auth.py + backend/app/api/chat.py ## Summary
- Update the API contract artifact that should reflect the recently changed implementation surface.
## Why
- Backfill the missing API contract or spec update before another implementation change lands on top of the same surface.
## Touched paths
- `backend/app/api/auth.py`
- `backend/app/api/chat.py`
## Validation
- Update the relevant OpenAPI, GraphQL, or contract/spec artifact used by this repo.
- Run the contract validation, docs generation, or API verification flow that depends on that artifact.db: add migration follow-up for backend/app/models/chat.py + backend/app/models/document.py ## Summary
- Add the missing migration or schema rollout step for the recently changed schema surface.
## Why
- Backfill the missing migration artifact before another schema or model change lands on top.
## Touched paths
- `backend/app/models/chat.py`
- `backend/app/models/document.py`
## Validation
- Create the migration or schema rollout artifact used by this repo.
- Run the repo migration / schema validation flow and verify the changed models still match production expectations.chore: sync config templates for docker-compose.yml ## Summary
- Update the example env files, sample configs, or deployment templates that should mirror the changed runtime configuration surface.
## Why
- Backfill example env files or config templates before a fresh setup drifts from the shipped runtime surface.
## Touched paths
- `docker-compose.yml`
## Validation
- Update the repo example env file or config template that should reflect the new runtime settings.
- Run the setup, boot, or deployment validation flow that depends on the changed config surface.test: add auth coverage for backend/app/api/auth.py + backend/app/auth/rate_limit.py ## Summary
- Add auth, session, or permission regression coverage for the recently changed security-sensitive surface.
## Why
- Backfill auth or permission regression coverage before another access-control change lands on the touched surface.
## Touched paths
- `backend/app/api/auth.py`
- `backend/app/auth/rate_limit.py`
## Validation
- Add or extend integration / e2e coverage for the changed auth, session, middleware, or permission surface.
- Exercise allowed and denied flows, invalid or expired credentials, or equivalent access-control boundary cases.test: add browser coverage for frontend/src/api/chat.js + frontend/src/utils/sse.js ## Summary
- Add browser or end-to-end coverage for the recently changed user-facing surface.
## Why
- Backfill browser coverage before another user-facing UI change lands on the touched surface.
## Touched paths
- `frontend/src/api/chat.js`
- `frontend/src/utils/sse.js`
## Validation
- Add or extend browser / e2e coverage for the changed component, page, or flow.
- Exercise the visible user journey that depends on the touched UI surface.security: add scanner evidence for backend/app/api/auth.py + backend/app/auth/rate_limit.py ## Summary
- Add security scanner or code-scanning evidence for the recently changed security-sensitive surface.
## Why
- Backfill explicit scanner or code-scanning evidence before another security-sensitive change lands on the touched surface.
## Touched paths
- `backend/app/api/auth.py`
- `backend/app/auth/rate_limit.py`
## Validation
- Run or add the relevant security scanner, code scanning, secret scanning, or dependency/security review check for the touched surface.
- Attach the scanner output, SARIF/code-scanning result, or focused security regression test to the follow-up PR.
- Confirm the changed auth, billing, webhook, secret-handling, agent, or CI surface has an explicit pass/fail gate.test: add budget evidence for CLAUDE.md + backend/app/services/llm.py ## Summary
- Add budget or usage-limit validation for the recently changed AI routing or model-call surface.
## Why
- Backfill cost, token, or usage-limit validation before another model-routing change lands on the touched surface.
## Touched paths
- `CLAUDE.md`
- `backend/app/services/llm.py`
## Validation
- Add or extend budget, token, usage-limit, or model-routing regression coverage for the changed path.
- Verify the route still enforces plan limits, retry caps, fallback behavior, or explicit cost controls.analysis: add RAG/evaluator evidence for backend/app/services/embedding.py + backend/app/services/reranker.py ## Summary
- Add RAG/evaluator comparison evidence for the recently changed retrieval, ranking, embedding, or evaluator surface.
## Why
- Backfill reference-set comparison, golden trace, benchmark, or eval-run evidence before another RAG or evaluator change lands on the touched surface.
## Touched paths
- `backend/app/services/embedding.py`
- `backend/app/services/reranker.py`
## Validation
- Add or update an eval, reference set, golden trace, benchmark, fixture, or judge/scoring regression for the changed RAG/evaluator behavior.
- Compare the changed behavior against representative retrieval or evaluator cases and record pass/fail evidence.
- Confirm the follow-up evidence covers the same retrieval, embedding, ranking, or evaluator path touched by this PR.Generated Instincts (18)
After merging, import with: Files
|
Chat UX:
event: thinkingSSE frames before the answer body; 400-fallback retries without enable_thinking for model tiers that reject the param; frontend toggle persists in localStorage, collapsible reasoning block with timing.Storage / ops:
pip install --force-reinstall chroma-hnswlib(pulls numpy 2.x → np.float_ removed → crash loop); run uvicorn directly. Real bind-mount persistence to ./data/chromadb; ./data/neo4j bind-mounts for graph data.Infra (earlier batch):
Verified: 54 chunks repopulated into Chroma (0 cache misses, 0 API calls); collection count=54; metadata user_id/document_id/prev_next intact.