Repository navigation
Commit 8bdf5a3
feat(finishingbot,glambot): read the chora deed, not the retired .scm files (#689)
## Why
Repo facts are clauses of the one `<repo>_chora.deed` at the root (D312,
D313). Neither finishingbot nor glambot read the deed:
- finishingbot still **validated** legacy `STATE/META/….scm` files. Its
`SCM-005` advised **moving** a root `STATE.scm` into
`.machine_readable/`, which restores a retired layout (CLAUDE.md
invariant 1).
- glambot required a `.machine_readable/` directory, and its fixtures
built the retired `.scm` layout.
## What
**`deed-reader/` (new, std-only, read-only).** panicbot's
grammar-faithful reader, extracted so bots read the deed one way, plus
the lookup conventions of `scripts/deed-field.sh`:
| `deed-field.sh` | `deed_reader` |
|---|---|
| `--find DIR` | `find_chora(dir)`: exactly one `*_chora.deed`,
`Multiple` otherwise |
| `--has DEED PATH` | `Clause::has(path)` |
| `DEED PATH KEY` | `clause_at(path)` then `field(key)`: key at the
clause's top level only |
`load_chora` requires the `repo-deed` doc-head. One tightening against
`deed.abnf`: a bare CR is now an error (`line-end = CRLF / LF`). It
stays a reader; `deed_lint.js` remains the conformance gate.
**finishingbot.** The type `ScmFilesAnalyzer` and the report key
`scm_files` keep their names, so the API and JSON shape are stable.
| ID | Severity | When |
|---|---|---|
| DEED-001 | warning | no chora deed |
| DEED-002 | error | more than one (D312) |
| DEED-003 | error | unreadable, unparseable (with line), or not a
`repo-deed` |
| DEED-004 | warning | no `(status …)` clause and no
`descriptiles/STATE.deed` (A7 J15) |
| SCM-006-`<NAME>.scm` | warning | legacy file at the root,
`.machine_readable/` or `6scm/`: **migrate**, never validated, never
"move" |
| SCM-002…005 | retired | (SCM-001 already was) |
**glambot.**
- MACH-006 (missing `.machine_readable/`) is retired: a repo whose facts
all live in its deed needs no such directory.
- New: MACH-008 (warning, no chora deed) and MACH-009 (error: several,
unreadable, unparseable or wrong head).
- Fixtures now use a chora deed.
- Neither finding is auto-fixable: bots never write a deed.
**CI.** `deed-reader` and `finishingbot` join the `rust.yml` matrix.
**finishingbot had never been built or tested in CI.** glambot stays out
because it has about 60 pre-existing clippy diagnostics under `-D
warnings`. With `--keep-going`, this branch has **one fewer** than main
and adds none.
## Validation (local)
| Crate | build `--locked` | tests | clippy `-D warnings` | fmt |
|---|---|---|---|---|
| deed-reader | ✅ | 7 passed | ✅ 0 | ✅ |
| finishingbot | ✅ | 69 + 69 + 38 passed | ✅ 0 | ✅ |
| glambot | ✅ | 36 + 36 + 6 passed | 63 pre-existing (main: 64) | ✅ |
Each new rule has positive and negative tests: none / one / two deeds,
parse error with line, wrong head, status vs `STATE.deed`, and legacy
`.scm` at all three locations reported as migrate and never validated.
## Not in this PR (follow-ups)
- Move panicbot's and rhodibot's private readers onto `deed-reader`.
rhodibot's is under #687, so this waits on that.
- Pay glambot's clippy debt, then add glambot to the matrix.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01J4QvDhFeexmokLqLRfZNce)_
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## Summary by CodeRabbit
* **New Features**
* Repository checks now recognize a root-level chora deed, report when
it is missing or invalid, and include parse-error locations.
* Finishingbot checks deed status and maturity, and warns when it finds
legacy `.scm` files.
* **Changes**
* Legacy SCM document validation and related findings have been retired.
`.scm` files are no longer required or validated.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: CLAUDE <355856132+HoTT-stuff@users.noreply.github.com>1 parent d077960 commit 8bdf5a3
19 files changed
Lines changed: 1616 additions & 762 deletions
File tree
- .github/workflows
- bots
- finishingbot
- src/analyzers
- tests
- glambot
- src/analyzers
- tests
- panicbot
- src
- deed-reader
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
83 | 92 | | |
84 | 93 | | |
85 | 94 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
8 | | - | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
19 | 27 | | |
20 | 28 | | |
21 | 29 | | |
| |||
32 | 40 | | |
33 | 41 | | |
34 | 42 | | |
35 | | - | |
| 43 | + | |
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
| 51 | + | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
| 421 | + | |
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| |||
0 commit comments