Skip to content

feat(hub): compose decision tasksets - #303

Open
alliscode wants to merge 21 commits into
build/hub/newfrom
alliscode-decision-taskset-source
Open

alliscode wants to merge 21 commits into
build/hub/newfrom
alliscode-decision-taskset-source

Conversation

@alliscode

Copy link
Copy Markdown
Contributor

Why

The decision control plane needs a production source for private training tasksets before Hub can submit customer-operated training jobs. The source must use the new Hub's stored Builds, review evidence, learning contracts, and provider-neutral artifact storage without bringing back Rails behavior or leaking evidence across repositories.

What changes

Hub now selects eligible reviewed prototypes and published successful Builds, reads their captured pages from artifact storage, and combines them with consent-filtered learning evidence through the packages/learning decision contracts. It pins the evidence, Build, question, and taskset digests; exposes deterministic preflight coverage and missing-evidence reasons; stages private data within fixed resource limits; transfers one idempotent runtime upload; and cleans temporary files on success or failure.

Completed Build evaluations remain in the existing control-plane record. Their overview projection includes the candidate and promotion generation, exact submitted page views, probabilities, timestamps, and bounded Hub-generated explanations. Private learning and comment text stays in the learning store rather than being copied into PostgreSQL or API findings.

flowchart LR
  reviews["Accepted review outcomes"] --> export["Private preview export"]
  builds["Published Build artifacts"] --> source["Hub taskset source"]
  export --> source
  source --> preflight["Authoritative coverage preflight"]
  source --> upload["Pinned runtime taskset upload"]
  upload --> runtime["Customer-operated runtime"]
  runtime --> findings["Build findings in the existing control-plane record"]
Loading

This PR is stacked on the finalized decision control plane in #301. A conforming customer runtime still supplies the taskset upload, cancellation, training, promotion, and evaluation interfaces; Hub does not add a runtime server, model storage, automatic promotion, Azure-specific code, UI, or browser-capture changes.

@alliscode
alliscode requested review from a team and nshki as code owners November 19, 2026 18:00
Copilot AI adaptive review requested due to automatic review settings November 19, 2026 18:00
Comment thread packages/learning/src/store.mjs Resolved

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

A digest mismatch blocks runtime training, while unaudited retrieval and unrecorded exports bypass learning-data safeguards needed for recall auditing, consent withdrawal, and redaction follow-ups.

12 open issues
What changed in this PR

Connects the decision-model control plane from #301 to Hub’s stored Build screenshots and consent-filtered learning evidence, preparing private tasksets for customer-operated runtimes.

Changes:

  • Adds bounded taskset composition, pinned input digests, and preflight coverage.
  • Wires API and worker dependencies and checks the runtime’s transferred taskset digest.
  • Projects Build evaluation findings without learning text and adds preview exports, tests, and documentation.
File Description
packages/​learning/​test/​cli.test.mjs Covers preview-export output.
packages/​learning/​src/​store.mjs Supports exports without durable export records.
packages/​learning/​src/​cli.mjs Exposes export preview mode.
packages/​learning/​README.md Documents preview-export behavior.
packages/​learning/​index.d.mts Types the export preview option.
hub/​server/​workers/​index.ts Validates decision-runtime configuration at startup.
hub/​server/​workers/​configuration.ts Registers configured training and recovery jobs.
hub/​server/​start-server-processes/​index.ts Accepts decision-model route dependencies.
hub/​server/​run-api/​index.ts Passes decision-model dependencies into API composition.
hub/​server/​routes/​api/​decision-model/​types.ts Expands preflight and evaluation response contracts.
hub/​server/​routes/​api/​decision-model/​index.test.ts Removes learning-text expectations from findings.
hub/​server/​routes/​api/​decision-model/​create-decision-model-route-dependencies/​index.ts Projects evaluation digests, availability, and explanations.
hub/​server/​repositories/​decision-training-builds/​list-decision-training-builds/​index.ts Selects repository-scoped reviewed prototypes and Builds.
hub/​server/​repositories/​decision-training-builds/​list-decision-training-builds/​index.db.test.ts Covers selection eligibility, ordering, and isolation.
hub/​server/​repositories/​decision-model-configurations/​get-decision-model-overview/​index.db.test.ts Covers repository-scoped evaluation retrieval.
hub/​server/​index.ts Composes the taskset source and decision-model API.
hub/​server/​domains/​decision-model/​types.ts Adds detailed coverage and private finding contracts.
hub/​server/​domains/​decision-model/​process-decision-training-job/​index.ts Rejects mismatched runtime taskset digests.
hub/​server/​domains/​decision-model/​orchestrate-decision-training/​index.test.ts Covers transfer mismatch and revised findings.
hub/​server/​domains/​decision-model/​evaluate-build-with-decision-model/​index.ts Generates explanations without copying learning text.
hub/​server/​domains/​decision-model/​errors.ts Adds repository and Build lookup errors.
hub/​server/​domains/​decision-model/​create-hub-decision-taskset-source/​index.ts Composes evidence, artifacts, preflight, uploads, and evaluation inputs.
hub/​server/​domains/​decision-model/​create-hub-decision-taskset-source/​index.test.ts Covers determinism, artifact checks, bounds, and cleanup.
hub/​server/​domains/​decision-model/​create-decision-model-store/​index.ts Persists explanations instead of learning text.
hub/​server/​domains/​decision-model/​create-configured-decision-model-job-processors/​index.ts Lazily composes worker storage, source, and runtime dependencies.
hub/​docs/​decision-model-control-plane.md Documents taskset preparation and evaluation integration.
hub/​docs/​architecture.md Describes the composed decision-model boundary.
docs/​decision-model.md Updates Hub taskset-transfer prerequisites.

Review effort: Max (adaptive)

Comment thread hub/server/workers/configuration.ts Resolved
Comment thread hub/server/workers/index.ts Resolved
@alliscode
alliscode force-pushed the alliscode-decision-taskset-source branch from f2bb263 to 29ae79b Compare November 19, 2026 20:31
@alliscode
alliscode force-pushed the alliscode-decision-taskset-source branch from c4262c7 to cf109b1 Compare November 19, 2026 20:46
@alliscode
alliscode force-pushed the alliscode-decision-taskset-source branch from cf109b1 to 31b7447 Compare November 19, 2026 21:33
Base automatically changed from alliscode-hub-decision-control-plane to build/hub/new November 19, 2026 21:37
@alliscode
alliscode force-pushed the alliscode-decision-taskset-source branch from 31b7447 to 06bdb0f Compare November 19, 2026 21:47
Ben Thomas and others added 13 commits November 19, 2026 16:03
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>
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>
Prototype Author and others added 8 commits November 19, 2026 16:10
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-decision-taskset-source branch from ddbc138 to 7eb5c00 Compare November 20, 2026 00:12
@alliscode
alliscode added this pull request to stack #320 November 20, 2026 00:27
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.

3 participants