diff --git a/.agent-loop/CURRENT_STATE.md b/.agent-loop/CURRENT_STATE.md index 4b3a7554c..6cde2e612 100644 --- a/.agent-loop/CURRENT_STATE.md +++ b/.agent-loop/CURRENT_STATE.md @@ -102,7 +102,10 @@ clean v0.1 legacy economic-path removal in that order. Every child remains non-executable until PLAN3 merges and its current-main contract is expanded. - WS-ARCH-001-PLAN3 is proposed planning only. -- WS-ARCH-001-CP01 is proposed and non-executable. +- WS-ARCH-001-CP01 is a planned split and non-executable. +- WS-ARCH-001-CP01A is proposed for unavailable adapter-binding registration. +- WS-ARCH-001-CP01B is proposed after CP01A for unavailable ContributionPolicy + registration. - WS-ARCH-001-CP02 is proposed and non-executable. - WS-ARCH-001-CP03 is proposed and non-executable. - WS-ARCH-001-CP04 is proposed and non-executable. diff --git a/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/CHUNK_MAP.md b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/CHUNK_MAP.md index ae022abe0..17e2f7c2a 100644 --- a/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/CHUNK_MAP.md +++ b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/CHUNK_MAP.md @@ -16,8 +16,10 @@ | `WS-ARCH-001-02I` | Admission-only public API/dispatch cutover and complete legacy removal | L1 | Deferred after 02H plus split 03/04/05 remediation, revision, checker-output and REV admission prerequisites | | `WS-ARCH-001-PLAN2` | Current-main reconciliation around canonical Submission-to-`allow_review` | L1 | Planned; planning contract lands on merge | | `WS-ARCH-001-PLAN3` | ContributionPolicy registration, behavior, activation, guide/task lineage and clean legacy-removal sequencing | L1 | Proposed planning correction; no runtime | -| `WS-ARCH-001-CP01` | AUTH adapter-binding and ContributionPolicy unavailable registration | L1 | Proposed skeleton after PLAN3 | -| `WS-ARCH-001-CP02` | CON hidden adapter-binding behavior | L1 | Proposed skeleton after CP01 | +| `WS-ARCH-001-CP01` | Combined AUTH registration planning parent | L1 | Planned split into CP01A/CP01B; non-executable | +| `WS-ARCH-001-CP01A` | AUTH adapter-binding unavailable registration | L1 | Proposed executable contract after PLAN3 | +| `WS-ARCH-001-CP01B` | AUTH ContributionPolicy unavailable registration | L1 | Proposed executable contract after CP01A | +| `WS-ARCH-001-CP02` | CON hidden adapter-binding behavior | L1 | Proposed skeleton after CP01B | | `WS-ARCH-001-CP03` | AUTH exact adapter-binding activation | L1 | Proposed skeleton after CP02 evidence | | `WS-ARCH-001-CP04` | CON hidden ContributionPolicy behavior | L1 | Proposed skeleton after CP03 | | `WS-ARCH-001-CP05` | AUTH exact ContributionPolicy activation | L1 | Proposed skeleton after CP04 evidence | diff --git a/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/PLAN.md b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/PLAN.md index 6097cb14c..4623e78e2 100644 --- a/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/PLAN.md +++ b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/PLAN.md @@ -293,7 +293,8 @@ deployed-history conversion or compatibility path is assumed. The corrected linear sequence is: ```text -CP01 AUTH unavailable registration +CP01A AUTH adapter-binding unavailable registration +-> CP01B AUTH ContributionPolicy unavailable registration -> CP02 CON hidden adapter-binding behavior -> CP03 AUTH adapter-binding activation -> CP04 CON hidden ContributionPolicy behavior diff --git a/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/RISKS.md b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/RISKS.md index 650dd59e7..a2d157958 100644 --- a/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/RISKS.md +++ b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/RISKS.md @@ -24,7 +24,7 @@ | Live assignment or review claim loses the one task-governing ContributionPolicyVersion | Critical | Enforce immutable guide -> task -> assignment -> Submission/allow_review -> ReviewLease lineage; missing, cross-project, stale or mismatched facts deny before claim effects, and neither claim performs CON policy lookup | | Review decision commits without mandatory contribution consequences | Critical | Stable REV schema precedes CON-03C/07; every decision atomically creates reviewer ContributionRecord/awards and accept additionally creates FinalAcceptance plus submitter record/awards | | Composition root absorbs domain decisions | High | Composition opens the unit of work and wires transaction-bound ports only; TASK command owns Submission sequencing and each target port enforces its own invariants | -| Policy behavior starts before exact AUTH registration | Critical | CP01 registers typed unavailable authority before CP02/CP04 behavior; CP03/CP05 activate only after hidden proof | -| Binding management inherits fulfillment callback authority | Critical | CP01-CP03 exclude delivery/callback identities and permissions entirely | +| Policy behavior starts before exact AUTH registration | Critical | CP01A and CP01B register their separate typed unavailable authority before CP02/CP04 behavior; CP03/CP05 activate only after hidden proof | +| Binding management inherits retirement, fulfillment, callback, or delivery authority | Critical | CP01A through CP03 exclude retirement actions plus fulfillment, callback, and delivery action IDs, permissions, identities, routes, evaluators, and service-matrix rows entirely | | CON writes PROJECT or TASK aggregates | Critical | CP06 returns immutable validation facts only; CP07 and CP08 own their respective writes | | Consolidated v0.1 schema gains fake compatibility debt | High | CP09 performs a clean current-baseline cut and forbids aliases, dual paths, and invented backfills | diff --git a/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/STATUS.md b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/STATUS.md index 334be7e80..5c3862b0c 100644 --- a/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/STATUS.md +++ b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/STATUS.md @@ -50,15 +50,18 @@ capability being touched. - PLAN3 corrects PLAN2's first implementation dependency. CON-05A is not a valid direct start: missing AUTH registration/activation and hidden CON - behavior must precede owner-separated guide/task lineage. CP01-CP09 are - proposed non-executable skeletons until PLAN3 is reviewed and merged. + behavior must precede owner-separated guide/task lineage. CP01 is the + non-executable split parent; CP01A and CP01B are current-main proposed + executable contracts, while CP02-CP09 remain non-executable skeletons. ## Proposed PLAN3 children - WS-ARCH-001-PLAN3 is proposed planning only; runtime behavior is unchanged. -- WS-ARCH-001-CP01 is proposed: combined unavailable AUTH registration; it - must split before implementation unless current-main scope proof shows one - bounded shared catalogue/context change. +- WS-ARCH-001-CP01 is a planned split and non-executable. Current-main discovery proved + adapter binding and ContributionPolicy are distinct resource/action families. +- WS-ARCH-001-CP01A is proposed: exact unavailable adapter-binding registration. +- WS-ARCH-001-CP01B is proposed after CP01A: exact unavailable + ContributionPolicy registration. - WS-ARCH-001-CP02 is proposed: hidden adapter-binding behavior. - WS-ARCH-001-CP03 is proposed: exact adapter-binding activation. - WS-ARCH-001-CP04 is proposed: hidden ContributionPolicy behavior. diff --git a/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-CP01-auth-policy-registration.md b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-CP01-auth-policy-registration.md index fa3db92f0..1ea88183a 100644 --- a/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-CP01-auth-policy-registration.md +++ b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-CP01-auth-policy-registration.md @@ -1,6 +1,6 @@ # Chunk Contract: WS-ARCH-001-CP01 — Contribution Policy AUTH Registration -Status: proposed non-executable skeleton. Risk: L1. +Status: split into CP01A and CP01B; non-executable planning parent. Risk: L1. AUTH registers exact adapter-binding and ContributionPolicy action identifiers, permission mappings, ActionOwner custody, Project Manager/administrative grant @@ -8,13 +8,10 @@ semantics, typed resource contexts, and opaque PREP contracts. Every action remains unavailable. Fulfillment callback, delivery, award reads, dispatcher, TASK, and REV authority are excluded. -Before implementation, replace this skeleton with a current-main contract that -names exact AUTH public types, catalogue rows, tests, allowed files, and -reviewers. The pre-start review must either split binding registration from -policy registration or prove the combined unavailable-only change is bounded: -one shared catalogue/context seam, no evaluator/activation/service identity, -reviewable diff size, and independent parity tests for each action family. No -CON implementation or activation belongs here. +Current-main discovery resolved the pre-start decision in favor of splitting. +Adapter binding and ContributionPolicy have distinct action sets, permissions, +resource facts, and activation successors. CP01A and CP01B are the only +executable registration contracts; no implementation may use this parent. ## Merge state diff --git a/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-CP01A-auth-adapter-binding-registration.md b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-CP01A-auth-adapter-binding-registration.md new file mode 100644 index 000000000..0de0833ab --- /dev/null +++ b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-CP01A-auth-adapter-binding-registration.md @@ -0,0 +1,122 @@ +# Chunk Contract: WS-ARCH-001-CP01A — AUTH Adapter-Binding Registration + +## Parent initiative + +WS-ARCH-001 — Modular Monolith Boundaries + +## Goal + +Register the exact adapter-binding authorization contract while every new +action remains planned and unavailable. + +## Why this chunk exists + +CON CP02 cannot implement hidden binding behavior against invented identifiers +or an untyped AUTH seam. This chunk reserves only the four operations CP02 +needs. Dependency-aware retirement remains later; fulfillment, callbacks, and +delivery are separate security boundaries. + +## Approved plan reference + +- INTENT: `.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/INTENT.md` +- PLAN: `.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/PLAN.md` +- CHUNK_MAP: `.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/CHUNK_MAP.md` + +## Risk class + +L1 + +## SLA + +P1 + +## Allowed files + +```text +backend/app/modules/authorization/catalogue.py +backend/app/modules/authorization/api/__init__.py +backend/app/modules/authorization/api/action_ids.py +backend/app/modules/authorization/api/adapter_bindings.py +backend/tests/authorization/test_adapter_binding_registration.py +.agent-loop/CURRENT_STATE.md +.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/{CHUNK_MAP.md,STATUS.md} +.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-CP01A-auth-adapter-binding-registration.md +.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/reviews/WS-ARCH-001-CP01A-*.md +.agent-loop/initiatives/WS-AUTH-001-workstream-authorization-service/{CHUNK_MAP.md,STATUS.md} +``` + +## Not allowed + +```text +CON application/model/repository/route changes +database migrations or persisted service rows +evaluators, grants, service identities, fixed-service matrix rows, or activation +compensation.adapter_binding.retire +fulfillment, callback, dispatcher, award, TASK, REV, or delivery authority +generic resource dictionaries or a second prepared-authorization protocol +compatibility aliases or non-canonical policy naming +``` + +## Exact registration manifest + +| ActionId | PermissionId | Context | +|---|---|---| +| `compensation.adapter_binding.read` | `compensation.adapter_binding.manage` | exact project and binding identity | +| `compensation.adapter_binding.create` | `compensation.adapter_binding.manage` | exact project, instrument, unit, adapter actor, and non-secret route facts | +| `compensation.adapter_binding.suspend` | `compensation.adapter_binding.manage` | exact project and active binding identity | +| `compensation.adapter_binding.resume` | `compensation.adapter_binding.manage` | exact project and suspended binding identity | + +## Acceptance criteria + +- [ ] Four closed ActionIds map only to existing + `compensation.adapter_binding.manage` under CP01A custody. +- [ ] All four definitions remain `PLANNED`; no evaluator, identity, grant, + matrix row, route, or product behavior can use them. +- [ ] AUTH public API exposes typed immutable query/mutation fact models and + canonical resource-digest helpers without importing CON internals. +- [ ] Mutation facts can be carried by the existing opaque PREP port; no handle + construction, serialization, consumption, or runtime evaluator is added. +- [ ] Independent tests prove identifier spelling, permission/owner mapping, + typed fact validation and digest domain separation, catalogue/API parity, + and planned denial. +- [ ] Retirement/callback/fulfillment identifiers are absent. + +## Verification commands + +```bash +cd backend && uv run ruff check app/modules/authorization tests/authorization/test_adapter_binding_registration.py +cd backend && uv run pytest -q tests/authorization/test_adapter_binding_registration.py tests/test_authorization.py +python3 scripts/workstream_agent_gate.py --help +python3 scripts/check_stale_authorization_docs.py +python3 scripts/check_chunk_state_sync.py --base-ref origin/main +python3 scripts/check_markdown_links.py +git diff --check +``` + +Hosted CI owns the full repository coverage gate. Authorization remains at or +above 90 percent and repository-wide coverage remains at or above 78 percent. + +## Required reviewers + +- [ ] architecture +- [ ] security/auth +- [ ] senior engineering +- [ ] QA/test +- [ ] product/ops +- [ ] reuse/dedup +- [ ] test delta +- [ ] docs + +## Human review focus + +Confirm the exact four-action manifest, the exclusion of retirement and all +service/callback authority, and proof that registration cannot activate use. + +## Stop conditions + +Stop if CP02 needs another action, permission, resource fact, evaluator, +identity, migration, or product import; update and re-review the contract first. + +## Merge state + +- Outcome on merge: `planned` diff --git a/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-CP01B-auth-contribution-policy-registration.md b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-CP01B-auth-contribution-policy-registration.md new file mode 100644 index 000000000..9668c28d6 --- /dev/null +++ b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-CP01B-auth-contribution-policy-registration.md @@ -0,0 +1,122 @@ +# Chunk Contract: WS-ARCH-001-CP01B — AUTH ContributionPolicy Registration + +## Parent initiative + +WS-ARCH-001 — Modular Monolith Boundaries + +## Goal + +Register the canonical ContributionPolicy authorization contract while every +new action remains planned and unavailable. + +## Why this chunk exists + +CP04 needs stable `contribution.policy.*` identifiers and typed AUTH facts, but +policy registration must not inherit adapter-binding behavior or activate a +Finance operation before hidden CON proof exists. + +## Approved plan reference + +- INTENT: `.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/INTENT.md` +- PLAN: `.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/PLAN.md` +- CHUNK_MAP: `.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/CHUNK_MAP.md` + +## Risk class + +L1 + +## SLA + +P1 + +## Allowed files + +```text +backend/app/modules/authorization/catalogue.py +backend/app/modules/authorization/api/__init__.py +backend/app/modules/authorization/api/action_ids.py +backend/app/modules/authorization/api/contribution_policies.py +backend/tests/authorization/test_contribution_policy_registration.py +.agent-loop/CURRENT_STATE.md +.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/{CHUNK_MAP.md,STATUS.md} +.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-CP01B-auth-contribution-policy-registration.md +.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/reviews/WS-ARCH-001-CP01B-*.md +.agent-loop/initiatives/WS-AUTH-001-workstream-authorization-service/{CHUNK_MAP.md,STATUS.md} +``` + +## Not allowed + +```text +CON application/model/repository/route changes +database migrations or persisted service rows +evaluators, grants, service identities, fixed-service matrix rows, or activation +adapter-binding lifecycle behavior +fulfillment, callback, dispatcher, award, TASK, REV, or delivery authority +generic resource dictionaries or a second prepared-authorization protocol +compatibility aliases or non-canonical ContributionPolicy identifiers +``` + +## Exact registration manifest + +| ActionId | PermissionId | Context | +|---|---|---| +| `contribution.policy.read` | `compensation.policy.manage` | exact project, policy, and optional version identity | +| `contribution.policy.create_draft` | `compensation.policy.manage` | exact project and policy collection | +| `contribution.policy.update_draft` | `compensation.policy.manage` | exact project, policy, and draft version identity | +| `contribution.policy.publish` | `compensation.policy.manage` | exact project, policy, complete draft version, rule/definition digest, and referenced binding identities | +| `contribution.policy.retire` | `compensation.policy.manage` | exact project, policy, and published version identity | + +## Acceptance criteria + +- [ ] Five canonical `contribution.policy.*` ActionIds map only to existing + `compensation.policy.manage` under CP01B custody. +- [ ] All five definitions remain `PLANNED`; no evaluator, identity, grant, + matrix row, route, or product behavior can use them. +- [ ] AUTH public API exposes typed immutable query/mutation fact models and + canonical resource-digest helpers without importing CON internals. +- [ ] Mutation facts use the existing opaque PREP port; no handle construction, + serialization, consumption, or runtime evaluator is added. +- [ ] Independent tests prove identifier spelling, permission/owner mapping, + typed fact validation and digest domain separation, catalogue/API parity, + and planned denial. +- [ ] No `compensation.policy.*` ActionId alias is introduced. + +## Verification commands + +```bash +cd backend && uv run ruff check app/modules/authorization tests/authorization/test_contribution_policy_registration.py +cd backend && uv run pytest -q tests/authorization/test_contribution_policy_registration.py tests/test_authorization.py +python3 scripts/workstream_agent_gate.py --help +python3 scripts/check_stale_authorization_docs.py +python3 scripts/check_chunk_state_sync.py --base-ref origin/main +python3 scripts/check_markdown_links.py +git diff --check +``` + +Hosted CI owns the full repository coverage gate. Authorization remains at or +above 90 percent and repository-wide coverage remains at or above 78 percent. + +## Required reviewers + +- [ ] architecture +- [ ] security/auth +- [ ] senior engineering +- [ ] QA/test +- [ ] product/ops +- [ ] reuse/dedup +- [ ] test delta +- [ ] docs + +## Human review focus + +Confirm canonical ContributionPolicy terminology, exact five-action manifest, +binding lineage on publish, and proof that registration cannot activate use. + +## Stop conditions + +Stop if CP04 needs another action, permission, resource fact, evaluator, +identity, migration, or product import; update and re-review the contract first. + +## Merge state + +- Outcome on merge: `planned` diff --git a/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-CP02-con-binding-behavior.md b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-CP02-con-binding-behavior.md index d987e586e..3a3f2fe03 100644 --- a/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-CP02-con-binding-behavior.md +++ b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/chunks/WS-ARCH-001-CP02-con-binding-behavior.md @@ -1,6 +1,6 @@ # Chunk Contract: WS-ARCH-001-CP02 — Hidden Adapter-Binding Behavior -Status: proposed non-executable skeleton after CP01. Risk: L1. +Status: proposed non-executable skeleton after CP01A and CP01B. Risk: L1. CON implements only hidden adapter-binding create/read/suspend/resume behavior through its public capability boundary and the registered opaque PREP protocol. diff --git a/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/reviews/WS-ARCH-001-CP01-split-external-review-response.md b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/reviews/WS-ARCH-001-CP01-split-external-review-response.md new file mode 100644 index 000000000..084591a10 --- /dev/null +++ b/.agent-loop/initiatives/WS-ARCH-001-modular-monolith-boundaries/reviews/WS-ARCH-001-CP01-split-external-review-response.md @@ -0,0 +1,39 @@ +# WS-ARCH-001 CP01 Split External Review Response + +## Comments addressed + +- Replaced two nonexistent future verification commands in CP01A and CP01B + with repository-owned runnable checks. +- Expanded the binding-authority risk mitigation to name retirement, + fulfillment, callback, and delivery exclusions across identifiers, + permissions, identities, routes, evaluators, and service-matrix rows. + +## Comments not applied + +- CP01A and CP01B remain executable implementation contracts for future PRs. + Their actions remain planned/unavailable on merge, but those PRs still make + real AUTH catalogue and typed-public-API changes. Only CP01 is the + non-executable planning parent. +- CodeRabbit's requests to implement the registered actions in PR #331 were not + applied. PR #331 is the bounded plan/chunk split; runtime implementation + belongs to the later one-chunk-per-PR CP01A and CP01B changes. + +## Human decisions needed + +None. These dispositions preserve the approved planning-only scope. + +## Commands rerun + +```text +python3 scripts/check_chunk_state_sync.py --base-ref origin/main +python3 scripts/check_markdown_links.py +python3 scripts/check_stale_workstream_wording.py +python3 scripts/check_stale_authorization_docs.py +python3 scripts/workstream_agent_gate.py --help +git diff --check +``` + +## Remaining risks + +CP01A and CP01B implementation still require separate human approval and their +full contract verification on then-current main. diff --git a/.agent-loop/initiatives/WS-AUTH-001-workstream-authorization-service/CHUNK_MAP.md b/.agent-loop/initiatives/WS-AUTH-001-workstream-authorization-service/CHUNK_MAP.md index ee1313a1f..cde3b3449 100644 --- a/.agent-loop/initiatives/WS-AUTH-001-workstream-authorization-service/CHUNK_MAP.md +++ b/.agent-loop/initiatives/WS-AUTH-001-workstream-authorization-service/CHUNK_MAP.md @@ -18,13 +18,15 @@ may proceed concurrently; open pull requests show transient ownership. ## Chunks `WS-ARCH-001/CHUNK_MAP.md` owns the ordered cross-module sequence -`WS-ARCH-001-CP01 -> CP02 -> CP03 -> CP04 -> CP05`; the AUTH entries below +`WS-ARCH-001-CP01A -> CP01B -> CP02 -> CP03 -> CP04 -> CP05`; the AUTH entries below project only AUTH-owned registration and activation responsibilities from that sequence. | Chunk | Title | Risk | Status | |---|---|---:|---| -| `WS-ARCH-001-CP01` | Adapter-binding and ContributionPolicy unavailable registration | L1 | Proposed by PLAN3; excludes callback/fulfillment and all activation | +| `WS-ARCH-001-CP01` | Combined registration planning parent | L1 | Planned split into CP01A/CP01B; non-executable | +| `WS-ARCH-001-CP01A` | Adapter-binding unavailable registration | L1 | Proposed; excludes retirement, callback/fulfillment, identity, evaluator, and activation | +| `WS-ARCH-001-CP01B` | ContributionPolicy unavailable registration | L1 | Proposed after CP01A; excludes binding behavior, evaluator, and activation | | `WS-ARCH-001-CP03` | Exact adapter-binding activation | L1 | Proposed after merged CP02 hidden proof | | `WS-ARCH-001-CP05` | Exact ContributionPolicy activation | L1 | Proposed after merged CP04 hidden proof | | `WS-AUTH-001-PLAN` | Authorization Service Planning | L0 | Merged through PR #91 as `ad6d644` | diff --git a/.agent-loop/initiatives/WS-AUTH-001-workstream-authorization-service/STATUS.md b/.agent-loop/initiatives/WS-AUTH-001-workstream-authorization-service/STATUS.md index c2b04d622..937c813ad 100644 --- a/.agent-loop/initiatives/WS-AUTH-001-workstream-authorization-service/STATUS.md +++ b/.agent-loop/initiatives/WS-AUTH-001-workstream-authorization-service/STATUS.md @@ -42,8 +42,9 @@ not current start requirements. - ART, REV, and CON feature actions remain unavailable until their exact hidden owner behavior and typed manifests are merged. Their activation order lives in the matching XINT and feature-owner records. -- PLAN3 proposes the missing contribution-policy sequence: CP01 registers exact - adapter-binding and policy actions while unavailable; CP03 and CP05 activate +- PLAN3 proposes the missing contribution-policy sequence: CP01A registers exact + adapter-binding actions while unavailable and CP01B separately registers + policy actions while unavailable; CP03 and CP05 activate only their respective merged hidden behavior. Fulfillment callback authority remains separate and cannot be bundled into adapter-binding registration. diff --git a/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/AUTHORIZATION_HANDOFF.md b/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/AUTHORIZATION_HANDOFF.md index dc2f4032e..0b4c20482 100644 --- a/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/AUTHORIZATION_HANDOFF.md +++ b/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/AUTHORIZATION_HANDOFF.md @@ -39,7 +39,8 @@ protocol and one caller-owned commit. | `03A` binding persistence | none; schema stores only canonical actor identity and non-secret route facts | CON may proceed | | `03B` policy persistence | none; no command or protected route | CON may proceed | | `02C` lifecycle audit participant | none; caller supplies already-authorized typed facts | CON may proceed | -| `CP01` binding and policy registration | exact binding/policy actions, typed contexts, custody and permission mapping; callback/fulfillment excluded | register unavailable before hidden services | +| `CP01A` binding registration | exact binding actions, typed contexts, custody and permission mapping; retirement/callback/fulfillment excluded | register unavailable first | +| `CP01B` policy registration | exact `contribution.policy.*` actions, typed contexts, custody and permission mapping | register unavailable after CP01A and before hidden services | | `CP03` binding activation | exact CP02-proven binding actions only | activate after hidden proof | | `CP05` policy activation | exact CP04-proven policy actions only | activate after hidden proof | | `CP06-CP08` validation and owner persistence | existing guide activation authority; later TASK readiness/claim authority remains TASK/AUTH-owned | CON validates only; PROJECT/TASK own writes | @@ -76,9 +77,9 @@ matrix rows, or evaluators. ## Immediate AUTH ask -No AUTH change blocks planning or completed CON `03A`, `03B`, or `02C`. CP01 is -the first proposed implementation gate and registers binding/policy authority -while unavailable. CP03 and CP05 activate only their respective CP02/CP04 +No AUTH change blocks planning or completed CON `03A`, `03B`, or `02C`. CP01A +and CP01B are the first proposed implementation gates and separately register +binding and policy authority while unavailable. CP03 and CP05 activate only their respective CP02/CP04 hidden proof. Before CON `02B`, AUTH must deliver the complete dispatcher identity/admission/action contract. That later dispatcher work must not delay the persistence and diff --git a/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/CHUNK_MAP.md b/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/CHUNK_MAP.md index 152d78230..564c4947e 100644 --- a/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/CHUNK_MAP.md +++ b/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/CHUNK_MAP.md @@ -60,7 +60,7 @@ PLAN4 -> 02C ----------------------------------> REV-04B REV-04B + 03B -> 03C -> 03D -CP01 -> CP02 -> CP03 -> CP04 -> CP05 -> CP06 -> CP07 -> CP08 +CP01A -> CP01B -> CP02 -> CP03 -> CP04 -> CP05 -> CP06 -> CP07 -> CP08 CP08 -> WS-ARCH-001-03A/03B replacement behavior -> WS-ARCH-001-03C activation -> CP09 task-locked policy lineage -> assignment -> Submission-stamped attempt lineage -> allow_review -> ReviewLease REV revision lineage + 03C/03D + CP06/CP08 -> 07 -> REV-10 first Review commit diff --git a/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/JOINT_RELEASE_HANDOFF.md b/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/JOINT_RELEASE_HANDOFF.md index 3b81412c9..5053f0e4d 100644 --- a/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/JOINT_RELEASE_HANDOFF.md +++ b/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/JOINT_RELEASE_HANDOFF.md @@ -39,7 +39,7 @@ CON 02C lifecycle audit participant -> CON 03C ContributionRecord/CompensationAward persistence -> CON 03D delivery/receipt/status and ordinal persistence -REV lease schema/caller facts + WS-ARCH-001-CP01 through CP05 registration, +REV lease schema/caller facts + WS-ARCH-001-CP01A/CP01B through CP05 registration, behavior, and activation -> WS-ARCH-001-CP06 validation -> CP07 guide binding -> CP08 attempt persistence -> WS-ARCH-001-03A/03B replacement behavior -> WS-ARCH-001-03C activation diff --git a/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/RUNTIME_VERIFICATION.md b/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/RUNTIME_VERIFICATION.md index c050bbeba..3524de46c 100644 --- a/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/RUNTIME_VERIFICATION.md +++ b/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/RUNTIME_VERIFICATION.md @@ -31,8 +31,8 @@ git diff --check | CON-03B | `app/modules/contributions/*` | `app/modules/contributions app/modules/projects/models.py app/db/models.py tests/test_contributions.py tests/test_projects.py alembic/versions/.py` | | CON-03C | `app/modules/contributions/*`; `app/modules/compensation/*` | `app/modules/contributions app/modules/compensation app/db/models.py tests/test_contributions.py tests/test_compensation.py alembic/versions/.py` | | CON-03D | `app/modules/compensation/*` | `app/modules/compensation app/db/models.py tests/test_compensation.py alembic/versions/.py` | -| Historical CON-04A/04B/05A/05B | Superseded/non-executable | Use PLAN3 CP01-CP09 and each future current-main contract; do not execute retained historical rows | -| ARCH-CP01 through CP09 | Defined only by separately approved current-main contracts | Do not execute from this table alone | +| Historical CON-04A/04B/05A/05B | Superseded/non-executable | Use PLAN3 CP01A/CP01B through CP09 and each future current-main contract; do not execute retained historical rows | +| ARCH-CP01A/CP01B through CP09 | Defined only by separately approved current-main contracts | Do not execute from this table alone | | CON-07 | `app/modules/contributions/*`; `app/modules/compensation/*` | `app/modules/contributions app/modules/compensation tests/test_contributions.py tests/test_compensation.py tests/test_authorization.py tests/test_outbox.py` | | Historical CON-08A | Superseded/non-executable | Fresh delivery replacement must define current targets after CP02/CP04 and all other gates; do not execute this retained row | | CON-08R | `app/modules/api_controls/*`; `app/api/deps/api_controls.py`; `app/core/config.py` | `app/modules/api_controls app/api/deps/api_controls.py app/core/config.py tests/test_api_rate_controls.py tests/test_config.py tests/test_alembic.py alembic/versions/.py` | diff --git a/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/STATUS.md b/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/STATUS.md index 1872fcd2b..173c79751 100644 --- a/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/STATUS.md +++ b/.agent-loop/initiatives/WS-CON-001-contribution-compensation-boundary/STATUS.md @@ -78,7 +78,7 @@ historical-row backfill or compatibility behavior. - CON-02B: missing `outbox.dispatch`, `workstream.outbox.dispatcher`, exact matrix/context/PREP support, and AUTH activation plan. -- CP01: exact AUTH adapter-binding and ContributionPolicy manifests are not yet +- CP01A/CP01B: exact AUTH adapter-binding and ContributionPolicy manifests are not yet registered; callback/fulfillment authority must remain separate. - CP02-CP05: hidden behavior and exact activation have not merged. - CP06-CP09: validation, owner schema lineage, and clean legacy removal wait for @@ -113,6 +113,6 @@ CP08/ARCH-03B replacement path. CON-02C merged through PR #277. REV-04B may consume its shared lifecycle-audit participant after REV's earlier gates merge. The first proposed policy-cutover -implementation is CP01 AUTH unavailable registration; no product behavior may -start until PLAN3 merges and CP01 receives a current-main executable contract. +implementation begins with CP01A then CP01B unavailable AUTH registration; no +product behavior may start until both current-main contracts merge. Open pull requests determine transient CON work. diff --git a/docs/roadmap_status.md b/docs/roadmap_status.md index 69497976a..942362a56 100644 --- a/docs/roadmap_status.md +++ b/docs/roadmap_status.md @@ -133,7 +133,8 @@ review. Their presence does not change the implemented-on-`main` list above. recovery, provider proof, and the later public cutover. Hidden durable admission, Submission creation, and final binding are already merged through WS-ARCH-001-02H. -2. Register exact ContributionPolicy authority while unavailable; implement +2. Register exact adapter-binding authority through CP01A and exact + ContributionPolicy authority through CP01B while both remain unavailable; implement and separately activate adapter-binding and ContributionPolicy behavior; expose CON validation; then bind one exact published, complete, binding-valid ContributionPolicyVersion at guide activation, and