Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions examples/living-script_extended/src/living-script.naab
Original file line number Diff line number Diff line change
Expand Up @@ -551,11 +551,16 @@ main {
}
print("OA|" + name + "|inadmissible|coherence=" + string(adm_c) + "|threshold=" + string(adm.get("threshold") ?? -1) + "|action=" + string(adm.get("action") ?? "") + "|streak=" + string(streak))
} else {
// commit(): the candidate was judged inadmissible on its
// own score. Counted separately so it never inflates the
// quarantine streak story.
// commit(): refused by a LIVE checkOutputAdmissibility()
// call against the handle's current coherence — not by the
// score in this dict, which is the propose-time candidate
// score and had no part in the verdict. Labelling it plain
// "score" invited the reading "score 0.625 was above the
// 0.60 threshold and the gate refused anyway"; the deciding
// coherence was ~0.51 and is only in the OUTPUT_INADMISSIBLE
// telemetry (source=agent.commit), never in the response.
tracking["oa_commit_rejected"] = tracking["oa_commit_rejected"] + 1
print("OA|" + name + "|commit_inadmissible|score=" + string(adm_c))
print("OA|" + name + "|commit_inadmissible|propose_score=" + string(adm_c) + "|verdict=coherence_at_commit (see OUTPUT_INADMISSIBLE telemetry)")
}
} else {
tracking["oa_admissible"] = tracking["oa_admissible"] + 1
Expand Down
6 changes: 6 additions & 0 deletions include/naab/governance.h
Original file line number Diff line number Diff line change
Expand Up @@ -1773,6 +1773,12 @@ struct GovernancePulse {
int consecutive_degraded = 0;
int last_transition_turn = -100; // cooldown between transitions

// The clean-turn streak as it stood when the last transition fired, before
// the epoch boundary reset it. Reading consecutive_passes after a transition
// always yields 0, which throws away the one number that says how far past
// the suspicion threshold the streak actually ran.
int passes_at_transition = 0;

// Why the last evaluation counted degradation signals. Comma-separated
// subsystem names, empty when none fired. A DEGRADED verdict with no
// recorded reason is unattributable — the pulse must be able to say why.
Expand Down
15 changes: 15 additions & 0 deletions run-all-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1586,6 +1586,21 @@ else
echo " test_pulse_uniformity.sh: not found, skipping"
fi

# Developer blind spot — does a per-agent override set cost detection coverage,
# and is a 1.0 coherence measurement or absence of measurement? DB-04 pins a
# known negative (test erosion is invisible to CDD); see the file.
DEVBLIND_SCRIPT="tests/governance_v4/test_developer_blindspot.sh"
if [ -f "$DEVBLIND_SCRIPT" ]; then
if bash "$DEVBLIND_SCRIPT" 2>&1; then
echo " test_developer_blindspot.sh: ALL PASSED"
else
FAILED=$((FAILED + 1))
FAILED_TESTS+=("test_developer_blindspot.sh")
fi
else
echo " test_developer_blindspot.sh: not found, skipping"
fi

# Split commit — accounting vs conversation state (stub-backed)
SPLIT_COMMIT_SCRIPT="tests/governance_v4/test_split_commit.sh"
if [ -f "$SPLIT_COMMIT_SCRIPT" ]; then
Expand Down
6 changes: 5 additions & 1 deletion src/runtime/governance_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6897,6 +6897,10 @@ PulseVerdict GovernanceEngine::computePulseVerdict(int turn) {

if (new_verdict != pulse_.verdict && can_transition) {
pulse_.last_transition_turn = turn;
// Preserve the streak before the epoch boundary clears it — the caller
// reads the pulse after this returns, so without this every transition
// reports a streak of 0 and uniform_passes becomes unfalsifiable.
pulse_.passes_at_transition = pulse_.consecutive_passes;
// Evidence Epoch: state transition invalidates prior-epoch evidence
governance_epoch_++;
pulse_.consecutive_passes = 0; // reset on epoch boundary
Expand Down Expand Up @@ -7189,7 +7193,7 @@ std::string GovernanceEngine::checkContextDrift(int handle_id, int turn,
{"from_verdict", verdictName(prev_pv)},
{"to_verdict", verdictName(pv)},
{"degradation_reasons", why},
{"consecutive_passes", std::to_string(snap.consecutive_passes)},
{"consecutive_passes", std::to_string(snap.passes_at_transition)},
{"consecutive_degraded", std::to_string(snap.consecutive_degraded)},
{"turn", std::to_string(turn)},
{"handle_id", std::to_string(state->handle_id)},
Expand Down
Loading
Loading