Commit 374821f
test: walk the schema so a new digest site cannot join unlisted
test_every_known_site_is_listed asserted len(SCHEMA_SITES) == 6 and
len(COMPILED_COPIES) == 5. Both are constants in this module, so no change
to schemas/trace-claim.json could move either one. The module docstring and
the commit message of f65e7c3 both said a seventh digest field appearing
later would fail that test instead of joining silently. It would not.
lywinged showed it by execution on the pull request that added the file: a
seventh digest field carrying a drifted pattern left the suite green.
This adds their test unchanged. It walks the schema for digest-shaped
patterns and compares the walked set to SCHEMA_SITES, so a digest site
present in the schema and absent from the list now fails, and dropping a
site from the list is caught by the same assertion, and a listed entry
naming no schema site fails from the other side. The list stays named, so
adding a site is still a decision.
The schema-side count is removed rather than kept beside the walk, because
set equality against the schema is what that count stood in for. The
compiled-side count stays. Nothing discovers a compiled copy:
enum_drift.py walks the AST for set literals and a compiled regex is
invisible to it, and a walk of the schema cannot see one either. The
docstring now states that gap instead of implying the file closes both
halves.
Full suite green on this branch, and the plant reverts clean.
Co-authored-by: LouieLuNZ <48041247+lywinged@users.noreply.github.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: opento-suggestions <opentosuggestionsofficial@gmail.com>1 parent 30a655e commit 374821f
1 file changed
Lines changed: 43 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
16 | 26 | | |
17 | 27 | | |
18 | 28 | | |
| |||
105 | 115 | | |
106 | 116 | | |
107 | 117 | | |
108 | | - | |
109 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
110 | 139 | | |
111 | | - | |
112 | | - | |
113 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
114 | 150 | | |
115 | | - | |
116 | 151 | | |
0 commit comments