fix(ask): find related source evidence automatically - #688
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…to HEAD # Conflicts: # frontend/src/components/OperationsDashboard.stories.tsx # frontend/src/components/OperationsDashboard.test.tsx # frontend/src/components/OperationsDashboard.tsx
…textualWisdomLab/LineageWeave into fix/pr688-restack-child # Conflicts: # backend/app/post_content_worker.py
…to fix/ask-auto-source-composer
…textualWisdomLab/LineageWeave into fix/pr688-restack-child
…to fix/ask-auto-source-composer
…textualWisdomLab/LineageWeave into fix/pr688-restack-child
This reverts commit a7cda9b.
This reverts commit 1d16c40.
This reverts commit 891e0f9.
…to fix/ask-auto-source-composer
| where missing.post_id = any($1::uuid[]) | ||
| and job.status_code = $2 | ||
| and nullif(btrim(post.post_body), '') is not null | ||
| order by post.post_id | ||
| """, | ||
| [UUID(sibling_id) for sibling_id in sibling_ids], | ||
| SUCCEEDED, | ||
| ) |
There was a problem hiding this comment.
📝 Info: Re-analysis only reaches siblings with missing facts
The SUCCEEDED reclaim check in _claim_job still tests only source_body_sha256, not the new analysis_input_sha256, so a completed post never self-reclaims on a stale evidence window. Re-analysis depends entirely on _requeue_project_missing_case_jobs, which requeues only siblings that still carry missing facts. A completed sibling whose facts are all present is never re-analyzed when new project evidence arrives.
Was this helpful? React with 👍 or 👎 to provide feedback.
| "--agents", | ||
| str(agents_path), | ||
| "--auto-discover-model-agents", |
There was a problem hiding this comment.
🔍 Orchestrator start no longer tolerates model-discovery failures
start.py drops --allow-discovery-failures while chat agents still carry blank models expanded via --auto-discover-model-agents. If gateway /v1/models discovery fails, the orchestrator now fails to start instead of continuing, taking the whole LLM/Vision/embedding boundary down. This is coupled to the pinned-commit bump and is not documented in ADR 0083.
(Refers to this code)
Was this helpful? React with 👍 or 👎 to provide feedback.
| def operations_analysis_input_sha256( | ||
| sources: tuple[OperationsEvidenceSource, ...], context: str | ||
| ) -> str: | ||
| """Digest the exact ordered source window and context sent for analysis.""" | ||
| payload = { | ||
| "context": context, | ||
| "sources": [ | ||
| { | ||
| "post_id": source.post_id, | ||
| "title": source.title, | ||
| "input_sha256": source.input_sha256, | ||
| } | ||
| for source in sources | ||
| ], | ||
| } | ||
| encoded = json.dumps( | ||
| payload, ensure_ascii=False, separators=(",", ":"), sort_keys=True | ||
| ).encode("utf-8") | ||
| return hashlib.sha256(encoded).hexdigest() | ||
|
|
There was a problem hiding this comment.
📝 Info: Input fingerprint omits source clock and axis
operations_analysis_input_sha256 digests context and each source's post_id, title, and text digest, but not observed_at or time_axis_code. Milestones bind their instant to observed_at, so a source whose clock changes while text/title/id stay identical produces the same fingerprint and does not invalidate reuse.
Was this helpful? React with 👍 or 👎 to provide feedback.
Summary
Evidence
uv run pytest -q tests/test_post_chat_ingestion.py tests/test_post_content_worker.py(27 passed)corepack pnpm exec vitest run src/components/OperationsDashboard.test.tsx --maxWorkers=1(12 passed)corepack pnpm exec vitest run src/App.test.tsx --maxWorkers=1 -t "renders safe Ask Agent evidence under each cited post"(1 passed, 95 skipped)corepack pnpm lintStacked on #640. No source names or production identifiers are included.