fix(models): wire RealitioWithdrawBonds SharedState into composed MRO (crash-loop fix) - #231
Merged
Merged
Conversation
Mirrors market-resolver#35. After the resume-after-timeout claim cache (omen_realitio_withdraw_bonds_abci v0.1.2, cascaded via #230) merged, market-creator main was left in a crash-prone state: the composed ``market_maker_abci.SharedState`` did not include the withdraw-bonds sub-skill in its MRO, so ``realitio_claim_build_cache`` was never initialised on the runtime ``self.context.state``. ``RealitioWithdrawBondsBehaviour._build_claim_txs`` reads it directly, which would raise: AttributeError: 'SharedState' object has no attribute 'realitio_claim_build_cache' -> AEAActException -> skill_exception_policy: stop_and_exit -> Propel restart loop (as observed on market_resolver_ci) The composed SharedState already multiply-inherits MechInteract and CtRedeem SharedStates so their ``__init__`` cross-round vars land on the runtime state; this adds ``RealitioWithdrawBondsSharedState`` alongside them. Verified: the composed SharedState now yields ``realitio_claim_build_cache == {}`` next to ``ignored_ct_positions``. Regression test added (attr initialised + sub-skill in MRO). 58 market_maker_abci tests pass; lint + structural green.
Adamantios
reviewed
Jun 30, 2026
Adamantios
approved these changes
Jun 30, 2026
OjusWiZard
approved these changes
Jun 30, 2026
OjusWiZard
left a comment
Member
There was a problem hiding this comment.
Approve — minimal, well-targeted crash-loop fix.
- MRO is sound:
RealitioWithdrawBondsSharedStateis appended last, so it can't override any previously-resolved method; its only effect is contributing__init__to the cooperativesuper()chain (same mechanism asignored_ct_positions). - Regression test asserts both MRO membership and
realitio_claim_build_cache == {}after real instantiation — the right pair of assertions for this bug class. - Import follows the file's existing force_single_line isort convention.
- Hash cascade is internally consistent (skill CID matches aea-config; agent CID matches service.yaml; service CID matches the rollout CID in the PR body).
- Docstring now documents the invariant.
LGTM.
DIvyaNautiyal07
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Same crash-loop fix as market-resolver#35, applied to market-creator
After the resume-after-timeout claim cache (
omen_realitio_withdraw_bonds_abciv0.1.2, cascaded via #230) merged, market-creatormainwas left in the same crash-prone state the resolver hit in production: the composedmarket_maker_abci.SharedStatedoes not include the withdraw-bonds sub-skill in its MRO, sorealitio_claim_build_cacheis never initialised on the runtimeself.context.state.RealitioWithdrawBondsBehaviour._build_claim_txsreads it directly:```
AttributeError: 'SharedState' object has no attribute 'realitio_claim_build_cache'
-> AEAActException -> skill_exception_policy: stop_and_exit -> Propel restart loop
```
The market-creator deployment was not yet bumped to the cache CID (the agent-deployments env bump was held), so this is a pre-deploy fix — no production impact, unlike the resolver.
Fix — standard repo pattern
The composed
SharedStatealready multiply-inheritsMechInteractSharedStateandCtRedeemTokensSharedStateso their__init__cross-round vars (ignored_ct_positions, mech state) land on the runtime state. This addsRealitioWithdrawBondsSharedStatealongside them:```python
class SharedState(
MechInteractSharedState,
BaseSharedState,
CtRedeemTokensSharedState,
RealitioWithdrawBondsSharedState, # <- added
):
```
The class docstring is updated to spell out the invariant (omitting a sub-skill whose behaviour reads
self.context.state.<attr>crash-loops).Verification
```
instantiate composed SharedState -> realitio_claim_build_cache == {} (next to ignored_ct_positions)
```
Test plan
TestSharedState(4) incl. new regression (attr initialised + sub-skill in MRO)market_maker_abcisuite 58 passedautonomy packages lockcascade;third_partypreservedRollout
Merge → service CID
bafybeibb5msj3gggv2clat37k4vfpalsjr6bveym3ve6ty64ean3tpgpzy. The held agent-deployments creator env bumps (QS + Pearl) must target this fixed CID, not #230's.