Set up the protocol spec as an mdBook and add a GitHub Actions workflow that builds it on every push/PR and deploys to GitHub Pages on main. The repo is now both a machine-readable corpus and a browsable, searchable site. Structure changes (one-time, mechanical): - Rename the spec source directory from `spec/` to `src/` to match mdBook's default convention. All 21 chapter files move; their internal relative cross-links are unchanged. - Add `src/SUMMARY.md` as the mdBook table of contents, grouping chapters under Wire Format, Payloads, Cryptography & Identity, and Routing & Higher-Layer Protocols. - Add `book.toml` at repo root: title, author, search enabled, fold enabled, edit-on-GitHub links, navy theme. - Add `.github/workflows/mdbook.yml`: build on push + PR, deploy on push to main only (configure-pages + upload-pages-artifact + deploy-pages from actions/). - Add `/book/` to .gitignore. Reference updates so the old path is fully retired: - Every `spec_ref` in `corpus/**/*.json` rewritten from `spec/` to `src/` (54 files). - Schema description text and example path in `corpus/schema/test-vector.schema.json`. - `README.md`: prominent link to the published site near the top; "What's Here" updated for the new layout. - `CONTRIBUTING.md`: spec-editing instructions point at `src/` and note the SUMMARY.md requirement. - `CLAUDE.md`: directory-layout notes updated. CHANGELOG.md historical entries intentionally keep their `spec/` paths since those record what the paths were at the time of those commits. After this lands, the user needs to enable GitHub Pages in repo settings with source = "GitHub Actions" (one-time, manual). The workflow will then publish to https://swaits.github.io/meshcore-spec/ on every push to main. Verified locally: `mdbook build` produces a clean book/ tree with all 21 chapters rendered and the SUMMARY-driven sidebar populated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
97 lines
3.8 KiB
JSON
97 lines
3.8 KiB
JSON
{
|
||
"$schema": "../../schema/test-vector.schema.json",
|
||
"name": "Advertisement App Data - Location",
|
||
"spec_ref": "src/05-payload-advert.md",
|
||
"protocol_version": 0,
|
||
"description": "Tests app_data with location fields (latitude and longitude as int32_le × 1,000,000).",
|
||
"vectors": [
|
||
{
|
||
"id": "adl-001",
|
||
"description": "Chat node with location: San Francisco (37.7749, -122.4194)",
|
||
"type": "encode_decode",
|
||
"structured": {
|
||
"header": {
|
||
"version": 0,
|
||
"payload_type": "advert",
|
||
"route_type": "flood"
|
||
},
|
||
"path": {
|
||
"hash_size": 1,
|
||
"hash_count": 0,
|
||
"hashes": []
|
||
},
|
||
"payload": {
|
||
"pub_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
|
||
"timestamp": 0,
|
||
"signature": "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB",
|
||
"app_data": {
|
||
"flags": 17,
|
||
"latitude": 37774900,
|
||
"longitude": -122419400
|
||
}
|
||
}
|
||
},
|
||
"binary": "11 00 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 00000000 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 11 34664002 3807B4F8",
|
||
"notes": "flags=0x11: type=Chat(1), has_location(bit 4). Lat 37774900=0x02406634 LE=34664002. Lon -122419400=0xF8B40738 LE=3807B4F8."
|
||
},
|
||
{
|
||
"id": "adl-002",
|
||
"description": "Repeater with location: equator/prime meridian (0, 0)",
|
||
"type": "encode_decode",
|
||
"structured": {
|
||
"header": {
|
||
"version": 0,
|
||
"payload_type": "advert",
|
||
"route_type": "flood"
|
||
},
|
||
"path": {
|
||
"hash_size": 1,
|
||
"hash_count": 0,
|
||
"hashes": []
|
||
},
|
||
"payload": {
|
||
"pub_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
|
||
"timestamp": 0,
|
||
"signature": "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB",
|
||
"app_data": {
|
||
"flags": 18,
|
||
"latitude": 0,
|
||
"longitude": 0
|
||
}
|
||
}
|
||
},
|
||
"binary": "11 00 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 00000000 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 12 00000000 00000000",
|
||
"notes": "flags=0x12: type=Repeater(2), has_location. Both coords zero."
|
||
},
|
||
{
|
||
"id": "adl-003",
|
||
"description": "Sensor with negative latitude: south pole (-90, 0)",
|
||
"type": "encode_decode",
|
||
"structured": {
|
||
"header": {
|
||
"version": 0,
|
||
"payload_type": "advert",
|
||
"route_type": "flood"
|
||
},
|
||
"path": {
|
||
"hash_size": 1,
|
||
"hash_count": 0,
|
||
"hashes": []
|
||
},
|
||
"payload": {
|
||
"pub_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
|
||
"timestamp": 0,
|
||
"signature": "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB",
|
||
"app_data": {
|
||
"flags": 20,
|
||
"latitude": -90000000,
|
||
"longitude": 0
|
||
}
|
||
}
|
||
},
|
||
"binary": "11 00 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 00000000 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 14 80B5A2FA 00000000",
|
||
"notes": "flags=0x14: type=Sensor(4), has_location. Lat -90000000=0xFAA2B580 LE=80B5A2FA. Lon 0."
|
||
}
|
||
]
|
||
}
|