Classify evidence as load-bearing or attributive, draft the emission-cadence declaration for Taxonomy, treat silence as a stream finding, keep completeness separate from record richness, forbid immune memory as a state plane, and make containment proposals reconstructable to their origin. Observe real qonto-assistant audit events; deny-class completeness stays unknown until the source publishes a heartbeat. Assistant: grok Assistant-Session: 01a05ef1-9e5a-70f2-b0ff-0b05d6b38ae9
39 lines
1.6 KiB
Python
39 lines
1.6 KiB
Python
from kings_guard.contracts import StreamCompleteness
|
|
|
|
from helpers import load_pilot, observation_from_fixture
|
|
from kings_guard.posture import PostureEvaluator
|
|
|
|
|
|
def test_effector_requests_carry_origin_and_do_not_widen_authority() -> None:
|
|
fixture = load_pilot()
|
|
observation = observation_from_fixture(fixture)
|
|
evaluation = PostureEvaluator().evaluate(fixture.genome, observation)
|
|
signal = evaluation.signals[0]
|
|
|
|
assert signal.effector_requests
|
|
for request in signal.effector_requests:
|
|
assert request.originating_observation_id == observation.observation_id
|
|
assert request.originating_signal_id == signal.signal_id
|
|
assert request.stream_completeness is StreamCompleteness.UNKNOWN
|
|
assert request.authority_boundary in {"advisory_only", "metadata_only"}
|
|
assert request.restrictive_direction in {
|
|
"reduce_authority",
|
|
"require_step_up",
|
|
"request_containment",
|
|
"none",
|
|
}
|
|
|
|
assert signal.effector_requests[0].restrictive_direction == "reduce_authority"
|
|
assert signal.effector_requests[1].restrictive_direction == "none"
|
|
assert signal.metadata["originating_observation_id"] == observation.observation_id
|
|
|
|
|
|
def test_adjacent_boundary_states_receiving_side_origin_expectation() -> None:
|
|
from pathlib import Path
|
|
|
|
text = (Path(__file__).resolve().parents[1] / "docs" / "AdjacentSystemBoundary.md").read_text(
|
|
encoding="utf-8"
|
|
)
|
|
assert "originating observation" in text
|
|
assert "decision record" in text
|
|
assert "does not widen authority" in text
|