Commit 81ebbf2
committed
fix(runtime): reject a mixed tightening while a Turn is active (#3349)
Review finding: session.configuration.update is a full configuration
operation, but the fast tightening path commits the entire record while
the live backend keeps its frozen composition. For bypass/agent →
ask/plan the permission half applies per dispatch while the stale agent
collaboration keeps combining with the fresh ask boundary — so a
write-capable dispatch can still be admitted after the stored
configuration already says the session is read-only Plan.
A tightening that also changes any backend-composed field (backend,
connection, model, thinking level, collaboration mode, orchestration
mode) now rejects session_busy while a run is live — never partially
committed; the retry lands whole once the run ends and the queued path
recomposes the backend with every field. Permission-only projections
keep the immediate-revocation path. The regression drives the reviewer's
scenario end to end: live rejection with zero partial commit, then a
read-only dispatch (plan downgrades ask to explore) after the retry.
Generated-by: ZCode (Z.ai GLM)1 parent d63f8ca commit 81ebbf2
2 files changed
Lines changed: 127 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5341 | 5341 | | |
5342 | 5342 | | |
5343 | 5343 | | |
| 5344 | + | |
| 5345 | + | |
| 5346 | + | |
| 5347 | + | |
| 5348 | + | |
| 5349 | + | |
| 5350 | + | |
| 5351 | + | |
| 5352 | + | |
| 5353 | + | |
| 5354 | + | |
| 5355 | + | |
| 5356 | + | |
| 5357 | + | |
| 5358 | + | |
| 5359 | + | |
| 5360 | + | |
| 5361 | + | |
| 5362 | + | |
| 5363 | + | |
| 5364 | + | |
| 5365 | + | |
| 5366 | + | |
| 5367 | + | |
| 5368 | + | |
| 5369 | + | |
| 5370 | + | |
| 5371 | + | |
| 5372 | + | |
| 5373 | + | |
| 5374 | + | |
| 5375 | + | |
| 5376 | + | |
| 5377 | + | |
| 5378 | + | |
| 5379 | + | |
| 5380 | + | |
| 5381 | + | |
| 5382 | + | |
| 5383 | + | |
| 5384 | + | |
| 5385 | + | |
| 5386 | + | |
| 5387 | + | |
| 5388 | + | |
| 5389 | + | |
| 5390 | + | |
| 5391 | + | |
| 5392 | + | |
| 5393 | + | |
| 5394 | + | |
| 5395 | + | |
| 5396 | + | |
| 5397 | + | |
| 5398 | + | |
| 5399 | + | |
| 5400 | + | |
| 5401 | + | |
| 5402 | + | |
| 5403 | + | |
| 5404 | + | |
| 5405 | + | |
| 5406 | + | |
| 5407 | + | |
| 5408 | + | |
| 5409 | + | |
| 5410 | + | |
| 5411 | + | |
| 5412 | + | |
| 5413 | + | |
| 5414 | + | |
| 5415 | + | |
| 5416 | + | |
| 5417 | + | |
| 5418 | + | |
| 5419 | + | |
| 5420 | + | |
| 5421 | + | |
| 5422 | + | |
| 5423 | + | |
| 5424 | + | |
5344 | 5425 | | |
5345 | 5426 | | |
5346 | 5427 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1135 | 1135 | | |
1136 | 1136 | | |
1137 | 1137 | | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
1138 | 1152 | | |
1139 | 1153 | | |
1140 | 1154 | | |
| 1155 | + | |
1141 | 1156 | | |
1142 | 1157 | | |
1143 | 1158 | | |
| |||
1673 | 1688 | | |
1674 | 1689 | | |
1675 | 1690 | | |
1676 | | - | |
1677 | | - | |
1678 | | - | |
1679 | | - | |
1680 | | - | |
1681 | | - | |
1682 | | - | |
1683 | | - | |
1684 | | - | |
1685 | | - | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
1686 | 1707 | | |
1687 | 1708 | | |
1688 | 1709 | | |
1689 | 1710 | | |
1690 | 1711 | | |
| 1712 | + | |
1691 | 1713 | | |
1692 | 1714 | | |
1693 | 1715 | | |
| |||
1698 | 1720 | | |
1699 | 1721 | | |
1700 | 1722 | | |
| 1723 | + | |
1701 | 1724 | | |
1702 | 1725 | | |
1703 | 1726 | | |
| |||
1734 | 1757 | | |
1735 | 1758 | | |
1736 | 1759 | | |
| 1760 | + | |
1737 | 1761 | | |
1738 | 1762 | | |
1739 | 1763 | | |
| |||
1755 | 1779 | | |
1756 | 1780 | | |
1757 | 1781 | | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
1758 | 1794 | | |
1759 | 1795 | | |
1760 | 1796 | | |
| |||
0 commit comments