Skip to content

Commit 4252a2f

Browse files
committed
test: cover identity rows in archive envelope
1 parent a784405 commit 4252a2f

2 files changed

Lines changed: 79 additions & 1 deletion

File tree

test/archive-forwarder-contract.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ describe("archive forwarder wire contract (shared golden fixture)", () => {
4545
new Set([
4646
"strategy_data.policy_evaluation_events",
4747
"strategy_data.strategy_policy_snapshots",
48+
"strategy_data.market_identity",
49+
"strategy_data.symbol_mapping",
4850
"strategy_data.inventory_settlement_events",
4951
]),
5052
);

test/fixtures/archive_forwarder_envelope.json

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,82 @@
5858
},
5959
"table": "strategy_data.strategy_policy_snapshots"
6060
},
61+
{
62+
"row": {
63+
"access_policy_id": "",
64+
"active_from_ms": 1719999999996,
65+
"archive_event_id": "run-2026-07-02T00-00-00Z:strategy_data.market_identity:1",
66+
"base_asset": "ARB",
67+
"canonical_core_pool_id": "0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
68+
"canonical_exchange": "binance",
69+
"canonical_market_id": "0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
70+
"canonical_trading_pair": "ARB-USDC",
71+
"connector_id": "fiet_cex",
72+
"connector_name": "fiet_cex",
73+
"content_hash": "3f9c9e16063259ea9b0329dcad2a64eea8ab52747cc71d623ce4251bd9c7dd16",
74+
"controller_id": "layer12-live-arb-usdc-015",
75+
"controller_type": "layer12_live",
76+
"core_pool_id": "0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
77+
"deployment_id": "arb-usdc-015",
78+
"emitted_at_ms": 1720000000000,
79+
"event_time_ms": 1719999999996,
80+
"exchange": "binance",
81+
"market_id": "arb-usdc-015",
82+
"payload_json": "{\"market_detail\":{\"core_pool_id\":\"0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\"inventory\":{\"token0\":{\"address\":\"0x1111111111111111111111111111111111111111\",\"symbol\":\"ARB\"},\"token1\":{\"address\":\"0x2222222222222222222222222222222222222222\",\"symbol\":\"USDC\"}},\"market_id\":\"arb-usdc-015\"},\"market_identity\":{\"canonical_core_pool_id\":\"0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\"core_pool_id\":\"0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\",\"market_id\":\"arb-usdc-015\"}}",
83+
"producer_id": "hb_runtime:arb-usdc-015:layer12-live-arb-usdc-015",
84+
"producer_run_id": "run-2026-07-02T00-00-00Z",
85+
"quote_asset": "USDC",
86+
"revision": "3f9c9e16063259ea9b0329dcad2a64eea8ab52747cc71d623ce4251bd9c7dd16",
87+
"run_id": "run-2026-07-02T00-00-00Z",
88+
"schema_version": "2",
89+
"seq": 3,
90+
"snapshot_reason": "startup",
91+
"source": "hb_runtime",
92+
"source_hash": "3f9c9e16063259ea9b0329dcad2a64eea8ab52747cc71d623ce4251bd9c7dd16",
93+
"source_symbol": "ARB-USDC",
94+
"stream_name": "strategy_data.market_identity",
95+
"stream_seq": 1,
96+
"trading_pair": "ARB-USDC"
97+
},
98+
"table": "strategy_data.market_identity"
99+
},
100+
{
101+
"row": {
102+
"access_policy_id": "",
103+
"active_from_ms": 1719999999998,
104+
"archive_event_id": "run-2026-07-02T00-00-00Z:strategy_data.symbol_mapping:1",
105+
"base_asset": "ARB",
106+
"canonical_exchange": "binance",
107+
"canonical_market_id": "arb-usdc-015",
108+
"canonical_trading_pair": "ARB-USDC",
109+
"connector_id": "fiet_cex",
110+
"connector_name": "fiet_cex",
111+
"content_hash": "ad9018fea06786f8448b2ebf2ff99b3c6a7cf647c5b0853a1173f466bf358cfc",
112+
"controller_id": "layer12-live-arb-usdc-015",
113+
"controller_type": "layer12_live",
114+
"deployment_id": "arb-usdc-015",
115+
"emitted_at_ms": 1720000000000,
116+
"event_time_ms": 1719999999998,
117+
"exchange": "binance",
118+
"market_id": "arb-usdc-015",
119+
"payload_json": "{\"base_asset\":\"ARB\",\"cex_exchange_name\":\"binance\",\"connector_name\":\"fiet_cex\",\"market_pair\":\"ARB-USDC\",\"policy_epoch\":\"42\",\"quote_asset\":\"USDC\",\"trading_account_selector\":\"secondary:1\",\"trading_pair\":\"ARB-USDC\"}",
120+
"producer_id": "hb_runtime:arb-usdc-015:layer12-live-arb-usdc-015",
121+
"producer_run_id": "run-2026-07-02T00-00-00Z",
122+
"quote_asset": "USDC",
123+
"revision": "ad9018fea06786f8448b2ebf2ff99b3c6a7cf647c5b0853a1173f466bf358cfc",
124+
"run_id": "run-2026-07-02T00-00-00Z",
125+
"schema_version": "2",
126+
"seq": 4,
127+
"snapshot_reason": "symbol_mapping_change",
128+
"source": "hb_runtime",
129+
"source_hash": "ad9018fea06786f8448b2ebf2ff99b3c6a7cf647c5b0853a1173f466bf358cfc",
130+
"source_symbol": "ARB-USDC",
131+
"stream_name": "strategy_data.symbol_mapping",
132+
"stream_seq": 1,
133+
"trading_pair": "ARB-USDC"
134+
},
135+
"table": "strategy_data.symbol_mapping"
136+
},
61137
{
62138
"row": {
63139
"account": "secondary:1",
@@ -77,7 +153,7 @@
77153
"reservation_id": "resv-0001",
78154
"run_id": "run-2026-07-02T00-00-00Z",
79155
"schema_version": "2",
80-
"seq": 3,
156+
"seq": 5,
81157
"source": "hb_runtime",
82158
"stream_name": "strategy_data.inventory_settlement_events",
83159
"stream_seq": 1,

0 commit comments

Comments
 (0)