Skip to content

Release 8.1.5 - #17

Merged
wtorsi merged 11 commits into
mainfrom
8.1
Oct 20, 2026
Merged

wtorsi merged 11 commits into
mainfrom
8.1

Conversation

@wtorsi

@wtorsi wtorsi commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Release 8.1.5: optional per-storage S3 client http timeouts and retries (finite, >= 0.001 s), redirect guard (3xx -> S3Exception, no follow) and no connection reuse when http is set. Feature PR: #16. Without the new keys the S3 client is identical to 8.1.4.

Merging creates tag v8.1.5 via tag.yml.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SXB2dje72BXojVPbein4Rm

Dev and others added 11 commits October 19, 2026 14:18
…ge (CI-8 Task 1)

Storages accept two optional blocks, http {connect_timeout, timeout: float > 0}
and retries {mode: legacy|standard|adaptive, max_attempts: int >= 1}. If a
block is set, every subkey is required; a missing, unknown or invalid subkey
fails configuration processing with the key path (R-B1, D-9). Integer literals
are accepted and cast to float.

An s3 storage passes a set block to the S3Client arguments as http /
retries, after the 8.1.4 keys; an unset block stays absent, so without both
blocks the client definition equals 8.1.4 (R-B2, R-B3). The file_system
driver accepts and ignores both blocks, including an s3 base merged with a
file_system override (R-B4).

README: option rows (also the missing path_style and credentials rows) and
an S3 timeouts section with the limits of the bound (static credentials,
curl handler, asynchronous DNS). CLAUDE.md: Service Configuration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SXB2dje72BXojVPbein4Rm
…p feed and single attempt (CI-8 Task 2a)

A fake TCP server and the storage operation each run in a child process; the harness kills the
operation after 10·T_test, so a client without timeouts fails instead of hanging (AC-5: I-1, I-2,
I-3, I-7). Connect timeout: full backlog-1 accept queue on Linux, 192.0.2.1:81 on macOS, with a
raw-connection probe that fails the test (never skips) when the environment cannot time out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SXB2dje72BXojVPbein4Rm
…CI in php:8.5-cli-trixie (CI-8 Task 2a fix F-1)

- FakeS3Harness::connectTimeoutEndpoint() fails (never skips) on libcurl < 8.11, whose connect-timeout
  wording Guzzle classifies as NetworkTimeoutException instead of ConnectTimeoutException.
- php.yml runs the job in the php:8.5-cli-trixie container (libcurl 8.14.1, + gd, git, unzip, Composer)
  instead of the runner's Ubuntu 24.04 (libcurl 8.5.0), and prints the PHP and libcurl versions.
- The 10·T_test guard starts at operation.php's "ready" line (child start-up has its own deadline);
  the harness also fails on a non-zero exit code.
- Timing upper bound A·T_test + 2 s + 1 s = 4 s; the A = 1 test asserts elapsed >= T_test (m3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SXB2dje72BXojVPbein4Rm
… single-attempt 404 NoSuchKey (CI-8 Task 2b)

- testServiceUnavailableThenSuccess: 503 ServiceUnavailable then 200; two requests, two SDK attempts.
  The PUT uploads 1 040 000 random bytes (Guzzle streams it, no Expect) and the retried request's body
  length and sha256 equal the file (I-4, E-28, M-2); the GET target holds only the 200 body (E-12).
- testNoSuchKeyIsSingleAttemptWithCode: 404 NoSuchKey, one attempt, code kept, not a connection error.
- FakeS3: scenarios unavailable_then_ok and no_such_key, requests() journal accessor, upload size and
  source sha256 in the operation result.
- README and CLAUDE.md: a failed download() may leave a partial target file; the caller deletes it,
  Handler::archive does not (R-B5, L-5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SXB2dje72BXojVPbein4Rm
…ound docblock, document both timing bounds (CI-8 Task 2a minors n1-n3)

- FakeS3Harness: a PHP start-up warning printed before "ready" no longer
  sends the guard back to the from-spawn deadline; "did not start" now
  prints stdout too.
- S3StorageFaultTest: delete the "D(A) = 6 s" docblock; the bound is 4 s.
- CLAUDE.md: the A = 2 tests use 4 s, the A = 1 test uses T_test + 1 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SXB2dje72BXojVPbein4Rm
… without a code (CI-8 Task 3a, R-B7/D-17)

register() appends one init step (NAME = chamber_orchestra_file.s3_redirect_guard)
to an S3Client's handler list. A fulfilled result with @metadata.statusCode
300-399 becomes exactly S3Exception: status in the message, no AWS error code,
connection_error false, the result kept for diagnostics. Other results and
rejections pass unchanged. Not wired into the extension yet (Task 3b).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SXB2dje72BXojVPbein4Rm
…omes an error (CI-8 Task 3b, R-B7)

With `http` set, the extension passes `allow_redirects: false` in the client's
`http` argument and sets `[S3RedirectGuard::class, 'register']` as the client
definition's configurator, so a 3xx ends the operation after one request:
301 -> PermanentRedirectException, any other 3xx -> S3Exception without an AWS
error code, never retried. Without `http` the client definition stays as in
8.1.4 (no allow_redirects, no configurator).

S3StorageRedirectTest (AC-17-AC-19) runs PUT and GET against a redirecting
fake server with a silent Location target. Recorded runs: v1 (no
allow_redirects, no guard) all 8 red; v2 (allow_redirects only) AC-17 green,
AC-18/AC-19 red (silent success). The extension tests check the http array,
the configurator, and on a compiled container exactly one guard step in
`init` with `retry` and `s3.permanent_redirect` in `sign`.

FakeS3Harness now holds the one 4 s bound (UPPER_BOUND), ATTEMPTS and the
test storage config, shared by the fault and redirect tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SXB2dje72BXojVPbein4Rm
…sk 4, R-B8, AC-3, AC-20)

With `http` set, the client's `http` argument also gets `curl => [CURLOPT_FORBID_REUSE => true]`, so
Guzzle never re-sends a streamed PUT on a dead reused connection and one SDK attempt is one HTTP request.
Without `http` the client definition stays exactly as in 8.1.4.

S3StorageKeepAliveTest (AC-20): fake server scenario keep_alive (warm-up GET 200 keep-alive; request 2
closed 0.8*T_test after its body, unanswered; then silence), warm-up download() before the guard, upload
of 1 040 000 B. Without R-B8: red 3/3, 4 requests on 3 connections, 3 PUTs for 2 SDK attempts. With
R-B8: green 3/3, 3 requests on 3 connections, PUTs = attempts = 2, upload() 1.43-1.87 s (bound 4 s).

Docs: README and CLAUDE.md state R-B8, the ext-curl requirement (container compile Error without it),
the rejected `stream` option (StreamHandler), that remove() rethrows unwrapped (false only for
NoSuchKey), and that a failed download may leave the S3 error XML in the target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SXB2dje72BXojVPbein4Rm
- Requirements / Dependencies: Symfony 8.1 and metadata-bundle 8.1, as in composer.json.
- http/retries: write literals; %env()% placeholders fail the > 0 / >= 1 check.
- A timeout of .inf or below 0.001 passes configuration, but Guzzle 8.2 rejects
  every request with InvalidArgumentException; it is not "no timeout".
- Stream-handler cases in the "do not bound" list fail instead when http is set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SXB2dje72BXojVPbein4Rm
…R-B1, AC-1)

A timeout that is infinite or below 1 ms passed validation: Guzzle 7 then
silently disables the timeout (CURLOPT_TIMEOUT_MS = 0) and Guzzle 8 rejects
every request. Both keys now fail configuration processing with the key path.
The message is built with var_export, since thenInvalid's json_encode cannot
encode INF.

Docs: README and CLAUDE.md state the new rule; the stream-option rejection is
Guzzle 8+ only; composer suggest matches 8.1.* and lists ext-curl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SXB2dje72BXojVPbein4Rm
CI-8: S3 storage HTTP timeouts, retries, redirect guard and no connection reuse
@wtorsi
wtorsi merged commit 33ba134 into main Oct 20, 2026
2 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