Require labeled proposal sections (issue #10) #22

Closed
PlasticDigits wants to merge 0 commits from 10-feat-voting-structured-proposal-template-and-minimum-required-sections into main
PlasticDigits commented 2026-08-30 05:46:24 +00:00 (Migrated from gitlab.com)

Summary

  • Server-enforces a fixed proposal template (problem, optional context, solution, pros_cons, summary, success_criteria) so voters can scan TL;DR, trade-offs, and goalposts before signing.
  • body_hash is SHA-256 of canonical JSON (sorted keys, ammonia-cleaned HTML per section). New creates reject freeform body_html. Legacy rows still render via body_html.
  • Compose, list, and detail use the same schema. Legal gate, 1000 CL8Y, blacklist, ammonia allowlist, identity v1, and snapshot-at-create are unchanged.

Related to #10. Do not close #10 until staging Terra and BSC compose is verified. Draft/review lifecycle remains #13.

Test plan

  • cargo test --workspace --lib (section validation + golden hash 85b0e398…)
  • LEDGER_TEST_DATABASE_URL=… cargo test --workspace --tests (Terra/BSC create, empty sections, hash mismatch, XSS, legacy GET)
  • cd frontend && npm test (gates, golden JSON, list text TL;DR, legacy fallback)
  • cd frontend && npm run test:e2e -- --workers=5 (template compose → detail headings → list TL;DR)
  • Staging: Terra and BSC Legal accept → register → templated propose → list TL;DR → detail sections → vote
  • Confirm GET /v1/proposals includes summary on live operator API after migrate
## Summary - Server-enforces a fixed proposal template (`problem`, optional `context`, `solution`, `pros_cons`, `summary`, `success_criteria`) so voters can scan TL;DR, trade-offs, and goalposts before signing. - `body_hash` is SHA-256 of canonical JSON (sorted keys, ammonia-cleaned HTML per section). New creates reject freeform `body_html`. Legacy rows still render via `body_html`. - Compose, list, and detail use the same schema. Legal gate, 1000 CL8Y, blacklist, ammonia allowlist, identity v1, and snapshot-at-create are unchanged. Related to #10. Do not close #10 until staging Terra **and** BSC compose is verified. Draft/review lifecycle remains #13. ## Test plan - [x] `cargo test --workspace --lib` (section validation + golden hash `85b0e398…`) - [x] `LEDGER_TEST_DATABASE_URL=… cargo test --workspace --tests` (Terra/BSC create, empty sections, hash mismatch, XSS, legacy GET) - [x] `cd frontend && npm test` (gates, golden JSON, list text TL;DR, legacy fallback) - [x] `cd frontend && npm run test:e2e -- --workers=5` (template compose → detail headings → list TL;DR) - [ ] Staging: Terra **and** BSC Legal accept → register → templated propose → list TL;DR → detail sections → vote - [ ] Confirm `GET /v1/proposals` includes `summary` on live operator API after migrate
PlasticDigits commented 2026-08-30 05:46:45 +00:00 (Migrated from gitlab.com)

marked this merge request as ready

marked this merge request as **ready**
PlasticDigits commented 2026-08-30 05:46:45 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits (Migrated from gitlab.com) closed this pull request 2026-08-30 05:47:13 +00:00
PlasticDigits commented 2026-08-30 05:47:14 +00:00 (Migrated from gitlab.com)

Closed: this MR targeted the empty issue auto-branch at main. Replacement comes from feat/10-proposal-template.

Closed: this MR targeted the empty issue auto-branch at main. Replacement comes from feat/10-proposal-template.

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
code/voting!22
No description provided.