Skip to content

test(store): verify live content-store commands #6746

Open

Description

@devops-cli-service

Split from #4761.

Problem: The item's live checks need a real content store, the devops key from dan-petty/homelab#98, and the files host from dan-petty/homelab#341. No offline test can prove the live endpoint, the 150 MB upload through s3.<domain>, or that the index page shows a new window right after publish. Why deferred: The key and the files host are outside this repository. The rest of the store command group is testable offline through the store seam and its in-memory fake. Acceptance criteria: Against the live store, devops store publish, ls, get, url and presign (at most 7 days) work. devops store doctor puts, lists, gets, presigns and deletes a canary through the cluster endpoint and through s3.<domain>. A 150 MB file uploads through s3.<domain>. The index page shows a new window right after its publish. The check runs only after dan-petty/homelab#98 provides the devops key and dan-petty/homelab#341 serves the files host.

Proposed design

Problem statement

The store command group has offline tests with an in-memory fake, but no check proves the live endpoint, the 150 MB upload through s3.<domain>, or the index page after a publish. This item adds a devops store doctor live check that runs publish, ls, get, url and presign, a canary through both endpoints, the large upload and the index-page read against the real content store. It can run only after dan-petty/homelab#98 provides the devops key and dan-petty/homelab#341 serves the files host; its offline cases run through the store seam and the in-memory fake with no skip on host state.

Acceptance criteria

Requirement: Live store commands

devops store doctor SHALL run devops store publish, ls, get, url and presign against the real content store.

Scenario: Live command run

  • WHEN uv run devops store doctor runs with the devops key and the files host
  • THEN it exits 0, ls lists the published key, get returns the published bytes, url and presign return a URL, and the presign URL expires in at most 7 days.

Requirement: Doctor canary on both endpoints

devops store doctor SHALL put, list, get, presign and delete one canary through the cluster endpoint and through s3.<domain>.

Scenario: Live doctor run

  • WHEN uv run devops store doctor runs with the devops key and the files host
  • THEN it prints put, list, get, presign and delete for the cluster endpoint and for s3.<domain>, and exits 0.

Requirement: 150 MB upload

devops store doctor SHALL upload a 150 MB file through s3.<domain> with the store client's normal upload path.

Scenario: Large file upload

  • WHEN uv run devops store doctor uploads a 150 MB file through s3.<domain>
  • THEN it exits 0, the object's ContentLength is 150,000,000 bytes, and a get returns the same SHA-256.

Requirement: Index page after publish

devops store doctor SHALL show a new window on the index page right after its publish.

Scenario: Index refresh

  • WHEN uv run devops store doctor publishes a new window and fetches the index page
  • THEN the page lists the new window without a manual refresh.

Requirement: Missing setting refusal

devops store doctor SHALL refuse with an error that names the missing setting when the devops key or the files host is absent, and its offline tests SHALL NOT skip on the state of the host.

Scenario: Missing key or host

  • WHEN the offline test runs devops store doctor with the store fake and a config that lacks the devops key or the files host
  • THEN the command exits non-zero, its error names the missing setting, and the offline suite reports the case as passed, not skipped.

Existing Tool Considered

No alternatives check has run. pytest 9.2.0 (MIT, pyproject.toml:106) is the project's test harness and runs the offline cases through the store seam and its in-memory fake. boto3 1.44.3 (Apache-2.0) is the S3 client that the object-store build test already uses for a 150 MB multipart upload and a SHA-256 read-back (k8s/object-store/build-test/scripts.yaml:15, :18, :44, :60). Neither covers a live end-to-end proof of the project's own devops store commands or its index page: that needs the devops key and the files host. docs/TESTING.md:78 forbids a pytest test that skips on the state of the host, so the live part is a thin devops store doctor command over the existing store client, and its offline tests reuse the store seam and fake. The command costs about 2,000 tokens and 1 hour to write, and about 200 tokens per store API change to keep.

Key questions

  • How should the live store suite gate on the missing key and files host?: There is no live pytest suite to gate. docs/TESTING.md:78 forbids a test that skips on the state of the host, and the project's live checks are devops commands (devops k8s searxng-check and devops k8s crawl4ai-check). Add the live rows to devops store doctor: it refuses with a ConfigurationError that names the missing setting when the devops key or the files host is absent, and its offline cases run through the store seam and the in-memory fake with no skip. A person runs uv run devops store doctor after dan-petty/homelab#98 and dan-petty/homelab#341. (best practice) [sources: docs/TESTING.md:78, docs/TESTING.md:68, openspec/changes/archive/2026-11-08-3929-searxng-check-command/design.md:5, openspec/changes/archive/2026-11-08-3894-crawl4ai-check-command/design.md:5]
    • Chosen: devops store doctor live check. It follows the project rule that a live check is a command, refuses with a named setting, and keeps the offline cases on the store seam and fake.
    • Rejected: pytest skipif on live settings. It skips on the state of the host, which docs/TESTING.md:78 forbids; the project rejected a live pytest test for the same reason (test(k8s): live check that Crawl4AI refuses internal URLs #3894, test(k8s): live check of the SearXNG service #3929).
    • Rejected: separate live CI job. CI has no devops key before homelab#98, and a job that skips without it repeats the same host-state skip.
    • Rejected: no gate, fail when missing. It makes the offline suite red and hides the external block; the command's ConfigurationError names the missing setting at the live edge.
  • What presign TTL cap should the live check assert?: At most 7 days (604800 seconds). The live check reads the X-Amz-Expires parameter of the presigned URL and asserts it is no more than 604800. The issue sets this cap, and S3 SigV4 presigned URLs allow at most 7 days. (proposed)
    • Chosen: at most 7 days (604800 s). The issue sets this cap and it is the maximum that an S3 SigV4 presigned URL allows.
    • Rejected: 1 hour. It is shorter than the issue's cap and would fail the doctor canary that the issue asks for.
    • Rejected: no cap. S3 rejects a TTL over 7 days, so the check would pass a URL that the store cannot issue.
  • How should the live suite upload a 150 MB file?: Through the store client's normal upload path, with boto3 upload_fileobj and TransferConfig, which uses a multipart upload above the part threshold. The object-store build test already uploads 150 MB this way with 8 MiB parts, then reads the object back and compares its SHA-256. The live check asserts ContentLength is 150,000,000 bytes and the SHA-256 matches; it does not force one PUT or one part. (best practice) [sources: k8s/object-store/build-test/scripts.yaml:18, k8s/object-store/build-test/scripts.yaml:22, k8s/object-store/build-test/scripts.yaml:44, k8s/object-store/build-test/scripts.yaml:60]
    • Chosen: normal client upload with multipart above the threshold. It exercises the same path that the store client and the object-store build test use; the build test uploads 150 MB with 8 MiB parts and checks the byte count and SHA-256.
    • Rejected: forced single PUT. A 150 MB single PUT is fragile and is not the path that the store client uses.
    • Rejected: fixed 8 MiB parts in the test. It duplicates the client's part choice and fails when the client changes its threshold; assert the final object instead.

Fit

Fits in one pull request.

Suspected block

dan-petty/homelab#98 must provide the devops key before the live check can run.

Dependencies

#4761, dan-petty/homelab#341

Activity

  1. added
    type/test
    source/agent
    status/new
    value/medium
    on Nov 22, 2026
  2. devops-cli-service commented on Nov 22, 2026

    @devops-cli-service
    ContributorAuthor
    • Scope: none. The title has the scope store, and .github/labels.yml declares no scope/store label. Add the label to the file to give the scope to this item.
    • Related: feat(cli): publish and read content-store files #4761, which asks for a different change. Both concern the content-store command group; dan-petty/devops-cli#4761 delivers the commands, this item delivers their live verification.
  3. added
    effort/medium
    priority/p2-medium
    on Nov 22, 2026
  4. devops-cli-service commented on Nov 23, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumsource/agentstatus/newtype/testvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions