Skip to content

Fixes GRE-800: prove job socket reconnect and shutdown - #1256

Merged
poitee merged 2 commits into
mainfrom
gre-800-job-ws-reconnect
Oct 27, 2026
Merged

poitee merged 2 commits into
mainfrom
gre-800-job-ws-reconnect

Conversation

@poitee

@poitee poitee commented Oct 27, 2026 •

Copy link
Copy Markdown
Owner

Fixes GRE-800

Summary

A job socket closes 1011 when 17 snapshots publish before its pump admits another frame. The next upgrade returns the current public snapshot at progress 16, with no updated_at. Owner shutdown closes every live socket with that same 1011, and a later upgrade is HTTP 500.

The test uses a current_thread runtime so those publishes finish before the pump runs. Production jobs.rs is unchanged.

Definition of done

See the definition of done.

  • One job, under about 1,500 lines. Work for other tickets is noted on those tickets.
  • Unslop pass run on code, comments and docs. No filler comments, dead code or speculative abstractions.
  • Docs updated in this PR, or the PR changes no behavior, setup or interface.
  • Reviewed by a different model vendor than the author, on the exact head commit, with CI green.

Evidence

Feature-on cargo test -p pp-api --locked --manifest-path rust/Cargo.toml --features desktop_rebuild --test jobs_http -- --test-threads=2 with CARGO_TARGET_DIR=/persist/targets/gre-800-job-ws and CARGO_BUILD_JOBS=2: 18 passed, 0 failed.

Feature-off filters job_ws_reconnect_returns_authoritative_snapshot and jobs_router_shutdown_closes_subscriptions: 1 passed each. Those are the 404 stubs.

cargo clippy -p pp-api --locked --manifest-path rust/Cargo.toml --features desktop_rebuild --all-targets -- -D warnings: clean.

cargo clippy -p pp-api --locked --manifest-path rust/Cargo.toml --all-targets -- -D warnings: clean.

cf15bc5c changes docs/gre-800-jobs-http.md and test comments only. The commands above ran on 1816fd83.

Exemption

Exemption: none

Council review

Rounds: 1

Delegate Round 1
Claude Opus 5.5 9/10
Grok 4.7 9/10
Qwen3.8-Flash 9/10

All three approved cf15bc5ce5c3eb43c72429e5a68ac2997164196a. Nits were declined so this head stays. They cover admit-versus-pump wording, spelling out 500 versus 503, a fuller job-row compare, folding close_owner into shutdown, asserting initial progress 0, a sub-threshold publish, a read timeout, and a shared slot constant.

Reviewed with sol-loop: 1 round with Claude Opus 5.5 on xhigh. Sol verdict: changes on the doc wording. That wording is corrected in cf15bc5c. A fuller job-row snapshot and read timeouts were declined.

Created with Grok 4.7 in T3 Code.

A socket that misses the claim and sixteen progress updates closes 1011. The next upgrade returns the current public snapshot at progress 16. Owner shutdown closes every live socket with that same 1011, and a later upgrade is HTTP 500.
Seventeen publishes before the pump admits another frame close the socket
with 1011. The current_thread test forces that order. The helper comment
now says claim plus progress 1 through 15 fill the mailbox, and progress
16 lags it.

Sol round 1 on 1816fd8. Fuller job-row checks and read timeouts stay out.
@poitee
poitee merged commit a135bdd into main Oct 27, 2026
33 checks passed
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