Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical deletion and provenance flaws can report withdrawals as complete while private data remains stored or in use.
24 open issues
Backfill legacy provenance before serving or recovering deletions · New Bind provisional inventory to verified upload provenance · New Do not mark uploads deleted without connector confirmation · New Allow retention exemptions only for runtime-mounted sources · New Evict deleted tasksets from runtime caches · New Use the connector-issued storage reference for deletion · New Delete reports through their owning storage connector · New Track and delete or retain inference idempotency results · New Keep deletion pending until workers terminate and clean up · New Recheck revocation atomically when registering inference · New Recover staged private copies before completing deletion · New Prevent revoked pending promotions from blocking startup · New Validate required provenance on upload, mount, and use · New Require explicit purpose permission before training · New Match Hub's aggregate evidence-digest contract · New Keep receipt items within Hub's accepted schema · New Test connector pagination, filtering, and limit validation · New Verify deletion preserves foreign copies and removes owner copies · New Reject idempotency-key reuse with changed input or stale version · New Translate filesystem deletion errors into retryable connector errors · New
And 4 more that still need to be addressed.
What changed in this PR
Extends the customer-operated decision runtime to honor consent withdrawal through copy disclosure, use revocation, and durable deletion receipts. This complements #303’s Hub taskset and control-plane work without adding Hub UI or persistence.
Changes:
- Adds content-free provenance and authenticated, paginated disclosure of runtime copies.
- Adds idempotent deletion requests, cancellation, connector deletion, retention records, and restart recovery.
- Expands lifecycle and conformance coverage, adds a Compose demo, and documents operator responsibilities.
| File | Description |
|---|---|
packages/learning/test/decision.test.mjs |
Asserts taskset purpose, review, and evidence provenance. |
packages/learning/README.md |
Documents provenance and runtime withdrawal behavior. |
packages/learning/environments/brand-check/tests/test_runtime_deletion.py |
Adds withdrawal, concurrency, recovery, and HTTP coverage. |
packages/learning/environments/brand-check/tests/test_connector_deletion_conformance.py |
Tests local inventory, deletion, tombstones, and receipts. |
packages/learning/environments/brand-check/tests/test_connector_conformance.py |
Extends contract-only fixtures for privacy and deletion. |
packages/learning/environments/brand-check/server/runtime.Dockerfile |
Includes the withdrawal demo script. |
packages/learning/environments/brand-check/runtime.py |
Implements disclosure, revocation, deletion receipts, and cancellation. |
packages/learning/environments/brand-check/runtime_server.py |
Exposes authenticated disclosure and deletion routes. |
packages/learning/environments/brand-check/README.md |
Explains APIs, connectors, demo usage, and operator duties. |
packages/learning/environments/brand-check/local_connectors.py |
Adds local deletion and durable privacy storage. |
packages/learning/environments/brand-check/examples/runtime_deletion_demo.py |
Demonstrates the withdrawal lifecycle over HTTP. |
packages/learning/environments/brand-check/connectors.py |
Defines privacy and storage-deletion interfaces. |
packages/learning/environments/brand-check/connector_conformance.py |
Adds shared privacy and deletion conformance cases. |
packages/learning/environments/brand-check/compose.yaml |
Adds the optional lifecycle demo service. |
packages/learning/environments/brand-check/.dockerignore |
Includes the demo script in the build context. |
docs/decision-model.md |
Summarizes withdrawal behavior and external-copy responsibilities. |
docs/adr/0002-decision-model-and-rl-environment.md |
Updates the architecture’s privacy contracts and boundaries. |
Review effort: Max (adaptive)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
7c91fa9 to
323d181
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Critical withdrawal and scope-isolation defects allow deletion to be reported as complete while customer-derived data remains and permit cross-scope enumeration or deletion of stored inference results.
15 open issues
Persisting connectors lack a required stable result reference · New Mounted tasksets skip digest validation against their reference · New Inference connector storage access is not scoped to its tenant · New Incomplete revoked copies can prevent startup recovery · New Failed inventory writes can leave untracked taskset bytes · New Unkeyed evaluations persist results without inference-copy inventory · New Keyed inference skips the final revocation check without a retry reference · New Conflict cleanup can erase an earlier successful idempotent result · New Failed inventory activation leaves undeleted candidate bytes · New Startup scans load every payload under one shared deadline · New Connector conformance tests require an unspecified cursor format · New Concurrent deletion retries can return a version conflict · New Revocation checks reparse all historical receipts under the lock · New Restart reconciliation rewrites already completed withdrawal receipts · New Retention timestamps with offsets are not normalized to UTC · New
24 resolved since last review
Keep receipt items within Hub's accepted schema Match Hub's aggregate evidence-digest contract Require explicit purpose permission before training Validate required provenance on upload, mount, and use Prevent revoked pending promotions from blocking startup Recover staged private copies before completing deletion Recheck revocation atomically when registering inference Keep deletion pending until workers terminate and clean up Track and delete or retain inference idempotency results Delete reports through their owning storage connector Use the connector-issued storage reference for deletion Evict deleted tasksets from runtime caches Allow retention exemptions only for runtime-mounted sources Do not mark uploads deleted without connector confirmation Bind provisional inventory to verified upload provenance Backfill legacy provenance before serving or recovering deletions Populate review provenance from memory reviewDigest values Test caller-requested retention and invalid retention Normalize retention metadata to Hub's accepted fields Retry pending deletions during polling or scheduled reconciliation
And 4 more resolved.
Review effort: Max (adaptive)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Critical cleanup, recovery, and revocation defects can let withdrawal report completion while private bytes remain or allow training and inference to continue after a durable withdrawal.
19 open issues
Recover abandoned inference staging files before completing deletion · New Namespace inference results by backend ownership · New Sort and skip copy records by filename before reading · New Fail closed when receipt creation succeeds but bookkeeping fails · New Reconcile uncertain registrations and staging cleanup failures · New Keep rollback fenced against concurrent taskset registration · New Make disclosure telemetry best-effort · New Preserve finalized deletion progress and refresh batch contexts · New Restrict legacy retention exemption to superseded taskset records · New Reject cached-result reuse with mismatched candidate lineage · New Track and retry failed work-directory cleanup · New Normalize and validate taskset timestamps before disclosure · New Translate atomic receipt write failures into retryable errors · New Do not wait for queued jobs that never started · New Use disclosed runtimeCopyId consistently in receipt items · New Clear completedAt when reconciliation leaves a receipt pending · New Retry privacy recovery before refusing normal Hub traffic · New Create retry context after acquiring the per-key lock · New Add newly discovered retained mounts to the receipt · New
15 resolved since last review
Startup scans load every payload under one shared deadline Failed inventory activation leaves undeleted candidate bytes Conflict cleanup can erase an earlier successful idempotent result Keyed inference skips the final revocation check without a retry reference Unkeyed evaluations persist results without inference-copy inventory Failed inventory writes can leave untracked taskset bytes Incomplete revoked copies can prevent startup recovery Inference connector storage access is not scoped to its tenant Mounted tasksets skip digest validation against their reference Persisting connectors lack a required stable result reference Retention timestamps with offsets are not normalized to UTC Restart reconciliation rewrites already completed withdrawal receipts Revocation checks reparse all historical receipts under the lock Concurrent deletion retries can return a version conflict Connector conformance tests require an unspecified cursor format
Review effort: Max (adaptive)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>


Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
15075d4283b0fc825055a068ed7a353a21cc1e6e↑ Python 3.12 and 3.14 runtime suites, 681 learning tests, container build, and Compose privacy lifecycle pass.
↑ Independent architecture review, final code review, and the exact-history conventions gate found no remaining blocker.
↓ Fresh CI is pending on this revision.
↑ The stabilization fixes the shared lifecycle invariants rather than adding per-symptom exceptions.
↓ Hosted connectors remain validated through the shared contract rather than this local implementation.
Why
Withdrawing training consent must stop customer-operated runtime copies, not only stop new exports in Hub. Without a provider-neutral disclosure and deletion contract, operators cannot reliably find tasksets, trained candidates, evaluation reports, or in-flight uses derived from a withdrawn export or grant.
What changes
The decision runtime now keeps content-free provenance for uploaded and mounted tasksets and every derived candidate and report. Authenticated disclosure can find copies by source export, permitting grant, evidence digest, or taskset digest with bounded pagination.
Deletion requests are durable and idempotent. They revoke readiness, training, promotion, and inference first; cancel queued, running, and in-flight work; delete connector-owned copies; retain operator-mounted sources only with an explicit recorded reason; and remain pending while retryable connector work is incomplete. Restart, lease expiry, duplicate requests, registration retries, and concurrent inference retries preserve the same result.
The shared connector contract and conformance suite now cover enumeration, deletion, tombstones, receipts, idempotency, and scope isolation. The Compose demo proves upload, training, promotion, disclosure, withdrawal, deletion, refused inference, and receipt completion. Operator guidance also covers model and trainer caches, merged weights, registries, backups, and provider logs outside the configured connectors.
This runtime layer complements the Hub taskset and control-plane work in #303; it does not add Hub UI or duplicate Hub persistence. The unchanged OpenEnv server image build could not complete locally because Docker's PyPI connection repeatedly ended with a TLS EOF while fetching
setuptools; the changed runtime image, full package suites, and Compose lifecycle completed successfully.