Skip to content

Conversation

@nathanbogale
Copy link
Contributor

@nathanbogale nathanbogale commented Dec 7, 2025

This PR introduces a new Conditions System for decentralized, auditable tracking of user acceptance of terms and conditions across the Catalyst platform. The implementation adds:

New Document Type: Conditions

  • Document Type: Conditions (UUID: b664afc2-6472-4028-b90f-875bf6eefab8)
  • Purpose: Simple document type published by authoritative parties (admins) to define terms and conditions that users must accept
  • Content: Supports Markdown or HTML payload for rich formatting
  • Status: Marked as draft: true per requirements - development should NOT begin until formally released

New Metadata Field: conditions

A new metadata field that serves two distinct purposes:

  1. On Parameter Documents (Brand/Campaign/Category/Contest Parameters):

    • Lists required condition documents for that level
    • Optional field - if not present, no conditions are required
  2. On User-Submitted Documents (Proposals, Comments, etc.):

    • References all condition documents the user has accepted
    • Must include ALL conditions from the parameter hierarchy (Brand → Campaign → Category → Contest)
    • The act of listing these references and signing serves as the user's digital signature and acceptance

Validation Logic

  • Transitive Collection: System collects all required conditions from the parameter hierarchy
  • Perfect Match Validation: User document's conditions array must exactly match the union of all required conditions
  • Rejection Criteria: Documents are rejected if missing required conditions, including extra conditions, or referencing revoked/invalid conditions

Further Documentation: https://docs.google.com/document/d/1ZxCbAhtlADP9oDmQUiJ5wuM2dcP3NjOcRV-32yEQMAo/edit?usp=sharing

Related Issue: 342

Please confirm the following checks

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (N/A - specification only)
  • New and existing unit tests pass locally with my changes (N/A - specification only)
  • Any dependent changes have been merged and published in downstream module

…ment type:

- Added a new `conditions` metadata field to parameter documents and user-submitted documents, specifying required terms and conditions.
- Created a new Conditions document type to define terms users must accept before submitting documents, including validation rules and business logic for acceptance.
- Updated the `signed_doc.json` specification to include the new Conditions document type and its associated metadata.
- Enhanced documentation to clarify the role of conditions in the document submission process and validation requirements.
- Updated the documentation to include the new Conditions document type, detailing its purpose and validation requirements.
- Enhanced the types.md file to list the Conditions document type, ensuring clarity in the available document types.
@nathanbogale nathanbogale requested a review from stevenj December 7, 2025 11:54
@nathanbogale nathanbogale self-assigned this Dec 7, 2025
@nathanbogale nathanbogale added documentation Pull requests that update a documentation do not merge yet PR is not ready to be merged yet draft Draft labels Dec 7, 2025
"description": "Media Type/s allowed in the Payload",
"format": "Media Type",
"required": "yes",
"value": "text/markdown"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have markdown and html content types already defined. Should be one of those.

- Add conditions.cue definition file
- Enhanced conditions metadata field documentation
- Add Contest Parameters to System Parameters list
- Support both Markdown and HTML content types with charset
- Update validation process to clarify upward traversal
- Add schema-level vs validation-level requirement distinction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge yet PR is not ready to be merged yet documentation Pull requests that update a documentation draft Draft

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants