Skip to content

Commit 8ff623e

Browse files
docs(review): refresh mech-interact plan for v0.32.4 and document MULTIPLIER_MECH invariant
Addresses OjusWiZard and bennyjo's review on PR #95. - docs/mech_offchain_integration_plan.md: replace v0.32.4-rc1 references (scope line, vendor tree, packages.json hash, config-surface timeout note, rollback guidance) with the tagged v0.32.4 release and its hash. The doc previously described the rc2-era dedicated 330s RESPONSE_ROUND_TIMEOUT as active; that event was reverted before v0.32.4 was tagged, so the note now correctly states MechResponseRound stays on the shared MechInteractEvent.ROUND_TIMEOUT and meme-ooorr's existing MULTIPLIER_MECH=20 override (600s effective) covers both v0.32.2 and v0.32.4 identically. - memeooorr_chained_abci/models.py: add an invariant comment near MULTIPLIER_MECH documenting that v0.32.4 dropped rc2's auto-scaling of the off-chain poll timeout, so round_timeout_seconds * MULTIPLIER_MECH and offchain_poll_timeout_seconds must be kept in sync manually to satisfy _check_round_timeout_fits_poll_budget when use_offchain=true. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 285a53b commit 8ff623e

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

docs/mech_offchain_integration_plan.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Mech-interact off-chain integration plan (meme-ooorr)
22

3-
Scope: wire meme-ooorr onto mech-interact v0.32.4-rc1 (off-chain HTTP request/response support). Default behaviour stays on-chain; operators opt in per service.yaml by flipping `use_offchain: true` inside `MECH_MARKETPLACE_CONFIG` **and** setting an endpoint for the executor to reach — either `offchain_url` (static per-service) or `use_dynamic_mech_selection: true` (discover URL from the on-chain manifest). With both left at their shipped defaults (`null` and `false`), `MechMarketplaceConfig.__post_init__` raises at startup.
3+
Scope: wire meme-ooorr onto mech-interact v0.32.4 (off-chain HTTP request/response support). Default behaviour stays on-chain; operators opt in per service.yaml by flipping `use_offchain: true` inside `MECH_MARKETPLACE_CONFIG` **and** setting an endpoint for the executor to reach — either `offchain_url` (static per-service) or `use_dynamic_mech_selection: true` (discover URL from the on-chain manifest). With both left at their shipped defaults (`null` and `false`), `MechMarketplaceConfig.__post_init__` raises at startup.
44

55
Reference implementations that ship the same shape:
66

@@ -23,13 +23,13 @@ meme-ooorr uses `PostTxDecisionMakingRound + PostTxDecisionMakingBehaviour` as t
2323

2424
### 1. Vendor updated mech_interact_abci + 3 new contracts
2525

26-
- Replace `packages/valory/skills/mech_interact_abci/` with the v0.32.4-rc1 tree (adds `behaviours/offchain_request.py`, `behaviours/offchain_response.py`, three new degenerate rounds under `states/final_states.py`, seven off-chain knobs on `MechMarketplaceConfig`, `OFFCHAIN_DEPOSIT_TX_SUBMITTER` sentinel at `states/request.py:44`).
26+
- Replace `packages/valory/skills/mech_interact_abci/` with the v0.32.4 tree (adds `behaviours/offchain_request.py`, `behaviours/offchain_response.py`, three new degenerate rounds under `states/final_states.py`, seven off-chain knobs on `MechMarketplaceConfig`, `OFFCHAIN_DEPOSIT_TX_SUBMITTER` sentinel at `states/request.py:44`).
2727
- Vendor three new contract packages (mirrors trader/optimus):
2828
- `packages/valory/contracts/mech_marketplace/`
2929
- `packages/valory/contracts/balance_tracker_fixed_price_native/`
3030
- `packages/valory/contracts/balance_tracker_fixed_price_token/`
3131
- `packages/packages.json`:
32-
- Bump `skill/valory/mech_interact_abci/0.1.0` hash to v0.32.4-rc1 (`bafybeihhwzpa6x5ypth426tzd2zjsnys6jmjaab4zvk4edisetzktft754`).
32+
- Bump `skill/valory/mech_interact_abci/0.1.0` hash to v0.32.4 (`bafybeici5tsgtlypnyrnp5colj7katnsyjfdzt6js4xdbnpdms4232muje`).
3333
- Add three new `contract/valory/*` entries under `third_party`.
3434
- `packages/valory/skills/memeooorr_chained_abci/skill.yaml` — bump the sibling `mech_interact_abci` skill dep hash to match.
3535

@@ -45,7 +45,7 @@ Pre-existing mech contract registration (`agent_mech`, `mech`, `mech_mm`, `mech_
4545

4646
### 3. Config surface — off-chain knobs on `MECH_MARKETPLACE_CONFIG`
4747

48-
Extend the env-default dict in both locations with seven off-chain fields, defaulting `use_offchain: false` so today's FSM entries are unchanged. Note that the mech-interact bump from v0.32.2 to v0.32.4-rc1 does move the `MechResponseRound` timeout from the shared 30s `ROUND_TIMEOUT` to a dedicated 330s `RESPONSE_ROUND_TIMEOUT`; this applies to on-chain agents too (they wait longer before declaring a mech unresponsive), matching what trader/optimus ship.
48+
Extend the env-default dict in both locations with seven off-chain fields, defaulting `use_offchain: false` so today's FSM entries are unchanged. Timeout note: v0.32.4 keeps `MechResponseRound` on the shared `MechInteractEvent.ROUND_TIMEOUT` (rc2's briefly-lived dedicated `RESPONSE_ROUND_TIMEOUT` was reverted before the tag). meme-ooorr overrides `MechInteractEvent.ROUND_TIMEOUT` in `MemeooorrChainedSkillAbciApp.event_to_timeout` at `memeooorr_chained_abci/models.py` via `round_timeout_seconds × MULTIPLIER_MECH` (`MULTIPLIER_MECH = 20`), giving 600s effective — comfortably above v0.32.4's ≥330s poll-budget guard for the off-chain path. Same wiring was in place under v0.32.2, so the response-round timeout is unchanged across the bump.
4949

5050
- `packages/dvilela/services/memeooorr/service.yaml:108` (the deployed service.yaml override)
5151
- `packages/valory/agents/memeooorr/aea-config.yaml:247` (the agent's own `mech_marketplace_config` under the mech_interact_abci skill block)
@@ -122,4 +122,4 @@ Read `.github/workflows/*.yaml` — run every `tox -e` env locally, including `c
122122

123123
## Rollback
124124

125-
Set `use_offchain: false` in the operator env override for `MECH_MARKETPLACE_CONFIG`. The on-chain FSM entries are unchanged; the only behavioural side-effect from the v0.32.4-rc1 skill bump that remains active is the longer `RESPONSE_ROUND_TIMEOUT` (see the config-surface note above). No code removal is needed to revert to today's routing.
125+
Set `use_offchain: false` in the operator env override for `MECH_MARKETPLACE_CONFIG`. The on-chain FSM entries are unchanged; nothing else from the v0.32.4 skill bump alters on-chain behaviour (the response-round timeout stays on the shared `MechInteractEvent.ROUND_TIMEOUT` we already override to 600s — see the config-surface note above — same as under v0.32.2). No code removal is needed to revert to today's routing.

packages/valory/skills/memeooorr_chained_abci/models.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@
7171

7272
MARGIN = 5
7373
MULTIPLIER = 10
74+
# Effective MechInteractEvent.ROUND_TIMEOUT = round_timeout_seconds * MULTIPLIER_MECH.
75+
# Must stay >= mech_interact_abci's off-chain poll budget (offchain_poll_timeout_seconds
76+
# in MECH_MARKETPLACE_CONFIG, ceiling 570s for the guard) whenever use_offchain=true,
77+
# otherwise MechRequestBehaviour raises at startup via _check_round_timeout_fits_poll_budget.
78+
# v0.32.4 no longer auto-scales the response timeout, so this pairing is manual — keep
79+
# round_timeout_seconds hardcoded rather than env-templated, or bump MULTIPLIER_MECH.
7480
MULTIPLIER_MECH = 20
7581

7682

0 commit comments

Comments
 (0)