Commit Graph
9 Commits
Author SHA1 Message Date
rock f452f38546 fix: wire memory-agent-oidc secret + ornith:35b in K8s deployment
CI / CI (pull_request) Successful in 11m33s
- LLM_ENDPOINT points to api.riotpiao.com (not in-cluster reasoning-predictor)
- LLM_MODEL=ornith:35b
- Authentik creds from memory-agent-oidc secret (CLIENT_ID, CLIENT_SECRET, ISSUER, TOKEN_URL)
- Removed stale poimen-memory-auth secretRef
- Removed stale poimen-memory-secrets secretRef (MEM_API_KEY still from it)
- command: ["/app/mem"] present
2026-09-10 09:00:43 +09:00
rock 721589d251 feat: LLM-based fact extraction + robust entity parsing
CI / CI (pull_request) Successful in 11m41s
Entity extraction fixes:
- clean_llm_response() strips <think> tags, markdown fences, extracts JSON
- Handle array responses (wrap in {"entities": [...]})
- EntityType custom Deserialize: unknown variants map to Unknown (not crash)
- Increase timeout to 90s for reasoning models
- Increase max_tokens to 1500 for reasoning model overhead

Fact extraction (new):
- LlmFactExtractor: LLM-based relationship extraction between entities
- Validates source/target against known entity list (no hallucinated edges)
- Same clean_llm_response() for reasoning model + Ollama compatibility
- Graceful fallback: returns empty on LLM error (no pipeline crash)
- IngestWorker uses LlmFactExtractor when LLM_ENDPOINT set

K8s deployment:
- Add LLM_ENDPOINT, LLM_API_BASE, LLM_MODEL env vars
- Points to in-cluster reasoning-predictor service

Tested E2E with local Ollama (qwen2.5:3b):
- 12 entities extracted (person, tool, concept, organization)
- 5 edges with meaningful relationships and facts
- 781 tests pass
2026-09-09 17:53:44 +09:00
rock 99803f5ff8 fix: add command to deployment, args replace CMD not append
K8s args without command replaces Dockerfile CMD entirely.
Container tried exec 'serve' as binary instead of '/app/mem serve'.
Add explicit command: ["/app/mem"] so args append correctly.
2026-09-09 17:08:07 +09:00
rock 1e5c3d1433 feat: setup phase 3 agent infrastructure + enable docker ci on prs
CI / CI (push) Successful in 15m5s
- Enable docker build, sha extraction on PRs (validate Dockerfile)
   - Add SOPS encrypted memory-agent credentials
   - Plan 15 tasks: 5 memory service + 10 temporal workflow
   - Milestone: monitoring-agent (due 2025-03-15)
   - Ready: Forgejo API token needed for PR automation
 ```

Co-authored-by: rock <[email protected]>
2026-09-08 23:16:31 +00:00
rock 5fc9101888 fix: extract auth config to ConfigMap + SOPS, update Authentik slug (#40)
CI / CI (push) Successful in 15m28s
## Problem

JWT validation failing with `error decoding response body: expected value at line 6 column 1`.

Root cause: `AUTHENTIK_ISSUER` pointed to slug `poimen-memory` which returns 404 on OIDC discovery. Slug was renamed to `poimen` in Authentik.

Secondary issue: auth env vars were set via `kubectl set env` (not in git), so every ArgoCD sync reverted them.

## Changes

- **k8s/app/config.yaml** — ConfigMap for non-sensitive env (auth mode, rate limits, OpenSearch/Obsidian URLs)
- **k8s/app/auth.enc.yaml** — SOPS-encrypted Secret with `AUTHENTIK_ISSUER`, `AUTHENTIK_AUDIENCE`, `JWT_CACHE_TTL_SECS`
- **k8s/app/secret-generator.yaml** — KSOPS generator for ArgoCD decryption
- **k8s/app/deployment.yaml** — `envFrom` referencing ConfigMap + Secret
- **k8s/app/kustomization.yaml** — Added config.yaml + KSOPS generator
- **k8s/app/opensearch-deployment.yaml** — Updated JWKS/issuer URLs to `poimen` slug

## Rollout

Reloader (`--auto-reload-all=true`) triggers rolling restart when ConfigMap/Secret change. Merge and ArgoCD sync handles everything.Reviewed-on: rock/poimen-memory#40

Co-authored-by: rock <[email protected]>
2026-09-08 05:34:17 +00:00
rock 92458e643c fix: remove unused vault PVC from memory deployment
Memory service stores in pgvector, not local files.
PVC was RWO causing multi-node scheduling failures with 2 replicas.
MEM_HOME points to /tmp (emptyDir) for any scratch needs.
2026-08-30 07:23:18 -07:00
rock 2501a68528 fix: add PodSecurity contexts to all poimen deployments
- runAsNonRoot, runAsUser 1000, seccompProfile RuntimeDefault
- Drop ALL capabilities, no privilege escalation
- readOnlyRootFilesystem on memory (with /tmp emptyDir)
- git-sync init runs as root with only CHOWN+DAC_OVERRIDE caps
- All pods use their service accounts
2026-08-30 07:20:08 -07:00
rock 46d993824f feat: add Obsidian vault projection with Longhorn storage (#13) 2026-08-24 01:58:39 +00:00
Story Crater Bot eaed7fc42a Add K8s app deployment, Dockerfile, and CI workflow (Option A) 2026-08-23 00:01:30 -07:00