Skip to content

v0.60.683.0

Choose a tag to compare

@github-actions github-actions released this 12 Nov 00:47
3c96bc4

Making a page private through an operator repair no longer lowers its trust or rewrites its file. On a managed brain, an operator who added visibility: private to one page through a local put_page, or ran gbrain repair visibility, saw the page drop from "your notes" (operator_curated) to "written by an agent", a pending lower_page proposal only a typed token could settle, and a re-rendered file: a slug key removed, a source_kind value overwritten with put_page, keys reordered, and provenance stamps and a trust_tier marker added. Both repairs and gbrain repair private-labels now write through one label-only door. The page keeps its tier, no proposal is filed, and its file changes only on the label lines, with every other key, its order and the body kept byte for byte. A new slug-bound form, gbrain repair visibility --slug <page>, is the operator's single-page way to make a page private (preview first, then --apply --expect <hash>). A plain put_page, local or remote, is still an agent edit and lowers the page as before. gbrain trust backfill --label-lowerings lists every lower_page proposal as label-only or content, counted by proposer, so an operator can see which lowerings came from label-only writes; it changes nothing, and raising a page back stays a trust decision.

Itemized changes

  • src/core/persistence/label-edit.ts (new): the label_edit intent (set and remove over visibility, access, confidentiality) and the line editor that applies it to a file's frontmatter, or declines a label line it cannot edit as one line.
  • src/core/persistence/page-prepare.ts: a managed_maintenance_page write that carries label_edit publishes the canonical file's own bytes with only its label lines edited (labelEditFile), keeping its body when it reads as the write's body, and refuses instead of re-rendering when no line edit reads back as the write.
  • src/core/persistence/prepared-maintenance.ts: maintenance page publications carry labelEdit.
  • src/core/repair/label-write.ts (new): the label-only write door both repairs use (the maintenance door with keep_trust on a managed brain; the import under the page lock and withTrustKeep otherwise); filesInCheckout and importAtRevision moved here from private-labels.ts.
  • src/core/repair/visibility.ts: page and fenced-fact items write through the label door instead of put_page; on a brain without managed persistence a page whose file sits in a checkout gets the same label-line edit in that file, imported with its tier kept, and a file it cannot write (sync.write_through off, a pulled clone, a write error) is held file_backed with nothing written; a segmented page is held (segmented_page); a page that changed after it was read is skipped (revision_conflict) instead of counted; new --slug selection (class pages), preview-bound, tighten-only; a fenced fact row it could not make private is reported fact_left_readable when remote callers can still read it, or fact_left_world when only its page's privacy hides it (NOT CLOSED in the text output for both), instead of a plain skip.
  • src/core/repair/private-labels.ts: clears and restores carry their label edit, so the file loses or regains only those lines.
  • src/core/trust/label-lowerings.ts (new), src/cli/commands/trust.ts: gbrain trust backfill --label-lowerings [--source ID] [--json], read-only.
  • Tests: test/label-only-repairs.test.ts (managed Git source and repo-less brain, PGLite and Postgres); test/owner-member-boundary.test.ts pins that the owner reads its private pages and pages that list it, and never another member's restricted page, on every read path.