This repository has been archived on 2026-11-14. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Paul HittandClaude Opus 5 7abe9c0ab2 Remove Flamenet Files, and delete accounts outright
Files was folded into the messenger, so this repository is the account
service and nothing else. The file server, its web client, its tenant
schemas and the documentation for all of it are gone.

Removed: EnclaveServer and its routes, EnclaveAccess, EnclaveCrypto, the
browser client under client/, the Files spec and vectors, the tenant SQL
under sql/, the web build and the node CI job, and the Leaf dependency
that only ever rendered the file server's pages. The Dockerfile built
EnclaveServer and shipped Public/ and Resources/; it now builds the
account service alone.

Nothing was lost. Every table in the production Files database was empty
when this was written: no nodes, no blobs, no identities, no tenants.
flamenetfiles.com, www.flamenetfiles.com and files.flamenet.io were
served by that stack and now answer 404; the compose file, the env and a
schema dump are on the box under /srv/prod/backups/, and the two docker
volumes were kept rather than pruned.

The service now issues pseudonyms for one product. `050_retire_files.sql`
deletes the `files` rows and replaces the CHECK constraint rather than
dropping it, so a container still being drained cannot write one back.
Every account had a `files` pseudonym and none had a `files` identity,
which is why there is no key material to migrate: the row was bookkeeping
for a product nobody enrolled in.

That also settles the delete endpoint added on this branch. It was built
around keeping a shared account alive while another product still held an
identity, and with one product that rule can never fire. `AccountRemoval`
and its five tests are gone, the response no longer reports which of two
outcomes happened, and a delete simply removes the account. None of it
had shipped, so there is no wire compatibility to keep.

Verified: the suites pass, the live delete script passes against a real
Postgres and a running service, and the image builds and boots to its
"DATABASE_URL is required" refusal, which is the account service and not
a file server.

`flamenet/files/auth/v1` stays as the authentication context string. It
is a wire constant baked into every stored verifier, not a product name,
and changing it would lock out every existing account. Said so in
ARCHITECTURE.md so nobody tidies it later.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 17:30:55 -04:00

1.9 KiB

Testing

Four layers, and they answer different questions. Running the fast ones proves the maths; only the last one proves the app.

Layer What it can tell you What it cannot
Engine vectors (Swift, Kotlin, JS) the crypto agrees across three languages whether anything calls it
Server unit tests the lattice, the SQL and the account kit hold whether a route uses them
Integration scripts the real client modules against a real stack whether a button is wired to it
App UI suites a person tapping the thing little else, slowly

Every bug found in sharing and in recovery was found by the bottom row.

The fast ones

swift test    # lattice, SQL scripts, accounts kit

Against a throwaway stack

./scripts/test-rate-limits.sh        # the throttle SQL, against a real Postgres
./scripts/test-account-delete.sh     # POST /accounts/delete, service and database

Both spin up their own Postgres and tear it down. test-account-delete.sh also builds and runs the account service, because what it checks is the part AccountRemovalTests cannot reach: the transaction, the schema's cascades, and whether a refused passphrase leaves the row where it was.

The scenario worth knowing about is B. One handle backs both products, so a Messenger delete that took the whole account would take the identities row that wraps somebody's file key, and nothing else holds a copy. B is what fails if that reading ever comes back.

The rate limits, when you run the throwaway stack

docker-compose.yml raises two limits a deployment should leave alone: registrations and sign-in attempts per address, because every test run on a development machine arrives from one address. The per-handle sign-in limit is deliberately left at its default. It is the one that actually stops a password guess, and scripts/test-throttle-restart.sh asserts that it engages.