~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

The tests run against the spaces alpha, and the stock PDS only where it differs

Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:ci/stock-for-few
.knotless/workflows/test.yml+9−3
@@ -1,5 +1,6 @@
# The tests, under `just cov`'s gate: every test binary against the npm
# reference PDS and the spaces alpha, failing under 100% of lines or
# The tests, under `just cov`'s gate: every test binary against the
# spaces alpha, and those that reach what a PDS without spaces does
# against the npm reference PDS too, failing under 100% of lines or
# functions, a pull's run as the merge queue's batch. Then that every
# XRPC answer they received is as its lexicon says.
#
@@ -73,7 +74,12 @@ steps:
# the batch's does: one against the stock PDS first fell short of the
# gate in every pull that changed a test binary, then ran the alpha
# after it, which cost a minute more than running both side by side.
COV_STORE=/opt/testcache COV_JOBS=$(( $(nproc) / 2 )) COV_HARNESSES=2 COV_TOOLCHAIN=$(rustup show active-toolchain | cut -d' ' -f1) \
# The alpha is the stock PDS with spaces added: against the stock PDS
# too go only the binaries whose tests reach knotless's handling of
# a PDS without spaces, which the alpha never answers as. Every
# binary against both took 40% longer and reached nothing more; a
# line that falls short of the gate without one names it.
COV_STOCK=gateway,pages,cli,spaces,oauth COV_STORE=/opt/testcache COV_JOBS=$(( $(nproc) / 2 )) COV_HARNESSES=2 COV_TOOLCHAIN=$(rustup show active-toolchain | cut -d' ' -f1) \
node harness/cov.mjs /opt/atproto/packages/dev-env
- name: answers
run: |
docs/design/merge-queue.md+2−2
@@ -230,8 +230,8 @@ the branch may have fixed since.
A pre-flight may also check less than the batch does, for speed.
knotless's own `test` checks the same: a pull's run tests against the
stock PDS and the spaces alpha and holds the 100% gate, as the batch's
does. Testing against the stock PDS first and the alpha only when the
spaces alpha, and the stock PDS for what only it reaches, and holds the
100% gate, as the batch's does. Testing against the stock PDS first and the alpha only when the
gate fell short was slower: nearly every change that reached a test
binary fell short, and then ran the two one after the other.
harness/cov.mjs+10−2
@@ -43,6 +43,12 @@
// at once instead: a change that reaches a test binary almost always falls
// short without the alpha, and the two one after the other take longer.
//
// COV_STOCK=a,b runs against the stock PDS only the test binaries named,
// and every one against the alpha. The alpha is the stock PDS with spaces
// added, so the stock PDS reaches nothing more but knotless's handling of
// a PDS without spaces, which only those binaries' tests reach. A line
// that falls short with it names a binary to add.
//
// COV_JOBS sets how many run at once; COV_CLEAN=1 builds every workspace
// crate again first; COV_ONLY=a,b runs only the test binaries named, to
// try something quickly (failing the gate); COV_TOOLCHAIN names the
@@ -316,10 +322,12 @@ const reused = all.filter(stored)
// finish is not one started late: the integration tests before the rest
// where there is no time yet.
const guess = (t) => times[timeKey(t)] ?? (t.name.endsWith('(test)') ? 1e9 : 0)
const runs = all.filter((r) => !reused.includes(r) && netsRun.includes(r.net)).sort((a, b) => guess(b) - guess(a))
const stockOnly = process.env.COV_STOCK?.split(',')
const wanted = (r) => netsRun.includes(r.net) && !(stockOnly && r.net === 'stock' && !stockOnly.includes(r.name.split(' ')[0]))
const runs = all.filter((r) => !reused.includes(r) && wanted(r)).sort((a, b) => guess(b) - guess(a))
console.log(`${reused.length} of ${all.length} runs passed before, as they are now, ${runs.length} to run`)
const left = all.filter((r) => !reused.includes(r) && !runs.includes(r))
if (left.length) console.log(` not run, as COV_NETS is ${netsRun}: ${left.map((r) => `${r.net} ${r.name}`).join(', ')}`)
if (left.length) console.log(` not run, as COV_NETS is ${netsRun}${stockOnly ? ` and COV_STOCK ${stockOnly}` : ''}: ${left.map((r) => `${r.net} ${r.name}`).join(', ')}`)
if (reused.length) console.log(` passed before: ${reused.map((r) => `${r.net} ${r.name}`).join(', ')}`)
if (runs.length) {
AGENTS.md+3−1
@@ -188,7 +188,9 @@ on every pull. `main` deploys only once they all pass:
- `check`: `cargo fmt --check` and clippy, warnings denied; on a pull,
a change file for a change to the client (`harness/changes.sh`).
- `test`: `just cov`'s 100% gate, over the stock PDS and the spaces alpha,
- `test`: `just cov`'s 100% gate, over the spaces alpha, and the stock
PDS for the few test binaries that reach what a PDS without spaces does
(`COV_STOCK` in harness/cov.mjs),
and that every XRPC answer the serve tests received, kept with a
stored run or fresh, is as its lexicon says (`harness/answers.mjs`
over what `harness/cov.mjs` gathers), and that no query the index