IF Commons GitHub

AnyFS S3 tests

0003Active

0003-anyfs-s3-tests · owner if · domain commons

Requirements

FR-001checkpassing

The download of RustFS MUST be pinned by the SHA-256 of the archive of each platform, from a TLS address of the publisher for one version; an archive that is not the pinned one MUST be refused and MUST NOT be unpacked, a program that was not unpacked from a verified archive MUST NOT be run, the program MUST be kept below the cache folder of the user (XDG on Linux), used again with no download where its digest is the one recorded when it was unpacked, and replaced from a verified archive where it is not.

Enforced (check): .github: cd commons/anyfs-s3 && bun run verify — suite/rustfs.test.ts: the pins and the verified download

Proved by: anyfs-s3/suite/rustfs.test.ts

Written in: anyfs-s3/tools/rustfs.ts

Tests: passed: suite/rustfs.test.ts an archive that is not the pinned one is refused with both digests and nothing of it is un; passed: suite/rustfs.test.ts every pin names a TLS address of the publisher for the version, a SHA-256 and the file in ; passed: suite/rustfs.test.ts the pinned archive is unpacked below the XDG cache folder, the program is executable, it i

FR-002checkpassing

The server made in process MUST check Signature Version 4 as the service checks it, MUST honour or ignore each condition as it is told, and MUST be held to the contract tests that run on RustFS, so that a behaviour of the fake that the real server does not have is a failing test.

Enforced (check): .github: cd commons/anyfs-s3 && bun run verify — suite/store.test.ts: one contract on the fake and on RustFS

Proved by: anyfs-s3/suite/store.test.ts

Tests: passed: suite/store.test.ts a store is not made where the bucket is not there, the keys are not accepted, the signatur; passed: suite/store.test.ts the store passes every case of the conformance suite of AnyFS, with revisions of the diges

FR-003checkpassing

Where RustFS cannot be run (no pin for the platform, no network, an archive that is not the pinned one) a test MUST say why it did not run it and MUST run on the server made in process, and a test MUST NOT pass silently for want of the real server.

Enforced (check): .github: cd commons/anyfs-s3 && bun run verify — suite/store.test.ts: a test says why it did not run RustFS

Proved by: anyfs-s3/suite/store.test.ts

Tests: passed: suite/store.test.ts the store passes every case of the conformance suite of AnyFS, with revisions of the diges

Acceptance scenarios

  1. Given an archive whose digest is not the pin, When the binary is asked for, Then it is refused and nothing is unpacked, per FR-001.
  2. Given RustFS, When the contract tests run, Then they are those that run on the fake, per FR-002.

Out of scope

  • Servers other than RustFS and the one in process (MinIO, localstack): a later choice.

Edge cases

  • A cache whose binary was replaced: downloaded again, per FR-001.

Assumptions

  • The publisher gives no checksum file: the pin is the digest of the archive as downloaded over TLS on the day it was pinned.

Open questions

  • None.

Key entities

  • The pin - the address, the digest of the archive and the file in it, for one platform.

Success criteria

SC-001success criterion

Every contract test runs on both servers where both can be run.

Review & acceptance checklist

  • [x] Every requirement is testable (MUST / MUST NOT), not aspirational
  • [x] No company fact is asserted here
  • [x] Every open item is marked, not silently decided

Titles, headings, exports, tables, columns and requirements. Esc closes.