Skip to content

Utopia: run 0.1.0-re.7 (token graph reads, scored search, read-back by external_id) - #2789

Merged
gedaiu merged 1 commit into
mainfrom
utopia/run-re7
Oct 16, 2026
Merged

gedaiu merged 1 commit into
mainfrom
utopia/run-re7

Conversation

@gedaiu

@gedaiu gedaiu commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Bumps Utopia from re.6 to 0.1.0-re.7 (digest sha256: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 upstream dev (which now has deeplethe/utopia#1261, the cross-base evidence fix, and #1270, members of a class lacking a relation) + our open PRs:

Left out on purpose: the list-by-external_id change (held until #1280 merges), because it adds a migration whose number upstream has not assigned yet. No new migration in re.7 (still 0113).

Checked before pushing: on the merged re-dev (8c477cd), cargo fmt --check, clippy -D warnings and cargo test --workspace on 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

@lore-agent

lore-agent Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

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 review to re-run the review.

@github-actions

Copy link
Copy Markdown

🔍 Lore Spec Impact

Examined 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 @ 54e00aa (projected 2026-10-07) · 1 file(s) skipped: changed since the graph last saw them, so their line numbers no longer line up · no tests run by this check

@lore-agent lore-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@gedaiu
gedaiu merged commit 8d347e6 into main Oct 16, 2026
27 checks passed
@gedaiu
gedaiu deleted the utopia/run-re7 branch October 16, 2026 18:19
gedaiu added a commit that referenced this pull request Oct 16, 2026
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant