Skip to content

feat: “commit‑message” guard‑rail for DAO communications #70

@pbtc21

Description

@pbtc21

Labels: backend, frontend, stacks, priority:P0, ux, governance

Why

Members are approving on‑chain messages that promise deliverables the DAO has not (and may never) authorize.
We need a lightweight but enforceable distinction between:

  • Info messages – announcements, hype, no commitment.
  • Commit messages – statements that something will happen and must reference an executable proposal.

Scope & Deliverables

Layer Work
Stacks — new messaging extension 1. Split trait (fork of current aibtc-action-send-message.clar):
clarity\n(define-trait info-message ((send (string-ascii 280))))\n(define-trait commit-message ((send-commit (string-ascii 280) (uint linked-id))))\n
2. Implement commit-message logic:
  • Requires linked-id to reference an existing proposal.
  • Checks that proposal’s status == passed when the commit executes.
  • If linked proposal fails, bond is burned to treasury.
3. Unit test in Clarinet.
Backend (FastAPI) 1. Update template sync so message templates include type radio `info
Frontend (Next.js) 1. Participate form:
  • Radio “Info / Commit”.
  • Commit requires select‑box to choose an existing proposal (autocomplete search endpoint).
2. In Proposal detail: badge colour →
  • Green “Delivered” when linked proposal executed.
  • Amber “Pending”.
  • Red “Defaulted (bond burned)”.
Reputation service On default event reduce proposer score by 0.3 (floor 0).
Docs Update messaging section to explain Info vs Commit.

Endpoints / Contract Names

Contract Trait New function File location
faces-action-message-info info-message send contracts/dao/extensions/actions/
faces-action-message-commit commit-message send-commit same dir

Backend autocomplete: GET /proposals/list?status=pending|passed.


Done‑When ✅

  1. Contract tests: Clarinet passes > 90 % coverage; commit call fails if linked proposal not passed.
  2. E2E Cypress: create commit message → message shows Pending, linked proposal passes → badge turns Green automatically.
  3. Evaluator: attempts to submit commit without link receive 400 UI error; votes auto‑NO when bypassed.
  4. Performance: additional evaluator check adds < 5 ms p95.
  5. Reputation: proposer score drops after default; visible in UI within 10 min.
  6. Feature flag FEATURE_COMMIT_MESSAGE allows rollback.

Target timeline: 1 engineering day for contract & backend, 0.5 day for frontend, 0.5 day QA → ship next sprint.

See examples of messages that randomly promise things..

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions