Skip to content

Utopia client: an ontology import waits five minutes, a push 30 seconds - #2798

Merged
gedaiu merged 1 commit into
mainfrom
utopia/import-timeout-and-db-size
Oct 16, 2026
Merged

gedaiu merged 1 commit into
mainfrom
utopia/import-timeout-and-db-size

Conversation

@gedaiu

@gedaiu gedaiu commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

The ontology upgrade to version 4 (#2790) has timed out on every mirrored ingest since re.8 went live: lore-api's log shows [utopia-mirror] re-cinq/lore ontology upgrade: The operation was aborted due to timeout for each attempt, and the lore base still holds only its version-3 relations. An import plans against the whole base, writes every class and relation, and queues alignment. With Utopia's database at its 2-CPU limit, that takes longer than the 30 seconds a push gets.

The client's requester now holds two timeouts: 30 seconds for a push or a read, five minutes for a call marked heavy, which the import is. Both are client options, so the new test runs a 50 ms request timeout against a 200 ms answer: the import waits it out and a push that slow is aborted. Spec FR8.4.

The database itself gets more room in a separate terraform PR.

Related: #2790 (the upgrade that times out), #2795 (re.8).

🤖 Generated with Claude Code

The version-4 upgrade timed out on every mirrored ingest on 2026-10-17: an
import plans against the whole base, writes every class and relation and
queues alignment, and with Utopia's database at its CPU limit that outlasted
the 30 seconds a push gets. The requester now holds both timeouts and an
import marks itself heavy; both are options, so the test runs in
milliseconds.
@lore-agent

lore-agent Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Lore is reviewing this PR — 5b517f12-8962-4592-9bd3-46b8faa1d10b.

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 — advisory

This PR touches 31 statement(s) across 1 spec(s), and 24 of them have validating tests this PR does not change.

Feature Specification: The spec-to-code chain mirrored in Utopia · 31 statement(s)

specs/utopia-graph-mirror/spec.md

The push
✓ this PR also changes the tests that validate it

FR3.1 — An item is posted to POST /api/v1/sources/{source}/statements under the source's own key, as external_id, `…

validated by libs/shared/src/outbound/utopia/utopia-client.test.ts:130

The push
✓ this PR also changes the tests that validate it

FR3.2 — A tombstone is external_id plus deleted: true, answered marked_missing.

validated by libs/shared/src/outbound/utopia/utopia-client.test.ts:130

The push
✓ this PR also changes the tests that validate it

FR3.3 — A 429 or 5xx is retried once after a short wait; a second failure, or any other refusal, throws a `UtopiaPushEr…

validated by libs/shared/src/outbound/utopia/utopia-client.test.ts:130

The ingest
✓ this PR also changes the tests that validate it

FR4.1 — The deployment reaches Utopia through UTOPIA_API_URL (utopia.enabled in the lore-api chart, from `enable_ut…

validated by libs/shared/src/outbound/utopia/utopia-client.test.ts:130

Setup
✓ this PR also changes the tests that validate it

FR5.1 — POST /api/repos/{owner}/{repo}/utopia/setup (admin scope) takes a person's Utopia session token and a workspa…

validated by libs/shared/src/outbound/utopia/utopia-client.test.ts:130, apps/lore-api/src/transport/routes/repos/utopia-setup.test.ts:187

Setup
✓ this PR also changes the tests that validate it

FR5.5 — The setup calls carry any bearer Utopia accepts as a person: a session JWT or a personal access token with `wri…

validated by libs/shared/src/outbound/utopia/utopia-client.test.ts:130

Setup on first ingest
✓ this PR also changes the tests that validate it

FR6.1 — A deployment sets repos up itself when it has UTOPIA_API_URL, UTOPIA_TOKEN (the write token of the Utopia p…

validated by libs/shared/src/outbound/utopia/utopia-client.test.ts:130

The ontology
⚠ the tests that validate it are not touched by this PR

only its test links changed — the statement text itself is unchanged

FR1.1 — The Lore ontology is one turtle file, libs/shared/src/domain/lore-ontology.ttl, read beside the module that n…

validated by libs/shared/src/domain/lore-ontology.test.ts:57

The ontology
⚠ the tests that validate it are not touched by this PR

only its test links changed — the statement text itself is unchanged

FR1.3 — Version 2 declares the text attribute, a string on Section and Statement, and adds Document to the domain of …

validated by libs/shared/src/domain/lore-ontology.test.ts:57

The ontology
⚠ the tests that validate it are not touched by this PR

only its test links changed — the statement text itself is unchanged

FR1.4 — Version 3 declares what a test run says: violated_by from Statement to Test, outcome a string on Test, Test…

validated by libs/shared/src/domain/lore-ontology.test.ts:57

…and 21 more statement(s).

2 changed statement(s) had no validating test, so no coverage broke. 71 new statement(s) have no test link yet.

Deterministic · graph @ 54e00aa (projected 2026-10-07) · 3 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

Cleanly separates the 5-minute ontology import timeout from the 30-second request timeout with full test and spec traceability.

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 8e022b72-b23a-4fb9-a8da-d1db8bbb894d.

@gedaiu
gedaiu merged commit 60dbed4 into main Oct 16, 2026
30 checks passed
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