Skip to content

feat(sdl): add reusable mixed-control policies and occurrence contracts - #1584

Merged
Brad-Edwards merged 22 commits into
devfrom
1363-reusable-mixed-control-authoring
Oct 15, 2026
Merged

Brad-Edwards merged 22 commits into
devfrom
1363-reusable-mixed-control-authoring

Conversation

@doublewhy

@doublewhy doublewhy commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds reusable mixed-control policies and explicit finite scripts with exact, versioned occurrence contracts. Integrates the identity refactor so validation, compilation, editor references and trusted policy projections preserve the same declared identities and authority anchors.

Requirement UIDs

  • ACT-617
  • API-409
  • DSL-142

Related Issues

Refs #1363

ADR Impact

  • ADR-110
  • ADR-112 (preserved delivery boundary)

Changes

  • Compile one child per permission and script step; retain legacy readers and explicit conversion with ambiguous cases refused.
  • Publish API-409 v2 occurrence contracts with exact policy, controller, state, target, order and evidence joins; distinguish missing historical context from invalid history.
  • Add independently pinned DSL-142 control bindings, validate every scope/evidence reference, require one admitted disclosure rule to supply the policy basis, and diagnose unaddressable delivery items.
  • Align all five embedded schemas with paired script windows, closed portable-key maps and delivery-control shape restrictions; preserve unsupported live-execution refusals.

Test Plan

  • Unit tests pass
  • Integration tests pass if applicable
  • Full completion suite required in CI before merge
  • No coverage regression

857 targeted tests pass locally, including the newly merged tool-import behavior. Scoped repository policy passes. Full verification, integration, fuzz, coverage and supported-interpreter checks run in CI.

Ground Control Checks

  • Repository policy checks required in CI before merge
  • Pre-push Codex review completed; all findings fixed or dispositioned

Traceability

  • IMPLEMENTS: ACT-617 ← implementations/python/packages/raes/participant_mixed_control_policy.py; implementations/python/packages/raes_processor/compiler/_mixed_control_policy.py, API-409 ← implementations/python/packages/raes_contracts/contracts/participant_control_occurrence_v2_validation.py; implementations/python/packages/raes_contracts/contracts/participant_control_history_verifiability.py, DSL-142 ← implementations/python/packages/raes/validator/_participant_inject_delivery_control.py; implementations/python/packages/raes_processor/compiler/participant_inject_deliveries.py
  • TESTS: ACT-617 / API-409 / DSL-142 ← implementations/python/tests/test_issue_1363_*.py (461 cases), Compatibility, identity editor, schema factoring and catalog tests: 311 passed; one CI-only case deselected., Merged-base integration: 85 tool and behavior-authoring regression cases pass.

Checklist

  • Code follows the project's coding standards
  • Changelog: owned by Release Please (generated from the Conventional Commit PR title; no per-PR fragment)
  • Architectural docs updated if stack, package structure, or key behaviors changed

Documentation

Updated: see diff.

@doublewhy
doublewhy force-pushed the 1363-reusable-mixed-control-authoring branch from 5bd9fd3 to 59aea03 Compare October 13, 2026 07:07
@doublewhy
doublewhy force-pushed the 1363-reusable-mixed-control-authoring branch from 59aea03 to 4d224ea Compare October 13, 2026 07:36
proposal_revision on a proposal record and decision_revision on an
approval or denial record were lax Literal[1], so model_validate took
the boolean true (and 1.0) as revision 1 while the published schema's
const 1 rejects true. They are now StrictInt bounded to 1 with the
unchanged published const 1 schema, matching every other v2 integer.
The parity suite gains true rows for all three fields and a denial
baseline; both validators now reject them.

Refs #1363
Specification-coverage capture capture-9b57bce7 and formal-validation
capture capture-8b772fef bind this branch's implementation digest
(89e8fcdf) with zero formal replay drift. They follow
docs/develop/research-captures.md; outcomes, classifications and claim
limits are unchanged.

Refs #1363
Six parametrized cases matched an empty string, so they passed for any SDL error and emitted PytestWarnings. Each now matches the specific refusal message.
…able-mixed-control-authoring

# Conflicts:
#	contracts/schema-publication/entries/instantiated-scenario-snapshot-v1.json
#	contracts/schema-publication/entries/instantiated-scenario-v1.json
#	contracts/schema-publication/entries/materialized-scenario-v1.json
#	contracts/schema-publication/entries/scenario-satisfiability-evidence-v1.json
#	contracts/schema-publication/entries/sdl-authoring-input-v1.json
#	contracts/schemas/sdl/materialized-scenario-v1.json
#	docs/requirements/DSL-142/requirement.md
#	implementations/python/packages/raes/validator/_participant_inject_deliveries.py
#	implementations/python/packages/raes/validator/_participant_relationships.py
@Brad-Edwards Brad-Edwards changed the title feat(sdl): add reusable mixed-control policies and api-409 v2 occurrences feat(sdl): add reusable mixed-control policies and occurrence contracts Oct 15, 2026
@Brad-Edwards
Brad-Edwards marked this pull request as ready for review October 15, 2026 06:55
@Brad-Edwards

Copy link
Copy Markdown
Collaborator

Ground Control delivery — this pull request delivers issue #1363; Phase E runs on merge.

@Brad-Edwards
Brad-Edwards merged commit 6ee62fc into dev Oct 15, 2026
38 checks passed
@Brad-Edwards
Brad-Edwards deleted the 1363-reusable-mixed-control-authoring branch October 15, 2026 16:16
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.

2 participants