diff --git a/CODING_STANDARDS.md b/CODING_STANDARDS.md index d13f5c4..28bdc46 100644 --- a/CODING_STANDARDS.md +++ b/CODING_STANDARDS.md @@ -43,12 +43,12 @@ A state the compiler refuses needs no test and cannot return unnoticed. body. - Why: it costs no test run, fails when the state becomes constructable again, and passes for that reason only. -- **SF-IMP-5** Never write or propose an integration or end-to-end test for an - invariant a type can enforce; enforce it in types (`SF-IMP-1`). Test at - runtime only behaviour the compiler cannot prove (decoding external data, peer - responses, timing, or database and runtime behaviour). Run tests at the - lightest isolation reaching that boundary and name the covered behaviour in - any test proposal. +- **SF-IMP-5** Never write or propose an integration test (embedded, + local-runtime, container, or microVM) for an invariant a type or formal proof + can enforce; enforce it in types (`SF-IMP-1`). Test at runtime only behaviour + the compiler cannot prove (decoding external data, peer responses, timing, or + database and runtime behaviour). Run tests at the lightest runtime reaching + that boundary and name the covered behaviour in any test proposal. - Why: slow tests tie up shared hosts while proving less than a compile error. ## Tests diff --git a/WORKING.md b/WORKING.md index b843474..a4a34df 100644 --- a/WORKING.md +++ b/WORKING.md @@ -7,8 +7,12 @@ narrow these rules, never loosen them. - **SF-WRK-1** Deliver the whole task. Stop only when merged, in the merge queue, or blocked by something only the owner holds, and state which applies. - **SF-WRK-2** Do reversible work without asking. -- **SF-WRK-4** Never run full test suites, end-to-end tests, or tests that boot - a container or virtual machine on shared hosts; leave them to CI. +- **SF-WRK-4** On shared hosts, never run full-repository test suites, microVM + runs, or multi-service browser stacks; leave them to CI. A scoped + single-package integration run, including one that starts a single scoped + container, may run locally when it fits the host's resource budget. + - Why: those runs hold a shared host's CPU, memory and disk for long stretches + and starve other work, while CI runs them on dedicated runners. - **SF-WRK-5** Before any destructive or broad action, restate the instruction's verb and object in one line and act strictly on that, not on a nearby interpretation. diff --git a/docs/solutions/architecture-patterns/an-io-test-isolates-one-adapter-and-its-runtime-is-a-choice.md b/docs/solutions/architecture-patterns/an-io-test-isolates-one-adapter-and-its-runtime-is-a-choice.md index 31347e7..3678a39 100644 --- a/docs/solutions/architecture-patterns/an-io-test-isolates-one-adapter-and-its-runtime-is-a-choice.md +++ b/docs/solutions/architecture-patterns/an-io-test-isolates-one-adapter-and-its-runtime-is-a-choice.md @@ -51,9 +51,12 @@ on logic defects, runs slowly, and cannot say which side broke. - Choose the adapter's isolation by what it needs. For a database, that is an in-memory engine first (SQLite on `:memory:`, PGlite), then a container or a virtual machine only for what those cannot do. -- Test the whole system on real services in the end-to-end suite. +- Test the whole system on real services as an integration test at the lightest + runtime that reaches those services. - Keep the shared-host limit on what is heavy, not on one runtime by name: - `SF-WRK-4` covers any test that boots a container or virtual machine. + `SF-WRK-4` keeps full-repository suites, microVM runs and multi-service + browser stacks in CI, and admits a scoped single-container run locally when it + fits the host's budget. ## Why This Matters