feat(8205): a System with rulings and no file patterns is flagged
CI & Build / TypeScript typecheck (push) Canceled after 0s
CI & Build / Plugin hooks (push) Canceled after 0s
CI & Build / Python lint (push) Canceled after 0s
CI & Build / Python tests (push) Canceled after 0s
CI & Build / integration (push) Canceled after 0s
CI & Build / Build & push image (push) Canceled after 0s
CI & Build / TypeScript typecheck (push) Canceled after 0s
CI & Build / Plugin hooks (push) Canceled after 0s
CI & Build / Python lint (push) Canceled after 0s
CI & Build / Python tests (push) Canceled after 0s
CI & Build / integration (push) Canceled after 0s
CI & Build / Build & push image (push) Canceled after 0s
Its rulings reach no session: delivery is by path_patterns alone. enter_project carries rulings_undelivered (absent when none) with the fix call, the Systems list reads ruling_count, and the System card says so with a button to name its files. A System without rulings is not flagged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -128,6 +128,12 @@ async def enter_project(project_id: int) -> dict:
|
||||
create it with create_system rather than leaving the area unmodelled. Read
|
||||
a subsystem's accumulated records with list_system_records. Each is id and name; get_system has the charter.
|
||||
|
||||
`rulings_undelivered`, present only when it applies, lists Systems that
|
||||
carry rulings but name no files. A ruling reaches a session when a
|
||||
command or edit touches its System's files, so these rulings reach
|
||||
nobody. Name each area's files with
|
||||
`update_system(id, path_patterns=[...])`, globs from the repo root.
|
||||
|
||||
`platforms` is what the project is built on or ships as
|
||||
— Android app, container image, Go, … — each with how it is known
|
||||
(`declared` by a person, `detected` from a bound repo). They decide which
|
||||
@@ -281,6 +287,7 @@ async def enter_project(project_id: int) -> dict:
|
||||
},
|
||||
"pattern_coverage": coverage_svc.coverage_line(coverage) if coverage else None,
|
||||
"systems": [{"id": s.id, "name": s.name} for s in systems],
|
||||
**_rulings_undelivered(systems),
|
||||
"platforms": platforms,
|
||||
"design_system": design_system,
|
||||
"milestone_summary": milestone_summary,
|
||||
@@ -366,6 +373,25 @@ async def get_project(project_id: int) -> dict:
|
||||
return data
|
||||
|
||||
|
||||
def _rulings_undelivered(systems) -> dict:
|
||||
"""`{"rulings_undelivered": {...}}` when some System's rulings reach no
|
||||
session, else nothing: the key is absent, not empty, so its presence is
|
||||
the signal."""
|
||||
from grimoire.services import system_rulings
|
||||
|
||||
missing = system_rulings.undelivered(systems)
|
||||
if not missing:
|
||||
return {}
|
||||
return {"rulings_undelivered": {
|
||||
"systems": missing,
|
||||
"why": (
|
||||
"A System's rulings are shown when a command or edit touches its "
|
||||
"files. These name no files, so their rulings reach no session."
|
||||
),
|
||||
"fix": "update_system(id, path_patterns=[...]) with the area's files as globs from the repo root",
|
||||
}}
|
||||
|
||||
|
||||
def _inception_choices(design_system_id, seed_systems, platforms=None) -> dict | None:
|
||||
"""The tool args → an inception choices object, or None when no inception
|
||||
arg was given at all (a bare create stays undecided and enter_project
|
||||
|
||||
Reference in New Issue
Block a user