docs(6206): the remaining models, routes, mcp/tools/repos and config comments drop citations
A shipped tool docstring (mcp/tools/repos bind_repo) cited this instance's "rule 1: dev is home"; it now says what a dev-branch project should do. routes/knowledge, routes/tasks, routes/systems and models/retrieval_log state the property each guards rather than the bug that once broke it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -172,8 +172,8 @@ async def test_smtp():
|
||||
return jsonify({"error": str(e)}), 500
|
||||
|
||||
|
||||
# The forge CONFIG moved to per-user keyring rows (#2778, Settings → Git
|
||||
# forges); what stays admin is the webhook secret, because the push endpoint
|
||||
# The forge CONFIG is per-user keyring rows (Settings → Git forges); what
|
||||
# stays admin is the webhook secret, because the push endpoint
|
||||
# is one URL per instance and authenticates deliveries, not users.
|
||||
|
||||
|
||||
@@ -329,13 +329,13 @@ async def run_db_maintenance_now():
|
||||
return jsonify(summary)
|
||||
|
||||
|
||||
# ── Scheduled backups (milestone 523) ────────────────────────────────────────
|
||||
# ── Scheduled backups ────────────────────────────────────────────────────────
|
||||
# One dated, uncompressed tar per run to a folder or an S3 bucket — see
|
||||
# services/backup_file.py for why it is shaped that way, backup_destination.py
|
||||
# for where it goes, backup_job.py for when.
|
||||
|
||||
# How long "Test" waits on the destination. A folder on a hung NFS mount has
|
||||
# no timeout of its own (rule 156), and the request must come back either way.
|
||||
# no timeout of its own, and the request must come back either way.
|
||||
_BACKUP_CHECK_TIMEOUT = 45.0
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""Canonical-system routes — the GLOBAL area vocabulary, and the mapping of a
|
||||
project's Systems onto it (milestone 307, decision note 3026).
|
||||
project's Systems onto it.
|
||||
|
||||
Two shapes live here because they are two halves of one idea:
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Design system + token REST endpoints (milestone #254 step 4).
|
||||
"""Design system + token REST endpoints.
|
||||
|
||||
Wraps `services/design_systems.py`, which owns the ACL and the cycle guard.
|
||||
Design systems are owner-scoped top-level records rather than project-scoped
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
"""Family canon routes — the web door to the promotion engine (milestone 463).
|
||||
"""Family canon routes — the web door to the promotion engine.
|
||||
|
||||
The agent decides promotions and each project's answers through the MCP
|
||||
tools; this door exists so a person can READ every decision and its reasons
|
||||
— the ideas, the adoption matrix, the log — and retire an idea or undo a
|
||||
decision when they disagree. The promote and propose endpoints are here for
|
||||
parity with the agent's door (rule 33), and are recorded as the operator's.
|
||||
Every write is gated on the idea's note in the service (rule 78).
|
||||
parity with the agent's door, and are recorded as the operator's.
|
||||
Every write is gated on the idea's note in the service.
|
||||
"""
|
||||
import logging
|
||||
|
||||
|
||||
@@ -14,10 +14,9 @@ logger = logging.getLogger(__name__)
|
||||
knowledge_bp = Blueprint("knowledge", __name__, url_prefix="/api/knowledge")
|
||||
|
||||
# Derived from the service's facet table, never re-listed here. This set was a
|
||||
# hand-kept copy and had drifted three kinds behind it: it admitted `plan`
|
||||
# (retired in 0066) and rejected `issue` (shipped in 0065, 435 rows) and
|
||||
# `snippet` — so the browse surface could not filter to the kinds it was
|
||||
# already rendering badges for (#3128).
|
||||
# hand-kept copy drifts behind it — admitting retired kinds and rejecting new
|
||||
# ones — until the browse surface cannot filter to the kinds it renders
|
||||
# badges for.
|
||||
_VALID_TYPES = FACET_TYPES
|
||||
_VALID_SORTS = {"modified", "created", "alpha", "type"}
|
||||
|
||||
@@ -64,13 +63,10 @@ async def list_knowledge():
|
||||
)
|
||||
|
||||
items = await label_shared_items(uid, items)
|
||||
# The surfaced-vs-opened counts, on the list a person actually browses
|
||||
# (#4230). `usage_for_notes` always worked on every note row, but only the
|
||||
# snippet and rule lists ever attached it — and this is the ONLY lesson and
|
||||
# note list in the UI, so those two kinds had the counter collected and
|
||||
# shown nowhere. Attaching here rather than teaching `/api/lessons` a
|
||||
# second time is what closes both holes at once: `/knowledge` is how notes,
|
||||
# lessons and processes are all browsed.
|
||||
# The surfaced-vs-opened counts, on the list a person actually browses.
|
||||
# This is the ONLY lesson and note list in the UI — `/knowledge` is how
|
||||
# notes, lessons and processes are all browsed — so attaching here is what
|
||||
# shows those kinds' counters at all.
|
||||
#
|
||||
# Mixed kinds is not a problem for this: usage keys on the note row, which
|
||||
# every facet of this feed is.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""Platform routes — the GLOBAL platform catalog, and which platforms a
|
||||
project is (milestone 463 step 2).
|
||||
project is.
|
||||
|
||||
Two shapes, as with the canonical areas:
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ async def list_systems_route(project_id: int):
|
||||
uid, project_id, include_archived=_truthy(request.args.get("include_archived")),
|
||||
)
|
||||
counts = await systems_svc.open_issue_counts_by_system(uid, project_id)
|
||||
# How often each area's rulings reached a session (#4769) — one GROUP BY
|
||||
# How often each area's rulings reached a session — one GROUP BY
|
||||
# for the page, and a zero shape for an area nothing has touched.
|
||||
usage = await system_usage_svc.usage_for_systems([s.id for s in systems])
|
||||
out = []
|
||||
@@ -67,9 +67,8 @@ async def create_system_route(project_id: int):
|
||||
data = await request.get_json() or {}
|
||||
if not (data.get("name") or "").strip():
|
||||
return jsonify({"error": "name is required"}), 400
|
||||
# The same gate the MCP door enforces. It lived only in the tool layer
|
||||
# until now, which is exactly how the web UI shipped without gates the
|
||||
# agent surface had (#2482) — one service call, one answer (rule 33).
|
||||
# The same gate the MCP door enforces — one service call, one answer, so
|
||||
# neither door ships without a gate the other has.
|
||||
assessment = await systems_svc.assess_system_name(uid, project_id, data["name"])
|
||||
duplicate = assessment["duplicate"]
|
||||
if duplicate and not data.get("force"):
|
||||
|
||||
@@ -242,9 +242,8 @@ async def update_task_route(task_id: int):
|
||||
if "tags" in data:
|
||||
fields["tags"] = data["tags"]
|
||||
|
||||
# Re-filing a task's kind. The editor has always SENT this field and the
|
||||
# route silently dropped it — reporting "Task saved" and reverting on the
|
||||
# next load (#3129). Validated at the same layer as status and priority so
|
||||
# Re-filing a task's kind. The editor sends this field; dropping it would
|
||||
# report "Task saved" and revert on the next load. Validated at the same layer as status and priority so
|
||||
# an unrecognised value is a 400 rather than a database CHECK violation.
|
||||
if "kind" in data:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user