From 3f2f53c6cb726e38afcd7e030021700e4b2046ae Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Fri, 4 Dec 2026 19:22:41 +1300 Subject: [PATCH 1/3] AGENTS.md: serde_json arbitrary_precision with untagged/flatten, and app context in tokio::spawn tasks --- AGENTS.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 466d8219..fae5039f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -86,3 +86,10 @@ design is in `docs/design.md`; read it before changing the architecture, and upd returns 404 for `/api/v1/*` on purpose. - Renderers handle untrusted input: they run only on the render node, under gVisor, with no network and no service-account token. +- serde_json's `arbitrary_precision` feature is on in app/'s build, so a number inside `#[serde(untagged)]` or + `#[serde(flatten)]` fails to deserialize (it arrives as a map, not a number). Read such bodies through + `serde_json::Value` (`domain::lenient`). Tests that build the struct directly won't catch it (4 Dec 2026, visualci.yml + thresholds and update_project floats). +- Code in a bare `tokio::spawn` task has no app context: `laravel::now()`, the database and the cache panic there. Use + `laravel::task::spawn` or `context.scope`, and `spawn_blocking` only for pure CPU work on plain data (decoding + images). Integration tests run inside an app context and won't catch it. From b59c99e6451a3fa35942504c13e1b646e1a028a3 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Fri, 4 Dec 2026 20:19:30 +1300 Subject: [PATCH 2/3] AGENTS.md: check kitze's laravel-rust-* packages and Talira before building shared plumbing --- AGENTS.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index fae5039f..b24b370f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -93,3 +93,6 @@ design is in `docs/design.md`; read it before changing the architecture, and upd - Code in a bare `tokio::spawn` task has no app context: `laravel::now()`, the database and the cache panic there. Use `laravel::task::spawn` or `context.scope`, and `spawn_blocking` only for pure CPU work on plain data (decoding images). Integration tests run inside an app context and won't catch it. +- Before building something other Laravel for Rust apps also need (R2 presigned uploads, API key hashing or metering, + sitemaps, OG images, cookie consent, PostHog, Resend, Polar billing), search Talira and check kitze's packages + (github.com/kitze/laravel-rust-*) first. Keep VisualCI's own OAuth and MCP code (Nathan, 4 Dec 2026). From 9ae41624f21aa246875ffcf9a120a505dd328ef9 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Fri, 4 Dec 2026 17:39:40 +0000 Subject: [PATCH 3/3] AGENTS.md: say Laravel Rust --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index b24b370f..ad9f4e97 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -93,6 +93,6 @@ design is in `docs/design.md`; read it before changing the architecture, and upd - Code in a bare `tokio::spawn` task has no app context: `laravel::now()`, the database and the cache panic there. Use `laravel::task::spawn` or `context.scope`, and `spawn_blocking` only for pure CPU work on plain data (decoding images). Integration tests run inside an app context and won't catch it. -- Before building something other Laravel for Rust apps also need (R2 presigned uploads, API key hashing or metering, +- Before building something other Laravel Rust apps also need (R2 presigned uploads, API key hashing or metering, sitemaps, OG images, cookie consent, PostHog, Resend, Polar billing), search Talira and check kitze's packages (github.com/kitze/laravel-rust-*) first. Keep VisualCI's own OAuth and MCP code (Nathan, 4 Dec 2026).