Repository navigation
End-to-end NAS journey test (proves wired path; pins restore-materialization gap) - #41
Merged
Merged
Conversation
Walks the real NAS user journey via the API (create pool -> upload -> download -> offline -> download-409 -> request+run restore -> download). Building it PROVED: - The wired part works end-to-end (test_nas_journey_upload_download_and_offline_ detection passes): pool creation, upload, online download, offline detection returning the actionable 409 hydrate hint (#40). - A real gap (strict xfail): the NAS restore executor (HydrationExecutor) is a record-state SIMULATOR — it marks the file online_cached but does NOT materialize a downloadable copy (_simulate_content returns placeholder bytes and writes no file), so download stays 409 after a "successful" restore. The full journey (restore -> downloadable original bytes) does not yet complete. The xfail is strict, so when restore is wired to materialize real bytes from tape (read via ltfs + write to a download-resolvable cache path, exercised through the archive-plan/ingest path), the test flips to xpass and must be updated to assert 200 + matching checksum. Documents exactly what "fully working NAS experience" still needs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012K5Zjc2bggcyJtFbz2D4Pw
There was a problem hiding this comment.
Pull request overview
Adds an end-to-end NAS “user journey” test that exercises the wired pool/upload/download flow and deliberately pins the remaining restore-materialization gap (via a strict xfail) so CI will flip to a hard pass once restore produces downloadable bytes again.
Changes:
- Introduces a new e2e test covering: create pool → upload → download (online) → simulate offline → download returns actionable
409hydrate hint. - Adds a strict
xfailjourney test that documents and enforces the current limitation: restore marks state but does not yet materialize downloadable content.
Comment on lines
+39
to
+44
| @pytest.fixture | ||
| def auth(client: TestClient) -> dict[str, str]: | ||
| resp = client.post("/aml/users/login", json={"name": "admin", "password": "password"}) | ||
| assert resp.status_code == 200 | ||
| return {"Cookie": f"sessionID={resp.cookies.get('sessionID')}"} | ||
|
|
Comment on lines
+29
to
+32
| @pytest.fixture(autouse=True) | ||
| def _ctx(tmp_path: Path) -> None: | ||
| reset_context(create_context(OpenBladeConfig(db_url=f"sqlite:///{tmp_path / 'journey.db'}"))) | ||
|
|
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.
Builds the end-to-end NAS journey test you asked for and, in doing so, established exactly how much of a 'full NAS experience' works today.
Proven working (passes): create pool → upload → download (online) → file goes offline → download returns the actionable 409 hydrate hint (not a misleading 404). The pool/upload/download/offline-detection surfaces are wired together.
Gap pinned (strict xfail): the NAS restore executor (
HydrationExecutor) is a record-state simulator — it marks a fileonline_cachedbut does NOT materialize a downloadable copy (_simulate_contentreturns placeholder bytes, writes no file). So after a 'successful' restore, download still 409s. The browse→offline→restore→download journey doesn't complete.The xfail is
strict=True: when restore is wired to materialize real bytes from tape (ltfs read → write to a download-resolvable cache path, driven through the archive-plan/ingest path), it flips to xpass and forces the test to assert 200 + matching checksum.This is the precise, CI-visible definition of what a fully-working NAS experience still needs.
https://claude.ai/code/session_012K5Zjc2bggcyJtFbz2D4Pw