docs: cite the cross-layer integrity contract generically in comments and notes

This commit is contained in:
David Snelling 2026-07-14 10:11:41 -07:00
parent c40a89e649
commit 1d26988963
7 changed files with 16 additions and 16 deletions

View file

@ -755,7 +755,7 @@ export interface Change {
}
/**
* @description A declared derived-index blob FAMILY (ADR-004 §7 the
* @description A declared derived-index blob FAMILY (the
* registered-blob contract). A family names the set of on-disk blobs that a
* derived index needs AS A SET (e.g. the vector base = `main.dkann` +
* `main.slotmap` + `main.slotrev`): losing ANY member corrupts the index. Once a
@ -1083,7 +1083,7 @@ export interface StorageAdapter {
getBinaryBlobPath(key: string): string | null
/**
* @description OPTIONAL (ADR-004 §7 registered-blob contract). Declare a
* @description OPTIONAL (registered-blob contract). Declare a
* derived-index blob {@link DerivedFamilyDeclaration | family} whose members
* become UNDELETABLE through this adapter a subsequent `deleteBinaryBlob` /
* `removeRawPrefix` that would remove a declared member throws a

View file

@ -311,7 +311,7 @@ export class VectorIndexNotReadyError extends BrainyError {
/**
* Thrown when a delete (`deleteBinaryBlob` / `removeRawPrefix`) would remove a
* blob that is a declared member of a protected derived-index FAMILY (ADR-004 §7
* blob that is a declared member of a protected derived-index FAMILY (the
* registered-blob contract). Declared derived artifacts are undeletable through
* the storage layer this makes an in-process GC / sweeper INCAPABLE of removing
* a load-bearing index file (the lost-`main.dkann` class). Intentional retirement

View file

@ -116,7 +116,7 @@ export interface BrainyPluginContext {
// ===========================================================================
/**
* @description How a failed provider invariant should be remediated (ADR-004 §6):
* @description How a failed provider invariant should be remediated:
* - `'none'` informational; the invariant held or nothing to do.
* - `'repair'` a targeted, cheap fix exists (e.g. re-derive a count/manifest field).
* - `'rebuild'` the derived state must be rebuilt from canonical (`provider.rebuild()`).
@ -124,7 +124,7 @@ export interface BrainyPluginContext {
export type InvariantHeal = 'none' | 'repair' | 'rebuild'
/**
* @description The result of ONE provider invariant check (ADR-004 §6). A failure
* @description The result of ONE provider invariant check. A failure
* (`holds === false`) NAMES what diverged, with numbers, so it is diagnosable
* from the report alone never a bare boolean. `name` is a stable kebab-case id
* for telemetry / remediation routing.
@ -146,7 +146,7 @@ export interface InvariantResult {
/**
* @description A provider's self-report of its own cross-layer invariants
* (ADR-004 §6 the `validateInvariants()` hook). Contract:
* (the `validateInvariants()` hook). Contract:
* - It NEVER throws a failure is DATA (`healthy: false` + a failing invariant),
* not an exception.
* - It is BOUNDED (<50ms): residency checks + O(1) counts only, NO canonical
@ -196,7 +196,7 @@ export interface MetadataIndexProvider {
isReady?(): boolean
/**
* @description OPTIONAL (ADR-004 §6). The provider's self-report of its own
* @description OPTIONAL. The provider's self-report of its own
* cross-layer invariants (manifest segments counts residency/coherence).
* MUST NOT throw a failure is DATA (`healthy: false` + a failing invariant).
* MUST be bounded (<50ms): residency + O(1) counts only, NO canonical walks, so
@ -358,7 +358,7 @@ export interface GraphIndexProvider {
isReady?(): boolean
/**
* @description OPTIONAL (ADR-004 §6). The provider's self-report of its own
* @description OPTIONAL. The provider's self-report of its own
* cross-layer invariants (manifest segments counts residency/coherence).
* MUST NOT throw a failure is DATA (`healthy: false` + a failing invariant).
* MUST be bounded (<50ms): residency + O(1) counts only, NO canonical walks, so
@ -1024,7 +1024,7 @@ export interface VectorIndexProvider {
isReady?(): boolean
/**
* @description OPTIONAL (ADR-004 §6). The provider's self-report of its own
* @description OPTIONAL. The provider's self-report of its own
* cross-layer invariants (manifest segments counts residency/coherence).
* MUST NOT throw a failure is DATA (`healthy: false` + a failing invariant).
* MUST be bounded (<50ms): residency + O(1) counts only, NO canonical walks, so

View file

@ -183,7 +183,7 @@ export class MemoryStorage extends BaseStorage {
* @param key - The blob key.
*/
public async deleteBinaryBlob(key: string): Promise<void> {
// Registered-blob contract (ADR-004 §7) — parity with the filesystem adapter:
// Registered-blob contract — parity with the filesystem adapter:
// a declared family member is undeletable (throws ProtectedArtifactError).
await this.assertBlobKeyDeletable(key)
this.blobStore.delete(key)