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); }); /**