Commit 124830a
authored
feat: add Collection.ForkCount for lineage-wide fork counting (#475)
* docs(13): capture phase context
* docs(state): record phase 13 context session
* docs(13): research collection ForkCount implementation
* docs(phase-13): add validation strategy
* docs(13): create phase plan for Collection.ForkCount
* feat(13-01): add ForkCount to Collection interface with HTTP and embedded implementations
- Add ForkCount(ctx) (int, error) to Collection interface
- HTTP impl issues GET to /fork_count and decodes JSON {count: n}
- Embedded impl returns explicit unsupported error
* test(13-01): add ForkCount unit tests for HTTP and embedded paths
- HTTP happy path: server returns {"count":5}, assert result == 5
- HTTP error path: server returns 500, assert error returned
- Embedded path: assert unsupported error message
* docs(13-01): complete Collection ForkCount interface and implementations plan
- Add 13-01-SUMMARY.md with execution results
- Update STATE.md position and metrics
- Update ROADMAP.md progress
* docs(13-02): add ForkCount section to collection forking docs
- Add "Checking Fork Count" section with Python and Go code examples
- Add ForkCount row to Fork API Reference table
- Add lineage-wide semantics note to Notes section
* feat(13-02): add runnable Fork + ForkCount example
- Create examples/v2/fork_count/main.go demonstrating Fork followed by ForkCount
- Show lineage-wide semantics where source and fork report same count
- Use run() pattern to satisfy gocritic exitAfterDefer lint rule
* docs(13-02): complete ForkCount documentation and example plan
- Add 13-02-SUMMARY.md with task results and deviations
- Update STATE.md with plan progress and metrics
- Update ROADMAP.md with phase 13 completion status
- Mark FC-05, FC-06 requirements complete
* docs(phase-13): complete phase execution
* docs(phase-13): evolve PROJECT.md after phase completion
* Fix cloud-only fork count docs and example
* Polish fork count docs and example comments
* docs(13): ship phase 13 — PR #4751 parent 4910d59 commit 124830a
20 files changed
Lines changed: 1603 additions & 19 deletions
File tree
- .planning
- phases/13-collection-forkcount
- docs/go-examples/cloud/features
- examples/v2/fork_count
- pkg/api/v2
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
70 | 79 | | |
71 | 80 | | |
72 | 81 | | |
| |||
127 | 136 | | |
128 | 137 | | |
129 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
130 | 145 | | |
131 | 146 | | |
132 | | - | |
133 | | - | |
| 147 | + | |
| 148 | + | |
134 | 149 | | |
135 | 150 | | |
136 | 151 | | |
137 | 152 | | |
138 | | - | |
| 153 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
| 126 | + | |
| 127 | + | |
124 | 128 | | |
125 | 129 | | |
126 | 130 | | |
| |||
153 | 157 | | |
154 | 158 | | |
155 | 159 | | |
156 | | - | |
157 | | - | |
158 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
0 commit comments