Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

chore: remove deprecated e2e tests (#4777)

Will Hutchinsonaa5d6fadd5cb
diff --git a/.github/workflows/code_check_cloud_storage.yml b/.github/workflows/code_check_cloud_storage.yml
index eb3731fffa..876164de91 100644
--- a/.github/workflows/code_check_cloud_storage.yml
+++ b/.github/workflows/code_check_cloud_storage.yml
@@ -198,9 +198,7 @@ jobs:
- name: clippy
run: |
cargo clippy --workspace --all-features \
- --exclude sync_service \
- --exclude test_build_full_pdf_modification_data \
- --exclude test_pdf_modification_data_deserialize
+ --exclude sync_service
# sync-service has mutually exclusive storage features, so lint its
# supported default feature set separately. These two existing lints
# predate its inclusion in the root workspace.
diff --git a/.github/workspace-dep-closures.json b/.github/workspace-dep-closures.json
index 9869105ed3..cece19d4a4 100644
--- a/.github/workspace-dep-closures.json
+++ b/.github/workspace-dep-closures.json
@@ -5230,63 +5230,6 @@
"crates/unfurl",
"crates/workspace-hack"
],
- "test_build_full_pdf_modification_data": [
- "crates/agent",
- "crates/ai_toolset",
- "crates/ai_usage",
- "crates/attachment",
- "crates/cowlike",
- "crates/document_sub_type",
- "crates/entity_access_db_utils",
- "crates/integration_tests/test_build_full_pdf_modification_data",
- "crates/macro_db_client",
- "crates/macro_entrypoint",
- "crates/macro_env",
- "crates/macro_env_var",
- "crates/macro_user_id",
- "crates/macro_uuid",
- "crates/model",
- "crates/model-entity",
- "crates/model-error-response",
- "crates/model_file_type",
- "crates/model_user",
- "crates/models_bulk_upload",
- "crates/models_dcs",
- "crates/models_entity_access_management",
- "crates/models_opensearch",
- "crates/models_pagination",
- "crates/models_permissions",
- "crates/models_properties",
- "crates/models_team",
- "crates/non_empty",
- "crates/prompt",
- "crates/system_properties",
- "crates/user_quota",
- "crates/workspace-hack"
- ],
- "test_pdf_modification_data_deserialize": [
- "crates/agent",
- "crates/ai_toolset",
- "crates/ai_usage",
- "crates/attachment",
- "crates/cowlike",
- "crates/document_sub_type",
- "crates/integration_tests/test_pdf_modification_data_deserialize",
- "crates/macro_env_var",
- "crates/macro_user_id",
- "crates/macro_uuid",
- "crates/model",
- "crates/model-entity",
- "crates/model-error-response",
- "crates/model_file_type",
- "crates/model_user",
- "crates/models_bulk_upload",
- "crates/models_pagination",
- "crates/models_permissions",
- "crates/non_empty",
- "crates/prompt",
- "crates/workspace-hack"
- ],
"unfurl": [
"crates/unfurl",
"crates/workspace-hack"
diff --git a/.sqlx/query-00f5c74ee659c3676ea06b0fd5e3ad33905202426458176b9ba7ea8ac99fc3ee.json b/.sqlx/query-00f5c74ee659c3676ea06b0fd5e3ad33905202426458176b9ba7ea8ac99fc3ee.json
deleted file mode 100644
index f6e849768f..0000000000
--- a/.sqlx/query-00f5c74ee659c3676ea06b0fd5e3ad33905202426458176b9ba7ea8ac99fc3ee.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n SELECT COUNT(*)\n FROM \"DocumentInstanceModificationData\" dimd\n WHERE \n dimd.\"modificationData\" -> 'highlights' IS NOT NULL\n AND jsonb_typeof(dimd.\"modificationData\" -> 'highlights') = 'object'\n AND dimd.\"modificationData\" -> 'highlights' != '{}';\n ",
- "describe": {
- "columns": [
- {
- "ordinal": 0,
- "name": "count",
- "type_info": "Int8"
- }
- ],
- "parameters": {
- "Left": []
- },
- "nullable": [
- null
- ]
- },
- "hash": "00f5c74ee659c3676ea06b0fd5e3ad33905202426458176b9ba7ea8ac99fc3ee"
-}
diff --git a/.sqlx/query-8650979421df05be29af8d8b21c16cd01dbdbdbad7cce1333ee8b45d1f55cdfb.json b/.sqlx/query-8650979421df05be29af8d8b21c16cd01dbdbdbad7cce1333ee8b45d1f55cdfb.json
deleted file mode 100644
index 3bf9054a8a..0000000000
--- a/.sqlx/query-8650979421df05be29af8d8b21c16cd01dbdbdbad7cce1333ee8b45d1f55cdfb.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n SELECT COUNT(*)\n FROM \"DocumentInstanceModificationData\",\n jsonb_array_elements(\"modificationData\"->'placeables') AS placeable\n WHERE placeable->>'payloadType' = 'thread';\n ",
- "describe": {
- "columns": [
- {
- "ordinal": 0,
- "name": "count",
- "type_info": "Int8"
- }
- ],
- "parameters": {
- "Left": []
- },
- "nullable": [
- null
- ]
- },
- "hash": "8650979421df05be29af8d8b21c16cd01dbdbdbad7cce1333ee8b45d1f55cdfb"
-}
diff --git a/.sqlx/query-effa102b8b4009d40fb90ed8471199aae934ce6e23a5b8c5dc7d2cd0c4c8577a.json b/.sqlx/query-effa102b8b4009d40fb90ed8471199aae934ce6e23a5b8c5dc7d2cd0c4c8577a.json
deleted file mode 100644
index b699ae57f9..0000000000
--- a/.sqlx/query-effa102b8b4009d40fb90ed8471199aae934ce6e23a5b8c5dc7d2cd0c4c8577a.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n SELECT \"modificationData\" as \"modification_data\"\n FROM \"DocumentInstanceModificationData\"\n ",
- "describe": {
- "columns": [
- {
- "ordinal": 0,
- "name": "modification_data",
- "type_info": "Jsonb"
- }
- ],
- "parameters": {
- "Left": []
- },
- "nullable": [
- false
- ]
- },
- "hash": "effa102b8b4009d40fb90ed8471199aae934ce6e23a5b8c5dc7d2cd0c4c8577a"
-}
diff --git a/Cargo.lock b/Cargo.lock
index 677b2af1e3..6fb638ef1d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -14037,36 +14037,6 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683"
-[[package]]
-name = "test_build_full_pdf_modification_data"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "chrono",
- "macro_db_client",
- "macro_entrypoint",
- "model",
- "serde",
- "serde_json",
- "sqlx",
- "tokio",
- "workspace-hack",
-]
-
-[[package]]
-name = "test_pdf_modification_data_deserialize"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "chrono",
- "model",
- "serde",
- "serde_json",
- "sqlx",
- "tokio",
- "workspace-hack",
-]
-
[[package]]
name = "text-size"
version = "1.1.1"
diff --git a/Cargo.toml b/Cargo.toml
index a31e7ec113..bf51d4ed65 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,8 +23,6 @@ members = [
"crates/graphql_properties",
"crates/graphql_soup",
"crates/integration_tests/local_e2e",
- "crates/integration_tests/test_build_full_pdf_modification_data",
- "crates/integration_tests/test_pdf_modification_data_deserialize",
"crates/loops_client",
"crates/macro_authorization",
"crates/macro_config",
@@ -39,45 +37,45 @@ members = [
"crates/task_dedup",
"crates/unfurl",
"crates/workspace-hack",
+ "services/ai_projections_refresh_handler",
"services/authentication_service",
+ "services/call_recording_preview_handler",
"services/connection_gateway",
"services/contacts_service",
"services/convert_service",
- "services/document_cognition_service",
- "services/document_cognition_service/load-test",
- "services/document_storage_service",
- "services/email_service",
- "services/image_proxy_service",
- "services/ai_projections_refresh_handler",
- "services/call_recording_preview_handler",
"services/dataloss_prevention_handler",
"services/delete_chat_handler",
"services/deleted_item_poller",
+ "services/document_cognition_service",
+ "services/document_cognition_service/load-test",
+ "services/document_storage_service",
"services/document_text_extractor",
"services/document_upload_finalizer_handler",
"services/docx_unzip_handler",
"services/email_refresh_handler",
"services/email_scheduled_handler",
+ "services/email_service",
"services/email_sfs_delete_handler",
"services/email_suppression_handler",
"services/image_optimizer",
- "services/organization_retention_handler",
- "services/organization_retention_trigger",
- "services/search_upload_handler",
- "services/sha_cleanup_worker",
- "services/upload_extractor_lambda_handler",
- "services/upload_extractor_lambda_trigger",
- "services/user_link_cleanup_handler",
- "services/worker_trigger",
+ "services/image_proxy_service",
"services/mcp_auth_proxy",
"services/mcp_service",
"services/notification_service",
+ "services/organization_retention_handler",
+ "services/organization_retention_trigger",
"services/scheduled_action",
"services/search_processing_service",
+ "services/search_upload_handler",
+ "services/sha_cleanup_worker",
"services/static_file_service",
"services/sync-service",
"services/sync-service/bebop-schema",
"services/unfurl_service",
+ "services/upload_extractor_lambda_handler",
+ "services/upload_extractor_lambda_trigger",
+ "services/user_link_cleanup_handler",
+ "services/worker_trigger",
"tooling/native_app_server",
"tooling/notification_sandbox",
"tooling/seed_cli",
diff --git a/crates/integration_tests/test_build_full_pdf_modification_data/Cargo.toml b/crates/integration_tests/test_build_full_pdf_modification_data/Cargo.toml
deleted file mode 100644
index 89a3c03b93..0000000000
--- a/crates/integration_tests/test_build_full_pdf_modification_data/Cargo.toml
+++ /dev/null
@@ -1,20 +0,0 @@
-[package]
-edition = "2024"
-name = "test_build_full_pdf_modification_data"
-publish = false
-version = "0.1.0"
-
-[[bin]]
-name = "main"
-
-[dependencies]
-anyhow = { workspace = true }
-chrono = { workspace = true }
-macro_db_client = { path = "../../macro_db_client" }
-macro_entrypoint = { path = "../../macro_entrypoint" }
-model = { path = "../../model" }
-serde = { workspace = true }
-serde_json = { workspace = true }
-sqlx = { workspace = true }
-tokio = { workspace = true }
-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
diff --git a/crates/integration_tests/test_build_full_pdf_modification_data/README.md b/crates/integration_tests/test_build_full_pdf_modification_data/README.md
deleted file mode 100644
index 6a0095ef1c..0000000000
--- a/crates/integration_tests/test_build_full_pdf_modification_data/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Running the tests
-
-DATABASE_URL=$MACRODB_DEV_URL cargo run --bin main
diff --git a/crates/integration_tests/test_build_full_pdf_modification_data/src/bin/main.rs b/crates/integration_tests/test_build_full_pdf_modification_data/src/bin/main.rs
deleted file mode 100644
index cf6816f143..0000000000
--- a/crates/integration_tests/test_build_full_pdf_modification_data/src/bin/main.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-use macro_db_client::document::build_pdf_modification_data::get_complete_pdf_modification_data;
-use macro_db_client::document::build_pdf_modification_data::get_pdf_modification_data_for_document;
-use macro_entrypoint::MacroEntrypoint;
-use sqlx::postgres::PgPoolOptions;
-
-#[tokio::main]
-async fn main() {
- MacroEntrypoint::default().init();
- let database_url = std::env::var("DATABASE_URL").expect("DATABASE_URL must be set");
-
- // Connect to database
- let pool = PgPoolOptions::new()
- .max_connections(5)
- .connect(&database_url)
- .await
- .expect("Failed to connect to the database");
-
- let document_id = "ad329053-741f-4558-a8af-207b8780587b";
-
- let initial_modification_data =
- get_pdf_modification_data_for_document(&pool, document_id).await;
- let initial_modification_data = initial_modification_data.unwrap();
-
- let full_modification_data =
- get_complete_pdf_modification_data(&pool, document_id, Some(initial_modification_data))
- .await;
-
- println!(
- "{}",
- serde_json::to_string(&full_modification_data.unwrap()).unwrap()
- );
-}
diff --git a/crates/integration_tests/test_pdf_modification_data_deserialize/Cargo.toml b/crates/integration_tests/test_pdf_modification_data_deserialize/Cargo.toml
deleted file mode 100644
index bbfbc06aaf..0000000000
--- a/crates/integration_tests/test_pdf_modification_data_deserialize/Cargo.toml
+++ /dev/null
@@ -1,21 +0,0 @@
-[package]
-edition = "2024"
-name = "test_pdf_modification_data_deserialize"
-publish = false
-version = "0.1.0"
-
-[[bin]]
-name = "test_placeable_thread_deserialization"
-
-[[bin]]
-name = "test_highlight_deserialization"
-
-[dependencies]
-anyhow = { workspace = true }
-chrono = { workspace = true }
-model = { path = "../../model" }
-serde = { workspace = true }
-serde_json = { workspace = true }
-sqlx = { workspace = true }
-tokio = { workspace = true }
-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
diff --git a/crates/integration_tests/test_pdf_modification_data_deserialize/README.md b/crates/integration_tests/test_pdf_modification_data_deserialize/README.md
deleted file mode 100644
index 1da116961f..0000000000
--- a/crates/integration_tests/test_pdf_modification_data_deserialize/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-# Running the tests
-
-DATABASE_URL=$MACRODB_DEV_URL cargo run --bin test_placeable_thread_deserialization
-DATABASE_URL=$MACRODB_DEV_URL cargo run --bin test_highlight_deserialization
diff --git a/crates/integration_tests/test_pdf_modification_data_deserialize/src/bin/test_highlight_deserialization.rs b/crates/integration_tests/test_pdf_modification_data_deserialize/src/bin/test_highlight_deserialization.rs
deleted file mode 100644
index 7267922735..0000000000
--- a/crates/integration_tests/test_pdf_modification_data_deserialize/src/bin/test_highlight_deserialization.rs
+++ /dev/null
@@ -1,76 +0,0 @@
-use model::document::modification_data::PdfModificationData;
-use sqlx::Pool;
-use sqlx::Postgres;
-use sqlx::postgres::PgPoolOptions;
-
-async fn test_highlight_deserialization(pool: &Pool<Postgres>) {
- let modification_data_rows: Vec<Result<PdfModificationData, anyhow::Error>> = sqlx::query!(
- r#"
- SELECT "modificationData" as "modification_data"
- FROM "DocumentInstanceModificationData"
- "#
- )
- .map(|row| {
- let modification_data = row.modification_data;
- serde_json::from_value(modification_data.clone()).map_err(|e| {
- anyhow::anyhow!(
- "Failed to deserialize modification data {:?} with data: {:?}",
- e,
- modification_data
- )
- })
- })
- .fetch_all(pool)
- .await
- .expect("Failed to fetch data from database");
-
- let expected_highlight_map_count = sqlx::query_scalar!(
- r#"
- SELECT COUNT(*)
- FROM "DocumentInstanceModificationData" dimd
- WHERE
- dimd."modificationData" -> 'highlights' IS NOT NULL
- AND jsonb_typeof(dimd."modificationData" -> 'highlights') = 'object'
- AND dimd."modificationData" -> 'highlights' != '{}';
- "#
- )
- .fetch_one(pool)
- .await
- .expect("Failed to fetch data from database")
- .unwrap_or_else(|| panic!("Failed to fetch data from database"));
-
- let mut highlight_map_count = 0;
- for row in modification_data_rows {
- match &row {
- Ok(pdf_modification_data) => {
- let highlight_map = pdf_modification_data.clone().highlights;
- if let Some(map) = highlight_map
- && map.into_keys().count() > 0
- {
- highlight_map_count += 1;
- }
- }
- Err(e) => {
- panic!("{:?}", e);
- }
- }
- }
-
- println!("Expected {} highlight maps", expected_highlight_map_count);
- println!("Deserialized {} highlight maps", highlight_map_count);
- assert_eq!(highlight_map_count, expected_highlight_map_count);
-}
-
-#[tokio::main]
-async fn main() {
- let database_url = std::env::var("DATABASE_URL").expect("DATABASE_URL must be set");
-
- // Connect to database
- let pool = PgPoolOptions::new()
- .max_connections(5)
- .connect(&database_url)
- .await
- .expect("Failed to connect to the database");
-
- test_highlight_deserialization(&pool).await;
-}
diff --git a/crates/integration_tests/test_pdf_modification_data_deserialize/src/bin/test_placeable_thread_deserialization.rs b/crates/integration_tests/test_pdf_modification_data_deserialize/src/bin/test_placeable_thread_deserialization.rs
deleted file mode 100644
index 85d3cb103d..0000000000
--- a/crates/integration_tests/test_pdf_modification_data_deserialize/src/bin/test_placeable_thread_deserialization.rs
+++ /dev/null
@@ -1,76 +0,0 @@
-use model::document::modification_data::Payload;
-use model::document::modification_data::PdfModificationData;
-use sqlx::Pool;
-use sqlx::Postgres;
-use sqlx::postgres::PgPoolOptions;
-
-async fn test_placeable_thread_deserialization(pool: &Pool<Postgres>) {
- let modification_data_rows: Vec<Result<PdfModificationData, anyhow::Error>> = sqlx::query!(
- r#"
- SELECT "modificationData" as "modification_data"
- FROM "DocumentInstanceModificationData"
- "#
- )
- .map(|row| {
- let modification_data = row.modification_data;
- serde_json::from_value(modification_data.clone()).map_err(|e| {
- anyhow::anyhow!(
- "Failed to deserialize modification data {:?} with data: {:?}",
- e,
- modification_data
- )
- })
- })
- .fetch_all(pool)
- .await
- .expect("Failed to fetch data from database");
-
- let expected_thread_count = sqlx::query_scalar!(
- r#"
- SELECT COUNT(*)
- FROM "DocumentInstanceModificationData",
- jsonb_array_elements("modificationData"->'placeables') AS placeable
- WHERE placeable->>'payloadType' = 'thread';
- "#
- )
- .fetch_one(pool)
- .await
- .expect("Failed to fetch data from database")
- .unwrap_or_else(|| panic!("Failed to fetch data from database"));
-
- let mut thread_count = 0;
- for row in modification_data_rows {
- match &row {
- Ok(pdf_modification_data) => {
- let placeables = pdf_modification_data.clone().placeables;
- for placeable in placeables {
- if let Payload::Thread(ref _thread) = placeable.payload {
- // println!("Thread placeable: {:?}", placeable);
- thread_count += 1;
- }
- }
- }
- Err(e) => {
- panic!("{:?}", e);
- }
- }
- }
-
- println!("Expected {} threads", expected_thread_count);
- println!("Deserialized {} threads", thread_count);
- assert_eq!(thread_count, expected_thread_count);
-}
-
-#[tokio::main]
-async fn main() {
- let database_url = std::env::var("DATABASE_URL").expect("DATABASE_URL must be set");
-
- // Connect to database
- let pool = PgPoolOptions::new()
- .max_connections(5)
- .connect(&database_url)
- .await
- .expect("Failed to connect to the database");
-
- test_placeable_thread_deserialization(&pool).await;
-}
diff --git a/nix/cloud-storage.nix b/nix/cloud-storage.nix
index 0602d275de..bace6ac1c5 100644
--- a/nix/cloud-storage.nix
+++ b/nix/cloud-storage.nix
@@ -221,8 +221,7 @@
cloudStorageCargoToml = builtins.fromTOML (builtins.readFile ../Cargo.toml);
cloudStorageWorkspaceMembers =
- cloudStorageCargoToml.workspace.members
- or (throw "Cargo.toml is missing workspace.members");
+ cloudStorageCargoToml.workspace.members or (throw "Cargo.toml is missing workspace.members");
dopplerConfigBinNames =
let
@@ -736,7 +735,7 @@
commonArgs
// {
cargoArtifacts = workspaceArtifacts;
- cargoClippyExtraArgs = "--workspace --all-features --exclude sync_service --exclude test_build_full_pdf_modification_data --exclude test_pdf_modification_data_deserialize -- -D warnings";
+ cargoClippyExtraArgs = "--workspace --all-features --exclude sync_service -- -D warnings";
RUSTDOCFLAGS = "-Dwarnings";
}
);
diff --git a/tooling/just/check.just b/tooling/just/check.just
index caebfc3366..56acae46be 100644
--- a/tooling/just/check.just
+++ b/tooling/just/check.just
@@ -12,61 +12,59 @@
# where no origin/main merge-base exists and the scope silently narrows to
# uncommitted work only).
check *ARGS:
- #!/usr/bin/env bash
- set -uo pipefail
- cd {{ justfile_directory() }}/../..
+ #!/usr/bin/env bash
+ set -uo pipefail
+ cd {{ justfile_directory() }}/../..
- base="${CHECK_BASE:-$(git merge-base HEAD origin/main 2>/dev/null || true)}"
- if [ -z "$base" ]; then
- echo "note: no merge-base with origin/main (shallow clone?); checking uncommitted changes only."
- echo " Set CHECK_BASE=<ref> to widen."
- fi
- changed=$({ [ -n "$base" ] && git diff --name-only "$base"; \
- git diff --name-only HEAD; \
- git ls-files --others --exclude-standard; } | sort -u \
- | while IFS= read -r f; do [ -f "$f" ] && printf '%s\n' "$f"; done)
- if [ -z "$changed" ]; then echo "no changed files — nothing to check"; exit 0; fi
+ base="${CHECK_BASE:-$(git merge-base HEAD origin/main 2>/dev/null || true)}"
+ if [ -z "$base" ]; then
+ echo "note: no merge-base with origin/main (shallow clone?); checking uncommitted changes only."
+ echo " Set CHECK_BASE=<ref> to widen."
+ fi
+ changed=$({ [ -n "$base" ] && git diff --name-only "$base"; \
+ git diff --name-only HEAD; \
+ git ls-files --others --exclude-standard; } | sort -u \
+ | while IFS= read -r f; do [ -f "$f" ] && printf '%s\n' "$f"; done)
+ if [ -z "$changed" ]; then echo "no changed files — nothing to check"; exit 0; fi
- rs=$(grep -E '^(crates|services|tooling)/.*\.rs$' <<<"$changed" || true)
- js=$(grep -E '^(apps/web|packages|services/(analytics-proxy|ai-editing-worker|lexical-service|websocket-service))/.*\.(ts|tsx)$' <<<"$changed" || true)
- sg=$(grep -E '^(apps|crates|packages|services|tooling)/.*\.(rs|ts|tsx)$' <<<"$changed" || true)
+ rs=$(grep -E '^(crates|services|tooling)/.*\.rs$' <<<"$changed" || true)
+ js=$(grep -E '^(apps/web|packages|services/(analytics-proxy|ai-editing-worker|lexical-service|websocket-service))/.*\.(ts|tsx)$' <<<"$changed" || true)
+ sg=$(grep -E '^(apps|crates|packages|services|tooling)/.*\.(rs|ts|tsx)$' <<<"$changed" || true)
- fail=0
- if [ -n "$rs" ]; then
- echo "── cargo fmt (root workspace)"
- cargo fmt --check \
- || { echo " fix: cargo fmt"; fail=1; }
- fi
- if [ -n "$js" ]; then
- echo "── biome (apps/web format + lint, same flags as CI)"
- (cd apps/web && bunx --bun @biomejs/biome ci --colors=off --no-errors-on-unmatched \
- --error-on-warnings $(sed 's|^apps/web/||' <<<"$js")) \
- || { echo " fix: bun run fix, then re-check"; fail=1; }
- echo "── oxlint (warn-only; docs/STYLE_GUIDE.md FE-12)"
- (cd apps/web && bunx --yes [email protected] $(sed 's|^apps/web/||' <<<"$js")) || fail=1
- fi
- if [ -n "$sg" ]; then
- echo "── ast-grep code rules (rule ids map to docs/STYLE_GUIDE.md)"
- bunx --yes @ast-grep/[email protected] scan --report-style=short $sg || fail=1
- fi
- if [ "{{ ARGS }}" = "full" ]; then
+ fail=0
+ if [ -n "$rs" ]; then
+ echo "── cargo fmt (root workspace)"
+ cargo fmt --check \
+ || { echo " fix: cargo fmt"; fail=1; }
+ fi
if [ -n "$js" ]; then
- echo "── tsc (apps/web)"
- bun run check || fail=1
+ echo "── biome (apps/web format + lint, same flags as CI)"
+ (cd apps/web && bunx --bun @biomejs/biome ci --colors=off --no-errors-on-unmatched \
+ --error-on-warnings $(sed 's|^apps/web/||' <<<"$js")) \
+ || { echo " fix: bun run fix, then re-check"; fail=1; }
+ echo "── oxlint (warn-only; docs/STYLE_GUIDE.md FE-12)"
+ (cd apps/web && bunx --yes [email protected] $(sed 's|^apps/web/||' <<<"$js")) || fail=1
fi
- if [ -n "$rs" ]; then
- echo "── clippy (root workspace)"
- (RUSTFLAGS="-Dwarnings -Dclippy::disallowed_methods" \
- RUSTDOCFLAGS=-Dwarnings SQLX_OFFLINE=true cargo clippy --workspace --all-features \
- --exclude sync_service \
- --exclude test_build_full_pdf_modification_data \
- --exclude test_pdf_modification_data_deserialize && \
- RUSTFLAGS="-Dwarnings -Dclippy::disallowed_methods" \
- RUSTDOCFLAGS=-Dwarnings SQLX_OFFLINE=true cargo clippy -p sync_service -- \
- -A clippy::unnecessary_map_or -A clippy::collapsible_if) || fail=1
+ if [ -n "$sg" ]; then
+ echo "── ast-grep code rules (rule ids map to docs/STYLE_GUIDE.md)"
+ bunx --yes @ast-grep/[email protected] scan --report-style=short $sg || fail=1
+ fi
+ if [ "{{ ARGS }}" = "full" ]; then
+ if [ -n "$js" ]; then
+ echo "── tsc (apps/web)"
+ bun run check || fail=1
+ fi
+ if [ -n "$rs" ]; then
+ echo "── clippy (root workspace)"
+ (RUSTFLAGS="-Dwarnings -Dclippy::disallowed_methods" \
+ RUSTDOCFLAGS=-Dwarnings SQLX_OFFLINE=true cargo clippy --workspace --all-features \
+ --exclude sync_service && \
+ RUSTFLAGS="-Dwarnings -Dclippy::disallowed_methods" \
+ RUSTDOCFLAGS=-Dwarnings SQLX_OFFLINE=true cargo clippy -p sync_service -- \
+ -A clippy::unnecessary_map_or -A clippy::collapsible_if) || fail=1
+ fi
fi
- fi
- echo
- if [ "$fail" -ne 0 ]; then echo "FAIL"; exit 1; fi
- echo "OK"
+ echo
+ if [ "$fail" -ne 0 ]; then echo "FAIL"; exit 1; fi
+ echo "OK"
diff --git a/tooling/just/rust.just b/tooling/just/rust.just
index b6e99f0996..eeb1932afe 100644
--- a/tooling/just/rust.just
+++ b/tooling/just/rust.just
@@ -3,11 +3,11 @@ import './database.just'
mod sqlx './sqlx.just'
rust-check:
- RUSTFLAGS=-Dwarnings RUSTDOCFLAGS=-Dwarnings CARGO_TERM_COLOR=always SQLX_OFFLINE=true cargo check --workspace --all-features --exclude test_build_full_pdf_modification_data --exclude test_pdf_modification_data_deserialize --exclude sync_service
+ RUSTFLAGS=-Dwarnings RUSTDOCFLAGS=-Dwarnings CARGO_TERM_COLOR=always SQLX_OFFLINE=true cargo check --workspace --all-features --exclude sync_service
RUSTFLAGS="-Dwarnings -Dclippy::disallowed_methods" RUSTDOCFLAGS=-Dwarnings CARGO_TERM_COLOR=always SQLX_OFFLINE=true cargo check -p sync_service
clippy:
- RUSTFLAGS="-Dwarnings -Dclippy::disallowed_methods" RUSTDOCFLAGS=-Dwarnings CARGO_TERM_COLOR=always SQLX_OFFLINE=true cargo clippy --workspace --all-features --exclude sync_service --exclude test_build_full_pdf_modification_data --exclude test_pdf_modification_data_deserialize
+ RUSTFLAGS="-Dwarnings -Dclippy::disallowed_methods" RUSTDOCFLAGS=-Dwarnings CARGO_TERM_COLOR=always SQLX_OFFLINE=true cargo clippy --workspace --all-features --exclude sync_service
RUSTFLAGS="-Dwarnings -Dclippy::disallowed_methods" RUSTDOCFLAGS=-Dwarnings CARGO_TERM_COLOR=always SQLX_OFFLINE=true cargo clippy -p sync_service -- -A clippy::unnecessary_map_or -A clippy::collapsible_if
# This can be used in any crate that uses macrodb under the hood
@@ -67,7 +67,6 @@ build_lambdas compiler="":
setup_test_envs:
echo "DATABASE_URL={{ DATABASE_URL }}" >> ./crates/contacts/.env
echo "DATABASE_URL={{ DATABASE_URL }}" >> ./services/delete_chat_handler/.env
- echo "DATABASE_URL={{ DATABASE_URL }}" >> ./crates/integration_tests/test_pdf_modification_data_deserialize/.env
echo "DATABASE_URL={{ DATABASE_URL }}" >> ./services/email_sfs_delete_handler/.env
echo "DATABASE_URL={{ DATABASE_URL }}" >> ./services/scheduled_action/.env
echo "DATABASE_URL={{ DATABASE_URL }}" >> ./crates/notification_db_client/.env
diff --git a/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs b/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs
index 9b7d367b46..6d13cc5799 100644
--- a/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs
+++ b/tooling/xtask/crates/xtask_workflows/src/workflows/code_check_cloud_storage.rs
@@ -211,9 +211,7 @@ fn cargo_fmt() -> Step<Run> {
fn cargo_clippy() -> Step<Run> {
Step::new("clippy").run(indoc::indoc! {r#"
cargo clippy --workspace --all-features \
- --exclude sync_service \
- --exclude test_build_full_pdf_modification_data \
- --exclude test_pdf_modification_data_deserialize
+ --exclude sync_service
# sync-service has mutually exclusive storage features, so lint its
# supported default feature set separately. These two existing lints
# predate its inclusion in the root workspace.