refactor(8.0): drop strictConfig — surface too small to justify the option (scaffold step 9)

Per user direction: after the step-8 simplification reduced
`config.vector` to three knobs (`recall`, `quantization`, `persistMode`),
the `strictConfig` field's only remaining job was warning about
`quantization.bits` being silently ignored on the cortex DiskANN path —
one mismatch case across the entire public surface.

That's not enough surface to justify a declared-but-undelivered config
field. Cleaner to drop it now; if 8.x or 9.0 adds enough provider-knob
mismatch cases to warrant a general-purpose strictness flag, we can add
it back then.

CHANGES

src/types/brainy.types.ts
- Removed BrainyConfig.strictConfig field + its JSDoc block.
- Removed the `strictConfig: 'warn' flags this at init time` reference
  from quantization JSDoc; replaced with a plain "silently ignored on
  DiskANN" note (cortex's B.4 contract still applies).

src/brainy.ts
- normalizeConfig() no longer emits a strictConfig field.

NO-OP scope

Field was declared but had no enforcement logic. Removing it is a pure
type-surface change. No behaviour change.

VERIFICATION

- npx tsc --noEmit: clean
- npm test: 1408 / 1409 (same pre-existing race-condition outstanding)
This commit is contained in:
David Snelling 2026-06-09 14:23:03 -07:00
parent 8e767408d9
commit 694a31f499
2 changed files with 1 additions and 28 deletions

View file

@ -9289,9 +9289,6 @@ export class Brainy<T = any> implements BrainyInterface<T> {
// { except: [...] }: strict, but listed types may omit subtype.
// Becomes the default in 8.0.0.
requireSubtype: config?.requireSubtype ?? false,
// Provider-knob mismatch strictness (8.0). Default is 'warn' (one-shot
// teaching message). See BRAINY-8.0-RENAME-COORDINATION § B.6.
strictConfig: config?.strictConfig ?? 'warn',
// Multi-process safety
mode: config?.mode ?? 'writer',
force: config?.force ?? false

View file

@ -1145,7 +1145,7 @@ export interface BrainyConfig {
* `distance:sq4` SIMD providers accelerate them when available.
*
* Silently ignored on a native DiskANN-style provider path (it uses its
* own PQ math); `strictConfig: 'warn'` flags this at init time.
* own PQ math instead).
*/
quantization?: {
enabled?: boolean
@ -1220,30 +1220,6 @@ export interface BrainyConfig {
*/
requireSubtype?: boolean | { except: Array<import('../types/graphTypes.js').NounType | import('../types/graphTypes.js').VerbType> }
/**
* Validation strictness for provider-knob mismatches (Brainy 8.0).
*
* When a registered provider silently ignores a configuration knob the
* user passed (e.g. `config.vector.advanced.diskann.*` on the open-core JS
* HNSW path, or `config.vector.advanced.hnsw.*` on a native DiskANN-style
* path), the user otherwise gets no feedback that their override has no
* effect. This option controls the response:
*
* - `false` no enforcement. Mismatched knobs are silently accepted.
* - `'warn'` (default in 8.0) one-shot warning per call site via
* `prodLog.warn`, listing the ignored knobs and the docs link to the
* appropriate `advanced.*` escape hatch.
* - `true` hard error at `init()`. Refuses to start until the config
* is consistent with the resolved provider impl.
*
* The warning / error format matches the 7.30.1 teaching-error pattern:
* problem escape valves caller location docs link.
*
* **Contract** locked in handoff thread BRAINY-8.0-RENAME-COORDINATION
* § B.6 (cortex-confirmed 2026-06-09).
*/
strictConfig?: boolean | 'warn'
/**
* Process role for multi-process safety on filesystem storage.
*