Commit 94138da
authored
## Summary
Replaces the fixed 5-line preceding-comment window in
`scripts/check-trusted-base.sh` with a walk-back through the consecutive
comment block (lines that start with `--` / `//` / `|||` / `#` / `*` /
`(*`). Adds a 15-line hard floor as a sanity bound.
## Why
Real Agda / Lean / Idris postulates commonly carry 7-15 line prose
justifications labelled `-- AXIOM:` / `-- TRUSTED:` on the *opening*
line of the block. The marker (the `postulate` keyword) lands at the
*end* of the block — past the 5-line window — and the script reported
the escape hatch as undocumented even though the documentation was
plainly there.
Echidna PR #128 had to insert a redundant `-- AXIOM:` line immediately
before each postulate as a workaround. This PR fixes the underlying
script behaviour so the natural prose-block placement is recognised
estate-wide.
## Behaviour matrix
| Block shape | Old (5-line window) | New (walk-back, 15-line floor) |
|---|---|---|
| Magic word on line N-2, marker on line N | ✅ | ✅ |
| Magic word on line N-10, with 10 lines of prose comment, marker on
line N | ❌ | ✅ |
| Magic word on line N-20, marker on line N (with intervening blank or
code line) | ❌ | ❌ (block-aware) |
| No magic word in the preceding block | ❌ | ❌ (correctly fails closed)
|
## Test plan
- [x] Local synthetic test (Agda postulate with 7-line prose block +
opening AXIOM: line) now passes the script.
- [ ] CI on standards' own .v / .agda / .idr / .rs files.
Closes #296.
EOF
)
1 parent 822fa14 commit 94138da
1 file changed
Lines changed: 35 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
245 | 276 | | |
246 | 277 | | |
247 | 278 | | |
| |||
0 commit comments