Commit 933f086
fix: tighten the claim-state types and the agent-contract example
Review follow-ups on the nudges.
`ClaimState`'s `attached` variant made `claimed_at` optional even though
`claimState` only ever produces that variant when both `claimed_at` and
`team_id` are present, so the optionality described a state that cannot
occur. Making it required lets the type say what the constructor
guarantees, and the test that built an `attached` value without a
timestamp now has to supply one.
The doctor check declared `state` untyped, leaving it an evolving `any`
and its `ClaimState` import unused. It is annotated now.
The `attached` example in the agent contract was not valid JSON: it
listed the key names with no values, which is the one thing a document
aimed at agents should not do.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 09bca03 commit 933f086
5 files changed
Lines changed: 7 additions & 6 deletions
File tree
- apps/cli
- src
- commands/doctor/checks
- lib
- tests/unit
- commands
- lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
152 | 153 | | |
153 | 154 | | |
154 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
0 commit comments