Skip to content

A human phrase decision materializes ahead of queued model work - #1358

Merged
WaylandYang merged 5 commits into
deeplethe:devfrom
Aschenbath:feat/materialize-intake-1351
Oct 29, 2026
Merged

WaylandYang merged 5 commits into
deeplethe:devfrom
Aschenbath:feat/materialize-intake-1351

Conversation

@Aschenbath

Copy link
Copy Markdown
Contributor

Why

A person’s phrase decision queues materialize_typed, but that store-only job currently waits behind extraction and cannot use the two worker slots reserved for intake.

Closes #1351.

What changes

How it was checked

On Linux x86_64 with Rust 1.99.1 and PostgreSQL 16.15, for commit 0f90734:

  • cargo fmt --all --check
  • cargo clippy --locked --workspace --all-targets -- -D warnings
  • cargo test --locked --workspace: 1,653 passed, 0 failed, 6 existing ignored tests, with UTOPIA_DATABASE_URL, UTOPIA_TEST_REQUIRE_DB=1, UTOPIA_TEST_REQUIRE_PDFTOTEXT=1 and RUST_TEST_THREADS=1 set against a freshly migrated UTF-8 database.
  • Verified the upgrade regression’s index scan separately: removing REINDEX returned no eligible queued materialization; the complete migration returned materialize_typed.

Before review

  • Every commit is signed off.
  • Formatting, strict workspace clippy and workspace tests pass.
  • Database-backed SQL tests ran with a database and the required-database guard enabled.
  • The migration uses the next free number and the CLI schema version equals the 105 migration files.

Signed-off-by: Aschenbath <Aschenbath@users.noreply.github.com>

@WaylandYang WaylandYang 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.

The change itself is right: CREATE OR REPLACE on the immutable function leaves stale index keys, REINDEX INDEX rebuilds them and is safe inside the migration transaction, and the handler makes no model call. Two things:

  • Migration number: 0118 is also claimed by #1334, which is older and about to land. Renumber this to 0119 and update the two include_str! paths in jobs_claim_tests.rs (lines ~44 and ~66) that name the file; the CLI schema count follows whatever the file count is at merge time.
  • Commit message: one English sentence, no fix: prefix, and the same sentence as the PR title. The test file tests/a_sync_runs_while_model_work_holds_every_slot.rs now holds intake_runs_while_…; rename the file to match.

Aschenbath and others added 2 commits October 29, 2026 14:29
…ake-1351

Signed-off-by: Aschenbath <Aschenbath@users.noreply.github.com>

# Conflicts:
#	crates/utopia-cli/src/main.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Aschenbath <Aschenbath@users.noreply.github.com>
@Aschenbath

Copy link
Copy Markdown
Contributor Author

Thanks. Updated onto current dev (80c898a). Since this review, dev landed 0118 through 0120, #1428/#1450 claim 0121 and #1409 now uses 0122, so this migration is 0123_human_phrase_materialization_is_intake.sql. Its include_str! in jobs_claim_tests.rs follows the new name; the other one there is 0116, the starting state, and is unchanged. CURRENT_SCHEMA_VERSION is 108, matching the file count on this branch. I checked that no migration after 0116 on dev redefines job_priority, so the CREATE OR REPLACE still starts from 0116's version. d08b5ab renames the test file to intake_runs_while_model_work_holds_every_slot.rs and updates its line in tests/store/main.rs. On the commit message: I didn't rewrite the commit that was already pushed. Later commits use one sentence, and with several commits on the branch the squash defaults to the PR title, which is the sentence you asked for.

WaylandYang
WaylandYang previously approved these changes Oct 29, 2026

@WaylandYang WaylandYang 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.

Thanks, the renumbering and the test file name are right. #1409 landed first with schema version 108, so I've pushed the bump to 109 here. Merging.

WaylandYang and others added 2 commits October 29, 2026 19:21
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: WaylandYang <>
@WaylandYang
WaylandYang merged commit 266456a into deeplethe:dev Oct 29, 2026
6 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.

2 participants