Repository navigation
Commit caee25a
committed
docs(readme): the tool table was missing two tools, and nothing could see it
The review found the count fix left a worse conflict behind: the package README
has a 模型工具 table, and it lists 10 tools while tools.js registers 12
(set_scope_state from #471 and memory_organize from #231 were never added). So
"11/12" in the prose and a 10-row table contradict each other in the same file —
a fixed number on top of a stale list.
Both rows added in registration order, each opt-in row naming the switch it needs
(organizeEnabled), and the discard/archive distinction the review flagged is
spelled out where a reader will hit it: discard writes nothing at all and only
touches the receipt, archive retires an existing row the report matched,
recoverably.
The real fix is the guard. readme-claims.test.js existed but only policed one
historical lie (the offline claim), which is why the table drifted twice without
a single failing test. It now derives the expected set from tools.js: names from
the registrations, opt-in membership from the `!== true` hiddenTools polarity
(`=== true` means default-on and user-disableable, so counting those as opt-in
would understate the default set), and requires the heading's numbers to match
both the default count and the full count.
Mutation-checked against the actual past breakage: heading back to "10 个" and
the two rows removed reddens the new test with the "table must map one-to-one"
message; restoring it is green.1 parent 7720ffb commit caee25a
3 files changed
Lines changed: 43 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| 65 | + | |
64 | 66 | | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
0 commit comments