derive-pipeline-is-defensive

IN derived (depth 1)

The derive pipeline applies multiple defensive measures: fail-soft validation, Jaccard-based retraction guard, and environment variable stripping to prevent recursive spawning

Summary

The derive pipeline is built to be resilient and safe when generating new beliefs automatically. It won't crash if one proposal is malformed, it avoids re-creating beliefs that were previously rejected, and it prevents the model subprocess from accidentally launching another instance of Claude Code, which would cause runaway recursion.

Justifications

SL — Each defense addresses a distinct failure mode (bad proposals, re-derivation of retracted beliefs, infinite recursion)

Antecedents (all must be IN):

  • derive-fail-soft-validation — `validate_proposals` filters invalid proposals into a skipped list rather than raising; `apply_proposals` catches per-item exceptions so one bad proposal never blocks others
  • derive-retraction-guard-uses-jaccard — `validate_proposals` rejects any proposed belief ID with Jaccard similarity >= 0.5 to an existing OUT node, preventing re-derivation of retracted beliefs
  • derive-strips-claudecode-env — `_derive_one_round` explicitly removes the `CLAUDECODE` environment variable before spawning the model subprocess, preventing recursive Claude Code invocation.

Dependents

These beliefs depend on this one:

Details