topic check: gnss signals; a literal topic (yukart/gnss/fix) is not a signal
/ crosscheck (push) Successful in 1s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
This commit is contained in:
2026-10-13 22:50:03 +09:00
parent 2e65f7550a
commit c41c727756
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ no network: plain Python over the tracked files.
| Check | Source of truth | Catches |
|---|---|---|
| `decision` | project-yukart `docs/ARCHITECTURE.md`, decisions table | a decision number that does not exist; a line calling an Accepted decision proposed |
| `topic` | contracts `schema/topics.json`, `schema/signals.json` | a `yukart/...` topic matching no pattern; a vehicle or host signal that is not registered, or has the wrong source |
| `topic` | contracts `schema/topics.json`, `schema/signals.json` | a `yukart/...` topic matching no pattern; a vehicle, host or gnss signal that is not registered, or has the wrong source |
| `docref` | the repos' own trees | ``<repo> `FILE.md` `` naming a file that does not exist; relative markdown links that do not resolve |
| `binaries` | each repo's `Cargo.toml` and `deploy/*.service` | project-yukart `REPOS.md` missing a deployed binary; `ORIN-RUNTIME.md` missing a deployed service |
| `frontmatter` | the docs convention | a `docs/**/*.md` without front matter, or with an unknown `type` |
+4 -2
View File
@@ -13,7 +13,7 @@ Exit status 1 when anything is found. Checks, and the source each one trusts:
decision "decision N" names a row of project-yukart's decisions table, and a
line calling it proposed does not contradict an Accepted row
topic every yukart/<...> topic matches contracts' topics.json; concrete
vehicle and host signals exist in signals.json with that source
vehicle, host and gnss signals exist in signals.json with that source
docref "<repo> `path.md`" names a file that exists in that repo; relative
markdown links resolve
binaries REPOS.md's row for a repo names every deployed [[bin]] in its Cargo.toml;
@@ -138,7 +138,7 @@ def check_topics(ws: Workspace) -> None:
topics = json.loads(ws.text("contracts", "schema/topics.json"))["topics"]
signals = json.loads(ws.text("contracts", "schema/signals.json"))["signals"]
patterns = [t.split("/") for t in topics]
sources = {"vehicle": {"obd2", "z27ag"}, "host": {"host"}}
sources = {"vehicle": {"obd2", "z27ag"}, "host": {"host"}, "gnss": {"gnss"}}
for repo, rel, text in ws.each():
if (repo, rel) == ("contracts", "schema/topics.json"):
continue
@@ -156,6 +156,8 @@ def check_topics(ws: Workspace) -> None:
if not any(topic_matches(segs, p) for p in patterns):
find(f"{repo}/{rel}", n, "topic", f"'{m.group(0)}' matches no topic in contracts topics.json")
continue
if "/".join(segs) in topics:
continue # a topic of its own (yukart/gnss/fix), not a signal
if root in sources and len(segs) == 3 and "*" in segs[2]:
glob = re.compile(re.escape(segs[2]).replace(r"\*", ".*"))
if not any(glob.fullmatch(k) and v.get("source") in sources[root] for k, v in signals.items()):