Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Missing repository-availability and in-lock consent checks can expose private learning text and score issues to Copilot after GitHub access is removed or evaluations are disabled.
10 open issues
Recheck repository availability before sending learning data · New Recheck evaluation consent under the execution lock · New Use lower priority for automatic learning updates · New Bound update batches so scheduled work cannot block other jobs · New Close abandoned runs independently of starting a new check · New Lock budget checks, command execution, and result persistence · New Continue the sweep when one repository fails preparation · New Preserve queued requests when Copilot is unavailable or unauthorized · New Persist the update flag before closing a successful run · New Delete only the request version observed before the check · New
What changed in this PR
Adds Hub’s daily integration with the learning package to suggest wording updates from newly scored learnings. Suggestions remain pending review; the review interface is outside this PR.
Changes:
- Flag scored learnings and check them oldest-first at 03:00 UTC.
- Record check outcomes and costs against the shared monthly evaluation budget.
- Add persistence, focused tests, and documentation for the daily workflow.
| File | Description |
|---|---|
hub/server/workers/configuration.ts |
Registers the processor and daily schedule. |
hub/server/repositories/learning-update-runs/start-learning-update-run/index.ts |
Starts checks and closes earlier interrupted runs. |
hub/server/repositories/learning-update-runs/start-learning-update-run/index.db.test.ts |
Tests interrupted-run handling. |
hub/server/repositories/learning-update-runs/finish-learning-update-run/index.ts |
Saves check outcomes and usage. |
hub/server/repositories/learning-update-requests/record-learning-update-request/index.ts |
Flags learnings after new scores. |
hub/server/repositories/learning-update-requests/list-learning-update-requests/index.ts |
Lists pending flags oldest-first. |
hub/server/repositories/learning-update-requests/delete-learning-update-request/index.ts |
Clears flags using a score-time cutoff. |
hub/server/repositories/learning-update-requests/delete-learning-update-request/index.db.test.ts |
Tests retaining flags after newer scores. |
hub/server/repositories/learning-evaluation-runs/sum-learning-evaluation-credits/index.ts |
Includes update checks in budget totals. |
hub/server/repositories/learning-evaluation-runs/sum-learning-evaluation-credits/index.db.test.ts |
Tests combined scoring and update costs. |
hub/server/domains/learning/score-applied-learnings/index.ts |
Requests update checks after successful scoring. |
hub/server/domains/learning/score-applied-learnings/index.test.ts |
Tests flagging scored learnings. |
hub/server/domains/learning/propose-learning-updates/index.ts |
Coordinates checks, usage recording, and flag cleanup. |
hub/server/domains/learning/propose-learning-updates/index.test.ts |
Covers results, failures, disabled settings, and budget pauses. |
hub/server/domains/learning/jobs/propose-learning-updates.ts |
Defines the job and retry options. |
hub/server/domains/learning/create-learning-job-processors/index.ts |
Connects the workflow to storage, credentials, and locking. |
hub/schema/repository.prisma |
Adds repository relations for requests and runs. |
hub/schema/migrations/20261227090000_learning_update_runs/migration.sql |
Creates request and run tables. |
hub/schema/learning-update-run.prisma |
Defines check history and usage fields. |
hub/schema/learning-update-request.prisma |
Defines pending learning flags. |
hub/docs/learning-foundation.md |
Documents daily checks and shared budget behavior. |
Review effort: Max (adaptive)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 25291e01-0146-42cb-ac6d-f5e1dd5c35f5
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 25291e01-0146-42cb-ac6d-f5e1dd5c35f5
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 25291e01-0146-42cb-ac6d-f5e1dd5c35f5
nshki
force-pushed
the
nshki/feat/hub/learning-update-suggestions
branch
from
November 26, 2026 10:39
39ff497 to
452ce52
Compare
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 learning package can now suggest better wording when the same problem keeps showing up after agents follow a learning. Hub already scores how learnings do, but nothing asks for those suggestions yet. Hub should check learnings that got new scores on its own, without anyone remembering to, and without going over the shared evaluation budget.
What changes
Each new score now flags its learning. A new job runs every day at 03:00 UTC and queues one low-priority check per flagged learning, oldest first. Each check runs
replica-learning propose-updateon its own, so other scheduled work runs in between and one repository's failure doesn't hold up the others. For example, two Builds score "Use the shared empty state" low because it never says where the empty state goes. The next morning's check keeps a suggestion that names the position.Hub records every check with its result and what it cost. That cost counts toward the same monthly budget as scoring. When the budget runs out or Copilot isn't available, a check keeps its flag for the next day. Each check confirms, under the learning lock, that evaluations are still on and the repository is still connected. A learning that gets another score during its check stays flagged for the next day. Suggestions only wait for review; showing and deciding them comes in the next PR.
sequenceDiagram participant S as Scoring job participant H as Hub database participant J as Daily job (03:00 UTC) participant L as Learning package S->>H: Flag the scored learning J->>H: Read flags, oldest first loop Each flagged learning, as its own job J->>H: Check consent, connection, and budget J->>H: Start a check J->>L: propose-update L-->>J: Result and cost J->>H: Record result and cost J->>H: Clear the flag unless scored again endNeeds design review