Commit 108cb6e
committed
fix(session-summary): address yellow review — stale-sidecar docs, subpath skip note, conformance clock alignment
- sessions.py: fast-path doctring note + inline return comment now say
'complete and fresh' sidecars never short-page; a present-but-stale
sidecar (summary.mtime < list_sessions.mtime) is routed through the
same gap-fill as a missing one and can short-page.
- types.py: SessionStore.list_session_summaries docstring explicitly
notes that subagent (subpath) keys must be skipped by the fold and
that results are scoped to project_key like list_sessions.
- conformance: replace tautological 'refolded[mtime] >= summ[mtime]'
check (the fold preserves prev mtime verbatim) with an explicit
equality, and add a clock-alignment assertion under has_list_sessions
that catches adapters deriving sidecar mtime from entry ISO timestamps
(which would make every sidecar look stale to the fast-path freshness
check).
- test: pin test_limit_offset_applied_after_sidechain_filter to the
slow path (list_session_summaries -> NotImplementedError) so it keeps
covering slow-path filter-THEN-paginate — the fast path deliberately
locks in paginate-THEN-drop for summary-backed sidechain slots.1 parent e3ebe57 commit 108cb6e
4 files changed
Lines changed: 43 additions & 10 deletions
File tree
- src/claude_agent_sdk
- _internal
- testing
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1602 | 1602 | | |
1603 | 1603 | | |
1604 | 1604 | | |
1605 | | - | |
1606 | | - | |
1607 | | - | |
1608 | | - | |
1609 | | - | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
1610 | 1611 | | |
1611 | 1612 | | |
1612 | 1613 | | |
| |||
1697 | 1698 | | |
1698 | 1699 | | |
1699 | 1700 | | |
1700 | | - | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
1701 | 1704 | | |
1702 | 1705 | | |
1703 | 1706 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
198 | 210 | | |
199 | 211 | | |
200 | 212 | | |
201 | 213 | | |
202 | 214 | | |
203 | 215 | | |
204 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
205 | 219 | | |
206 | 220 | | |
207 | 221 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1266 | 1266 | | |
1267 | 1267 | | |
1268 | 1268 | | |
1269 | | - | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
1270 | 1274 | | |
1271 | 1275 | | |
1272 | 1276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
162 | 174 | | |
163 | 175 | | |
164 | 176 | | |
| |||
0 commit comments