Skip to content

[no-ticket] Flag blocking web requests in favour of background jobs - #51

Merged
bockets merged 2 commits into
mainfrom
flag-blocking-web-requests
Sep 10, 2026
Merged

[no-ticket] Flag blocking web requests in favour of background jobs#51
bockets merged 2 commits into
mainfrom
flag-blocking-web-requests

Conversation

@bockets

@bockets bockets commented Sep 8, 2026

Copy link
Copy Markdown
Member

[no-ticket]

The reviewer flags N+1s and batch/task hot spots, but nothing about work whose
cost grows with what the request was handed. A controller that loops over an
uploaded file's rows creating a record each passes every existing rule and times
out in production the first time somebody uploads a real file.

Adds prompts/_shared/blocking-request-rules.md, injected into all three
prompts next to the existing performance block. The line is cost that grows with
something the request does not control, not "slow". It also treats two things as
findings when a request-to-job move misses them: determinate server-recorded
progress with a readable failure state, and a perform that is safe to retry.
Exclusions cover bounded work, anything already off the request path, and a
synchronous call the response depends on.

Prompt versions derive from file content, so every consuming repo picks this up
at once.

@bockets
bockets marked this pull request as ready for review September 8, 2026 15:56
The reviewer had no rule about work whose cost grows with the request's
input. A controller that loops over an uploaded file's rows creating a
record each, with the model callbacks that implies, reads as ordinary
code in a diff and times out in production once somebody uploads a real
portfolio.

This adds the rule, injected into all three prompts alongside the
existing performance block. It draws the line at cost that grows with
something the request does not control -- rows in a file, items a client
sent, matches from a query -- rather than at "slow", and asks for the
two things a request-to-job move has to get right: progress the member
can actually see, and a perform that is safe to run twice, since a
deploy SIGTERM will run it twice.
@bockets
bockets force-pushed the flag-blocking-web-requests branch from 66fd46e to 2b797c2 Compare September 10, 2026 18:49
@bockets
bockets merged commit f6a1f50 into main Sep 10, 2026
1 check passed
@bockets
bockets deleted the flag-blocking-web-requests branch September 10, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant