feat: configurable Governance Framework abstraction with Baal (Moloch v3) read adapter #34
Merged
wasabi opened 1 week ago

Summary

Make Kokonut Intelligence governance-framework-aware and feature-native for the Kokonut DAO (Moloch v3 / Baal) on Gnosis Chain, behind a pluggable GovernanceFramework abstraction so future frameworks (Governor, Aragon, Colony) slot in cleanly.

This first pass is read-first only: adapters expose on-chain state (proposals, votes, member shares/loot, governance config, shamans) with no transaction methods, matching the repo's read-only convention.

Changes

  • services/governance/: base types, registry factory, BaalReadClient, adapter stubs for governor/aragon/colony.
  • contracts/abis/: Baal.json, BaalShares.json, BaalLoot.json.
  • services/ingestion/baal_indexer.py: decode Baal events into governance_event.
  • services/ingestion/config.py: new KOKONUT_BAAL_ADDRESSES; legacy KOKONUT_MOLOCH_ADDRESSES preserved so the v2 indexer (gnosis_indexer.py) stays alive for historical queries.
  • Migration 324_baal_governance.sql + seeds: governance_framework registry, baal_governance_config, baal_shaman; corrected protocol contract_type to moloch_v3_baal and added Baal/Shares/Loot/Zodiac wallet profiles.
  • services/governance/cli.py mounted as dao in the unified meta-CLI (framework list, baal config|proposals|proposal|member|shaman).
  • AGENTS.md Governance Frameworks section; tests/test_governance_framework.py (7 tests, passing).

Verification

  • python3 -m pytest tests/test_governance_framework.py -> 7 passed
  • python3 -m services.migration dry-run -> 324 recognized, 0 failed
  • ruff clean on new files
  • python3 -m services.cli dao --help and python3 -m services.governance.cli --help work

Notes

  • The Kokonut DAO is Moloch v3 (Baal); the repo's seed/indexer previously referenced Moloch v2. This PR aligns the canonical seed to Baal while explicitly keeping the v2 indexer functional for legacy data.
  • No write/onchain_submit paths are included; those require a human-approved Governor/Agent flow (per services/agents/safety.py).
Commits were merged into target branch
  • feat: configurable Governance Framework abstraction with Baal (Moloch v3) read adapter
    Add a pluggable GovernanceFramework abstraction so Kokonut Intelligence is
    governance-framework-aware, starting with the Kokonut DAO (Moloch v3 / Baal)
    on Gnosis Chain. Read-first only: adapters expose on-chain state (proposals,
    votes, member shares/loot, governance config, shamans) with no transaction
    methods, matching the repo's read-only convention.
    
    - services/governance: base types, registry factory, BaalReadClient, adapter
      stubs for governor/aragon/colony.
    - contracts/abis: Baal.json, BaalShares.json, BaalLoot.json.
    - services/ingestion/baal_indexer.py: decode Baal events into governance_event.
    - config: KOKONUT_BAAL_ADDRESSES (legacy KOKONUT_MOLOCH_ADDRESSES preserved for
      the v2 indexer, which remains alive for historical queries).
    - migration 324_baal_governance.sql + seeds: governance_framework registry,
      baal_governance_config, baal_shaman; corrected protocol contract_type to
      moloch_v3_baal and added Baal/Shares/Loot/Zodiac wallet profiles.
    - services/governance/cli.py mounted as 'dao' in the unified meta-CLI.
    - AGENTS.md Governance Frameworks section; tests/test_governance_framework.py.
    1 week ago
  • wasabi merged 1 week ago
1/1
Submitter wasabi
Target main
Source feat/daohaus-baal-read
Jobs
Merge Strategy
Create Merge Commit
Watchers (1)
Reference
pull request KI-34
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover