A new test in internal/handlers, next to the generator round-trip test, makes a URL on the generator page with a ttl of one second, checks that /v1/e/ serves the image at once, waits two seconds and checks that the same URL then answers 410. Until now the 410 tests built an expired token directly, and the round-trip test set no ttl, so nothing checked that the generator page puts the ttl into the URL it makes. The test adds about two seconds to internal/handlers; it runs in parallel with the others there.
TODO.md gets its Completed Steps entry. No code or README.md changes: the README.md already describes the 410.
Disclosures:
Judgement call: pixa reads the clock directly when it makes and checks a URL, so there is no way for a test to set the time; the test waits for real, as the plan allows.
Deviation: the wait is two seconds, not "just past" one. The time a URL expires is kept in whole seconds and the URL is served through the whole of that second, so a one-second ttl can take up to two seconds to pass.
Judgement call: the new test repeats the round-trip test's setup instead of moving it into a shared helper, because the repo's rules need the owner's approval to change an existing test.
Model: opus-5-5
A new test in `internal/handlers`, next to the generator round-trip test, makes a URL on the generator page with a `ttl` of one second, checks that `/v1/e/` serves the image at once, waits two seconds and checks that the same URL then answers 410. Until now the 410 tests built an expired token directly, and the round-trip test set no `ttl`, so nothing checked that the generator page puts the `ttl` into the URL it makes. The test adds about two seconds to `internal/handlers`; it runs in parallel with the others there.
`TODO.md` gets its Completed Steps entry. No code or `README.md` changes: the `README.md` already describes the 410.
Disclosures:
- Judgement call: pixa reads the clock directly when it makes and checks a URL, so there is no way for a test to set the time; the test waits for real, as the plan allows.
- Deviation: the wait is two seconds, not "just past" one. The time a URL expires is kept in whole seconds and the URL is served through the whole of that second, so a one-second `ttl` can take up to two seconds to pass.
- Judgement call: the new test repeats the round-trip test's setup instead of moving it into a shared helper, because the repo's rules need the owner's approval to change an existing test.
Model: opus-5-5
internal/handlers/auth_session_internal_test.go, the t.Logf line after the two-second wait, prints the response body with %s. When the test fails because the URL is still served, which is the failure it exists to catch, that body is the JPEG, so raw image bytes, control characters included, are written into the test output and the CI log. Acceptable: print the body with %q, as requireServedPhoto in the same package does, or leave the body out of that line.
Not verified: how much time the test adds to internal/handlers (the PR body says about two seconds); the package's run time varies too much between runs to tell.
Model: opus-5-5
**FAIL** (needs-rework)
1. `internal/handlers/auth_session_internal_test.go`, the `t.Logf` line after the two-second wait, prints the response body with `%s`. When the test fails because the URL is still served, which is the failure it exists to catch, that body is the JPEG, so raw image bytes, control characters included, are written into the test output and the CI log. Acceptable: print the body with `%q`, as `requireServedPhoto` in the same package does, or leave the body out of that line.
Not verified: how much time the test adds to `internal/handlers` (the PR body says about two seconds); the package's run time varies too much between runs to tell.
Model: opus-5-5
The log line after the two-second wait now prints the response body with %q, so a failure no longer writes raw image bytes into the test output.
Model: opus-5-5
The log line after the two-second wait now prints the response body with `%q`, so a failure no longer writes raw image bytes into the test output.
Model: opus-5-5
A new handler test makes a URL on the generator page with a ttl of one
second, checks that /v1/e/ serves it at once, waits two seconds and
checks that it then answers 410. The expiry is kept in whole seconds,
so two seconds is the longest a one-second ttl can take to pass. Test
only.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
A new test in
internal/handlers, next to the generator round-trip test, makes a URL on the generator page with attlof one second, checks that/v1/e/serves the image at once, waits two seconds and checks that the same URL then answers 410. Until now the 410 tests built an expired token directly, and the round-trip test set nottl, so nothing checked that the generator page puts thettlinto the URL it makes. The test adds about two seconds tointernal/handlers; it runs in parallel with the others there.TODO.mdgets its Completed Steps entry. No code orREADME.mdchanges: theREADME.mdalready describes the 410.Disclosures:
ttlcan take up to two seconds to pass.Model: opus-5-5
FAIL (needs-rework)
internal/handlers/auth_session_internal_test.go, thet.Logfline after the two-second wait, prints the response body with%s. When the test fails because the URL is still served, which is the failure it exists to catch, that body is the JPEG, so raw image bytes, control characters included, are written into the test output and the CI log. Acceptable: print the body with%q, asrequireServedPhotoin the same package does, or leave the body out of that line.Not verified: how much time the test adds to
internal/handlers(the PR body says about two seconds); the package's run time varies too much between runs to tell.Model: opus-5-5
f43b595d2ato06975f95a9The log line after the two-second wait now prints the response body with
%q, so a failure no longer writes raw image bytes into the test output.Model: opus-5-5
PASS
06975f95a92112b50c4e647fe38c4070442286d6, onnextat8568c17d1b40b08f7f9a62b4fb92f9900436321c.Model: opus-5-5
06975f95a9to628555b70e