Skip to main content

max / makenotwork

Fix patches test: use MtThreadId/ProjectId newtypes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author: Max J. <87768334+MaxJMath@users.noreply.github.com> · 2026-05-01 22:17 UTC
Commit: 698d0e6ee6bc8cc122cbb25605c069ac0b35f091
Parent: 82b8eb7
1 file changed, +6 insertions, -6 deletions
@@ -221,7 +221,7 @@ async fn patch_message_id_insert_and_lookup() {
221 221 .await
222 222 .unwrap();
223 223
224 - let proj_id: uuid::Uuid = sqlx::query_scalar(
224 + let proj_id: makenotwork::db::ProjectId = sqlx::query_scalar(
225 225 "INSERT INTO projects (user_id, slug, title, project_type) VALUES ($1, 'db-proj', 'DB Project', 'software') RETURNING id",
226 226 )
227 227 .bind(project_id)
@@ -229,7 +229,7 @@ async fn patch_message_id_insert_and_lookup() {
229 229 .await
230 230 .unwrap();
231 231
232 - let thread_id = uuid::Uuid::new_v4();
232 + let thread_id = makenotwork::db::MtThreadId::new();
233 233
234 234 // Insert
235 235 makenotwork::db::patches::insert_patch_message_id(
@@ -271,7 +271,7 @@ async fn patch_message_id_lookup_any() {
271 271 .await
272 272 .unwrap();
273 273
274 - let proj_id: uuid::Uuid = sqlx::query_scalar(
274 + let proj_id: makenotwork::db::ProjectId = sqlx::query_scalar(
275 275 "INSERT INTO projects (user_id, slug, title, project_type) VALUES ($1, 'any-proj', 'Any Project', 'software') RETURNING id",
276 276 )
277 277 .bind(user_id)
@@ -279,7 +279,7 @@ async fn patch_message_id_lookup_any() {
279 279 .await
280 280 .unwrap();
281 281
282 - let thread_id = uuid::Uuid::new_v4();
282 + let thread_id = makenotwork::db::MtThreadId::new();
283 283
284 284 // Insert a message ID
285 285 makenotwork::db::patches::insert_patch_message_id(
@@ -330,7 +330,7 @@ async fn patch_message_id_duplicate_is_idempotent() {
330 330 .await
331 331 .unwrap();
332 332
333 - let proj_id: uuid::Uuid = sqlx::query_scalar(
333 + let proj_id: makenotwork::db::ProjectId = sqlx::query_scalar(
334 334 "INSERT INTO projects (user_id, slug, title, project_type) VALUES ($1, 'dupe-proj', 'Dupe Project', 'software') RETURNING id",
335 335 )
336 336 .bind(user_id)
@@ -338,7 +338,7 @@ async fn patch_message_id_duplicate_is_idempotent() {
338 338 .await
339 339 .unwrap();
340 340
341 - let thread_id = uuid::Uuid::new_v4();
341 + let thread_id = makenotwork::db::MtThreadId::new();
342 342
343 343 // Insert twice with same message_id
344 344 makenotwork::db::patches::insert_patch_message_id(