Skip to content

Add CIP-179 v5 linked survey linking and voting - #28

Open
Cerkoryn wants to merge 3 commits into
IntersectMBO:developfrom
Cerkoryn:feat/cip-179-surveys
Open

Add CIP-179 v5 linked survey linking and voting#28
Cerkoryn wants to merge 3 commits into
IntersectMBO:developfrom
Cerkoryn:feat/cip-179-surveys

Conversation

@Cerkoryn

Copy link
Copy Markdown

Summary

Supersedes #27 with a narrower implementation based on the stabilized CIP-179 v5 specification and the published cip-179 package from @mpizenberg's Tessara.

This PR covers survey discovery, rendering, and response submission through the voting pillar. Tally calculation and results display from the earlier proposal are intentionally out of scope.

List of changes

  • Return governance-action metadata JSON with proposal data so linked surveys can be discovered
  • Add a backend endpoint that returns exact metadata-label-17 CBOR by transaction hash and survey index
  • Render all built-in CIP-179 question types in the governance-action voting form
  • Support public responses and tlock-sealed responses submitted with the governance vote
  • Add optional pillar host contracts for enabling CIP-179, supplying a ledger metadatum codec, and registering custom-question renderers
  • Export the custom-renderer types and stable method-anchor key helper
  • Treat external presentation content as optional enrichment with hash verification and timeout handling
  • Validate revision, definition envelope, expiry, eligible role, response constraints, and rendering limits
  • Reject malformed, oversized, unavailable, or unsupported surveys without affecting the governance vote flow when the voter does not participate

Verification

  • CIP-179 frontend files pass focused lint and introduce no new TypeScript errors
  • The full pillar compiler still reports the repository’s existing unrelated baseline errors
  • Backend lint and build pass
  • All 4 survey backend tests pass
  • The equivalent main GovTool UI was inspected at desktop and mobile sizes with no page errors, MUI warnings, or overflow

Checklist

  • My changes generate no new warnings
  • My code follows the project style guidelines
  • I have commented code where additional context is useful
  • I have made corresponding changelog changes
  • I have added tests that prove the feature works

I was unfortunately unable to build all of the necessary dependencies to validate all of the changes. But I was able to build the storyboard and visually inspect some example surveys that were attached to governance actions. If this PR passes validation and we can get it merged into https://govtool-preview.cardanoapi.io/ at least, then I would be happy to do some conformance testing of my own with real surveys that are live on Preview and compare them against other tools' CIP-179 implementations.

This PR was constructed with heavy assistance from GPT-5.6 Sol High and I did my best to validate what I could locally. My apologies for not being able to test the entire end-to-end flow however 🙏

@Cerkoryn

Copy link
Copy Markdown
Author

Tagging @spannercode @mesudip and @bosko-m for review if possible 🙏

@Cerkoryn Cerkoryn mentioned this pull request Jul 12, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant