Skip to content

End-to-end NAS journey test (proves wired path; pins restore-materialization gap) - #41

Merged
Amantux merged 1 commit into
masterfrom
test/nas-e2e-journey
Jul 20, 2026
Merged

Amantux merged 1 commit into
masterfrom
test/nas-e2e-journey

Conversation

@Amantux

@Amantux Amantux commented Jul 20, 2026

Copy link
Copy Markdown
Owner

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 file online_cached but does NOT materialize a downloadable copy (_simulate_content returns 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

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
Copilot AI review requested due to automatic review settings July 20, 2026 19:51
@Amantux
Amantux merged commit 43d3ff7 into master Jul 20, 2026
12 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 409 hydrate hint.
  • Adds a strict xfail journey 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'}")))

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.

2 participants