Make the monthly season check offline: it compares each estimate's recorded track and location with the trail's current one and downloads nothing; fix the audit so every command runs as written (packets needs --out, the places tool runs in its venv), with places and seasons steps under their own headings
This commit is contained in:
1 parent
e6c2f371fc
commit
f91c7dbc20
9 files changed
+328
-194
No files matched your search
+23
-15
@@ -3,26 +3,32 @@
|
||||
A written checklist for the owner. It does not repeat the refresh runbook; it points at it. Work
|
||||
down the list in order and stop at the first step that fails.
|
||||
|
||||
1. **Refresh the records.** Run `/refresh-trails` (the full run once a quarter, `light` in the
|
||||
months between). It verifies every record against the pages it cites, re-checks the left-out
|
||||
list, looks for missing trails and updates tracks and emblems. The runbook is
|
||||
## Records and places
|
||||
|
||||
1. **Refresh the records.** Run the `/refresh-trails` skill (the full run once a quarter, `light`
|
||||
in the months between). It verifies every record against the pages it cites, re-checks the
|
||||
left-out list, looks for missing trails and updates tracks and emblems. The runbook is
|
||||
`.claude/skills/refresh-trails/SKILL.md`; this checklist adds to it and does not replace it.
|
||||
2. **Check the links.** `python3 tools/refresh.py links` lists every address a record cites that
|
||||
no longer answers. Fix each one in a record with a history entry.
|
||||
no longer answers (`--limit 20` is a quick trial). Fix each one in a record with a history
|
||||
entry.
|
||||
3. **Validate the data.** `python3 tools/validate.py` must end `OK <n> trails`. It fails a record
|
||||
with no `places_checked`, and one whose track has changed since its places were measured.
|
||||
4. **Check the history.** `python3 tools/check_history.py --base origin/main` must end
|
||||
`OK history`. A changed fact needs a new history entry.
|
||||
5. **Run both test suites.** `python3 -m unittest discover tools/tests` and
|
||||
`python3 -m unittest discover -s web/tests` must both pass.
|
||||
6. **Check the places.** `python3 tools/place_trails.py --check --refresh` downloads every outline again (without `--refresh` it reuses the files already in the cache, which are the ones first downloaded),
|
||||
measures every track again and prints each difference from the records, one per line:
|
||||
- a place gained or lost by a trail: re-run `place_trails.py propose`, read the line, and
|
||||
apply it only when the new outline is right;
|
||||
- a boundary that moved (a new source version): the owner rules whether the new outline
|
||||
replaces the old one;
|
||||
- a place that crossed the 3-trail line: its page appears or goes, so check its links and the
|
||||
counts that name it.
|
||||
6. **Check the places.** `.venv-places/bin/python tools/place_trails.py --check --refresh`
|
||||
downloads every outline again (without `--refresh` it reuses the files already in the cache,
|
||||
which are the ones first downloaded), measures every track again and prints each difference
|
||||
from the records, one per line. The venv is made as `tools/place_trails.py --help` says. For
|
||||
each line:
|
||||
(a) a place gained or lost by a trail: run `.venv-places/bin/python tools/place_trails.py propose`,
|
||||
read the line, and apply it only when the new outline is right;
|
||||
(b) a boundary that moved (a new source version): the owner rules whether the new outline
|
||||
replaces the old one;
|
||||
(c) a place that crossed the 3-trail line: its page appears or goes, so check its links and the
|
||||
counts that name it.
|
||||
The monthly workflow `.github/workflows/places.yml` runs this step by itself and fails with
|
||||
the list; this step is the one you run when it has failed, and before a release.
|
||||
7. **Review the `stated` placements by hand.** A trail with no track is placed from a page, and no
|
||||
@@ -35,9 +41,11 @@ down the list in order and stop at the first step that fails.
|
||||
|
||||
## Seasons
|
||||
|
||||
Every trail has a season. Where a page states one, the season is that page's. Where none does, the season is an estimate: set by a reviewer from the trail's climate and the seasons of similar trails, with its confidence on the record (`docs/season-judging.md`). The aim of this audit is that estimates shrink over time, and that none goes stale unnoticed.
|
||||
Every trail has a season. Where a page states one, the season is that page's. Where none does, the season is an estimate: set by a reviewer from the trail's climate and the seasons of similar trails, with its confidence on the record (`docs/season-judging.md`). Where pages from at least two publishers state different seasons and none is the trail's own, the season is set by judgement from all of them. The aim of this audit is that estimates shrink over time, and that none goes stale unnoticed.
|
||||
|
||||
1. Search afresh for a page that states the season of every trail still marked `estimate`. List them with `python3 tools/estimate_season.py estimates`. For each, follow `docs/season-research.md`: the trail's holder or a government page first, then an established hiking reference, a guidebook publisher's page or an association list. When a page states a season, replace the estimate through `tools/refresh.py` (propose, collect, apply): give the page's season and months, the basis (`primary`, `sources` or `source`), the page as a `[[hike.source]]` naming `season` and `months`, and remove the climate source and `season_method`. A change to the season gets a `[[history]]` entry like any other fact. Then run `python3 tools/season_judge.py inputs` so that the record of estimate inputs drops the trail. A trail with no page found stays an estimate, and nothing else about it changes.
|
||||
2. Re-run the machine estimate and flag any estimate whose inputs have changed: `python3 tools/estimate_season.py check`. It reruns the machine estimate for every estimate, compares it, the climate at the trail and the sourced trails it is compared with against what was recorded in `tools/season_inputs.json` when the season was set, and lists each trail whose inputs differ. The listing is a flag, not a rewrite. For each trail listed, build its packet (`python3 tools/season_judge.py packets`), look at what changed, and either keep the season or set it again by judgement. Then run `python3 tools/season_judge.py inputs` to record the inputs as they now are. The check also fails when the blind test of the method (`tools/season_blind_test.json`) is below its bar on the ends-only measure (the first and last months within a month of the page's: 77 percent when set, against a bar of 75; the strict measure, which also needs no wrong gap in the middle, was 71 percent and is recorded beside it), or when the fit of the machine estimate against the sourced seasons has got worse.
|
||||
The blind test behind the estimates has two figures, always read together: 114 of 148 (77 percent) had their first and last months within a month of the page's, and 105 (71 percent) also had no wrong gap in the middle. The 75 percent bar was set on the first measure; the second is below it. The owner decided that the estimates ship with both stated.
|
||||
|
||||
1. Search afresh for a page that states the season of every trail still marked `estimate`. List them with `python3 tools/estimate_season.py estimates`. For each, follow `docs/season-research.md`: the trail's holder or a government page first, then an established hiking reference, a guidebook publisher's page or an association list. When a page states a season, replace the estimate through `tools/refresh.py` (stage a proposal, then `python3 tools/refresh.py collect` and `python3 tools/refresh.py apply`): give the page's season and months, the basis (`primary`, `sources` or `source`), the page as a `[[hike.source]]` naming `season` and `months`, and remove the climate source and `season_method`. A change to the season gets a `[[history]]` entry like any other fact. Then run `python3 tools/season_judge.py inputs --points` so that the record of estimate inputs drops the trail. A trail with no page found stays an estimate, and nothing else about it changes.
|
||||
2. Check that no estimate has gone stale: `python3 tools/estimate_season.py check`. It works offline and downloads nothing. For every estimate it compares the digest of the trail's current track and location with the one recorded in `tools/season_inputs.json` when the season was set, and lists each trail where they differ or none is recorded. The listing is a flag, not a rewrite. For each trail listed, build its packet (`python3 tools/season_judge.py packets --out /tmp/season-packets`; it writes a packet for every trail and reads the climate, which is a large download the first time and cached after), look at what changed, and either keep the season or set it again by judgement. Then run `python3 tools/season_judge.py inputs --points <id>` to record the new digest. The climate normals are a fixed published dataset (CHELSA, 1981 to 2010), so they do not change from month to month and are not read again; `python3 tools/season_judge.py inputs <id>` (with the network) also records the machine estimate and the climate digest at the time, if a person wants them. The check also fails when the blind test of the method (`tools/season_blind_test.json`) is below its bar on the first-and-last-months measure (77 percent when set, against a bar of 75; the stricter figure, 71 percent, which also needs no wrong gap in the middle, is recorded beside it).
|
||||
|
||||
The same check runs on its own on the first of each month (`.github/workflows/season-check.yml`), so a changed estimate is noticed even when the audit is late. The audit is still the step that acts on it.
|
||||
@@ -108,10 +108,12 @@ left to someone remembering to run it (the owner's ruling):
|
||||
|
||||
- **Every push.** The validator fails any record with no season, so a new
|
||||
trail cannot ship without one, sourced or estimated.
|
||||
- **Every month.** A scheduled workflow runs `estimate_season.py --check`: it
|
||||
re-runs every estimate and the fit against sourced seasons, and fails with
|
||||
a list of estimates that would now come out different, or a fit that has
|
||||
got worse.
|
||||
- **Every month.** A scheduled workflow runs `estimate_season.py check`,
|
||||
offline and with no download: it compares the digest of each estimate's
|
||||
current track and location with the one recorded when the season was set,
|
||||
and fails with a list of estimates whose inputs have changed, or the blind
|
||||
test falling under its bar on the ends-only measure. The climate normals are
|
||||
a fixed published dataset, so they are not read again.
|
||||
- **Every audit.** `docs/audit.md`, the written checklist for the monthly
|
||||
audit of everything, lists two season steps: the check above, and a fresh
|
||||
search for a source for every season still marked `estimate`, so estimates
|
||||
@@ -202,7 +204,7 @@ The plan above chose a rule over climate normals for Step 3. It was built and te
|
||||
- **The method is tested blind.** The same reviewers estimated the 148 trails whose season a page states, from identical packets with the season hidden, and a trail's comparable trails never came from its own part of the split. Two measures are given, always together. 114 of 148 (77 percent) had their first and last months within a month of the page's; 105 (71 percent) also had no wrong gap in the middle. The ends-only measure is the one the 75 percent bar was set on, and on it the method clears the bar (77 percent); the strict measure (every window of the season must correspond, so a wrong gap counts as a miss) is lower, and the method does not reach 75 percent on it (71 percent). The owner decided the estimates ship with both figures stated. By the reviewer's confidence, ends only and strict: high 48 and 48 of 52, medium 55 and 46 of 76, low 11 and 11 of 20. The figures are in `tools/season_blind_test.json`, written by `season_judge.py score`, and the site reads them. The six trails judged from pages that disagree are not scored against themselves.
|
||||
- **An estimate is stricter.** `season_basis = "estimate"` means no page states a season. `season` is built from `months`; `season_method` is one or two plain sentences saying how it was set and what sets the season there, ending "Confidence: high.", "medium." or "low."; and its one `[[hike.source]]` names `season` and `months` and cites the climate data. The validator refuses an estimate with any ordinary page naming the season, or with no method, and requires a season on every trail.
|
||||
- **Pages that disagree.** Three trails (the Sierra High Route, the Cohos Trail and the Ouachita Trail) have pages from at least two different publishers that disagree, where none is the managing body, association or route author. Their season is set by judgement from all the pages and the estimate: basis `sources`, the pages cited as sources naming the season, and a `season_method` saying the pages differ and how it was settled, ending with a confidence; the validator requires two publishers and the confidence. Three more (the Finger Lakes Trail, whose one page contradicts itself, and the Ice Age Trail and the Ozark Trail, each with two pages from one publisher that differ) have no two publishers, so they are estimates: the pages are not cited as stating the season, and the method says a page was found but differs, so the season was estimated from the climate and similar trails. A season with a method is shown as an estimate (it reads "About" with a note), left out of structured data, and not counted among the seasons a page states.
|
||||
- **The monthly check** (`estimate_season.py check`) reruns the machine estimate for every estimate and flags any whose inputs have changed since `tools/season_inputs.json` recorded them. It does not rewrite anything. The audit (`docs/audit.md`) also searches afresh for a page for every estimate.
|
||||
- **The monthly check** (`estimate_season.py check`) runs offline: it compares the digest of each estimate's current track and location with the one `tools/season_inputs.json` recorded when the season was set, and flags any that differ. The climate normals are a fixed published dataset and are not read again. It does not rewrite anything. The audit (`docs/audit.md`) also searches afresh for a page for every estimate.
|
||||
- **On the site**, a trail's page reads "About April to October" with a note (no page states a season; estimated from the climate at the trail's elevation and from similar trails; what sets it there; the confidence; that these are the usual months, not a closure). Rows, tables and month lists mark estimates, the month filter can leave them out, and the reference page and glossary give the counts and the blind-test result.
|
||||
|
||||
## Open risks
|
||||
|
||||
Reference in new issue
Block a user