Skip to content

Conversation

@JoseSzycho
Copy link
Contributor

This pull request introduces full-featured API resource definitions and validating webhooks for both the Agreement and Documentation CRDs, significantly expanding Milo's extensibility and enterprise-readiness in managing legally critical resources.

Overview

Agreement

  • Introduces DocumentAcceptance and related resource APIs, enabling tracking of acceptance of critical agreements (ToS, NDAs, etc.) by users or machine identities.
  • Implements strong resource references: links DocumentAcceptance objects to accepted DocumentRevision, subject (e.g. Organization, User), and accepter records, supporting provenance, auditability, and trust.
  • Adds DocumentAcceptance webhook with in-depth validation:
    • Confirms referenced DocumentRevision exists and matches provided version.
    • Validates referenced subject and accepter are allowed by targeted DocumentRevision schema.
    • Ensures correct registration of acceptance context and signatures (web, email, CLI scenarios).

Documentation

  • Adds Document and DocumentRevision CRDs:
    • Document resources define "what" the agreement or published doc is (title, category, jurisdiction, type, etc.).
    • DocumentRevision resources model the full lifecycle of published document versions, including effective dates, versioning constraints, and content.
  • Implements Document and DocumentRevision validating webhooks:
    • Prevents deletion of Document if revisions exist.
    • Validates DocumentRevision creation constraints (version must increase, effective date in the future, targets match allowed subject/accepter kinds).
    • Supports immutable spec enforcement for DocumentRevision.

This commit introduces a new Document resource along with its corresponding roles: documentation-document-admin, documentation-document-editor, and documentation-document-reader. The Document resource includes specifications for title, description, and document type, while the roles define permissions for creating, updating, and managing documents. Additionally, validation webhooks are implemented to enforce rules on document deletion based on existing revisions.
@JoseSzycho JoseSzycho requested a review from scotwells October 15, 2025 13:25
@JoseSzycho JoseSzycho linked an issue Oct 15, 2025 that may be closed by this pull request
@joggrbot
Copy link
Contributor

joggrbot bot commented Oct 15, 2025

📝 Documentation Analysis

All docs are up to date! 🎉


✅ Latest commit analyzed: aa1e7d7 | Powered by Joggr

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.

Agreements System — API Features

2 participants