test_partial_disclosure.py

tests/test_partial_disclosure.py

A partial index must say it is partial on every reply, and must not claim a definitive empty.

test_a_definitive_empty_is_withdrawn_on_a_partial_index

None test_partial_disclosure.test_a_definitive_empty_is_withdrawn_on_a_partial_index()

A definitive empty claim is withdrawn on a partial index.

tests/test_partial_disclosure.py:107

Checks

  • assert "this is a definitive" not in note, f"the definitive claim survived: {payload['note']}"
  • assert "c/c++" in note, f"the withdrawal does not say which layer is missing: {payload['note']}"

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-MCP-004measuredtest_a_definitive_empty_is_withdrawn_on_a_partial_index → _withdraw_definitive
Source · 10 lines
def test_a_definitive_empty_is_withdrawn_on_a_partial_index() -> None:
    """@brief "Definitive" does not survive a missing layer.
    @return None.
    @version 1
    """
    payload = {"note": _DEFINITIVE_NOTE, "found": False}
    _withdraw_definitive(payload, [{"axis": "partial", "message": "x"}])
    note = payload["note"].lower()
    assert "this is a definitive" not in note, f"the definitive claim survived: {payload['note']}"
    assert "c/c++" in note, f"the withdrawal does not say which layer is missing: {payload['note']}"

1 more lines, not shown

Activity · 5 steps
lines 112–112payload = {"note": _DEFINITIVE_NOTE, "found": False}lines 113–113_withdraw_definitive(payload, [{"axis": "partial", "message": "x"}])lines 114–114note = payload["note"].lower()lines 115–115assert "this is a definitive" not in note, f"the definitive claim survived: {payload['note']}"lines 116–116assert "c/c++" in note, f"the withdrawal does not say which layer is missing: {payload['note']}"

test_a_failed_doxygen_produces_a_partial_notice_with_its_reason

None test_partial_disclosure.test_a_failed_doxygen_produces_a_partial_notice_with_its_reason()

A failed doxygen produces a partial notice naming the cause.

tests/test_partial_disclosure.py:62

Show on the map →

Called by none

Calls _axes, _status

Checks

  • assert "partial" in axes, f"no partial notice: {axes}"
  • assert "134" in axes["partial"], f"the reason did not reach the reader: {axes['partial']}"

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-MCP-004measuredtest_a_failed_doxygen_produces_a_partial_notice_with_its_reason → _axes → notices
Source · 10 lines
def test_a_failed_doxygen_produces_a_partial_notice_with_its_reason() -> None:
    """@brief The partial axis fires and carries the stamped reason.
    @return None.
    @version 1
    """
    axes = _axes(_status("failed"))
    assert "partial" in axes, f"no partial notice: {axes}"
    assert "134" in axes["partial"], f"the reason did not reach the reader: {axes['partial']}"

Activity · 3 steps
lines 67–67axes = _axes(_status("failed"))lines 68–68assert "partial" in axes, f"no partial notice: {axes}"lines 69–69assert "134" in axes["partial"], f"the reason did not reach the reader: {axes['partial']}"

test_skipped_or_ran_produces_no_partial_notice

None test_partial_disclosure.test_skipped_or_ran_produces_no_partial_notice()

Skipped and ran produce no partial notice.

tests/test_partial_disclosure.py:75

Show on the map →

Called by none

Calls _axes, _status

Checks

  • assert "partial" not in _axes(_status(outcome)), f"{outcome} was flagged as partial"
  • assert "partial" not in _axes({"source_changed_files": 0}), "an unstamped index was flagged"

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-MCP-004measuredtest_skipped_or_ran_produces_no_partial_notice → _axes → notices
Source · 14 lines
def test_skipped_or_ran_produces_no_partial_notice() -> None:
    """EMPTY ON A HEALTHY INDEX IS THE LOAD-BEARING HALF — `notices()`'s own docstring: "a
    warning that is always present is a warning nobody reads". A TypeScript repo that skipped
    doxygen is COMPLETE, and flagging it would teach every such user to ignore the axis.

    @brief No false positives.
    @return None.
    @version 1
    """
    for outcome in ("skipped", "ran"):
        assert "partial" not in _axes(_status(outcome)), f"{outcome} was flagged as partial"
    assert "partial" not in _axes({"source_changed_files": 0}), "an unstamped index was flagged"

Activity · 3 steps
lines 84–84◇ for outcome in ("skipped", "ran")lines 85–85assert "partial" not in _axes(_status(outcome)), f"{outcome} was flagged as partial"lines 86–86assert "partial" not in _axes({"source_changed_files": 0}), "an unstamped index was flagged"

test_the_partial_notice_says_to_fix_the_cause_before_refreshing

None test_partial_disclosure.test_the_partial_notice_says_to_fix_the_cause_before_refreshing()

The partial notice does not prescribe a refresh that would crash again.

tests/test_partial_disclosure.py:92

Show on the map →

Called by none

Calls _axes, _status

Checks

  • assert "index_scope" in message or "cause" in message, f"no remedy beyond refresh: {message}"

Result: passed

Verifies

requirementlinkedpath to the implementer
REQ-DDB-MCP-004measuredtest_the_partial_notice_says_to_fix_the_cause_before_refreshing → _axes → notices
Source · 12 lines
def test_the_partial_notice_says_to_fix_the_cause_before_refreshing() -> None:
    """A REFRESH ALONE RE-RUNS THE DOXYGEN THAT CRASHED. The schema axis's remedy is "refresh with
    force", which is right there and wrong here; borrowing it would send the reader round a loop.

    @brief The remedy names the cause.
    @return None.
    @version 1
    """
    message = _axes(_status("failed"))["partial"].lower()
    assert "index_scope" in message or "cause" in message, f"no remedy beyond refresh: {message}"

Activity · 2 steps
lines 100–100message = _axes(_status("failed"))["partial"].lower()lines 101–101assert "index_scope" in message or "cause" in message, f"no remedy beyond refresh: {message}"