a2aproject / a2aproject/A2A

Docs build succeeds when a proto table macro cannot resolve, so the error ships to the site

オープン
#2,151 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Shell
スター
25.7k
フォーク
2.6k
平均マージ
3日 6時間
マージ済み PR(30日)
16

説明

The three proto table macros return their failures as page content rather than raising, so an unresolved type reference renders into the published spec and the build still exits 0. Two are on the site right now:

- §4.3.1 — `Error: Message PushNotificationConfig not found.`
- §10.4.7 — `Error: Message CreateTaskPushNotificationConfigRequest not found.`

https://a2a-protocol.org/latest/specification/

The proto defines `TaskPushNotificationConfig`; there is no `PushNotificationConfig` message. `CreateTaskPushNotificationConfigRequest` is only an RPC method name, never a defined type.

#1676 reported the first in March and #1981 fixes both, but neither surfaced on its own, because a broken reference is not a build failure.

To find them from a clean checkout:

```python
import re
spec = open('docs/specification.md').read()
proto = open('specification/a2a.proto').read()
refs = set(re.findall(r'proto_(?:enum_)?to_table\(\s*"([^"]+)"', spec))
types = set(re.findall(r'^\s*(?:message|enum)\s+(\w+)\s*\{', proto, re.M))
print(sorted(refs - types))
```

Two of the three macros also wrap the whole body in `except Exception`, so any error, not only a missing type, becomes page text.

I have a branch that raises instead, and sets `on_error_fail` on the macros plugin. Without that flag mkdocs-macros catches the exception, renders it into the page and still exits 0, so raising alone does not close this. With it, the build fails naming the file and the type.

Verified locally against `16ba526`:

| | build | §4.3.1 |
|---|---|---|
| main today | exits 0 | error string rendered |
| raise only | exits 0 | exception rendered into the page |
| raise + `on_error_fail` | exits 100, names file and type | build refuses to ship |
| guard + #1981's two lines | exits 0 | real `TaskPushNotificationConfig` table |

Happy to open it once #1981 lands, or now if you would rather review them together. Kept it off `docs/specification.md` so it stays a `ci:` change rather than a `docs(spec):` one.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。