[Feature] Add policy simulation before destructive/limiting changes #5

Closed
opened 2026-07-10 23:38:14 +02:00 by zemion · 2 comments
Owner

Moved from add-ideas/govoplan-core#91: add-ideas/govoplan-core#91
Reason: Policy simulation and limiting-change preflight belongs in the policy module.

Imported from a backlog-like text file.

  • Source: /mnt/DATA/Nextcloud/ADD ideas UG/Products/govoplan/split-concept-action-plan.md
  • Line: 211
  • Source kind: product
  • Section: GovOPlaN Split Concept and Action Plan > Staged Refactor Plan > Phase 4: Extract Policy

Imported item:

Add policy simulation before destructive/limiting changes.
> Moved from `add-ideas/govoplan-core#91`: https://git.add-ideas.de/add-ideas/govoplan-core/issues/91 > Reason: Policy simulation and limiting-change preflight belongs in the policy module. <!-- codex-generic-backlog-fingerprint:2537ddb23fbeb14b3de52623 --> Imported from a backlog-like text file. - Source: `/mnt/DATA/Nextcloud/ADD ideas UG/Products/govoplan/split-concept-action-plan.md` - Line: `211` - Source kind: `product` - Section: `GovOPlaN Split Concept and Action Plan > Staged Refactor Plan > Phase 4: Extract Policy` Imported item: ```text Add policy simulation before destructive/limiting changes. ```
Author
Owner

Merged broader impact-analysis context from add-ideas/govoplan-core#15: add-ideas/govoplan-core#15.

The older item also mentions delete/disable/unshare/cascading changes. Treat that as policy-owned simulation/impact-analysis scope first; module-specific destructive-operation explainers can link back here.

Merged broader impact-analysis context from `add-ideas/govoplan-core#15`: https://git.add-ideas.de/add-ideas/govoplan-core/issues/15. The older item also mentions delete/disable/unshare/cascading changes. Treat that as policy-owned simulation/impact-analysis scope first; module-specific destructive-operation explainers can link back here.
Author
Owner

Codex State: done

Summary

  • Added a retention policy simulation/preflight endpoint for proposed write payloads.
  • Simulation returns allowed, changed fields, issues, before/requested policy, and a shared PolicyDecision payload without writing state.

Changed Files

  • src/govoplan_policy/backend/api/v1/routes.py
  • src/govoplan_policy/backend/api/v1/schemas.py
  • src/govoplan_policy/backend/retention.py
  • docs/POLICY_DECISION_PROVENANCE.md

Verification

  • PYTHONPATH=src:/mnt/DATA/git/govoplan-core/src python -m unittest discover -s tests
## Codex State: done ### Summary - Added a retention policy simulation/preflight endpoint for proposed write payloads. - Simulation returns allowed, changed fields, issues, before/requested policy, and a shared PolicyDecision payload without writing state. ### Changed Files - `src/govoplan_policy/backend/api/v1/routes.py` - `src/govoplan_policy/backend/api/v1/schemas.py` - `src/govoplan_policy/backend/retention.py` - `docs/POLICY_DECISION_PROVENANCE.md` ### Verification - `PYTHONPATH=src:/mnt/DATA/git/govoplan-core/src python -m unittest discover -s tests`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: add-ideas/govoplan-policy#5
No description provided.