Commit 32e21be
committed
[S3-E.1] aptos: REST chain template fixed + L1-CLI gate bug fix
S3-E wave-E, chain 1/5 (aptos).
Changes:
1. config/chains/aptos.json
- rpc_methods.single: 'GET /v1' (collection root, no address)
-> 'GET /v1/accounts/{addr}' (account info with address)
- Added _meta.rest_paths: maps 5 logical method keys to
{method, path} dicts. RestAdapter._resolve_path requires this
map; without it cli.py raises ValueError 'method X not in
_meta.rest_paths. Available: []'. Path templates use {address}
placeholder (RestAdapter only substitutes {address}).
- Added _meta.health_probe: GET /v1 + parse_jq '.block_height'
(Aptos response includes x-aptos-* headers but body also has
block_height, so the same endpoint serves both health probe
and bench traffic shape verification).
2. tests/test_chain_adapters.py (L1-CLI gate fix)
- Bug: test_cli_build_target_all_36_chains did
base64.b64decode(tgt["body"]) which KeyError'd on GET targets
(vegeta JSON omits "body" field for GET). aptos triggered this
after S3-E.1 fix because it's the first chain to produce GET
targets through the new path. Fix: tgt.get("body", "") with
empty-string fallback.
- Without this fix the invariant would silently mis-classify
every healthy GET-only chain as broken, defeating the entire
monotonic-shrink guarantee.
3. tests/test_chain_adapters.py (KNOWN_BROKEN_CLI ledger)
- Removed 'aptos' entry (chain is now healthy via cli.py).
- len() assertion: 16 -> 15 (1 chain fixed in S3-E.1).
Verification:
- L1 (unit + adapter contract): 10/10 PASS (was 10/10, no regression)
- L1-CLI gate: healthy 20/36 -> 21/36, broken 16/36 -> 15/36
- L2 (cli.py batch mode): 4/4 aptos targets generated, all addresses
correctly substituted into URL path
- L3 (real production pipeline target_generator.sh):
exit=0, "Successfully generated 4 test targets"
Output file format:
{"method":"GET","url":"http://.../v1/accounts/0x1","header":{}}
{"method":"GET","url":"http://.../v1/accounts/0x2","header":{}}
... (4 vegeta-compatible targets)
Wave S3-E progress: 1/5 chains (aptos done; algorand/hedera/tezos/ton pending)
KNOWN_BROKEN_CLI invariant working as designed — caught the GET body
KeyError immediately on first fix attempt.1 parent 8f81e54 commit 32e21be
2 files changed
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
62 | 70 | | |
63 | 71 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | 337 | | |
339 | 338 | | |
340 | 339 | | |
| |||
360 | 359 | | |
361 | 360 | | |
362 | 361 | | |
363 | | - | |
| 362 | + | |
364 | 363 | | |
365 | 364 | | |
366 | 365 | | |
| |||
418 | 417 | | |
419 | 418 | | |
420 | 419 | | |
421 | | - | |
| 420 | + | |
422 | 421 | | |
423 | 422 | | |
424 | | - | |
| 423 | + | |
| 424 | + | |
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
| |||
0 commit comments