Repository navigation
Fixes GRE-797: release retained job serializer permits on failure - #1253
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Retained job reads took a serializer permit and dropped it before the response body existed, so a refused read and a dropped client were not the same path.
The handler still allows two overlapping JSON encodings. A missing job or a failed encode drops the permit before the error JSON returns. A successful body keeps the permit until hyper finishes that body or drops it. Read-one JSON is the public snapshot and omits
updated_at. The list still includesupdated_at. Routes are unchanged and stay behinddesktop_rebuildplusPP_DESKTOP_REBUILD.Definition of done
See the definition of done.
Evidence
Feature-off stubs were proved on
1ea702645104f9b8c0f0459c1697e3edd6da5645. The permit-hold test was proved on1fd1d9fb3cffb374140fb86795d95655851b71d3. Both usedCARGO_TARGET_DIR=/persist/targets/gre-797-retained-jobandCARGO_BUILD_JOBS=2.Feature off:
cargo test -p pp-api --locked --manifest-path rust/Cargo.toml --test jobs_http job_response_refusal_releases_permit→ 1 passedcargo test -p pp-api --locked --manifest-path rust/Cargo.toml --test jobs_http retained_job_response_preserves_public_json→ 1 passedFeature on (
--features desktop_rebuild):--lib jobs::testson1fd1d9fb→ 2 passed (retained_body_drop_releases_permit,retained_response_holds_permit_until_drop)--test jobs_http job_response_refusal_releases_permit→ 1 passed--test jobs_http retained_job_response_preserves_public_json→ 1 passed--test jobs_http job_detail_→ 4 passedcargo clippy -p pp-api --locked --manifest-path rust/Cargo.toml --features desktop_rebuild --all-targets -- -D warnings→ cleanCouncil review
Rounds: 2. Scores are for the behavior diff. Round 2 is exact head
1fd1d9fb3cffb374140fb86795d95655851b71d3.Round 1 Claude approved and asked for a test that a live response holds the permit. That test is
retained_response_holds_permit_until_drop. Round 2 approved on this head: Claude 9/10, Grok 9/10, Qwen 9/10, and the Qwen retry 8/10. No merge blockers.Qwen re-ran
cargo fmt --check -p pp-api,cargo check --no-default-features, clippy with and withoutdesktop_rebuild, the feature-onjobs_httpsuite (12 passed), both feature-off filters (1 each), andticket_t_10_fixtureswith the feature (11 passed, including the Node jobs parity test). The ast-grep ratchet passed with 0 hits injobs.rs.Notes left for a later slice:
jobs_routerhas no caller outside tests, andadmit()is loopback. A write or header timeout belongs with the mount in GRE-798 and after.retained_response_holds_permit_until_dropcovers the live hold. An HTTP test onBody::fromis unreliable because hyper ends a full body before the client finishes reading.RetainedBodystays local to jobs. A shared permit body would edit the drafts router.docs/desktop-rebuild.mdanddocs/gre-795-jobs-http.mdhave no GRE-797 index line. The ticket doc omits the two cargo check lines above. Those checks already passed on this head.Content-Length, the duplicated test preamble, and thefinish_retainedsignature stay as they are.Exemption
Exemption: none
Reviewed with sol-loop: 1 round with Claude Opus 5.5. Sol verdict: approved.
Created with Grok 4.7 in Grok Build. Claude Opus 5.5 reviewed.