Repository navigation
Commit c64b853
fix(devin): keep one trajectory per named conversation so prompt caching hits
GetChatMessage stamped a fresh CortexTrajectoryReference id (#15) on every
request. Cognition routes a trajectory to the replica that holds its prompt
cache, so every turn of one conversation landed on a cold replica: SWE-2
reported no cache reads even for byte-identical repeats.
A conversation the client names (client thread, session_id or
x-session-affinity) now keeps one trajectory across the request-scoped
adapters the proxy builds per HTTP request. Unnamed turns still mint one per
request, and a live trajectory is never lent to an overlapping turn, because
the server holds or drops concurrent turns on one id.
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent 2e3acab commit c64b853
3 files changed
Lines changed: 108 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
656 | 656 | | |
657 | 657 | | |
658 | 658 | | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
659 | 685 | | |
660 | 686 | | |
661 | 687 | | |
| |||
744 | 770 | | |
745 | 771 | | |
746 | 772 | | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
747 | 776 | | |
748 | 777 | | |
749 | 778 | | |
| |||
780 | 809 | | |
781 | 810 | | |
782 | 811 | | |
| 812 | + | |
783 | 813 | | |
784 | 814 | | |
785 | 815 | | |
| |||
961 | 991 | | |
962 | 992 | | |
963 | 993 | | |
| 994 | + | |
| 995 | + | |
964 | 996 | | |
965 | 997 | | |
966 | 998 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
| 539 | + | |
| 540 | + | |
539 | 541 | | |
540 | 542 | | |
541 | 543 | | |
| |||
779 | 781 | | |
780 | 782 | | |
781 | 783 | | |
782 | | - | |
| 784 | + | |
| 785 | + | |
783 | 786 | | |
784 | | - | |
| 787 | + | |
785 | 788 | | |
786 | 789 | | |
787 | 790 | | |
| |||
1105 | 1108 | | |
1106 | 1109 | | |
1107 | 1110 | | |
| 1111 | + | |
| 1112 | + | |
1108 | 1113 | | |
1109 | 1114 | | |
1110 | 1115 | | |
| |||
1255 | 1260 | | |
1256 | 1261 | | |
1257 | 1262 | | |
| 1263 | + | |
1258 | 1264 | | |
1259 | 1265 | | |
1260 | 1266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
57 | 72 | | |
58 | 73 | | |
59 | 74 | | |
| |||
128 | 143 | | |
129 | 144 | | |
130 | 145 | | |
| 146 | + | |
131 | 147 | | |
132 | 148 | | |
133 | 149 | | |
134 | 150 | | |
135 | 151 | | |
136 | 152 | | |
137 | 153 | | |
138 | | - | |
| 154 | + | |
139 | 155 | | |
140 | 156 | | |
141 | 157 | | |
| |||
226 | 242 | | |
227 | 243 | | |
228 | 244 | | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
229 | 295 | | |
230 | 296 | | |
231 | 297 | | |
| |||
0 commit comments