Commit a056d3b
feat(command-dump): add REDIRECT control frame support (#1759)
* feat(command-dump): add REDIRECT control frame support
Capture the engine's REDIRECT frame (type id 0x40000005, introduced
in #1755) in the dump command's pcap output and surface it in the
zilla.lua Wireshark dissector. Like RESET, REDIRECT terminates the
stream, so it is mapped to a TCP PSH segment. Like BEGIN, the frame
carries an int64 affinity and a round-tripped extension, so each
binding's extension dissector treats REDIRECT the same as BEGIN.
Adds k3po scripts for the client-sent redirect scenario; the IT method
is wired but @ignore'd until its tshark-generated expected fixture is
regenerated on a docker-enabled host.
https://claude.ai/code/session_01K4wd5z8Ejgq4ejTsmL88oh
* fix(engine): align REDIRECT teardown with RESET in k3po-zilla transport
Per the engine ABI from #1755, REDIRECT terminates the stream like RESET
(EngineWorker dispatcher.remove + Target streams[].remove for both
RedirectFW.TYPE_ID and ResetFW.TYPE_ID). The k3po-zilla test transport
was leaving the channel in an inconsistent state on both ends, so
follow-up cleanup or script steps could emit END / ABORT frames against
a stream the engine had already torn down. This produced inconsistent
zilla dump pcap output for redirect scenarios.
Mirror the existing RESET pattern exactly:
- `ZillaSource.doAdviseInput` (ADVISORY_REDIRECT branch) — the caller of
`streamFactory.doRedirect` now closes the local READ side after the
frame is written, mirroring `doAbortInputAfterBegin` for RESET. The
frame writer (`ZillaTarget.doRedirect`) stays state-free, mirroring
`ZillaTarget.doReset` / `doAbortInput`.
- `Throttle.onRedirect` — on the receiver side, mirror `Throttle.onReset`
exactly: `setWriteAborted` + `setWriteClosed` + `fireOutputAborted` +
the disconnect / unbind / close events. The receiver is the source of
the stream (REDIRECT travels in the throttle direction, opposite the
BEGIN), so its WRITE side is what the redirect terminates — same as
RESET semantics.
The pre-existing `binding-http` `RedirectIT` (`read advise zilla:redirect`
+ `write aborted` on the application side, added in #1758) was authored
against the previous buggy transport behavior and has been failing on
develop ever since. With this fix in place it will need to be revisited
in a follow-up — that test is unaffected by this commit and remains in
the same failure state as on develop's HEAD.
Verified: engine surefire 320/320 + failsafe 204/204
(incl. SimplexIT 37/37 with the PR #1755 REDIRECT test).
https://claude.ai/code/session_01K4wd5z8Ejgq4ejTsmL88oh
* test(command-dump): enable shouldReceiveClientSentRedirect
Pair the redirect rpt scripts with `read abort` (client) and
`write aborted` (server) so post-REDIRECT teardown is deterministic
once the k3po-zilla transport aligns REDIRECT with RESET (#13ad202a1).
Add the tshark fixture and unignore the IT method.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent b162be1 commit a056d3b
8 files changed
Lines changed: 358 additions & 9 deletions
File tree
- incubator/command-dump/src
- main
- java/io/aklivity/zilla/runtime/command/dump/internal/airline
- resources/io/aklivity/zilla/runtime/command/dump/internal/airline
- scripts/io/aklivity/zilla/runtime/command/dump/binding/ws/streams/application/advise/client.sent.redirect
- test
- java/io/aklivity/zilla/runtime/command/dump/internal
- resources/io/aklivity/zilla/runtime/command/dump/internal
- runtime/engine/src/test/java/io/aklivity/zilla/runtime/engine/test/internal/k3po/ext/behavior
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| 220 | + | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| |||
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
| 230 | + | |
228 | 231 | | |
229 | 232 | | |
230 | 233 | | |
| |||
595 | 598 | | |
596 | 599 | | |
597 | 600 | | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
598 | 604 | | |
599 | 605 | | |
600 | 606 | | |
| |||
740 | 746 | | |
741 | 747 | | |
742 | 748 | | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
743 | 764 | | |
744 | 765 | | |
745 | 766 | | |
| |||
Lines changed: 21 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
867 | 868 | | |
868 | 869 | | |
869 | 870 | | |
| 871 | + | |
| 872 | + | |
870 | 873 | | |
871 | 874 | | |
872 | 875 | | |
| |||
876 | 879 | | |
877 | 880 | | |
878 | 881 | | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
879 | 888 | | |
880 | 889 | | |
881 | 890 | | |
| |||
974 | 983 | | |
975 | 984 | | |
976 | 985 | | |
| 986 | + | |
977 | 987 | | |
978 | 988 | | |
979 | 989 | | |
| |||
1280 | 1290 | | |
1281 | 1291 | | |
1282 | 1292 | | |
1283 | | - | |
| 1293 | + | |
| 1294 | + | |
1284 | 1295 | | |
1285 | 1296 | | |
1286 | 1297 | | |
| |||
1311 | 1322 | | |
1312 | 1323 | | |
1313 | 1324 | | |
1314 | | - | |
| 1325 | + | |
1315 | 1326 | | |
1316 | 1327 | | |
1317 | 1328 | | |
| |||
1464 | 1475 | | |
1465 | 1476 | | |
1466 | 1477 | | |
1467 | | - | |
| 1478 | + | |
1468 | 1479 | | |
1469 | 1480 | | |
1470 | 1481 | | |
| |||
1521 | 1532 | | |
1522 | 1533 | | |
1523 | 1534 | | |
1524 | | - | |
| 1535 | + | |
1525 | 1536 | | |
1526 | 1537 | | |
1527 | 1538 | | |
| |||
1629 | 1640 | | |
1630 | 1641 | | |
1631 | 1642 | | |
1632 | | - | |
| 1643 | + | |
| 1644 | + | |
1633 | 1645 | | |
1634 | 1646 | | |
1635 | 1647 | | |
1636 | 1648 | | |
1637 | | - | |
| 1649 | + | |
1638 | 1650 | | |
1639 | 1651 | | |
1640 | 1652 | | |
| |||
2046 | 2058 | | |
2047 | 2059 | | |
2048 | 2060 | | |
2049 | | - | |
| 2061 | + | |
| 2062 | + | |
2050 | 2063 | | |
2051 | 2064 | | |
2052 | 2065 | | |
2053 | 2066 | | |
2054 | | - | |
| 2067 | + | |
2055 | 2068 | | |
2056 | 2069 | | |
2057 | 2070 | | |
| |||
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
52 | 61 | | |
0 commit comments