fix(8205,8206): the new test helper no longer shadows _system, and using-grimoire fits its 350 lines
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / Python lint (push) Successful in 2s
CI & Build / TypeScript typecheck (push) Successful in 33s
CI & Build / Python tests (push) Successful in 2m9s
CI & Build / integration (push) Successful in 2m11s
CI & Build / Build & push image (push) Successful in 31s
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / Python lint (push) Successful in 2s
CI & Build / TypeScript typecheck (push) Successful in 33s
CI & Build / Python tests (push) Successful in 2m9s
CI & Build / integration (push) Successful in 2m11s
CI & Build / Build & push image (push) Successful in 31s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -244,7 +244,7 @@ async def test_a_write_with_no_prior_art_still_carries_its_areas_rulings():
|
||||
# ── a System whose rulings reach nobody ───────────────────────────────────
|
||||
|
||||
|
||||
def _system(sid, *, description, patterns):
|
||||
def _area(sid, *, description, patterns):
|
||||
return SimpleNamespace(id=sid, name=f"Area {sid}", description=description,
|
||||
path_patterns=patterns)
|
||||
|
||||
@@ -254,11 +254,11 @@ RULED = "What it does.\n\n## Rulings\n\n- **One decision** (operator, a date).\n
|
||||
|
||||
def test_a_system_with_rulings_and_no_files_is_named_as_undelivered():
|
||||
systems = [
|
||||
_system(1, description=RULED, patterns=[]),
|
||||
_area(1, description=RULED, patterns=[]),
|
||||
# Files named: its rulings are delivered on them.
|
||||
_system(2, description=RULED, patterns=["src/area/**"]),
|
||||
_area(2, description=RULED, patterns=["src/area/**"]),
|
||||
# No rulings: nothing to deliver, so nothing to flag.
|
||||
_system(3, description="What it does.", patterns=[]),
|
||||
_area(3, description="What it does.", patterns=[]),
|
||||
]
|
||||
assert sr.undelivered(systems) == [{"id": 1, "name": "Area 1", "rulings": 2}]
|
||||
|
||||
@@ -266,8 +266,8 @@ def test_a_system_with_rulings_and_no_files_is_named_as_undelivered():
|
||||
def test_enter_project_carries_the_flag_only_when_a_system_needs_it():
|
||||
from grimoire.mcp.tools.projects import _rulings_undelivered
|
||||
|
||||
flagged = _rulings_undelivered([_system(1, description=RULED, patterns=[])])
|
||||
flagged = _rulings_undelivered([_area(1, description=RULED, patterns=[])])
|
||||
assert flagged["rulings_undelivered"]["systems"] == [{"id": 1, "name": "Area 1", "rulings": 2}]
|
||||
assert "update_system" in flagged["rulings_undelivered"]["fix"]
|
||||
# Absent, not empty, when every ruled System names its files.
|
||||
assert _rulings_undelivered([_system(2, description=RULED, patterns=["src/**"])]) == {}
|
||||
assert _rulings_undelivered([_area(2, description=RULED, patterns=["src/**"])]) == {}
|
||||
|
||||
Reference in New Issue
Block a user