Skip to content

feat(learning): honor runtime consent withdrawal - #335

Open
alliscode wants to merge 11 commits into
build/hub/newfrom
alliscode-runtime-deletion-receipts
Open

alliscode wants to merge 11 commits into
build/hub/newfrom
alliscode-runtime-deletion-receipts

Conversation

@alliscode

@alliscode alliscode commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 15075d4283b0fc825055a068ed7a353a21cc1e6e

Dimension Assessment Rationale
Change confidence 9/10 ↑ The lifecycle registry removes conflicting live-worker state and keeps receipts pending through operation cleanup.
↑ 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.
Diagnosis confidence 9.5/10 ↑ Fault injection reproduced premature completion, recovery races, registration crash windows, and retry reactivation failures.
↑ The stabilization fixes the shared lifecycle invariants rather than adding per-symptom exceptions.
Evidence fit 9.5/10 ↑ The new crash, race, restart, and cleanup tests directly exercise the high-priority review failure modes.
↓ 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.

flowchart LR
  hub["Hub withdrawal"] --> disclose["Disclose matching runtime copies"]
  disclose --> revoke["Revoke use and cancel work"]
  revoke --> delete["Delete or retain through connectors"]
  delete --> receipt["Durable completed receipt"]
Loading

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.

@alliscode
alliscode requested review from a team and nshki as code owners November 21, 2026 01:45
Copilot AI adaptive review requested due to automatic review settings November 21, 2026 01:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved critical deletion and provenance flaws can report withdrawals as complete while private data remains stored or in use.

24 open issues

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)

Prototype Author and others added 8 commits November 30, 2026 09:19
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>
@alliscode
alliscode force-pushed the alliscode-runtime-deletion-receipts branch from 7c91fa9 to 323d181 Compare November 30, 2026 17:30
@alliscode
alliscode requested an adaptive review from Copilot November 30, 2026 17:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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
24 resolved since last review

And 4 more resolved.

Review effort: Max (adaptive)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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
15 resolved since last review

Review effort: Max (adaptive)

Prototype Author and others added 2 commits November 30, 2026 16:20
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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