Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CODING_STANDARDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions WORKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down