docs(6205): systems comments state the reason, not the instance that taught it
The name gate, catalog and starter-set docstrings drop milestone and record citations and the history of the tuple constant; each states why it is shaped this way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -114,11 +114,11 @@ def matching_patterns(patterns, path: str) -> list[str]:
|
||||
|
||||
|
||||
async def assess_system_name(user_id: int, project_id: int, name: str) -> dict:
|
||||
"""What BOTH doors must know before minting a System name (milestone 307).
|
||||
"""What BOTH doors must know before minting a System name.
|
||||
|
||||
Lived in the MCP tool alone until now, which is how the web UI shipped
|
||||
without a gate the agent surface enforced (#2482). One service function, so
|
||||
the two doors cannot answer the same question differently (rule 33).
|
||||
One service function, so the MCP tool and the web UI cannot answer the
|
||||
same question differently — a gate living in one door is a gate the other
|
||||
ships without.
|
||||
|
||||
Returns `{"duplicate": …|None, "canonical": …|None}`:
|
||||
|
||||
@@ -162,21 +162,20 @@ async def assess_system_name(user_id: int, project_id: int, name: str) -> dict:
|
||||
|
||||
|
||||
async def standard_systems() -> list[tuple[str, str]]:
|
||||
"""The standard cross-project vocabulary (#2798) as (name, charter) pairs.
|
||||
"""The standard cross-project vocabulary as (name, charter) pairs.
|
||||
|
||||
Reads the GLOBAL canonical catalog (milestone 307). This was a tuple
|
||||
constant in this module until the catalog became a table: a constant
|
||||
cannot be a foreign key, so nothing outside a project could reference an
|
||||
area, and the list only ever applied on the inception-seed path — which is
|
||||
how three spellings of "CI & Release" reached one instance anyway.
|
||||
Reads the GLOBAL canonical catalog. The catalog is a table rather than a
|
||||
constant because a constant cannot be a foreign key: projects map their
|
||||
own Systems onto a catalog entry, so variant spellings of one area still
|
||||
resolve to it.
|
||||
"""
|
||||
return [(entry.name, entry.description or "") for entry in
|
||||
await canonical_systems_svc.list_canonical_systems()]
|
||||
|
||||
|
||||
async def seed_standard_systems(user_id: int, project_id: int) -> list[System]:
|
||||
"""Mint the standard starter set for a project that has NO Systems yet
|
||||
(milestone 297). Idempotent: a project with any System — the vocabulary
|
||||
"""Mint the standard starter set for a project that has NO Systems yet.
|
||||
Idempotent: a project with any System — the vocabulary
|
||||
already started, standard or not — gets nothing; the duplicate gate and
|
||||
the project's own judgment take it from there. [] without write access.
|
||||
|
||||
@@ -197,9 +196,9 @@ async def seed_standard_systems(user_id: int, project_id: int) -> list[System]:
|
||||
|
||||
|
||||
def embed_system(system) -> None:
|
||||
"""Refresh a System's charter vectors, fire-and-forget (#4251).
|
||||
"""Refresh a System's charter vectors, fire-and-forget.
|
||||
|
||||
The twin of `notes.embed_note`, and here for the same reason (#2056): at
|
||||
The twin of `notes.embed_note`, and here for the same reason: at
|
||||
the service, so every door gets it by construction rather than each route
|
||||
and tool remembering. A charter edited through one door and not another
|
||||
would stay findable by what it used to say, and nothing would report it.
|
||||
@@ -430,7 +429,7 @@ async def system_names_for(note_ids: set[int]) -> dict[int, list[str]]:
|
||||
|
||||
For decorating a result set the caller was allowed to see — an injected
|
||||
menu line says which part of the project a record is about, so the reader
|
||||
can place it without opening it (#4364). No access check here for that
|
||||
can place it without opening it. No access check here for that
|
||||
reason: the ids come from a search that applied one, and a system name is
|
||||
metadata of the record, not a record of its own.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user