@ogygia/federation
0.14.0 minor
@ogygia/federation
Minor Changes
- #776
702f88fThanks @PuruVJ! -@ogygia/federation: Breaking: an app checks the signed calls it receives against itsaudience, or the host of itsORIGINenvironment variable when it sets none, and never against theHostthe request names. With neither, every signed call gets a 401 andfederate()warnsfederation_audience_missing; setaudience(orORIGIN) on each app that peers call into.verify_signed_request()withoutaudiencefollows the same rule. - #776
702f88fThanks @PuruVJ! - federation: a signed call also carries one capability token (x-og-cap): method, path, body hash, claims and audience as length-prefixed fields, a nonce that checks once, signed with Ed25519; a receiver checks a call that has one by it alone, and still accepts a call with only the legacy headers (x-og-ts,x-og-n,x-og-sig) from a peer that has not upgraded yet - #516
368b1daThanks @PuruVJ! - -@ogygia/core,ogygia: breaking:SharedStateis no longer exported fromogygiaor@ogygia/core. Import it from@ogygia/federation/sharedinstead; it works the same. -@ogygia/federation:SharedState(state shared across separate builds on one page) is exported from@ogygia/federation/shared.
Patch Changes
- #1001
2a2f7adThanks @PuruVJ! - A peer's asset refs are pinned to its origin only in the attribute values of real tags: text on a peer page that looks like one (a code sample, a comment, script text) reaches the shell as the peer wrote it. - #1121
d61549fThanks @PuruVJ! -@ogygia/core: Tag and attribute names read from server HTML are lower-cased the way a browser does it, ASCII letters only, sodata-Äsrcanddata-äsrccount as two attributes.@ogygia/federation: A peer tag with two attributes whose names differ only past ASCII (data-Äsrc,data-äsrc) now has each value pinned in its own attribute. Before, the first value was written into the second. - #1451
032d21fThanks @PuruVJ! - A request body that breaks off mid-upload is a 400 on the profiler's login and on the federation routes (the exposed table, a thaw notice), not a thrown error and a 500. - #1095
b3f4d94Thanks @PuruVJ! - The region batch endpoint and federation's routes stop reading a request body once it passes their size cap, also when it is sent without acontent-length(before, such a body was read whole, then refused). - #475
81a40eaThanks @PuruVJ! - Durations are measured on the monotonic clock: the memory store's TTLs, a federation deploy check's retry wait, the profiler's recording window, deadlines and busy waits, the testing API's wait, and the perf CLI's waits. A wall-clock step no longer moves them. - #533
49ff074Thanks @PuruVJ! - -@ogygia/compiler: new package, ogygia's compiler and its Vite plugin:@ogygia/compiler(the compiler),@ogygia/compiler/vite(ogygia(),definePlugin) and@ogygia/compiler/ids. It uses core only through@ogygia/core/contract; core never depends on it. -@ogygia/core: breaking: the@ogygia/core/vite,@ogygia/core/internal/compilerand@ogygia/core/internal/compiler-idsimport paths are gone. Import fromogygia/vite(or@ogygia/compiler/vite),@ogygia/compilerand@ogygia/compiler/idsinstead; the names are the same. -@ogygia/core: the types of theogygia:*virtual modules and the build's switches are named in core (@ogygia/core/contract), so core's own types no longer reach into the compiler. -ogygia:ogygia/vite,ogygia/internal/compilerandogygia/internal/compiler-idsre-export@ogygia/compiler; apps change nothing. -@ogygia/barrels,@ogygia/cli,@ogygia/content,@ogygia/devtools,@ogygia/federation,@ogygia/flags,@ogygia/postrender,@ogygia/router: they takedefinePluginand the compiler from@ogygia/compiler, a new peer dependency (ogygiabrings it). - #855
db021f1Thanks @PuruVJ! -@ogygia/federation: a shell's pages allow island code from every peer origin infederate({ peers }), replicas included, so peer islands still wake under core's code-origin check (#851). - #703
1865089Thanks @PuruVJ! -@ogygia/federation: an exposed route table is always asked on the app's own origin. A fragment request whosepathdoes not start with exactly one/answers 400, andsearchis always the query. - #707
d03eddaThanks @PuruVJ! -@ogygia/federation: a deferred remote hole's signature now covers its peer, kind, target and search as separate fields (message version 2). A hole URL minted before the update is refused like any other bad signature; pages rendered after the update carry new ones. - #441
352a522Thanks @PuruVJ! - A peer's redirect target is escaped into the "moved" card's link, so a quote in it no longer breaks the attribute. - #1973
cf48d2fThanks @PuruVJ! - A peer page that is not found is now handled one way: it is a 404 wherever the shell still sets the status, and a slot that can't change its status keeps its fallback. A deferred page hole now answers 404 and keeps its fallback (it used to answer 200 and put the peer's not-found page in the region). A streamedmount({ stream })now shows the "temporarily unavailable" card (it used to put the peer's not-found page inside the 200).mount()andmount.kit()still answer 404, as before. A peer page that moves with a status that is not a redirect (such as 304) is now refused as a bad answer (a 502,federation_peer_answer_invalid) instead of being passed on as a redirect. - #776
702f88fThanks @PuruVJ! -@ogygia/federation: a signed request'sx-og-sigis accepted only as the canonical base64 of its 64 bytes, so every copy of a signature counts as the same one. - #441
352a522Thanks @PuruVJ! - A mounted peer page's title is escaped once: "Tom & Jerry" no longer shows as "Tom & Jerry" in the tab, search results or the error page. - #1503
778d273Thanks @PuruVJ! - A federation request (/og/frag,/og/thaw,/og/fragment/*) that reaches a server before anyfederate()ran there is now said once asfederation_unregistered, instead of a bare 404 with no word. - #1457
620d27eThanks @PuruVJ! - The head's end is found as the browser reads it: anapp.htmlthat writes</HEAD>gets ogygia's head injections, and a</head>inside a head script's text (a JSON-LD string) no longer takes them into the script. The body's end is found in any case. - #938
f889cbfThanks @PuruVJ! - A deferred peer region whose peer fails (an error status, a cut or malformed body, or no answer) no longer answers its hole as an empty success: the hole answers 502, 503 or 504, so the region keeps its fallback and the browser asks again. - #878
08fd293Thanks @PuruVJ! - A mounted peer page's head is read as a browser reads it: a title or stylesheet inside a comment is ignored, an unquotedrelcounts, and a meta whose quoted content holds>is carried whole instead of cut. - #1116
9f7eac5Thanks @PuruVJ! -@ogygia/core: Reading tags out of server HTML (the head dedupe, region CSS, hole answers, seed injection, stitching) costs 2 to 53% fewer steps: each tag is read once, a character at a time.@ogygia/federation: Lifting a peer page and pinning its asset refs costs about half the steps: one walk, each tag's attributes read once. - #930
ad132e5Thanks @PuruVJ! - A peer answer that is not its JSON document no longer turns the shell's page into a 500: it is said asfederation_peer_answer_invalid, a static widget shows its boundary card, and a page read or a mutation is a 502. - #1104
e09c8aeThanks @PuruVJ! - A peer answer that is JSON but not its document's shape ({}, a proxy's{"error":…}, a field of another type) is a failed hop like one that does not parse:federation_peer_answer_invalidis said, a static widget shows its boundary card and a page read is a 502 (before, aTypeErrormade the shell's page a 500). - #932
cd255e1Thanks @PuruVJ! - A static widget whose peer answers an error status (4xx or 5xx) no longer turns the shell's page into a 500: it shows its boundary card, the answer is said asfederation_peer_answer_invalid, and a page read or a post passes the peer's own 503 or 504 through (any other error status is still a 502). - #1373
f3fd33cThanks @PuruVJ! - A peer region's endpoint is re-pointed through the shell however its tag is written (single quotes, no quotes, spaces around=, upper case, after a value holding>), and text that only looks like an endpoint inside another value is left alone. - #1750
d780369Thanks @PuruVJ! - A mounted peer page no longer carries itsogygia-*metas into the shell's head: the peer's router meta turned on the client router in a shell built withrouter: false, and overrode a shell's own view-transition setting. - #2025
7582a45Thanks @PuruVJ! - A peer page mounted in a shell keeps the context its page set (createContext's setter, ogygia'ssetContext): it reaches the peer's own islands, scoped to the mounted page. - #1821
8684e66Thanks @PuruVJ! - A page read from a peer whose fetch a thaw or a mutation drops every time no longer fetches forever: after 16 tries it is a 504, said as the new warningfederation_peer_read_dropped. - #919
9215339Thanks @PuruVJ! - A server island (or any region with its own endpoint) inside a peer's fragment now shows: the fragment pins its endpoints to its origin, and the shell serves each as a hole of its own that forwards to the peer, instead of asking its own endpoint and getting a 403. - #858
8769852Thanks @PuruVJ! -@ogygia/federation: a peer that serves its island code from its own assets origin (a CDN) wakes on the shell: the shell's page allows the origin of each peer fragment's own runtime, taken only from that peer's answer (#856). - #962
b4d8675Thanks @PuruVJ! - A static widget whose peer gives no answer at all (down, unreachable, or past its timeout) no longer turns the shell's page into a 500: it shows its boundary card, and the failure is said as the new warningfederation_peer_unreachable(also for a page read, a post and a deferred region, which answer 504). - #1012
26f7e95Thanks @PuruVJ! - A deferred peer region (and any plugin capability) names the key that signed it, as a region hole does: a server of another deployment (a rolling deploy without one shared OGYGIA_SECRET) refuses it asforeign-key, with the advice that goes with it, instead of as a bad signature. - #1470
a13ad32Thanks @PuruVJ! - A plugin's signed hole (federation's/og/frag) now pays the visitor's region rate budgets as a region hole does: the probe budget before the signature check, the render budget after. A federation hole can now answer 429 with Retry-After under load. - #992
edff1c1Thanks @PuruVJ! -@ogygia/federation: a thaw notice whoseid,hoportagsis not the notice's shape is refused with a 400, applies nothing and is passed on to no one (#988).
Updated dependencies: @ogygia/[email protected], @ogygia/[email protected], @ogygia/[email protected], @ogygia/[email protected]
0.13.0 minor
@ogygia/federation
Patch Changes
- #221
a5d28b0Thanks @PuruVJ! - The deploy thaw is tried again when its first check fails (the store unreachable, or a peer that never took the notice), instead of being lost until the pages' TTL, and only the peers that missed it are sent it again, for a bounded number of tries (#198). - #221
a5d28b0Thanks @PuruVJ! - After a thaw or a mutation, an old peer request ending no longer removes the newer one, so a read joins it instead of starting another upstream fetch (#210). - #175
a99a49aThanks @PuruVJ! - Every ogygia error and warning has a code and a page atogygiajs.dev/e/<code>: dev prints the wording and the link, a production build prints the link alone ([ogygia] https://ogygiajs.dev/e/<code>?<args>), so the wording stays out of the client and server bundles. - #333
865eb55Thanks @PuruVJ! - A peer read that starts while a mutation to that peer is out is no longer kept once the mutation ends, so the poster's next read never gets the page from before their own post (#331). - #305
e605070Thanks @PuruVJ! - A thaw drops only the peer documents it names: a fetch already out for another fragment is kept when it lands, and a caller whose fetch a thaw or a mutation made stale reads the page again instead of getting the old one (#294). - #323
7a53a56Thanks @PuruVJ! - A publish's thaw notices go through an outbox handed to the request'swaitUntil(the newapp.keepAlive), so a serverless instance that freezes after the response no longer loses them and peers no longer keep stale pages until their TTL (#286). - #321
17e009aThanks @PuruVJ! - A peer whose store fails to apply a thaw notice now answers an error, so the sender sends it again, instead of answering done and deduping the retry;app.notifyrejects once every hook ran when one failed (#287). - #321
17e009aThanks @PuruVJ! - A thaw notice that a peer never took, after every retry, now printsfederation_thaw_notice_failedwith the peers that missed it, instead of nothing. - #323
7a53a56Thanks @PuruVJ! - A peer applies two copies of a thaw notice that arrive at once only once, and keeps at most the newest 10 000 notice ids instead of every id for ten minutes (#308).
Updated dependencies: @ogygia/[email protected], @ogygia/[email protected], @ogygia/[email protected]
0.12.0 minor
@ogygia/federation
Patch Changes
- #157
a217b91Thanks @PuruVJ! - A remote fragment's island graph (its chunk preloads and portable snippets' locations) is pinned to the remote's origin like its attributes, so the shell no longer resolves it against its own files.
Updated dependencies: @ogygia/[email protected], @ogygia/[email protected]
0.11.0 minor
@ogygia/federation
Patch Changes
- #83
e229a9aThanks @PuruVJ! - Remote deferred holes now share local holes' lifetime and renewal: they were signed for a fixed 5 minutes and answered 410 after, so a stored or cached page older than that showed dead remote regions. Plugins sign with core's rule throughapp.capability. - #83
e229a9aThanks @PuruVJ! - A peer-cache refresh that answers an error no longer replaces the good document it was refreshing.
Updated dependencies: @ogygia/[email protected], @ogygia/[email protected]