Repository navigation
Commit 4fd79ff
committed
docs(openspec): say what "reuse" means for each of the three
Review feedback on #235. D1 claimed `submitRule`, `pollRuleStatus` and
`writeRuleFile` are "reused, not reimplemented", and for two of the
three that is not true yet.
Both requesters are hardcoded to the rule-family endpoints and take a
required `token`, which `createApiClient` turns unconditionally into an
`Authorization: Bearer` header. The demo is unauthenticated by
requirement, so neither is usable as written. The path half resolves
itself when the client adopts the renamed family; the token half does
not, and is the durable part.
The reason this is worth more than the wording: D1's failure test says
"if the demo needs a new writer, the shapes have diverged, and the demo
has done its job by failing". That test is a claim about PAYLOAD SHAPES,
and it was already tripping — for the requester and the poller, where it
means nothing of the kind. A requester needing a second argument says
nothing about whether the demo and the mainline agree on what a rule
looks like.
So D1 now splits them. `writeRuleFile` is byte-for-byte reuse and is
what the failure test is really about. The other two are two small
changes to functions written when every caller was authenticated, and
they are planned as task 1.2a rather than discovered mid-implementation,
which is what the previous wording set up.
1.2b is the part nobody raised: an unauthenticated call must send no
`Authorization` header rather than one carrying an empty token. A header
the service then has to decide how to ignore is a worse contract than
its absence.1 parent 31a04a0 commit 4fd79ff
2 files changed
Lines changed: 28 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
57 | 80 | | |
58 | 81 | | |
59 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
0 commit comments