Repair live unified search corpus runtime

This commit is contained in:
master
2026-03-09 19:44:16 +02:00
parent bf937c9395
commit 00bf2fa99a
12 changed files with 175 additions and 38 deletions

View File

@@ -0,0 +1,76 @@
# Sprint 20260309-013 - AdvisoryAI Live Unified Search Corpus Runtime Repair
## Topic & Scope
- Repair the live unified-search corpus gap exposed after the full rebuild and canonical route sweep: search-driven pages render, but several answer lanes report zero indexed chunks or insufficient evidence.
- Fix the real runtime contract in `src/AdvisoryAI/**` and compose wiring so published containers can resolve the packaged corpus and live adapters ingest findings, VEX, and policy data consistently.
- Keep the work scoped to AdvisoryAI runtime/search surfaces plus the minimal compose/docs coordination required to make the deployed stack converge correctly.
- Working directory: `src/AdvisoryAI/`.
- Allowed coordination edits: `devops/compose/docker-compose.stella-ops.yml`, `docs/modules/advisory-ai/**`, `docs/operations/unified-search-operations.md`, `docs/implplan/SPRINT_20260309_013_AdvisoryAI_live_unified_search_corpus_runtime_repair.md`, `src/Web/StellaOps.Web/output/playwright/**`.
- Expected evidence: focused AdvisoryAI test runs against the individual test `.csproj`, rebuilt `advisory-ai-web` and `advisory-ai-worker` images, redeployed compose services, refreshed live Playwright search artifacts.
## Dependencies & Concurrency
- Depends on `SPRINT_20260309_001_Platform_scratch_setup_bootstrap_restore.md` for the rebuilt stack baseline and `SPRINT_20260309_012_Router_live_quota_scope_and_notify_dispatch_repairs.md` for the clean `111/111` route-presence sweep.
- Safe parallelism: stay out of unrelated frontend/search UX changes outside `src/AdvisoryAI/**`; only add the minimal compose wiring needed for AdvisoryAI runtime configuration.
## Documentation Prerequisites
- `AGENTS.md`
- `docs/code-of-conduct/CODE_OF_CONDUCT.md`
- `docs/qa/feature-checks/FLOW.md`
- `docs/modules/platform/architecture-overview.md`
- `docs/modules/advisory-ai/architecture.md`
- `docs/modules/advisory-ai/knowledge-search.md`
- `docs/operations/unified-search-operations.md`
## Delivery Tracker
### LIVE-AIAI-013-001 - Restore published unified-search corpus packaging
Status: DONE
Dependency: none
Owners: Developer, Test Automation
Task description:
- Repair the AdvisoryAI published-image contract so the container carries the full repo-shaped unified-search corpus at the configured source-relative paths. The current image only packages a subset of snapshots, leaving graph, OpsMemory, timeline, and scanner answer lanes permanently unready in live deployments.
Completion criteria:
- [x] Published AdvisoryAI output includes all unified-search snapshot files under `src/AdvisoryAI/StellaOps.AdvisoryAI/UnifiedSearch/Snapshots/`.
- [x] AdvisoryAI tests cover runtime publish-layout resolution for all default unified snapshot paths.
- [x] Snapshot-only adapters use the repository-aware resolver rather than assuming `.` is the repository root.
### LIVE-AIAI-013-002 - Wire live VEX and policy adapters in compose
Status: DONE
Dependency: none
Owners: Developer, QA
Task description:
- Extend the live compose configuration so both AdvisoryAI hosts ingest VEX and policy data from the deployed Concelier and Policy Gateway services instead of silently relying on missing or stale fallback snapshots.
Completion criteria:
- [x] `advisory-ai-web` runtime env sets findings, VEX, and policy adapter base URLs.
- [x] `advisory-ai-worker` runtime env sets findings, VEX, and policy adapter base URLs.
- [x] AdvisoryAI/search docs describe the required live adapter configuration.
### LIVE-AIAI-013-003 - Rebuild, redeploy, and reverify live search-driven pages
Status: DONE
Dependency: LIVE-AIAI-013-001, LIVE-AIAI-013-002
Owners: Developer, QA
Task description:
- Rebuild the touched AdvisoryAI images, redeploy them into the existing stack, and rerun the live Playwright search/action sweep to verify that the previously corpus-unready answer lanes now return grounded or at least populated results from the repaired corpus.
Completion criteria:
- [x] Focused AdvisoryAI test runs pass from the individual test project.
- [x] `advisory-ai-web` and `advisory-ai-worker` are rebuilt and redeployed from the current source.
- [x] Live search artifacts are refreshed after the redeploy and show the repaired answer/corpus state on the affected pages.
## Execution Log
| Date (UTC) | Update | Owner |
| --- | --- | --- |
| 2026-03-09 | Sprint created after the full rebuild/redeploy and live changed-surface sweep exposed a deeper AdvisoryAI runtime issue: search-driven pages loaded but several answer lanes remained corpus-unready because the published image carried only a partial unified snapshot set and compose only wired the findings live adapter. | Developer |
| 2026-03-09 | Published the full unified snapshot corpus into the AdvisoryAI image at the documented source-relative paths, switched graph/opsmemory/timeline/scanner adapters to the repository-aware resolver, and added runtime-publish coverage plus focused live-adapter/integration test evidence (`23/23` via the xUnit runner against the rebuilt test assembly). | Developer |
| 2026-03-09 | Rebuilt and redeployed `advisory-ai-web` and `advisory-ai-worker`, verified runtime env and packaged snapshots inside the live container, rebuilt the knowledge/unified indexes (`domains=8`, `chunks=22`), and rechecked mission board, advisories/VEX, and policy overview with authenticated Playwright at `src/Web/StellaOps.Web/output/playwright/live-search-runtime-repair-recheck.json`. | QA |
## Decisions & Risks
- Decision: preserve the documented source-relative asset contract instead of changing defaults to ad hoc published-only paths. The container image must look repo-shaped under `/app` so the same defaults work in source and published runs.
- Decision: fix live VEX and policy ingestion in compose/runtime rather than masking the issue with UI fallback copy.
- Risk: `devops/compose/docker-compose.stella-ops.yml` is a shared file touched by other workstreams. Limit edits strictly to the AdvisoryAI env block.
- Evidence: live container verification now shows all packaged snapshot files under `/app/src/AdvisoryAI/StellaOps.AdvisoryAI/UnifiedSearch/Snapshots/`, and the AdvisoryAI logs report non-zero rebuild/refresh counts for findings, graph, opsmemory, platform, policy, scanner, timeline, and vex.
## Next Checkpoints
- 2026-03-09: land packaging/runtime repair and live adapter wiring, then rerun focused AdvisoryAI tests plus live Playwright verification.