Repository navigation
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Key D1 upload-only success and digest-validation cases remain untested, and the README does not explain taskset pinning or older-adapter failures after mount removal.
3 open issues
What changed in this PR
This PR enables Hub’s upload-only taskset flow for customer-operated D1 runtimes while preserving mounted-taskset support.
Changes:
- Allow D1 startup without a mounted taskset and use each training job’s validated taskset.
- Record taskset identity and learning-text digests in adapters for inference checks, without copying private learning text.
- Return backend readiness details and update setup guidance and regression coverage.
| File | Description |
|---|---|
packages/learning/environments/brand-check/tests/test_runtime.py |
Adds upload-only startup and readiness-response tests. |
packages/learning/environments/brand-check/tests/test_d1_connector.py |
Checks adapter digest metadata and mismatched inference requests. |
packages/learning/environments/brand-check/runtime_server.py |
Supports startup without a taskset mount and returns readiness details. |
packages/learning/environments/brand-check/README.md |
Documents the upload-first D1 setup. |
packages/learning/environments/brand-check/d1_connector.py |
Uses job-selected tasksets and validates adapter learning contracts. |
Review effort: Max (adaptive)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Why
The customer-operated D1 runtime crashed when Hub started it without a mounted taskset and then uploaded the taskset through the runtime API. That upload-only flow is the documented Hub integration, so a real D1 connector could not complete the same lifecycle as the fixture connector.
What changes
The D1 connector now accepts each validated uploaded taskset when its training job starts. The resulting immutable adapter records the taskset identity and SHA-256 identities for its learning text, so promoted inference rejects requests from another taskset without copying the private learning text into the adapter.
Mounted tasksets and existing mounted-taskset adapters remain compatible. The readiness endpoint also returns the operator-safe backend capability details that the runtime already computes, without exposing model paths, taskset IDs, or candidate IDs.
The Hub decision-runtime client is unchanged and its current request and response contracts still match the runtime. Its local Vitest suite could not be rerun because dependency downloads repeatedly reset from both the configured registry and the Microsoft npm proxy.