|
| 1 | +--- |
| 2 | +Title: Proposals, Templates, and Pub/Sub Discovery |
| 3 | +Authors: |
| 4 | + - Steven Johnson < steven[email protected]> |
| 5 | +Created: 2025-11-05 |
| 6 | +order: 2 |
| 7 | +--- |
| 8 | + |
| 9 | +## Abstract |
| 10 | + |
| 11 | +Shows how Proposal documents relate to their Templates, how submission state is determined, |
| 12 | +and how all artifacts are discovered and validated in a decentralized pub/sub network. |
| 13 | + |
| 14 | +## Documents and Roles |
| 15 | + |
| 16 | +* [Proposal](../docs/proposal.md): the authored content. |
| 17 | +* [Proposal Form Template](../docs/proposal_form_template.md): defines schema and form hints. |
| 18 | +* [Proposal Submission Action](../docs/proposal_submission_action.md): signals `final`, `draft`, or `hide`. |
| 19 | +* *Optional [Proposal Comment](../docs/proposal_comment.md)* and |
| 20 | + *[Proposal Comment Form Template](../docs/proposal_comment_form_template.md)* artifacts exist; |
| 21 | +* *Optional [Proposal Moderation Action](../docs/proposal_moderation_action.md)* artifacts exist; |
| 22 | + |
| 23 | +## Relationships |
| 24 | + |
| 25 | +* A Proposal references a Proposal Form Template via [`metadata.template`](../metadata.md#template) |
| 26 | + and a system parameters anchor via [`metadata.parameters`](../metadata.md#parameters). |
| 27 | + * The template’s own [`parameters`](../metadata.md#parameters) must transitively align to the |
| 28 | + same Brand/Campaign/Category chain. |
| 29 | +* A Proposal Submission Action references the Proposal via `metadata.ref` and repeats `metadata.parameters`, |
| 30 | + linked to `ref` for consistency. |
| 31 | + * Multiple collaborators may exist; all listed collaborators must submit equivalent `final` |
| 32 | + actions to be considered final by the deadline. |
| 33 | + |
| 34 | +The Deadline for a Proposal to be Final will be defined in the applicable parameters document(s), |
| 35 | +typically the Category Parameters document. |
| 36 | + |
| 37 | +## Versioning and Collaboration |
| 38 | + |
| 39 | +* Proposal [`id`](../metadata.md#id) and [`ver`](../metadata.md#ver) are UUIDv7. |
| 40 | +* The first Proposal version must be signed by the original author; |
| 41 | + later versions may be signed by the author or a collaborator from the immediately prior version. |
| 42 | + See: [Proposal validation](../docs/proposal.md#validation). |
| 43 | +* Collaborators are listed in `metadata.collaborators`; |
| 44 | + actions from collaborators confirm or rescind participation. |
| 45 | + See: [Proposal Submission Action](../docs/proposal_submission_action.md). |
| 46 | + |
| 47 | +## Pub/Sub Discovery Model |
| 48 | + |
| 49 | +All documents are published in the appropriate topic as defined by specs/generators/pages/signed_doc/voting_process/parameters_hierarchy_and_discovery.md.jinja |
| 50 | +and their parameters metadata. |
| 51 | + |
| 52 | +To discover the proposal template, a client looks in the appropriate topic for unique document IDs of the proposal template type. |
| 53 | +Then they choose the latest version of that template. |
| 54 | +This allows a client to determine all the possible proposal templates which are enabled for a given brand, campaign or category. |
| 55 | +Client applications then use the templates they discover to allow clients to submit proposal documents which match those templates. |
| 56 | +The timing and allowability and other rules are defined by the appropriate prameters document and its parent parameters documents. |
| 57 | +Once a proposal is submitted, its automatically draft. |
| 58 | +It can be made final by the deadline (as defined by parameters). |
| 59 | +If it is, it is a candidate proposal for a contest on the same parameter level. |
| 60 | +However, the proposal may be moderated and not be allowed to be a candidate proposal for the contest if a moderation action is submitted against it. |
| 61 | +Proposal comments may be attached to a proposal, and they may also be attached to another comment (acting as a reply). |
| 62 | +In this case they must link to the same proposal. You cant reply to a proposal comment on a different proposal. |
| 63 | +Comments can also be moderated via moderation actions. And in which case the client interface should hide them or show them as moderated and redacted. |
| 64 | +Comments and proposals can be revoked by their authors. |
| 65 | +When a proposal is revoked, all its comments should also be considered revoked, unless it is subsequently re-instated. |
| 66 | + |
| 67 | +At the campaign moderation deadline, the final set of candidate proposals for the contest is determined. |
| 68 | +These are then used in the contest voting process, described elsewhere. |
| 69 | + |
| 70 | +### Consumer Pipeline |
| 71 | + |
| 72 | +1. Template intake |
| 73 | + * Verify signature, type, id/ver, `metadata.parameters`, and payload schema validity. |
| 74 | + * Index by `(template-id, ver)` and by anchor. |
| 75 | +2. Proposal intake |
| 76 | + * Verify signature, `metadata.template`, `metadata.parameters` (linked to template), |
| 77 | + and payload against the template schema. |
| 78 | + * Track authorship and collaborators; index by `(proposal-id, ver)` and by anchor. |
| 79 | +3. Submission Action intake |
| 80 | + * Verify signature from author or collaborator; verify `metadata.ref` |
| 81 | + points to the intended proposal and `metadata.parameters` matches (linked_refs to `ref`). |
| 82 | + * For each signer, record latest action: `final`, `draft`, or `hide`. |
| 83 | + * A proposal is “final” iff all listed collaborators (and the author) have a latest |
| 84 | + `final` action by the configured deadline. |
| 85 | + |
| 86 | +### Status Computation |
| 87 | + |
| 88 | +* Final Set: proposals with all required `final` actions, within configured windows defined by parameters. |
| 89 | +* Draft Only: proposals with at least one `draft` and no conflicting `final` from that signer. |
| 90 | +* Hidden: honor `hide` semantics (author hides the proposal; collaborator hide = collaborator does not wish to be shown). |
| 91 | + |
| 92 | +## Validation Summary |
| 93 | + |
| 94 | +* Verify `type`, `id`, `ver`, `kid`, `content type`, and (if present) `content-encoding`. |
| 95 | +* Verify `metadata.template` exists and aligns via `metadata.parameters` up the same chain. |
| 96 | +* Validate the proposal payload against the referenced template JSON Schema. |
| 97 | +* For submission actions, enforce signer rules and collaborator unanimity for `final`. |
| 98 | +* Apply `revocations` and prefer the highest valid `ver` per `id`. |
| 99 | + |
| 100 | +## Content Addressing and Retrieval |
| 101 | + |
| 102 | +* All documents carry a `document_ref` that includes a CBOR Tag 42 CID locator. |
| 103 | + See: [Document Reference](../metadata.md#document-reference). |
| 104 | +* Pub/sub provides dissemination; the CID enables retrieval from content-addressed |
| 105 | + storage and ensures immutability. |
| 106 | + |
| 107 | +## Operational Notes |
| 108 | + |
| 109 | +* Timelines and windows come from the applicable parameters (brand/campaign/category/contest); |
| 110 | + consumers should enforce submission cutoffs as configured. |
| 111 | +* Indexes: maintain by proposal, by anchor, and by template to accelerate UI queries. |
| 112 | + |
0 commit comments