Commit e6bc347
feat(engine): withdraw_steer reports SteerWithdrawal outcome
Hosts that re-send a queued input through another path (interrupt-and-send)
must know whether the engine copy can still be committed, otherwise the
same message can be delivered twice: the withdrawal used to be
fire-and-forget, and "no SteerCommitted received yet" cannot be
distinguished from "already committed" on the async event path.
SteerControlState::withdraw now reports from the authoritative unsettled
ledger, and EngineHandle::withdraw_steer returns it:
- Retired: the id was pending and is now marked withdrawn — guaranteed
never to be injected, settles with exactly one SteerDropped; the host
may safely re-send.
- NotPending: the id already settled (committed or dropped) or was never
seen — no-op with no event; the host must not re-send.
The withdrawal-set invariants are unchanged: unknown ids do not grow the
set (bounded), settled ids stay no-ops. Behavior test
steer_lifecycle_withdrawal_is_bounded_and_prevents_commit now asserts all
three outcomes.
No-Issue: driven by pinvou-agent#308 review (interrupt-and-send resend
race); upstream-neutral, same area as the conversation-insertion
primitives in #16.
Signed-off-by: luzeyang (INT) <lu.zeyang@h3c.com>1 parent 4831c37 commit e6bc347
3 files changed
Lines changed: 50 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
582 | 597 | | |
583 | 598 | | |
584 | 599 | | |
| |||
665 | 680 | | |
666 | 681 | | |
667 | 682 | | |
668 | | - | |
| 683 | + | |
669 | 684 | | |
670 | 685 | | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
671 | 692 | | |
672 | 693 | | |
673 | 694 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
283 | 286 | | |
284 | 287 | | |
285 | 288 | | |
286 | | - | |
| 289 | + | |
287 | 290 | | |
288 | 291 | | |
289 | 292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5385 | 5385 | | |
5386 | 5386 | | |
5387 | 5387 | | |
5388 | | - | |
| 5388 | + | |
| 5389 | + | |
| 5390 | + | |
| 5391 | + | |
| 5392 | + | |
5389 | 5393 | | |
5390 | 5394 | | |
5391 | 5395 | | |
| |||
5397 | 5401 | | |
5398 | 5402 | | |
5399 | 5403 | | |
5400 | | - | |
| 5404 | + | |
| 5405 | + | |
| 5406 | + | |
| 5407 | + | |
| 5408 | + | |
5401 | 5409 | | |
5402 | 5410 | | |
5403 | | - | |
| 5411 | + | |
| 5412 | + | |
| 5413 | + | |
| 5414 | + | |
| 5415 | + | |
5404 | 5416 | | |
5405 | 5417 | | |
5406 | 5418 | | |
| |||
0 commit comments