docs(6209): rulebooks, pull telemetry, lesson usage, duplicate arm, cited status, trigger shape
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 14s
CI & Build / TypeScript typecheck (push) Successful in 54s
CI & Build / integration (push) Successful in 1m3s
CI & Build / Python tests (push) Successful in 1m55s
CI & Build / Build & push image (push) Successful in 13s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 14s
CI & Build / TypeScript typecheck (push) Successful in 54s
CI & Build / integration (push) Successful in 1m3s
CI & Build / Python tests (push) Successful in 1m55s
CI & Build / Build & push image (push) Successful in 13s
Six more test files state their pinned properties without the issue and milestone history: the pull-telemetry guard explains enumerating kinds instead of listing two getter incidents, cited-record status explains why a hint's id needs its status instead of recounting one misreported step, and the trigger-shape guard keeps its reasoning about why prose heuristics fail while dropping the dated corpus audit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ from tests.helpers import fake_rule, fake_rulebook, fake_topic, make_mock_sessio
|
||||
@pytest.fixture(autouse=True)
|
||||
def _no_exclusions():
|
||||
"""get_applicable_rules asks for the project's always-on exclusions
|
||||
(milestone 297) through its own session; these mocked-session tests
|
||||
through its own session; these mocked-session tests
|
||||
script the rule queries only, so the exclusions lookup is stubbed empty."""
|
||||
if True:
|
||||
yield
|
||||
@@ -212,12 +212,12 @@ def _areas(*canonical_ids):
|
||||
@pytest.mark.asyncio
|
||||
async def test_get_applicable_rules_returns_shape():
|
||||
"""The listing is a project's own rules plus the global rules tagged to its
|
||||
areas (milestone 414) — no subscriptions or suppressions in the shape."""
|
||||
areas — no subscriptions or suppressions in the shape."""
|
||||
mock_session = make_mock_session()
|
||||
rules_result = MagicMock()
|
||||
rules_result.all.return_value = [
|
||||
# The query selects the ENTITY plus three labels, so rule_brief stays
|
||||
# the one place deciding what a surfaced rule carries (note 3026).
|
||||
# the one place deciding what a surfaced rule carries.
|
||||
(fake_rule(id=i, title=f"Rule {i}", statement=f"Statement {i}", topic_id=2),
|
||||
"git-workflow", 1, "FabledSword family")
|
||||
for i in range(50)
|
||||
@@ -330,7 +330,7 @@ async def test_a_co_surfaces_partner_on_another_project_is_not_dragged_in():
|
||||
assert [r["id"] for r in result["rules"]] == [200, 201]
|
||||
|
||||
|
||||
# ── rule_brief (milestone 307) ──────────────────────────────────────────
|
||||
# ── rule_brief ──────────────────────────────────────────────────────────
|
||||
|
||||
def test_rule_brief_carries_age_but_not_the_deep_fields():
|
||||
"""The shape a SURFACED rule takes, and the reason it exists.
|
||||
@@ -338,7 +338,7 @@ def test_rule_brief_carries_age_but_not_the_deep_fields():
|
||||
There were three hand-written copies of this dict and they had already
|
||||
diverged — none carried the timestamps the model has always held, which is
|
||||
why a rule written before the capability it duplicates was
|
||||
indistinguishable at read time from one still doing work (note 3026).
|
||||
indistinguishable at read time from one still doing work.
|
||||
"""
|
||||
from scribe.services.rulebooks import rule_brief
|
||||
|
||||
@@ -356,7 +356,7 @@ def test_rule_brief_carries_age_but_not_the_deep_fields():
|
||||
|
||||
|
||||
def test_rule_brief_omits_keys_a_rule_has_no_value_for():
|
||||
"""#2483: a null key reads as a capability the record has and isn't using,
|
||||
"""A null key reads as a capability the record has and isn't using,
|
||||
which is a different claim from not having one."""
|
||||
from scribe.services.rulebooks import rule_brief
|
||||
|
||||
@@ -367,7 +367,7 @@ def test_rule_brief_omits_keys_a_rule_has_no_value_for():
|
||||
|
||||
|
||||
|
||||
# ── verify_with / expires_when (milestone 312) ──────────────────────────
|
||||
# ── verify_with / expires_when ──────────────────────────────────────────
|
||||
|
||||
def test_a_rule_with_no_check_says_nothing_about_verification():
|
||||
"""The empty case is the COMMON case, and it must stay silent.
|
||||
@@ -385,7 +385,7 @@ def test_a_rule_with_no_check_says_nothing_about_verification():
|
||||
|
||||
|
||||
def test_an_unverified_constraint_reads_never_rather_than_null():
|
||||
"""#2483 again: a null key reads as a capability going unused. "never" is
|
||||
"""A null key reads as a capability going unused. "never" is
|
||||
a different and much stronger claim — this rule asserts a fact about
|
||||
someone else's software and nobody has ever confirmed it."""
|
||||
from scribe.services.rulebooks import last_verified_label, rule_brief
|
||||
@@ -421,7 +421,7 @@ def test_the_check_text_itself_never_enters_a_listing():
|
||||
assert "expires_when" not in out
|
||||
|
||||
|
||||
# ── the sweep's row shape (milestone 312 step 3) ────────────────────────
|
||||
# ── the sweep's row shape ───────────────────────────────────────────────
|
||||
|
||||
def test_a_sweep_row_carries_the_check_in_full():
|
||||
"""The OPPOSITE call from rule_brief, and deliberately so.
|
||||
|
||||
Reference in New Issue
Block a user