Zen | AI in Production (@TenFoldDev) header
Zen | AI in Production (@TenFoldDev) profile picture

Most AI tutorials stop at the demo. I cover the rest: evals, guardrails, tracing, cost. Follow for weekly production AI patterns.

Joined April 2024
Photo by Zen | AI in Production (@TenFoldDev)
For an order endpoint with a 403 contract, I'd test that an authenticated user cannot fetch another user's order. Run it before and after an AI-generated authorization refactor. Returning 200 with fewer database calls is still a regression.
3
On fan-out requests: - Five required calls give the request five places to fail. - Therefore separate required results from optional ones. A missing recommendation should not block checkout unless the business rule really requires it.
1
14
Say your DynamoDB restore finishes in a rehearsal. Use the app's role to read and write a test record on the isolated replacement table before calling the app ready.
6
An export may finish just before the user clicks Cancel. Define a cancellation response for both outcomes: stopped and already completed. Then let the UI show the actual result rather than leave the user waiting for work that's already done.
1
6
Before merging a parser refactor, run the same blank-input test on both versions.
2
A 40 ms handler can sit inside a 900 ms request. I'd line up the caller, proxy and handler timings for that same request before deciding where to look next.
5
Two tests look almost identical. One starts the app with a different profile. I'd leave that difference alone until I knew why it's there. Sharing a startup isn't worth quietly testing the wrong behavior.
4
One fast run after a CI change feels great. I wouldn't call it a win yet. Same runner type, same worker count. Try a few runs before and after the one change, then look at how much the times jump around.
2
You add more Gradle test workers and Spring starts the app more often. That's worth checking: each worker process has its own Spring test context cache. The new workers don't get to borrow the old one's warm cache.
6
3 seconds of setup, 40 times. That's 2 minutes of work. Would cutting it save 2 minutes on the build? Only if that work was on the path holding up the finish, and wasn't overlapping.
The slowest test gets all the attention. Fair enough. But if 40 other tests each spend a little time setting up the same thing, that might be the better place to look.
2
Your build takes 12 minutes, but none of the tests look that slow. I'd check how many times the suite starts the app or fills the test database. More runners might just help you do the same setup faster.
1
Default to one active processing sequence per Kafka partition. Scale across partitions first where appropriate. Add within-partition concurrency only for a measured need, with explicit gap tracking, replay protection and a bounded failure path.
1
A Kafka worker dashboard needs more than delivery lag. Add oldest unfinished age, outstanding count and time of last durable completion. Then reconcile expected event identities with stored effects. Fetching records is not proof of finished work.
2
Test the crash window after a Kafka handler persists its effect but before the offset commit. Restart with the same group. For an effect in one transactional store, atomically store a unique event identity with the mutation and reject duplicate effects.
1
A paused Kafka partition still needs a live poll loop. Bound outstanding worker tasks, keep KafkaConsumer calls on its owner thread, and alert on the oldest unfinished task. Pausing delivery must not become an indefinite wait.
2