Repository navigation
Run documents route tests against Postgres in CI so they cannot skip silently - #868
Merged
Merged
Conversation
…silently Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <145302500+WaylandYang@users.noreply.github.com>
WaylandYang
force-pushed
the
ci/documents-routes-against-postgres
branch
from
September 23, 2026 06:57
e221787 to
6c68aba
Compare
This was referenced Sep 23, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
crates/utopia-server/src/api/documents_routes_tests.rsgates every test onutopia_store::test_db::url(). Thebackendjob has no Postgres, so there they skip and report green; themigrationsjob (the one with Postgres) only ran theapi::mcp::tests,api::chat::andretrieval::filters. Result: the documents route tests — including the five added by #860 (PAT scoping, purged → 410, ledger-referenced missing blob → 500) — never executed in CI. This is exactly the silent-skip failure mode called out in #248 and in the comments insideci.yml.What
One step added to the
migrationsjob, modelled on the "Chat module against Postgres" step from #845:The workflow-level
permissions: contents: readis untouched; no per-job permissions block added.Verification
Filter matches the module declared via
#[path = "documents_routes_tests.rs"](cargo test -p utopia-server api::documents_routes:: -- --list):Local run against the
docker composePostgres (host port 1517, see #866) withUTOPIA_TEST_REQUIRE_DB=1:Note on the local run: against the shared dev database (
.../utopia)each_upload_keeps_its_own_date_before_processing_and_extractionfailed deterministically with "no rows returned", because autopia-serverdev process was running against the same database and claimed the test's queuedprocess_documentjob before the test's ownUPDATE … RETURNING idcould. The passing run above is against a fresh database in the same container (utopia_ci_check, migrated by the fixture, dropped afterwards). CI has no such worker, so the step is unaffected; it is only a caveat for anyone reproducing locally withcargo runstill up.cargo fmt --all --checkpasses.Follow-ups (not bundled here)
Other
utopia-servertest modules are gated ontest_db::url()the same way and are still not covered by any filter in themigrationsjob, so they also skip silently in CI:api::jobs_routes::tests(api/jobs_routes_tests.rs)api::rule_metadata_tests,api::rule_expression_tests(declared inapi/mod.rs)pipeline::pipeline_testsingest_sources::{source_checkpoint_tests, rss_sync_contract_tests, source_filename_tests}type_alignment::testsextraction::testsquery_engine::postgres::testsAlready covered by the existing filters:
api::chat::chat_empty_reply_testsand its nestedfallback_tests(viaapi::chat::),api::mcp::tests,retrieval::retrieval_tests. A broader fix would be to run the wholeutopia-servercrate in themigrationsjob withUTOPIA_TEST_REQUIRE_DB=1, the wayutopia-storealready is, instead of maintaining a filter list.🤖 Generated with Claude Code