Skip to content

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

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

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

Conversation

@alliscode

Copy link
Copy Markdown
Contributor

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.

Prototype Author and others added 6 commits November 20, 2026 15:42
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 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)

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