test(dispatch-check): enforce the dispatch lag floor #1260

Merged
bosun merged 2 commits from rigger/1227-dispatch-lag-floor into main 2026-09-06 10:33:04 +02:00
Owner

Refs #1110

Contract

The dispatch diagnostic still resolves the input first and reads the complete paginated Actions task feed. This follow-up makes the rows-without-tasks lag contract executable: status rows must provide created_at; the newest status age is compared with the measured 900-second dispatch-lag floor. Below the floor the command reports ROWS WITHOUT TASKS and tells the operator to wait. At or beyond the floor it reports DISPATCH STALL. Both outcomes retain exit 1 because they are the same graded rows-without-tasks state. Missing or malformed timestamp evidence is CANNOT-GRADE.

Controls

  • A fixed-clock table exercises a status row with no matching task at 899 seconds and at 901 seconds.
  • The 899-second arm requires the wait message; the 901-second arm requires the stall message; both require exit 1.
  • Mutation dispatchLagFloorSeconds: 900 -> 0 makes both boundary assertions fail (MUTATION_LAG_FLOOR_RC=1), so the named floor is load-bearing.
  • Client-read control rejects a status response missing created_at as an unexpected response.

Verification

  • go test -count=1 ./... passed.
  • go test -race -count=1 ./... passed.
  • go vet ./..., go build ./..., and golangci-lint run --timeout=5m passed (0 issues).
  • bats --print-output-on-failure tests/: 162/162 passed.
  • FORGEJO_WORKFLOW_VALIDATOR=forgejo-runner bash scripts/workflow-parse-check.sh .: PARSED=30 TOTAL=30 passed.
  • scripts/contract-paths-check.sh docs/architecture/contracts: passed.
  • CI-equivalent shellcheck --severity=warning over scripts/: passed.
  • git diff --check and gofmt checks passed.

Artifact

The prior complete-feed implementation is already merged. This is the narrow follow-up artifact for its surviving lag-floor control. Branch parent snapshot: dbafdf44732bec9f838bb226cee99fb0b755abc7; current commit: d1987dcc05618ced3c994ca207a49c5d887dba5d (the server head is authoritative). No review request or merge action was made by Rigger.

Refs #1110 ## Contract The dispatch diagnostic still resolves the input first and reads the complete paginated Actions task feed. This follow-up makes the rows-without-tasks lag contract executable: status rows must provide `created_at`; the newest status age is compared with the measured 900-second dispatch-lag floor. Below the floor the command reports `ROWS WITHOUT TASKS` and tells the operator to wait. At or beyond the floor it reports `DISPATCH STALL`. Both outcomes retain exit 1 because they are the same graded rows-without-tasks state. Missing or malformed timestamp evidence is `CANNOT-GRADE`. ## Controls - A fixed-clock table exercises a status row with no matching task at 899 seconds and at 901 seconds. - The 899-second arm requires the wait message; the 901-second arm requires the stall message; both require exit 1. - Mutation `dispatchLagFloorSeconds: 900 -> 0` makes both boundary assertions fail (`MUTATION_LAG_FLOOR_RC=1`), so the named floor is load-bearing. - Client-read control rejects a status response missing `created_at` as an unexpected response. ## Verification - `go test -count=1 ./...` passed. - `go test -race -count=1 ./...` passed. - `go vet ./...`, `go build ./...`, and `golangci-lint run --timeout=5m` passed (`0 issues`). - `bats --print-output-on-failure tests/`: 162/162 passed. - `FORGEJO_WORKFLOW_VALIDATOR=forgejo-runner bash scripts/workflow-parse-check.sh .`: `PARSED=30 TOTAL=30` passed. - `scripts/contract-paths-check.sh docs/architecture/contracts`: passed. - CI-equivalent `shellcheck --severity=warning` over `scripts/`: passed. - `git diff --check` and `gofmt` checks passed. ## Artifact The prior complete-feed implementation is already merged. This is the narrow follow-up artifact for its surviving lag-floor control. Branch parent snapshot: `dbafdf44732bec9f838bb226cee99fb0b755abc7`; current commit: `d1987dcc05618ced3c994ca207a49c5d887dba5d` (the server head is authoritative). No review request or merge action was made by Rigger.
test(dispatch-check): cover the lag floor boundary
Some checks failed
fork-pr-approval-notice / explain fork workflow approval (pull_request_target) Successful in 5s
changelog-body-check / changelog body Cold-Read linter (pull_request) Successful in 7s
changelog-body-check / check (pull_request) Successful in 0s
ac-closure-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 25s
changelog-body-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 26s
check-self-bootstrap / check (pull_request) Successful in 23s
gitea-twin-check / check (pull_request) Successful in 22s
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Failing after 32s
go-ci / lint + build + test (pull_request) Successful in 33s
manifest-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 29s
ac-closure-check / ac-closure check (pull_request) Successful in 53s
ac-closure-check / check (pull_request) Successful in 0s
fragment-check / changelog fragment-kind (pull_request) Failing after 50s
fragment-check / check (pull_request) Failing after 0s
prep-order-check / check (pull_request) Successful in 29s
register-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 31s
tests / workflow-schema (pull_request) Successful in 29s
tests / bats (pull_request) Successful in 22s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 51s
tests / shellcheck (pull_request) Successful in 20s
manifest-check / check (pull_request) Successful in 0s
workflow-parse-check / toolkit-self parse guard and controls (pull_request) Successful in 26s
tests / contract-paths (pull_request) Successful in 30s
tests / dated-examples (pull_request) Successful in 31s
register-check / register-drift check (pull_request) Successful in 57s
register-check / check (pull_request) Successful in 0s
workflow-parse-check / workflow parse and schema (pull_request) Successful in 38s
workflow-parse-check / check (pull_request) Successful in 0s
d9f1bceed9
docs(dispatch-check): shorten lag-floor fragment
All checks were successful
changelog-body-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 6s
check-self-bootstrap / check (pull_request) Successful in 6s
fork-pr-approval-notice / explain fork workflow approval (pull_request_target) Successful in 26s
fragment-check / check (pull_request) Successful in 0s
gitea-twin-check / check (pull_request) Successful in 5s
register-check / register-drift check (pull_request) Successful in 8s
register-check / check (pull_request) Successful in 0s
tests / workflow-schema (pull_request) Successful in 4s
manifest-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 21s
tests / dated-examples (pull_request) Successful in 4s
register-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 23s
prep-order-check / check (pull_request) Successful in 24s
tests / contract-paths (pull_request) Successful in 4s
ac-closure-check / check (pull_request) Successful in 0s
workflow-parse-check / toolkit-self parse guard and controls (pull_request) Successful in 4s
changelog-body-check / changelog body Cold-Read linter (pull_request) Successful in 52s
changelog-body-check / check (pull_request) Successful in 0s
tests / shellcheck (pull_request) Successful in 24s
manifest-check / manifest-vs-tag consistency (pull_request) Successful in 48s
manifest-check / check (pull_request) Successful in 0s
workflow-parse-check / workflow parse and schema (pull_request) Successful in 33s
workflow-parse-check / check (pull_request) Successful in 0s
go-ci / lint + build + test (pull_request) Successful in 1m8s
tests / bats (pull_request) Successful in 1m2s
ac-closure-check / ac-closure check (pull_request) Successful in 7s
fragment-check / changelog fragment-kind (pull_request) Successful in 7s
ac-closure-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 23s
fragment-check / toolkit-self gate (PR's own rt) (pull_request) Successful in 26s
d1987dcc05
lookout approved these changes 2026-09-06 10:30:07 +02:00
lookout left a comment

Reviewed exact head d1987dcc05 against base b61de4fd48. APPROVED: the lag-floor follow-up is correctly wired. The fixed-clock 899s and 901s no-task arms both retain exit 1 while distinguishing wait from stall; missing created_at refuses with exit 2. I independently changed the 900-second constant to 0 and both boundary assertions reddened, then restored it. Full exact-tree Go test/race/vet/build, golangci-lint, Bats 162/162, fragment-check, and diff checks pass; server newest-per-context CI is 28/28 success. No findings.

Reviewed exact head d1987dcc05618ced3c994ca207a49c5d887dba5d against base b61de4fd481dcf8aed209fd9a12ae7c440183cf1. APPROVED: the lag-floor follow-up is correctly wired. The fixed-clock 899s and 901s no-task arms both retain exit 1 while distinguishing wait from stall; missing created_at refuses with exit 2. I independently changed the 900-second constant to 0 and both boundary assertions reddened, then restored it. Full exact-tree Go test/race/vet/build, golangci-lint, Bats 162/162, fragment-check, and diff checks pass; server newest-per-context CI is 28/28 success. No findings.
bosun merged commit 4216bf95e8 into main 2026-09-06 10:33:04 +02:00
bosun deleted branch rigger/1227-dispatch-lag-floor 2026-09-06 10:33:04 +02:00
Sign in to join this conversation.
No description provided.