From 902481a03dcd1bac0ed1eeca2fe8f1d72edfcb60 Mon Sep 17 00:00:00 2001 From: Kartios Date: Thu, 6 Aug 2026 03:46:59 -0700 Subject: [PATCH] The access test follows the sky out from behind the sign-in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Written against a `Capabilities` that had `liveData` on it, and landing on a master where it does not: 1db868a split that flag into `liveEnvironment` and `liveMarkers` and made both true for everybody, so my assertion that an anonymous visitor gets `liveData: false` was pinning a rule the codebase had deliberately just removed. A test that fails an intentional change is noise; a test that would have *blocked* one is worse. So the assertion is inverted and given the reasoning that replaced it. The sky is public because it is a government observation and an unencrypted broadcast — neither is a thing an account can grant access to, because neither is withheld from anyone — and the gate cost the only moment that makes this project land, on a first visit, from a stranger. That argument is now pinned by a test named after it, so the next person to reason from first principles that live feeds are what an account buys you finds out in CI rather than in the diff. Markers keep their own assertion: asked for by everyone, granted by the server, enforced at the 401. The client flag reports what the server already decided and is not the place that decision lives. 32 client tests, 137 server, both packages typecheck. --- src/test/access.test.ts | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/test/access.test.ts b/src/test/access.test.ts index 99e2290..84f447e 100644 --- a/src/test/access.test.ts +++ b/src/test/access.test.ts @@ -84,11 +84,31 @@ describe("the table", () => { assert.equal(capabilitiesFor("god").officeDepth, "full"); }); - it("keeps the instruments god-only and the feeds off the anonymous path", () => { + it("keeps the instruments god-only", () => { assert.equal(capabilitiesFor("member").timeControl, false); assert.equal(capabilitiesFor("member").debug, false); assert.equal(capabilitiesFor("god").timeControl, true); - assert.equal(capabilitiesFor("anon").liveData, false); + }); + + /** + * The sky is public, and this test exists because it briefly was not. + * + * `liveEnvironment` was once `tier !== "anon"`, on the reasoning that live + * feeds are what an account buys you — and the field's own note records why + * that did not survive contact with the data: the cloud cover over San + * Francisco is a government observation and the aircraft are broadcasting + * unencrypted to anyone with a forty-dollar receiver. Neither is a thing an + * account can grant access to, because neither is withheld from anybody. What + * the gate cost was the first impression — fog rolling off the Pacific onto a + * city you recognise, at the real time of day — traded for a rule with nothing + * behind it. Pinned here so it does not get re-argued from first principles. + */ + it("offers the real sky to a visitor who has not signed in", () => { + assert.equal(capabilitiesFor("anon").liveEnvironment, true); + // Markers are asked for by everyone and granted by the server. Setting this + // true against a deployment set to `members` earns a 401, which is the only + // place that decision can actually be enforced. + assert.equal(capabilitiesFor("anon").liveMarkers, true); }); }); @@ -131,8 +151,8 @@ describe("a deployment that says it has auth", () => { deployment({ "/health": sso, "/session": () => json({ authenticated: false }) }), ); assert.equal(access.tier, "anon"); + // The office is the thing a session changes. The sky is not — see above. assert.equal(access.can.officeDepth, "public"); - assert.equal(access.can.liveData, false); }); /**