mirror of
https://github.com/nestriness/nestri.git
synced 2026-09-19 09:15:19 +03:00
docs: this repo is public, so say what things are, not who decided them
Comments and served API descriptions here had grown references that only make sense to someone with our internal notes: relative paths that escape this tree, filenames and titles of documents nobody outside can open, quoted prose from them, and the name of a component that has no public surface — once in an OpenAPI description, which is published output rather than source. None of it was load-bearing. Every case restates as what the code actually requires, and every rewrite came out shorter: "in the words the host agent reports" for a component name, "republished as addresses are discovered" for a quoted phrase, "a size tier sets vCPU, RAM and the output geometry" for a sentence that had been carrying a path. Internal reasoning is now cited exactly one way, ref(d-NNNN) in a source comment, with the rule that the sentence must still stand if the marker is deleted. CLAUDE.md leads with it, because the previous version of this mistake was made by people who knew the repo was public and it still took ten occurrences to notice, so "be careful" is not a mechanism. Commit messages get the stricter rule and carry no references at all: a comment can be fixed by the next commit and a published message cannot be fixed at all. Git hooks now enforce both halves. The check caught a real one while being written: the CLAUDE.md table spelled out the paths it was prohibiting, which discloses them to exactly the reader it protects against. 138 tests, 0 fail.
This commit is contained in:
@@ -53,10 +53,10 @@ describe('POST /machine/heartbeat', () => {
|
||||
expect(res.status).toBe(200);
|
||||
|
||||
const body = (await res.json()) as any;
|
||||
// These two field names are what `neslet`'s plane.rs reads out of the
|
||||
// reply. A rename on either side produces a host that beats, parses
|
||||
// nothing, and reports success — so the names are the contract and this
|
||||
// is the test that holds them.
|
||||
// These two field names are what a host agent reads out of the reply. A
|
||||
// rename on either side produces a host that beats, parses nothing, and
|
||||
// reports success — so the names are the contract and this is the test
|
||||
// that holds them.
|
||||
expect(typeof body.data.lastSeen).toBe('string');
|
||||
expect(body.data.intervalSeconds).toBe(Machine.HEARTBEAT_SECONDS);
|
||||
expect(new Date(body.data.lastSeen).getTime()).not.toBeNaN();
|
||||
|
||||
@@ -386,10 +386,10 @@ describe('Box access', () => {
|
||||
});
|
||||
|
||||
test('teamId is required on the body, and null is no longer a value', async () => {
|
||||
// Null used to mean "make it mine alone". Since 0048 made
|
||||
// `machine.teamId` notNull there is no such state — hardware belongs to
|
||||
// exactly one team and the personal team is the one to name — so null is
|
||||
// now a validation error rather than a meaning.
|
||||
// Null used to mean "make it mine alone". Now that `machine.teamId` is
|
||||
// notNull there is no such state — hardware belongs to exactly one team
|
||||
// and the personal team is the one to name — so null is a validation
|
||||
// error rather than a meaning.
|
||||
const missing = await app.request('/machine/mch_whatever', {
|
||||
method: 'PATCH',
|
||||
headers: { ...adminHeaders(), 'content-type': 'application/json' },
|
||||
|
||||
Reference in New Issue
Block a user