Repository navigation
docs: name the relay and escrow in the "cannot read" claims #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| /* What Sourceful can read, said the same way everywhere it is said. | ||
| * | ||
| * Until FTW Cloud, "Sourceful cannot read your data" was true of every | ||
| * Sourceful service this app touches. FTW Cloud (srcfl/ftw ADR 0008) is a | ||
| * separate service for the iPhone app, and it can read what a box owner turns | ||
| * on. The relay and the escrow are as blind as before, so their claims stand. | ||
| * A sentence that says "Sourceful's services" or "the cloud" without naming | ||
| * them now claims more than is true. | ||
| * | ||
| * Nothing goes red when a document goes stale, so this file reads them. Two | ||
| * rules, both mechanical: | ||
| * | ||
| * 1. The broad sentences are gone. No document says that Sourceful's | ||
| * services, or the cloud as a whole, cannot read the data. | ||
| * 2. Every document that tells a reader what Sourceful cannot read also | ||
| * names FTW Cloud and links the ADR, so the exception sits beside the | ||
| * claim. | ||
| */ | ||
|
|
||
| import { describe, it, expect } from 'vitest' | ||
| import { readFileSync } from 'node:fs' | ||
| import { join } from 'node:path' | ||
|
|
||
| // From the project root, which is where vitest runs. | ||
| const read = (path: string) => | ||
| readFileSync(join(process.cwd(), path), 'utf8').replace(/\s+/g, ' ') | ||
|
|
||
| /** The documents that tell a reader what Sourceful can and cannot read. */ | ||
| const DOCS = ['README.md', 'docs/architecture.md', 'relay/README.md'] | ||
|
|
||
| /** The sentences that were true before FTW Cloud and are too broad now. */ | ||
| const BROAD = [ | ||
| /Sourceful's services cannot decrypt/i, | ||
| /Sourceful's cloud carries the traffic and cannot read it/i, | ||
| /\bthe cloud is blind\b/i, | ||
| /only remote path between the two/i, | ||
| ] | ||
|
|
||
| const ADR = 'srcfl/ftw/blob/master/docs/adr/0008-ftw-cloud.md' | ||
|
|
||
| describe('what Sourceful can read', () => { | ||
| for (const path of DOCS) { | ||
| it(`${path} claims nothing broader than the relay and escrow`, () => { | ||
| const text = read(path) | ||
| for (const pattern of BROAD) { | ||
| expect(text, `${path} still says ${pattern}`).not.toMatch(pattern) | ||
| } | ||
| }) | ||
|
|
||
| it(`${path} names FTW Cloud beside its claim`, () => { | ||
| const text = read(path) | ||
| expect( | ||
| text, | ||
| `${path} no longer says what Sourceful cannot read; if that is on purpose, drop it from DOCS` | ||
| ).toMatch(/cannot (read|decrypt)/i) | ||
| expect(text, `${path} makes the claim without naming the exception`).toContain('FTW Cloud') | ||
| expect(text, `${path} names FTW Cloud without linking the decision`).toContain(ADR) | ||
| }) | ||
| } | ||
|
|
||
| it('states the claim for the relay and the escrow by name', () => { | ||
| expect(read('docs/architecture.md')).toContain( | ||
| `**"Sourceful's relay and escrow cannot decrypt your energy data"**` | ||
| ) | ||
| }) | ||
| }) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a future edit adds a broad claim such as
Sourceful cannot read your energy data—the exact kind of statement the test header says must be rejected—none of these patterns matches it. Because every current document already containscannot read,FTW Cloud, and the ADR path elsewhere, the remaining assertions also pass, allowing the misleading claim to ship. Match generic Sourceful/cloud cannot-read wording rather than only the four historical phrases.Useful? React with 👍 / 👎.