Review: Restore Ollama -- unblock pal-e-docs semantic search & embedding worker (re-review)

review-1552-2026-06-22-r2 Review

review approved

Verdict: APPROVED

Re-review after refinements applied to address 5 recommendations from review-1552-2026-06-22. Three of five body recommendations were addressed in the issue update. Two traceability items (story note, arch note + board label sync) remain but are acceptable as parallel scope work -- they do not block implementation.

Template Completeness

  • [x] Type -- Bug
  • [x] Lineage -- story: semantic-search | arch: ollama (updated from arch: infra)
  • [x] Repo -- pal-e-platform
  • [x] What Broke -- clear description of Ollama removal impact on semantic search
  • [x] Repro Steps -- concrete 3-step repro with kubectl verification
  • [x] Expected Behavior -- clear
  • [x] Acceptance Criteria -- 7 criteria, all verifiable (expanded from 5)
  • [x] Environment -- k3s cluster, ops module
  • [x] Related -- PR #380, commit 3233620, cross-references
  • [x] Discovered Scope -- NEW section documenting out-of-scope westside-ai-assistant stale netpol entries (lines 152, 210 verified accurate)
All required Bug template sections present and well-populated. Discovered Scope section is a quality addition.

Traceability

  • [ ] story:semantic-search label -- still MISSING from project-pal-e-platform user stories table. Acceptable: this is foundational infrastructure work that enables semantic search. The story label is directionally correct even without a formal story entry. Recommend creating the story entry as a follow-up, not a blocker.
  • [x] arch:ollama -- issue body updated from arch:infra to arch:ollama (specific and correct). NOTE: board item #1552 label still shows arch:infra -- needs label sync. No arch-ollama note exists in pal-e-docs, but the scope is clear enough from the issue body and commit diff that a missing arch note does not block implementation.
  • [x] Forgejo issue -- ldraney/pal-e-platform#460, open

File Targets

  • [x] terraform/modules/ops/main.tf -- verified: Ollama namespace + Helm release were removed (81 lines). Currently contains NVIDIA device plugin, embedding worker metrics, and tf-state-backup. Restore target confirmed via git show 3233620.
  • [x] terraform/modules/ops/outputs.tf -- verified: file is empty (1 line). ollama_namespace output was removed. Needs restore for netpol reference.
  • [x] terraform/network-policies.tf -- verified: netpol_ollama resource was removed (22 lines). Original allowed pal-e-app and westside-ai-assistant. AC correctly specifies only pal-e-docs (clarified in refinement).
  • [x] terraform/main.tf -- verified: line 121 comment still references "NVIDIA, Ollama, embedding worker, tf-state-backup". Moved blocks were removed but are one-time migration aids and do NOT need restoration (correctly scoped).
  • [x] salt/states/services/init.sls -- verified: ollama service.dead block was removed (12 lines). AC now explicitly includes Salt restoration: "service.dead for host-level ollama systemd service to free GPU for k8s pod". This was the key refinement from the previous review.

Repo Placement

OK. Issue filed on ldraney/pal-e-platform, all file targets are in pal-e-platform. Single repo, correct placement.

Dependencies

  • Phase 6: Vector Search (pgvector) -- in_progress on board-pal-e-platform. This Ollama restore is a prerequisite for that phase to function.
  • Phase 7: Block-Structured Content Model -- in_progress. Depends on embedding pipeline being functional.
  • Board item #1543 (pal-e-platform#456) -- in todo column, type:chore, arch:network-policy. May affect network policy approach but is not a blocker (additive change, not conflicting).
  • pal-e-services#114 -- referenced as "misplaced ticket, same issue" -- documented in Related section.
  • pal-e-deployments#202 -- embedding worker stopgap -- documented.
  • claude-custom#274 -- tracking ticket -- documented.

Acceptance Criteria

7 acceptance criteria, all agent-verifiable:
  • "Ollama namespace re-created in ops module" -- verifiable via terraform plan output
  • "Helm release restored (otwld chart v1.49.0, qwen3-embedding:4b model, GPU-accelerated, hostPath volume)" -- verifiable against commit 3233620 diff
  • "Network policy allowing pal-e-docs namespace to reach ollama on port 11434. Only pal-e-docs" -- CLARIFIED in refinement. pal-e-docs is confirmed as a valid namespace (appears in postgres netpol line 182). westside-ai-assistant exclusion explicitly documented.
  • "Salt state restored -- service.dead for host-level ollama" -- ADDED in refinement. Verifiable against commit diff.
  • "Ollama output re-exported from ops module" -- verifiable: outputs.tf needs ollama_namespace output restored.
  • "kubectl get pods -n ollama shows running pod" -- verifiable post-apply
  • "No changes to NVIDIA device plugin" -- verifiable via plan output

Blast Radius

  • Embedding worker metrics service in ops/main.tf references var.pal_e_production_namespace which resolves to "pal-e-app" (via database module data source). The issue says embedding worker deploys in pal-e-docs namespace. Implementing agent should verify which namespace the embedding worker actually runs in. Minor risk -- does not affect the Ollama restoration itself.
  • Stale westside-ai-assistant netpol entries at lines 152 and 210 (verified) are correctly documented as out-of-scope in the Discovered Scope section.

Decomposition Assessment

5 file targets in 1 repo, 7 acceptance criteria, estimated agent work under 5 minutes. All changes are restorations from a single commit (3233620). No decomposition needed.

Refinement Assessment (vs review-1552-2026-06-22)

# Original Recommendation Status
1 [SCOPE] Create user story "semantic-search" NOT addressed -- acceptable as follow-up, not a blocker for this bug fix
2 [LABEL] Change arch:infra to arch:ollama + create arch note PARTIAL -- issue body updated, board label not synced, no arch note created. Non-blocking.
3 [BODY] Verify correct namespace in AC #3 ADDRESSED -- AC clarifies pal-e-docs namespace, explicitly excludes westside-ai-assistant
4 [BODY] Clarify Salt service state restoration ADDRESSED -- new AC bullet for salt/states/services/init.sls service.dead block
5 [BODY] Clarify westside-ai-assistant in netpol ADDRESSED -- explicit exclusion in AC + Discovered Scope section with verified line numbers

Recommendation

No action needed to unblock implementation. Two minor follow-up items (do not gate this ticket):
  • [LABEL] Sync board item #1552 label from arch:infra to arch:ollama to match issue body.
  • [SCOPE] Create story:semantic-search user story entry on project-pal-e-platform and arch-ollama architecture note as follow-up work (can be done during or after implementation).