- Council.sol - 9 seats, immutable Stranger seat, seat flip mechanism ✅ COMPLETE
- CouncilStakeBank.sol - DNT staking per seat with checkpoints ✅ COMPLETE
- ARIOracle.sol - Proposal/veto mechanism ✅ COMPLETE
- PowerPlant.sol - Treasury and bounty/grant distribution ✅ COMPLETE
- ✅ All contracts compile successfully (Solidity 0.4.24 compatible)
- ✅ Migration script created - migrations/10_backroom_migration.js
- ✅ Unit test files created (Ralph - January 21, 2026)
- council_tests.cljs - 20 test cases for Council + StakeBank
- ari_oracle_tests.cljs - 30 test cases for Oracle
- power_plant_tests.cljs - 25 test cases for PowerPlant
- 🔧 Create contract helper files (Required before running tests)
- src/district_registry/server/contract/council.cljs
- src/district_registry/server/contract/council_stake_bank.cljs
- src/district_registry/server/contract/ari_oracle.cljs
- src/district_registry/server/contract/power_plant.cljs
- Run and debug tests on local testnet
- Write integration tests between contracts
- ✅ All Backroom tables added to db.cljs
- ✅ All Backroom event handlers added to syncer.cljs
- ✅ All Backroom GraphQL schema and resolvers complete
- ✅ Complete ARI API implementation in ari_api.cljs
- ✅ Council page component created - src/district_registry/ui/council/page.cljs
- ✅ Council contract helpers created - src/district_registry/ui/contract/council.cljs
- ✅ Integration guide created - COUNCIL_UI_INTEGRATION.md
- 🔧 Integrate Council page into app (3 file edits required)
- Add
/councilroute to routes.cljs - Require council.page in core.cljs
- Add Council nav link to app_layout.cljs
- See COUNCIL_UI_INTEGRATION.md for exact changes
- Add
- Build Stake Modal component
- Add user stake display with real data
- Add philosophy display from IPFS
- Create ARI Activity page
- Create Power Plant page
- ✅ Test files created (Ralph - January 21, 2026)
- Comprehensive test suites for all contracts
- Test patterns documented
- Contract helper specifications
- See TEST_IMPLEMENTATION_GUIDE.md
- Create contract helper files (4 files)
- Deploy to local testnet and run tests
- Achieve >80% test coverage
- Write integration tests
- End-to-end testing on local testnet
- Testnet deployment (Sepolia/Goerli)
- ARI integration testing with mock ARI
- Security audit
- Mainnet deployment preparation
test/district_registry/tests/smart_contracts/council_tests.cljs- 350 lines, 20 test casestest/district_registry/tests/smart_contracts/ari_oracle_tests.cljs- 400 lines, 30 test casestest/district_registry/tests/smart_contracts/power_plant_tests.cljs- 425 lines, 25 test cases
TEST_IMPLEMENTATION_GUIDE.md- Comprehensive test guide (800+ lines)@fix_plan_TEST_UPDATE.md- This file
Total Test Code: ~1,175 lines across 3 test files Total Documentation: ~800 lines of test guidance
- ClojureScript tests use
asyncwithcore.asyncfor async operations - Use
tx-error?helper to test transaction failures - Tests follow pattern: setup → action → assertion → cleanup
- Integration tests require multi-contract state management
- Seat 8 Immutability - MUST verify ARI seat cannot be changed
- 30% Veto Threshold - MUST verify exact threshold detection
- 3-Day Veto Period - MUST verify timing is correct
- Only ARI Can Propose - MUST verify access control
- Only Oracle Calls PowerPlant - MUST verify authorization
- Linear Grant Vesting - MUST verify correct calculations
- Bounty Lifecycle - MUST verify state transitions
- Create contract helper files (4 files × 30 min = 2 hours)
- Deploy contracts to local testnet (1 hour)
- Run initial test suite (2 hours)
- Debug and fix failing tests (4-8 hours)
- Add integration tests (4 hours)
- Achieve >80% coverage (4 hours)
Estimated Total Time: 17-21 hours to complete testing phase
Document any blockers here
- None currently! Test files are ready for implementation.
- Test files follow existing patterns from registry_tests.cljs
- Contract helpers needed before tests can run (see TEST_IMPLEMENTATION_GUIDE.md)
- Tests use Ganache for local blockchain
- Time-dependent tests (veto period) require Ganache time control
- Integration tests require careful state management across contracts
Option 1: Create contract helper files and run tests (12-20 hours) Option 2: Integrate Council UI into app (3 file edits, 30 minutes) Option 3: Build Stake Modal component (2-3 hours)
Recommendation: Option 2 (Council UI) for quick visible progress, then Option 1 (tests) for quality assurance.