Merge the Express live probes, shrink the stage cases, simplify the proxy, and add session expiration - #8
Merged
Merged
Conversation
Grade them with live --profile s3-express, and the general-purpose S3 probes with --profile s3. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
S3 takes a part of any size until a completion names it before another part. Each stage case carried the 5 MiB part twice, which made operations.json 34 MB; it is now 6 MB. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
ureq tunnels through an HTTP proxy even to an http target. Every grader target is plain HTTP, so the grader answers CONNECT and reads the request inside the tunnel, whose Host header the case checks. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
ureq and the AWS CRT read their proxy from the environment, so an adapter built on them needs no proxy code. An offline adapter inherits no other proxy variable, and a live one keeps the caller's. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
An SDK names the algorithm of the checksum it sends in that header, and S3 answers the same with or without it, verified live on both bucket kinds. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A response's new body_time names a time in its body relative to when the grader sends it. Every CreateSession answer now carries its Expiration, five minutes ahead and in S3's element order, as measured live. get-session-expired answers the first CreateSession with an expired session, and the client must ask again and sign with the second. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.
Summary
Live probes.
cases/s3-express-live.jsonmerges intocases/live.jsonunder thes3-expressprofile, ass3-express.jsonmerged intooperations.jsonin Mirror cases onto HNS and S3 Express, and merge s3-express.json into operations #7. The two probes and their ids are unchanged.Smaller stage cases.
operations/s3/stageandoperations/s3-express/stageuploaded a 5 MiB part, carried twice as base64 in each case. They made up 28 of the 34 MB ofcases/operations.json. They now upload the four-byte part the key-encoding stage cases already use: S3 takes a part of any size, and refuses a small part only when a completion names it before another part. Both cases were verified live again.cases/operations.jsonis now 6 MB.Proxy tunnels. The grader's loopback proxy now answers
CONNECTand reads the request inside the tunnel. ureq opens such a tunnel even to anhttp://target, and the grader refused it. Every grader target is plain HTTP, so the tunnel carries the request unchanged, and the case checks itsHostheader as before.Proxy from the environment. An offline adapter also finds the grader's proxy in
HTTP_PROXYandhttp_proxy. ureq and the AWS CRT read their proxy from there by default, so an adapter built on them needs no proxy code. The grader clears every other inherited proxy variable for an offline adapter, so it reaches only the grader, and leaves a live adapter's environment as it is.Session expiration. A response may carry
body_time,{"text": "SESSION_EXPIRATION", "offset_seconds": 300}: the grader replaces that text in the body with the time that many seconds after it sends the response, in ISO 8601 UTC. Every S3 Express CreateSession answer now carries itsExpirationthis way, five minutes ahead and in the element order S3 writes, as measured live. The newoperations/s3-express/get-session-expiredanswers the first CreateSession with a session that expired a minute ago: a client must ask again and sign its GET with the second session. The AWS C++ SDK uses the expired one.For clients
live cases/live.json ENDPOINTS --provider s3now selects the Express probes too, and needs ans3-expressendpoint for them. Use--profile s3or--profile s3-expressto run one.An adapter behind
proxy_urlmay use aCONNECTtunnel or absolute-form requests.A client that misreads
Expirationand renews a valid session sends a CreateSession no Express case expects.Test plan
cargo test --locked,cargo clippy --locked --all-targets -- -D warningsandcargo fmt --checkpass.object-tests validatepasses forcases/live.json(6 cases) andcases/operations.json(916 cases).