Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/00_overview/DASHBOARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ _Top-level index across MVP1 → GA v1+ as of **2026-06-01**. Click a release na
| Release | Theme | Progress | Status |
|---|---|---|---|
| [MVP1 / v0.1](MVP1_DASHBOARD.md) | The Loop | 94 / 94 scoped done | **Complete** |
| [MVP2 / v0.2](MVP2_DASHBOARD.md) | Three-Engine + Real Signals | 7 / 17 scoped done · 28 remaining | **In progress** |
| [MVP2 / v0.2](MVP2_DASHBOARD.md) | Three-Engine + Real Signals | 8 / 17 scoped done · 27 remaining | **In progress** |
| MVP3 / v0.3 | Observable | — | **Not yet scoped** |
| GA v1 / v1.0 | Production-ready | — | **Not yet scoped** |

Expand Down
84 changes: 43 additions & 41 deletions docs/00_overview/MVP2_DASHBOARD.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/00_overview/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ <h2>Releases</h2>
<div class="roadmap-row">
<div class="release-name"><a href="mvp2_dashboard.html">MVP2 / v0.2</a></div>
<div class="theme">Three-Engine + Real Signals</div>
<div class="progress">7 / 17 scoped done · 28 remaining</div>
<div class="progress">8 / 17 scoped done · 27 remaining</div>
<span class="state-pill in_progress">In progress</span>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
## 1) Purpose

- **Problem:** Post-2026-05-31, no full `pr.yml` run can go green on any branch. The `backend` job has no Solr service container, so the heavy-lane reseed test `test_demo_seeding_ubi_full::test_full_reseed_produces_8_lists_8_studies_per_rung_correct` `ConnectError`s when the orchestrator at [`demo_seeding.py:1379`](../../../../../backend/app/services/demo_seeding.py#L1379) tries to seed the `acme-kb-docs-solr` scenario. Independently, the `smoke` job's `solr` container `exit(1)`s during `make up`, failing the smoke gate. PR #364 had to merge over both reds; further PRs land on the same red baseline.
- **Outcome (Phase 1, this spec):** The `pr.yml` **backend** job goes green on any branch that touches code by making the reseed orchestrator skip-on-unreachable for any engine scenario whose engine isn't reachable (test + product, in lock-step). The smoke job **remains red** until Phase 2 ships separately (smoke healthboot — see [`phase2_idea.md`](phase2_idea.md) + FR-7 / D-5). This is intentional: bundling Phase 2 into this PR would block a clean Phase 1 fix on log evidence we don't yet have from a smoke-job failure run. After both phases ship, every job in `pr.yml` is green on any branch. The Phase 1 fix mirrors the existing Elasticsearch skip pattern at [`test_demo_seeding_ubi_full.py:142`](../../../../../backend/tests/integration/test_demo_seeding_ubi_full.py#L142), so the engine-reachability handling is uniform across all three engines.
- **Outcome (Phase 1, this spec):** The `pr.yml` **backend** job goes green on any branch that touches code by making the reseed orchestrator skip-on-unreachable for any engine scenario whose engine isn't reachable (test + product, in lock-step). The smoke job **remains red** until Phase 2 ships separately (smoke healthboot — see [`infra_solr_smoke_stability`](../../planned_features/02_mvp2/infra_solr_smoke_stability/idea.md) + FR-7 / D-5). This is intentional: bundling Phase 2 into this PR would block a clean Phase 1 fix on log evidence we don't yet have from a smoke-job failure run. After both phases ship, every job in `pr.yml` is green on any branch. The Phase 1 fix mirrors the existing Elasticsearch skip pattern at [`test_demo_seeding_ubi_full.py:142`](../../../../../backend/tests/integration/test_demo_seeding_ubi_full.py#L142), so the engine-reachability handling is uniform across all three engines.
- **Non-goal:** Adding a Solr service container to the GHA `backend` job. The configset-upload step that real Solr needs (`make seed-solr` posts to ZooKeeper) is not trivially reproducible from a GHA `services:` container, and the skip-on-unreachable approach gives operators who don't run Solr locally the same behavior CI sees. Also non-goal: changing the on-Solr UBI demo-data shape, the Solr adapter, or any product feature. Also non-goal in Phase 1: stabilizing the Solr container on the smoke runner (Phase 2).

## 2) Current state audit
Expand Down Expand Up @@ -65,7 +65,7 @@
- (FR-5) Surface skipped engines in `ReseedStatusResponse.scenarios_skipped: list[str]` (top-level field, NOT inside the nested `summary` object) so the GET status endpoint + UI can report partial-reseed cleanly (closes the contract with Capability C / sibling `bug_reseed_failure_blocks_retry_arq_singleton_dedup`). Also: the **worker** (`backend/workers/demo_reseed.py`) special-cases the all-engines-unreachable marker to write the stable `failed_reason="all_engines_unreachable"` token (the reseed is async — there is no synchronous error envelope; the signal travels through the Redis status).
- (FR-6) Documentation update: data-model.md (no — N/A), runbook addition at `docs/03_runbooks/demo-reseed-engine-tolerance.md`, CLAUDE.md "Common Pitfalls" line.

**Phase 2 (separate PR, tracked as `phase2_idea.md`):**
**Phase 2 (separate PR, tracked as `infra_solr_smoke_stability`):**
- (FR-7) Smoke job: stabilize the Solr container. Path TBD pending log evidence — default lean is `SOLR_HEAP_SIZE=256m` in the smoke job environment first, then `start_period` extension, then smoke-job tolerance for Solr-down as last resort. Q-1 in §19 captures the diagnostic protocol.

### Out of scope
Expand All @@ -90,7 +90,7 @@ This feature does **not** add new endpoints or change any path/method. It modifi
### Phase boundaries

- **Phase 1 (this spec):** FR-1 → FR-6. Unblocks `backend` CI immediately; smoke remains red until Phase 2. Rationale: Phase 1 is pure-code work with no external dependency. Ship now.
- **Phase 2 (separate PR — tracked as [`phase2_idea.md`](phase2_idea.md)):** FR-7. Rationale: needs log evidence from a smoke-job failure (`docker compose logs solr`) to commit to the right stabilization lever. Treating it as a separate PR keeps Phase 1 reviewable in isolation and lets the smoke-stabilization work be driven by data rather than guesswork.
- **Phase 2 (separate PR — tracked as [`infra_solr_smoke_stability`](../../planned_features/02_mvp2/infra_solr_smoke_stability/idea.md)):** FR-7. Rationale: needs log evidence from a smoke-job failure (`docker compose logs solr`) to commit to the right stabilization lever. Treating it as a separate PR keeps Phase 1 reviewable in isolation and lets the smoke-stabilization work be driven by data rather than guesswork.

## 4) Product principles and constraints

Expand Down Expand Up @@ -197,7 +197,7 @@ N/A — `audit_log` table has not yet shipped (latest migration is `0022_solr_en
1. `SOLR_HEAP_SIZE=256m` in the smoke job's `env:` block, matching the backend job's `ES_JAVA_OPTS: -Xms256m -Xmx256m` pattern at [`pr.yml:287`](../../../../../.github/workflows/pr.yml#L287).
2. Extended `start_period` for the Solr healthcheck (currently `30s` at [`docker-compose.yml:285`](../../../../../docker-compose.yml#L285)) — bump to `60s` or `90s`.
3. Smoke-job tolerance for Solr being down: drop `solr` from the failure-log collection at [`pr.yml:719`](../../../../../.github/workflows/pr.yml#L719) and skip any Solr-specific smoke assertion (the current tutorial-path smoke at `backend/tests/smoke/test_tutorial_path.py` is ES-only — verify before relying on this).
- Notes: this FR ships in a follow-up PR — Phase 2. The Phase 2 spec / impl-plan will be generated from `phase2_idea.md` once log evidence is in hand.
- Notes: this FR ships in a follow-up PR — Phase 2. The Phase 2 spec / impl-plan will be generated from `infra_solr_smoke_stability` once log evidence is in hand.

## 8) API and data contract baseline

Expand Down Expand Up @@ -471,13 +471,13 @@ Unchanged. The existing Arq-singleton dedup on `demo_reseed:singleton` is indepe
- `docs/04_security/` — no change.
- `docs/05_quality/` — no change.
- `CLAUDE.md` — one-line "Common Pitfalls" entry + "Key Runbooks" table row (per FR-6).
- `state.md` — known-debt entry for `infra_solr_ci_readiness` updates from "P1 — pr.yml red on every branch" → "Phase 1 shipped, Phase 2 in progress (smoke stability — see `phase2_idea.md`)".
- `state.md` — known-debt entry for `infra_solr_ci_readiness` updates from "P1 — pr.yml red on every branch" → "Phase 1 shipped, Phase 2 in progress (smoke stability — see `infra_solr_smoke_stability`)".

## 16) Rollout and migration readiness

- **Feature flags / staged rollout:** N/A. The change is in test + service + UI code, not a runtime feature surface. The new `scenarios_skipped` field is additive; no enum change.
- **Migration/backfill expectations:** N/A. No schema changes (Alembic head stays `0022_solr_engine_auth_check`).
- **Operational readiness gates:** `pr.yml` backend job must go green on this PR (the test the change fixes must pass). Smoke remains red — explicitly acknowledged and tracked as Phase 2 ([`phase2_idea.md`](phase2_idea.md)).
- **Operational readiness gates:** `pr.yml` backend job must go green on this PR (the test the change fixes must pass). Smoke remains red — explicitly acknowledged and tracked as Phase 2 ([`infra_solr_smoke_stability`](../../planned_features/02_mvp2/infra_solr_smoke_stability/idea.md)).
- **Release gate:** `pr.yml` backend + frontend + both docker buildx + static-checks + license jobs green; **smoke explicitly exempted (Phase 2)**; Gemini adjudication clean. Heavy CI is ON (per `state.md` 2026-05-31 note). The PR is mergeable with smoke red because (a) the smoke failure is pre-existing and tracked, (b) `main` no longer enforces heavy-CI required-status-checks (per `state.md` known-state: the ruleset's `required_status_checks` rule was removed 2026-05-31), so the operator merges on judgment with the smoke-red rationale documented in the PR body.

## 17) Traceability matrix
Expand All @@ -498,18 +498,18 @@ This feature is complete when:

- [ ] All Phase 1 acceptance criteria (AC-1 through AC-11, incl. AC-6b) pass in CI.
- [ ] `pr.yml` **backend** job is green on this PR (the count-drift fix unblocks the heavy-lane test).
- [ ] `pr.yml` **smoke** job **remains red** (acknowledged — Phase 2 territory). The PR description MUST cite [`phase2_idea.md`](phase2_idea.md) and the rationale for the split. The `static-checks-backend`, `static-checks-frontend`, `frontend`, `docker buildx (relyloop/api)`, `docker buildx (relyloop/ui)`, `backend-unit-fast`, `license-headers`, and `license-inventory` jobs MUST all be green.
- [ ] `pr.yml` **smoke** job **remains red** (acknowledged — Phase 2 territory). The PR description MUST cite [`infra_solr_smoke_stability`](../../planned_features/02_mvp2/infra_solr_smoke_stability/idea.md) and the rationale for the split. The `static-checks-backend`, `static-checks-frontend`, `frontend`, `docker buildx (relyloop/api)`, `docker buildx (relyloop/ui)`, `backend-unit-fast`, `license-headers`, and `license-inventory` jobs MUST all be green.
- [ ] All test layers (unit/integration/contract + UI vitest) are green; no new E2E in Phase 1.
- [ ] `docs/03_runbooks/demo-reseed-engine-tolerance.md` is added and linked from CLAUDE.md.
- [ ] `phase2_idea.md` is added and references this spec.
- [ ] `infra_solr_smoke_stability` is added and references this spec.
- [ ] No open questions remain in §19.

## 19) Open questions and decision log

### Open questions

_None._ Q-1 and Q-2 from the idea have been resolved during cycle-1 review:
- **Q-1 (Phase 2 lever choice)** moved to [`phase2_idea.md`](phase2_idea.md) per D-5 — Phase 2 is a separate PR and the lever choice is gated on log evidence captured then.
- **Q-1 (Phase 2 lever choice)** moved to [`infra_solr_smoke_stability`](../../planned_features/02_mvp2/infra_solr_smoke_stability/idea.md) per D-5 — Phase 2 is a separate PR and the lever choice is gated on log evidence captured then.
- **Q-2 (UI consumer)** resolved by grep — there IS a real UI consumer at [`ui/src/components/dashboard/reset-demo-state-button.tsx`](../../../../../ui/src/components/dashboard/reset-demo-state-button.tsx) + the type mirror at [`ui/src/lib/api/demo-reseed.ts:27`](../../../../../ui/src/lib/api/demo-reseed.ts#L27). The wire-value design was flipped to additive-field-only (no new enum value) — see D-4 revised below.

### Decision log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
| FR-4 | Epic 1 / Story 1.4 | Heavy-lane test dynamic-count via shared slug-keyed snapshot (6 scenarios incl. rich) |
| FR-5 | Epic 1 / Story 1.5 | TS mirror `scenarios_skipped` + UI hint + contract/vitest (backend field + worker token are in Story 1.2) |
| FR-6 | Epic 1 / Story 1.6 | Runbook + CLAUDE.md edits |
| FR-7 | **Phase 2 — deferred** | Smoke Solr stability. Tracked in [`phase2_idea.md`](phase2_idea.md). NOT in this plan. |
| FR-7 | **Phase 2 — deferred** | Smoke Solr stability. Tracked in [`infra_solr_smoke_stability`](../../planned_features/02_mvp2/infra_solr_smoke_stability/idea.md). NOT in this plan. |

**Deferred work tracking:** FR-7 (smoke stability) is Phase 2; tracking artifact [`phase2_idea.md`](phase2_idea.md) already exists in this directory (verified). No new tracking file needed.
**Deferred work tracking:** FR-7 (smoke stability) is Phase 2; tracking artifact [`infra_solr_smoke_stability`](../../planned_features/02_mvp2/infra_solr_smoke_stability/idea.md) already exists in this directory (verified). No new tracking file needed.

## 2) Delivery structure

Expand Down Expand Up @@ -342,7 +342,7 @@ def _engine_reachable(host_base_url: str, engine_type: str) -> bool:
## 4) Documentation update workstream

### 4.0 Core context files
- [ ] `state.md` — update the known-debt "Solr is not CI-ready (P1)" entry: backend job unblocked (Phase 1 shipped); smoke still red (Phase 2, `phase2_idea.md`). Add the merge one-liner to "Last 5 merges" at finalization.
- [ ] `state.md` — update the known-debt "Solr is not CI-ready (P1)" entry: backend job unblocked (Phase 1 shipped); smoke still red (Phase 2, `infra_solr_smoke_stability`). Add the merge one-liner to "Last 5 merges" at finalization.
- [ ] `architecture.md` — no change (no new layer / data flow).
- [ ] `CLAUDE.md` — Common Pitfalls line + Key Runbooks row (Story 1.6).

Expand Down Expand Up @@ -415,7 +415,7 @@ Other docs/01,02,04,05: no change.
## 8) Rollout and cutover plan

- No feature flag. Additive field + new skip behavior. Ships in one PR.
- The PR merges with the `smoke` CI job still red (Phase 2 territory) — documented in the PR body citing `phase2_idea.md`. `main` no longer enforces heavy-CI required-status-checks (per `state.md`), so the operator merges on judgment.
- The PR merges with the `smoke` CI job still red (Phase 2 territory) — documented in the PR body citing `infra_solr_smoke_stability`. `main` no longer enforces heavy-CI required-status-checks (per `state.md`), so the operator merges on judgment.
- No migration, no cutover steps.

## 9) Execution tracker
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,35 @@
- Date: 2026-06-01
- File: feature_spec.md
- Cross-model review: GPT-5.5 passed (3 cycles — 5 → 6 → 3 findings, all accepted + resolved; convergence reached at cycle 3)
- Phases: 2 total, 1 covered by spec (Phase 1 = skip-on-unreachable + dynamic-count + UI partial hint; Phase 2 = smoke healthboot, tracked as phase2_idea.md)
- Phases: 2 total, 1 covered by spec (Phase 1 = skip-on-unreachable + dynamic-count + UI partial hint; Phase 2 = smoke healthboot, tracked as infra_solr_smoke_stability)

## Plan
- Status: Approved
- Date: 2026-06-01
- File: implementation_plan.md
- Cross-model review: GPT-5.5 passed (3 cycles — 5 → 2 → 1 findings, all accepted + resolved; convergence reached at cycle 3). Cycle 1 surfaced the rich-ESCI-scenario gap (High) + the worker dropping `scenarios_skipped` (High); cycle 2 the CLI guard ordering + Pydantic default-factory schema nuance; cycle 3 the CLI↔demo_seeding circular import. Drove 2 spec corrections (typed `AllEnginesUnreachableError`, rich-scenario inclusion) reconciling the async-architecture reality (reseed runs in the Arq worker — no synchronous error envelope).
- Stories: 6 across 1 epic
- Phases covered: Phase 1 of 2 (Phase 2 = smoke healthboot, tracked in phase2_idea.md)
- Phases covered: Phase 1 of 2 (Phase 2 = smoke healthboot, tracked in infra_solr_smoke_stability)

## Implementation
- Status: Phase 1 complete — PR #367 open, awaiting manual merge
- Status: Phase 1 complete — PR #367 squash-merged `214cdfcd`
- Date: 2026-06-01
- PR: https://github.com/SoundMindsAI/relyloop/pull/367
- CI: `backend` job + all jobs **green** except `smoke` (the pre-existing
`relyloop-solr-1 exited (1)` runner crash — deferred to Phase 2,
`phase2_idea.md`). This PR's goal (unblock the backend job) is achieved.
`relyloop-solr-1 exited (1)` runner crash — deferred to Phase 2, now the
standalone idea folder `02_mvp2/infra_solr_smoke_stability/`). This PR's
goal (unblock the backend job) is achieved.
- Stories: 6/6 (Epic 1) complete
- Cross-model: GPT-5.5 phase-gate (5 findings) + Gemini (3) + GPT-5.5 final
(2 fixed, 1 rejected) — all adjudicated, fixes CI-verified.
- Tests: 2095 backend unit + 327 contract + 998 UI vitest pass; heavy-lane
integration runs in the CI backend job.
- **Folder stays in `planned_features/`** until Phase 2 (`phase2_idea.md`,
smoke healthboot) also ships — do NOT move to `implemented_features/` yet.
- **Finalized to `implemented_features/2026_06_01_infra_solr_ci_readiness/`**
on 2026-06-01 — Phase 2 was extracted to its own standalone idea folder
(`02_mvp2/infra_solr_smoke_stability/`), so no `phase*_idea.md` remains here.
- Captured tangential: `chore_demo_reseed_partial_completion_fast_test`.

## Phase 2 (deferred)
- Status: Not started — tracked in `phase2_idea.md` (smoke-job Solr stability).
## Phase 2 (extracted)
- Status: Not started — now tracked as the standalone idea folder
[`infra_solr_smoke_stability`](../../planned_features/02_mvp2/infra_solr_smoke_stability/idea.md)
(smoke-job Solr stability).
Loading
Loading