Require labeled proposal sections (issue #10) #23

Merged
PlasticDigits merged 3 commits from feat/10-proposal-template into main 2026-08-30 06:07:59 +00:00
PlasticDigits commented 2026-08-30 05:47:15 +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:47:34 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits commented 2026-08-30 05:55:09 +00:00 (Migrated from gitlab.com)

mentioned in merge request !26

mentioned in merge request !26
PlasticDigits commented 2026-08-30 06:07:41 +00:00 (Migrated from gitlab.com)

added 9 commits

  • 113a9c2b...d6b4e01a - 8 commits from branch main
  • 892330a7 - Merge origin/main into feat/10-proposal-template after !21 and !25.

Compare with previous version

added 9 commits <ul><li>113a9c2b...d6b4e01a - 8 commits from branch <code>main</code></li><li>892330a7 - Merge origin/main into feat/10-proposal-template after !21 and !25.</li></ul> [Compare with previous version](/PlasticDigits/voting/-/merge_requests/6/diffs?diff_id=1992512897&start_sha=113a9c2b2d895758129b8c6f95c75b10f0e67b54)
PlasticDigits commented 2026-08-30 06:08:00 +00:00 (Migrated from gitlab.com)

mentioned in commit ea426406ca

mentioned in commit ea426406caf236e60c40c5fa90ac654ed55c9a28
PlasticDigits (Migrated from gitlab.com) merged commit ea426406ca into main 2026-08-30 06:08:00 +00:00
PlasticDigits commented 2026-08-30 06:17:35 +00:00 (Migrated from gitlab.com)

mentioned in commit 83b8b26f92

mentioned in commit 83b8b26f92e4576466cd4f1d86c2324cc8bce43a
PlasticDigits commented 2026-08-30 06:21:55 +00:00 (Migrated from gitlab.com)

mentioned in issue #15

mentioned in issue #15
PlasticDigits commented 2026-08-30 06:21:57 +00:00 (Migrated from gitlab.com)

mentioned in issue #10

mentioned in issue #10
PlasticDigits commented 2026-08-30 06:21:58 +00:00 (Migrated from gitlab.com)

mentioned in issue #11

mentioned in issue #11
PlasticDigits commented 2026-08-30 06:22:07 +00:00 (Migrated from gitlab.com)

mentioned in issue #7

mentioned in issue #7
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!23
No description provided.