Tests / @ogygia/federation

@ogygia/federation

Version 0.13.1
commit 4b18f465
65 test runs (65 tests, each run in Node, the browsers or both)
1.14× lines of test for each line of source (2,121 to 1,855) Only real test code counts: test files and their helpers, not fixtures, sample apps or benches. Blank lines are left out on both sides.
Exactly what is counted non-blank lines of test code across the repo (*.test.ts, *.test-d.ts, *.spec.ts, and the .ts helpers in test/ and e2e/ folders; no fixtures, fixture apps, stubs or benches), over non-blank lines of packages/*/src (no .d.ts or generated files)
75.8% of source lines run by the tests
  • 65Unit
  • 0Browser
  • 0End to end
  • 0Type tests
  • 0Lint rules
  • 0Failing

Coverage

  • 75.8%Lines
  • 62.5%Branches
  • 78.6%Functions
  • 71.8%Statements

Every test

End-to-end suites are not part of this report yet.

65 tests

TestKindNodeChromiumFirefoxWebKit
packages/federation/test/federation.test.ts
cross-app thaw > peer.drop evicts cached documents by their adopted tagsUnitpassnot runnot runnot run
deferred remote holes — the lifetime and renewal of a local hole > an expired hole is answered as an expired local one, and the runtime’s renewal re-signs itUnitpassnot runnot runnot run
deferred remote holes — the lifetime and renewal of a local hole > answers a live hole with the fragmentUnitpassnot runnot runnot run
deferred remote holes — the lifetime and renewal of a local hole > expires in SECONDS, by the app’s rule: the `ttl` window, or the life of the deploy on a stored pageUnitpassnot runnot runnot run
deferred remote holes — the lifetime and renewal of a local hole > refuses a forged hole and a renewal of one that has not expiredUnitpassnot runnot runnot run
Ed25519 signing / verification > a second authorized key still verifies (rotation / multi-caller)Unitpassnot runnot runnot run
Ed25519 signing / verification > accepts a fresh, correctly-signed request once and returns its claimsUnitpassnot runnot runnot run
Ed25519 signing / verification > AUDIENCE BINDING: a hop signed for cms.test is rejected at dash.test (same key)Unitpassnot runnot runnot run
Ed25519 signing / verification > NaN timestamp does not bypass the freshness gateUnitpassnot runnot runnot run
Ed25519 signing / verification > REPLAY: a byte-identical second delivery is rejectedUnitpassnot runnot runnot run
Ed25519 signing / verification > tampered claims (re-encoded x-og-user) break the signatureUnitpassnot runnot runnot run
federate() — registration + fail-closed > returns typed peer handles keyed by nameUnitpassnot runnot runnot run
federate() — registration + fail-closed > warns when it exposes but no peer has a key (and not with `open`)Unitpassnot runnot runnot run
lift_document — an app’s full HTML → the wire shape > a graph that is not an object passes through as it cameUnitpassnot runnot runnot run
lift_document — an app’s full HTML → the wire shape > extracts title, stylesheet links, and SEO meta; drops charset/viewport; absolutizes assetsUnitpassnot runnot runnot run
lift_document — an app’s full HTML → the wire shape > pins the island graph to the remote: chunks, entry keys, snippet locationsUnitpassnot runnot runnot run
mount() — claims auto-built from the table identity > anonymous + no experiments = NO claims header at allUnitpassnot runnot runnot run
mount() — claims auto-built from the table identity > signs c.visitor + EVERY table experiment into the hop — no hand-listingUnitpassnot runnot runnot run
mount() — claims auto-built from the table identity > STATUS CHANNEL: a mounted 404 answers 404 through the shellUnitpassnot runnot runnot run
peer transport — one per remote app > a pre-mutation in-flight fetch cannot repopulate the cache: its caller reads againUnitpassnot runnot runnot run
peer transport — one per remote app > a stale refresh that answers an error document never replaces the good copyUnitpassnot runnot runnot run
peer transport — one per remote app > coalesces concurrent misses into ONE upstream callUnitpassnot runnot runnot run
peer transport — one per remote app > failover: an unreachable primary tries the next origin; a 404 does notUnitpassnot runnot runnot run
peer transport — one per remote app > postDoc speaks AS the peer (origin header) and forwards the content-typeUnitpassnot runnot runnot run
peer transport — one per remote app > serves fresh, then STALE + refreshes in background after ttl (SWR)Unitpassnot runnot runnot run
peer transport — one per remote app > widgetDoc hits the catalog path with propsUnitpassnot runnot runnot run
peer transport — one per remote app > widgetDoc throws a plain Error; doc() throws http errors; a network failure is a 504Unitpassnot runnot runnot run
remote regions > a deferred remote region is a hole with a shell-signed urlUnitpassnot runnot runnot run
remote regions > a static remote page bakes its HTML and adopts the fragment’s tags into the captureUnitpassnot runnot runnot run
remote regions > mint_hole degrades to an empty inert region when no signer is installedUnitpassnot runnot runnot run
packages/federation/test/owners.test.ts
a deploy thaw is owed to the peers that missed it, not to every peer > a peer that never takes it: given up after a bounded number of rounds, with a warning naming itUnitpassnot runnot runnot run
a deploy thaw is owed to the peers that missed it, not to every peer > its policy keeps the old numbers: a round no sooner than 30 s after the last, 10 roundsUnitpassnot runnot runnot run
a deploy thaw is owed to the peers that missed it, not to every peer > one peer refuses: only it is sent the thaw again, the others take it onceUnitpassnot runnot runnot run
a peer request belongs to the generation that started it (#210) > after a drop, the old request ending does not remove the new one: no second upstream fetch#210Unitpassnot runnot runnot run
the deploy thaw is tried again until it is done (#198) > done is done: a check after a successful thaw does nothing#198Unitpassnot runnot runnot run
the deploy thaw is tried again until it is done (#198) > requests during a check join it (one check, one thaw)#198Unitpassnot runnot runnot run
the deploy thaw is tried again until it is done (#198) > the peer never takes the thaw AND the store goes down after the first ask: the owed thaw goes without asking it again#198Unitpassnot runnot runnot run
the deploy thaw is tried again until it is done (#198) > the peer never takes the thaw: a later request thaws again, and the store is asked once#198Unitpassnot runnot runnot run
the deploy thaw is tried again until it is done (#198) > the store is down for the first check: a later request checks again and thaws#198Unitpassnot runnot runnot run
packages/federation/test/peer-flights.test.ts
a peer read is one flight per key (#294) > a mutation while a read is out: the reader gets the page as it is after it#294Unitpassnot runnot runnot run
a peer read is one flight per key (#294) > a read that starts while a mutation is out: once the mutation ends, no read gets the page from before it#294Unitpassnot runnot runnot run
a peer read is one flight per key (#294) > a thaw of other tags keeps the fetch in flight: its answer is kept#294Unitpassnot runnot runnot run
a peer read is one flight per key (#294) > a thaw of the tags its answer carries: the waiting caller gets the page fetched again#294Unitpassnot runnot runnot run
packages/federation/test/router-stream.test.ts
mount({ stream: true }) — the sugar > a COMPONENT fallback bakes as an inline region into the flushed partUnitpassnot runnot runnot run
mount({ stream: true }) — the sugar > a dead MFE yields the offline card AFTER the flush — first byte never waitedUnitpassnot runnot runnot run
mount({ stream: true }) — the sugar > a late redirect degrades to a link card (status already flushed)Unitpassnot runnot runnot run
mount({ stream: true }) — the sugar > fallback flushes; the doc (css+head+body) rides the late chunkUnitpassnot runnot runnot run
page(async function*) — the streamed slot > a region that cannot bake fails LOUDLY into the error card (never an empty chunk)Unitpassnot runnot runnot run
page(async function*) — the streamed slot > a throw AFTER the flush becomes an error-card chunk, page still closesUnitpassnot runnot runnot run
page(async function*) — the streamed slot > flushes the first yield, chunks the rest as templates, boots onceUnitpassnot runnot runnot run
page(async function*) — the streamed slot > non-GET buffers to the FINAL yield (actions need a whole answer)Unitpassnot runnot runnot run
page(async function*) — the streamed slot > yields REAL regions — async generators auto-await them, the resolved shapes must bakeUnitpassnot runnot runnot run
packages/federation/test/router-when.test.ts
mount(pick) — the flag-picked canary > a pick that yields a non-client throws loudly, naming the fixUnitpassnot runnot runnot run
mount(pick) — the flag-picked canary > routes the hop through the picked client, stickily per visitorUnitpassnot runnot runnot run
when() — a gated-off route does not exist > endpoint: off → fall-through (null, no base); on via ?og-exp → servedUnitpassnot runnot runnot run
when() — a gated-off route does not exist > page under an owned base: off → 404 without ever touching the page (no network)Unitpassnot runnot runnot run
when() — a gated-off route does not exist > the gate decision self-registers for federation carry (like any flag read)Unitpassnot runnot runnot run
when() — a gated-off route does not exist > the gate is any (c) => boolean — a plain predicate worksUnitpassnot runnot runnot run
packages/federation/test/sim-deploy-thaw.test.ts
the deploy thaw, simulated > reaches every peer once the store and the peers are back, sent once to eachUnitpassnot runnot runnot run
packages/federation/test/sim-peer.test.ts
a federation peer, simulated > fetches each page once per thaw, and never serves a page from before what it sawUnitpassnot runnot runnot run
packages/federation/test/sim-thaw.test.ts
a thaw notice arriving, simulated > is answered done only once applied, applied once, and passed on only thenUnitpassnot runnot runnot run
packages/federation/test/thaw-receive.test.ts
a thaw notice whose evict fails (#287) > answers an error and keeps no id; the retry with the same id is applied#287Unitpassnot runnot runnot run
two copies of a notice at once (the sender tried again while the first applied) > applies it once, and passes it on onceUnitpassnot runnot runnot run
packages/federation/test/thaw-send.test.ts
a publish on a serverless platform (#286) > hands the thaw broadcast to the request's waitUntil, which holds until a peer took it#286Unitpassnot runnot runnot run
a thaw notice no peer took > is said with the peers that missed it, once the retries are spentUnitpassnot runnot runnot run