Repository navigation
Utopia: run 0.1.0-re.7 (token graph reads, scored search, read-back by external_id) - #2789
Conversation
|
Lore is reviewing this PR — f4c41f5c-fd39-49e0-a4ba-fc0e4e45ec0b. Submit a review that requests changes to have Lore push a fix for it. Comment |
🔍 Lore Spec ImpactExamined 1 changed file(s): 0 had graph data (no coupling found), 1 had none — no ingested test run covers them, so this check cannot speak for them. Deterministic · graph @ |
There was a problem hiding this comment.
Lore review — Approved
Clean Utopia image tag and sha256 digest bump to 0.1.0-re.7 in infra/terraform/variables.tf.
Must fix (0) · Consider (0) · Nits (0)
Reviewed by gemini-4-argon
Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.
Posted by floor, visit 51a8724a-ef51-48d9-9a04-0f8ec9e99604.
…its external id (#2791) The first read path from Lore into Utopia, for the side-by-side experiment (#2787): a small client for the two reads the first Utopia context arm needs, against the routes now live in Utopia `0.1.0-re.7` (#2789). ## What changed - `outbound/utopia/utopia-reads.ts`: `utopiaReadsFrom(env)` (null when `UTOPIA_API_URL` or `UTOPIA_TOKEN` is unset) reads a repo's knowledge base as the Lore person. - `search(kbId, q, {topK, offset})` → `POST /kbs/{kb}/search`, scored hits with source and `external_id`. - `documentByExternalId(kbId, sourceId, externalId)` → `GET …/documents/by-external-id`; a 404 is `null`. - The shared requester retries only 429/5xx, so a 422 (`page_too_deep`, `empty_query`) fails at once. - `domain/utopia/read-shapes.ts` (pure, Zod): `parseSearchPage`, `parseStoredDocument`, `parseStatementsChunk` (null for a chunk Utopia cut mid-item), `statementTexts`, and `pushedPathOf`, which turns a pushed id such as `stmt:specs/…/spec.md#0003.2` back into kind, path and statement ordinal. - Fixtures copied from re.7's Rust structs (`ScoredChunk`, `by_external_id`, a pushed statements item). - `utopia-client.ts`: `utopiaRequester` builds the `/api/v1` base and retry for both clients; `UtopiaPushError` becomes `UtopiaError`, since reads throw it too. Nothing calls the client yet; the Utopia arm for the `repo` and `adrs` context sections comes next. `specs/utopia-graph-mirror`: new "Reads" section FR11.1–FR11.3; FR3.3 names `UtopiaError`. ## Tests `read-shapes.test.ts` and `utopia-reads.test.ts` (the HTTP side against a local `node:http` server answering the fixtures): the search page with null ranks kept, `pushedPathOf` for `stmt`/`doc`/unknown ids, statement texts from a pretty-printed chunk and a cut chunk, the stored document, the request shape and PAT, 404 → null, 422 not retried, unset env → null. `tsc` clean in libs/shared; vitest `src/domain/utopia` + `src/outbound/utopia` 51 passed; eslint clean on changed files and `specs adrs`. Generated with [Claude Code](https://claude.com/claude-code)
Bumps Utopia from
re.6to0.1.0-re.7(digestsha256:9fa04033…). It puts the reads Lore's Utopia side needs on the running Utopia, so the trace reader can be built and measured against real data (dual-write experiment, #2787) while upstream reviews them.re.7=re.6+ current upstreamdev(which now has deeplethe/utopia#1261, the cross-base evidence fix, and #1270, members of a class lacking a relation) + our open PRs:external_idkeeps that id's document; content clashes answerduplicate; tombstone-then-push renamesexternal_idand pagesapisourcesexternal_idLeft out on purpose: the list-by-
external_idchange (held until #1280 merges), because it adds a migration whose number upstream has not assigned yet. No new migration inre.7(still 0113).Checked before pushing: on the merged
re-dev(8c477cd),cargo fmt --check,clippy -D warningsandcargo test --workspaceon a freshly migrated database (1612 passed, 6 ignored, 0 failed). The image booted on a fresh database: health 200, migrations at 113, and a bogus token on the new entities route answers 401 (route present, token checked).After merge:
terraform apply -target='kubernetes_deployment_v1.utopia[0]'from main.Generated with Claude Code