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:
1 parent
6440e43176
commit
358f0c4928
10 files changed
+580
-7
No files matched your search
@@ -14,9 +14,9 @@ jobs:
|
||||
python-version: "3.12"
|
||||
- run: python3 tools/validate.py
|
||||
|
||||
# A change to a fact needs a new [[history]] entry (docs/schema.md). The check compares the
|
||||
# work with its base, so it needs the history of the base branch: a full clone, not the
|
||||
# shallow one that checkout makes by default.
|
||||
# A change to a fact needs a new [[history]] entry (docs/schema.md), and trail-numbers.txt may
|
||||
# only be appended to. The check compares the work with its base, so it needs the history of
|
||||
# the base branch: a full clone, not the shallow one that checkout makes by default.
|
||||
history:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -41,6 +41,7 @@ jobs:
|
||||
fi
|
||||
python3 tools/check_history.py --base "$base"
|
||||
- run: python3 -m unittest discover tools/tests -p "test_history.py"
|
||||
- run: python3 -m unittest discover tools/tests -p "test_trail_numbers.py"
|
||||
|
||||
site:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in new issue
Block a user