feat(jobs): ten minutes as well as ten messages #743

Merged
coilyco-ops merged 1 commit from feat/ten-minutes-or-ten-messages into main 2026-08-13 22:01:46 +00:00
Member

The other half of the ceiling Kai decided on issue 236:

10 messages or 10 minutes, whichever we hit first

Issue 356 landed the message half and the seam under it. This adds the time half, which was not buildable before the counter existed.

What ships

maxJobContentWindow = 10 * time.Minute, and ErrJobContentWindowClosed separate from ErrJobContentExhausted. Two ceilings, two errors, so an executor and an operator can tell a job that said too much from one that took too long. The refusal reason also reaches telemetry as ceiling.

The decision inside it

The window opens on the first message, not at submission. A job that sat in the queue for an hour still gets its full ten minutes to answer. Queue time is not answer time, and a job punished for waiting would be a bound on the runner's backlog wearing a content ceiling's name.

That is the one judgement here and it is asserted directly by TestTheWindowOpensOnTheFirstMessage.

Verification

ward exec gate PASS on all six steps.

Two mutations, both in runs where the package compiles:

  • the window never closing: fails TestTheAnswerWindowClosesOnTime
  • the window opening at submission: fails that test plus TestTheWindowOpensOnTheFirstMessage, TestTheBoundIsPerJob, TestContentAndProgressDoNotShareABound

My first attempt at the first mutation was a build failure rather than a test failure - setting the condition to false left opened unused. That is issue 653's trap, where a non-compiling package reads as "caught". Redone as a comparison that still uses the variable.

Not in this change

Threading. Kai said both conditions should trigger it. Neither ceiling threads yet; they refuse. That is the next slice and it needs the thread binding in jobthread.go, which is its own piece of work.

File upload, the third output mode.

closes #742

The other half of the ceiling Kai decided on [issue 236](https://forgejo.coilysiren.me/coilyco-gaming/sirens-echo/issues/236): > 10 messages or 10 minutes, whichever we hit first [Issue 356](https://forgejo.coilysiren.me/coilyco-gaming/sirens-echo/issues/356) landed the message half and the seam under it. This adds the time half, which was not buildable before the counter existed. ## What ships `maxJobContentWindow = 10 * time.Minute`, and `ErrJobContentWindowClosed` **separate from** `ErrJobContentExhausted`. Two ceilings, two errors, so an executor and an operator can tell a job that said too much from one that took too long. The refusal reason also reaches telemetry as `ceiling`. ## The decision inside it **The window opens on the first message, not at submission.** A job that sat in the queue for an hour still gets its full ten minutes to answer. Queue time is not answer time, and a job punished for waiting would be a bound on the runner's backlog wearing a content ceiling's name. That is the one judgement here and it is asserted directly by `TestTheWindowOpensOnTheFirstMessage`. ## Verification `ward exec gate` PASS on all six steps. Two mutations, both in runs where the package compiles: - the window never closing: fails `TestTheAnswerWindowClosesOnTime` - the window opening at submission: fails that test plus `TestTheWindowOpensOnTheFirstMessage`, `TestTheBoundIsPerJob`, `TestContentAndProgressDoNotShareABound` **My first attempt at the first mutation was a build failure rather than a test failure** - setting the condition to `false` left `opened` unused. That is [issue 653](https://forgejo.coilysiren.me/coilyco-gaming/sirens-echo/issues/653)'s trap, where a non-compiling package reads as "caught". Redone as a comparison that still uses the variable. ## Not in this change **Threading.** Kai said both conditions should trigger it. Neither ceiling threads yet; they refuse. That is the next slice and it needs the thread binding in `jobthread.go`, which is its own piece of work. **File upload**, the third output mode. closes #742
feat(jobs): ten minutes as well as ten messages
All checks were successful
ci / image-build (pull_request) Successful in 23s
ci / test (pull_request) Successful in 37s
ci / publish-echo-image (pull_request) Has been skipped
ci / publish-observed (pull_request) Has been skipped
8a8064d916
356 landed the message half of the ceiling Kai decided on 236. This adds the
time half, which was not buildable before the counter existed.

Two ceilings, two errors: ErrJobContentWindowClosed is separate from
ErrJobContentExhausted, so an executor and an operator can tell a job that said
too much from one that took too long. The reason reaches telemetry as ceiling.

The window opens on the first message rather than at submission. A job that sat
in the queue for an hour still gets its full ten minutes, because queue time is
not answer time and a bound on the backlog should not wear a content ceiling's
name.

closes #742

Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-gaming/sirens-echo!743
No description provided.