fathom-keys.ts
Language TypeScript3.3 KB64 lines
/*** Whose Fathom key the board reads, and what that key can see.** Explicit lines, never a loop over the roster: the same rule as* INBOX_READERS in config/inbox.ts, and for the same reason. A key here is* read access to other people's meetings, so a new hire's meetings arrive when* somebody writes their line and not before.** Fathom keys are per user; there are no org-level keys. One key per person* cannot make Fathom's own permissions do the gating on this account: every* meeting reads `shared_with: no_teams`, Fathom's own words for "private to the* recorder", yet keys return meetings other people recorded. Why it reads that* way is not established (the account does have teams), and no reason is* written here until one is observed (rule 1).** So the board's own participant gate is the security boundary, not a second* layer behind Fathom's. That is why the leakage tests in apps/dashboard/test/fathom-gating.test.ts assert* against rendered HTML rather than against a view-model: the rendered page is* the thing a person actually receives.** What a key returns, measured rather than assumed: its owner's recordings* plus a substantial share recorded by other people, all still reading* `shared_with: no_teams`. So `shared_with` does not describe person-level* visibility, and whatever mechanism does is not observed from here.** What a key buys is coverage. The board sees the union of what its keys* return, deduplicated by recording id, so people who hold no key still have* meetings on the board. A key widens what the board can see; it never widens* who may see it. That is the gate's job, and the gate does not care which key* fetched a meeting.** The lines still commented out are people who have not handed a key over.* Some of their recordings arrive through the keys we do hold; whether all of* them do cannot be known from here. A person showing zero meetings is* therefore not proof they recorded none, and the pill says so. Uncommenting a line without the* matching environment variable set changes nothing: collect() drops keys with* no value.** Adding a line is a decision about other people's meetings. Everything a key* can see lands in the KV snapshot and in the briefing payload the model reads.* The gate decides who is shown it; nothing un-collects it. Do not add a key* that was not deliberately handed over for this.*/export interface FathomKey {/** Roster display name of the key's owner. Must match config/meridian-people.ts. */owner: string/** Environment variable holding the key. Process env only; no .env reader. */secret: string}export const FATHOM_KEYS: FathomKey[] = [{ owner: 'Sam Whitaker', secret: 'FATHOM_KEY_SAM' },{ owner: 'Ines Carvalho', secret: 'FATHOM_KEY_INES' },{ owner: 'Theo Bassett', secret: 'FATHOM_KEY_THEO' },// No key handed over yet. Some of their recordings reach the board through// the three keys above; whether all of them do is not knowable from here.// { owner: 'Rosa Galván', secret: 'FATHOM_KEY_ROSA' },// { owner: 'Marco Ibáñez', secret: 'FATHOM_KEY_MARCO' },// { owner: 'Rafael Montero', secret: 'FATHOM_KEY_RAFAEL' },// { owner: 'Nora Lindqvist', secret: 'FATHOM_KEY_NORA' },]/** How far back to sweep. Matches COMMITMENT_WINDOW_DAYS in fathom-people.ts. */export const FATHOM_WINDOW_DAYS = 14