target-revenue/workplans
tegwick 885da0a1cb Implement Control Plane backend: rights enforcement + audit log (WP-0009-T03)
migrations/0006_control_plane.sql: control_plane_audit_log (append-only,
no UPDATE/DELETE for trf_app) and control_plane_proposed_entries (the
Contributor tier's "propose, don't append" workflow from concept §2) -
review decisions go through a review_proposed_entry() SECURITY DEFINER
function, same governance-action pattern as
set_extension_status/revoke_credential, not a direct UPDATE.

src/target_revenue/control_plane.py is the enforcement layer concept
§2 called for: register_phase/append_development_credit require
Operator+; propose_ledger_entry requires Contributor+ and stores a
pending proposal without touching the real Ledger; approve_proposed_entry
(Operator+) appends it under the *reviewer's own* credential/attribution
(not the original proposer's - the reviewer is who's authorizing it into
the real Ledger, while the proposer stays on record in the proposal row
and audit log); reject_proposed_entry (Operator+) discards it. issue_/
revoke_user_credential (Admin+) wrap registry.py's T02 functions with
the same rights check and audit logging. Every action funnels through
record_audit_event, independent of the Trust Service's own signed
records.

tests/test_control_plane.py (12 tests): rights enforcement at each
tier boundary, the full propose -> approve -> appended-under-reviewer
flow, propose -> reject -> nothing appended, double-review rejection,
audit log content/attribution, DB-level UPDATE rejection on both new
tables. Full suite: 84 offline (unchanged), 53 with Docker (up from
41); no stray containers left running.
2026-07-30 15:08:59 +02:00
..
TREV-WP-0001-license-prior-art-research.md Accept TRSL V1C1 (WP-0001-T06): objective Commercial Use definition 2026-07-29 19:30:41 +02:00
TREV-WP-0002-trust-service-foundation.md Accept ADR-0001 and close TREV-WP-0002 2026-07-29 02:07:22 +02:00
TREV-WP-0003-normative-core-extraction.md Accept WP-0003-T06: normative extract review complete 2026-07-29 20:22:01 +02:00
TREV-WP-0004-global-jurisdiction-research.md Close WP-0004/WP-0005 with alpha/beta legal-review deferral 2026-07-29 20:46:49 +02:00
TREV-WP-0005-enforcement-network-research.md Close WP-0004/WP-0005 with alpha/beta legal-review deferral 2026-07-29 20:46:49 +02:00
TREV-WP-0006-trust-service-implementation.md Implement hosted Breach/Compliance Record publication (WP-0006-T09) 2026-07-29 22:23:41 +02:00
TREV-WP-0007-degeneration-policy-and-canonical-profiles.md Close WP-0007: confirm linear-longstop-v0 as adopted v1 norm (T02) 2026-07-29 22:37:08 +02:00
TREV-WP-0008-governance-and-pilot-rollout.md Adopt TRSL V1C1 as org-wide preliminary license (WP-0008-T05 sub-decision) 2026-07-30 01:23:52 +02:00
TREV-WP-0009-target-revenue-control-plane.md Implement Control Plane backend: rights enforcement + audit log (WP-0009-T03) 2026-07-30 15:08:59 +02:00
TREV-WP-0010-development-effort-calculator.md Apply Development Effort Calculator to real pilot candidates (WP-0010-T03) 2026-07-30 13:29:06 +02:00