Repository navigation
Serve the external payload storage diagnostic natively - #561
Conversation
POST /api/storage/test validates its request with Laravel's messages, refuses an unconfigured, disabled or mismatched driver with published PHP's bodies, and round-trips a generated small and large payload through the local driver. The object is removed only when no registered payload shares its content-addressed URI. A storage-test parity fixture records identical bodies from PHP 2.5.14 and native. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… rust-325-storage-test # Conflicts: # rust/src/runtime/http.rs
# Conflicts: # .github/workflows/server-parity.yml # scripts/conformance/server-parity/contract.mjs # scripts/conformance/server-parity/probe.php
# Conflicts: # .github/workflows/server-parity.yml # docs/rust-server-port.md
# Conflicts: # docs/rust-server-port.md
PHP and native wrote the diagnostic's objects under the same /state/<namespace> root. CI runs PHP as uid 1000 and native as the runner's uid, so native could not write into the directory PHP created and answered 503. Each target now writes under file:///state/storage-test-<host>/<namespace>, which the probe records and the contract checks and hashes. Reproduced and fixed locally with native running as another uid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Updated with main after #559 (bb88265), then fixed the fixtures failure in 8b346e9. Cause. Run 39528081280 failed the storage diagnostic's round trip on every database job: native answered 503 Fix. Each target now writes under Checks.
I cancelled the superseded runs on bb88265. |
|



Part of #325.
Native now serves
POST /api/storage/test, the external payload storage diagnostic, as published PHP'sStorageController::testdoes.Behavior.
Validation. Laravel's rules and messages for
driver(nullable|string|in:local,s3,gcs,azure,custom) and the two payload sizes (required|integer|min:1|max:…), with the 422validation_failedbody and its error count. The request normalization and failure body moved intolaravel_validation, which the search attribute registry now shares.Refusals. PHP's 422 bodies for:
external_storage_not_configured, null driver);external_storage_disabled);storage_driver_unavailablewithsupported_diagnostic_drivers: ["local"]).Drivers native cannot run are refused as unavailable in this runtime, as PHP is without their SDKs.
Round trip. A generated small and large payload is written to the local driver, read back with its size and digest verified, and removed. The response reports each payload's size, SHA-256 and the digest of its object URI.
Shared objects. Local objects are content-addressed, so a diagnostic payload can have the same bytes as a registered external payload. Native holds the payload object lock for the round trip and removes the object only when no registered payload refers to it. PHP removes it unconditionally.
Access. Admin only, in the default or a named namespace.
Fixture.
storage-testdrives a fresh namespace through:Published PHP 2.5.14 and native returned identical bodies, including the reference identities. Embedded PHP declares the fixture inapplicable. The contract has 21 unit tests (
ServerParityStorageTestContractTest.mjs).Local checks.
storage-test,search-attributesandworker-listingon all three targets, and the comparison passed.🤖 Generated with Claude Code