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

@@ -15,7 +15,7 @@ Everything staged so far was written without touching the repository, so that ma
3. `python3 tools/refresh.py apply`. It changes the named lines and adds the history entries.
4. For each new track (a proposal with a track file), `python3 tools/elevation.py <id>`: it writes `elevation.json` from the track. For a replaced track, `--force`.
5. Add the rows named in `sources_md` fields to `SOURCES.md`, by hand, in the existing form and place. Where a record was removed or a track dropped, take the row's counts and lists with it.
6. `python3 tools/build_index.py` rebuilds `trails.csv`, `index.geojson` and the counts in `README.md`. Do not edit those files by hand.
6. `python3 tools/build_index.py` rebuilds `trails.csv`, `index.geojson` and the counts in `README.md`. Do not edit those files by hand. It also appends any new record to the end of `trail-numbers.txt` (a trail's permanent number); commit that line with the record and never change, remove or reorder the lines already there.
7. `python3 tools/validate.py` must end `OK <n> trails`. `python3 tools/check_history.py` must end `OK history`. A failure that names a record you changed is yours: find the cause, and if it is a proposal that was wrong, say so in your report and revert that record from git (`git checkout -- <id>`, then apply the rest without it, by `--only`). A failure in a record you did not touch is reported.
8. Run all the test suites: `python3 -m unittest discover tools/tests` and `python3 -m unittest discover -s web/tests`. The web tests hold counts of trails, tracks and emblems; if one fails only because a count moved with the change, update that count. Any other failure is a real failure: stop and report it.
9. Write the entry at the top of `CHANGELOG.md`, in the voice of the entries already there (read the top two): a dated heading with a short title, then plain bullets saying what changed for contributors and, where a visitor can see it, what a visitor will see. State the counts that changed (trails, tracks, emblems). Say what was checked and left unchanged only where it matters. The orchestrator reads and edits it.