Skip to main content

Module technical_spec_use_cases

Module technical_spec_use_cases 

Source
Expand description

Use cases for TechnicalSpec + signatures (Story 3.8 — FR33).

Operations:

  1. TechnicalSpecUseCases::create_spec — syndic creates a new spec in Draft. Caller (handler) MUST already have enforced the syndic / superadmin role check.
  2. TechnicalSpecUseCases::bump_version — create a new version from a previous spec. Always returns a fresh Draft; the version must be strictly greater than the previous one. The use case marks the previous spec as Superseded once the bump succeeds.
  3. TechnicalSpecUseCases::submit_for_signatures — Draft -> Pending.
  4. TechnicalSpecUseCases::sign_spec — record a signature, returning 409 on duplicate, 403 when the signatory role is not in the required_signatures list. When the new signature completes the required set, the spec auto-promotes to Approved.

Mandate verification for AMO / Lawyer / Architect roles is handled at the entity level (TechnicalSpecSignature::new returns SignatoryNotAuthorized when mandate_id is missing for a role that requires it). Real cryptographic e-signatures and Mandate-active checks against the crate::application::use_cases::MandateUseCases are follow-ups tracked in the Story 3.8 acceptance notes.

Structs§

TechnicalSpecUseCases