Give every trail a permanent number in trail-numbers.txt, and check it is only appended to

The Saved page's short links will be bit sets over these numbers, so a number
must never change or be reused. The registry is one id per line, seeded
alphabetically; build_index appends new records; the validator fails on a
record with no line, a repeated id or a malformed line; check_history fails
when an earlier line is changed, moved or removed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-19 15:19:50 -07:00
1 parent 6440e43176
commit 358f0c4928
10 files changed
+580 -7

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ To add one:
To point to other good pages about the trail (a wiki or encyclopedia article), add a `[[link]]` table for each; the trail's own page goes in `hike.official_url` instead.
4. Add a logo only as `shield.svg` or `shield.png`, and name its holder in `shield.logo_owner` and where the art came from in `shield.logo_source`.
5. Write the first `[[history]]` entry, with `fields = ["record"]`, the date, who asked for the trail (by role) and the page that shows it.
6. Run the three commands above.
6. Run the three commands above. `python3 tools/build_index.py` also adds the new `id` to the end of `trail-numbers.txt`, which gives every trail a number for the Saved page's short links; commit that line with the record, and never edit or reorder the lines already there (`tools/check_history.py` refuses it).
## Refresh a trail from its source