Repository navigation
factory: every finished job counts toward cost, and a new job's estimate before it exists - #2188
Merged
Merged
Conversation
…red on their kind, calibration is kept per basis, and a new job's estimate is served before it exists
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.
What
The factory's cost history now counts every finished job, not only the ones that have a read.
basis: "kind", and the app saysfrom 12 jobs in api, not read. A job with enough similar read jobs keepsbasis: "read", and that match always comes first.queue.desk.estimates.basiscarries{read, kind}hit rates.factory.estimate_new {factory, repo, kind}(GET /v1/repos/{owner}/{repo}/estimate?kind=K) answers the kind pool's figure from the finished jobs the caller can see. It shows nothing below five jobs. This is for New job's "Start now". No model is asked.The no-figure rule is unchanged: below five jobs on both bases, the app shows "no cost history yet". No background AI is added.
Tests (written first)
basison the estimate and the per-basis hit rate.factory.estimate_newis registered, announced only by an engine that serves it, and its params are checked.Docs
PROTOCOL (method row,
basis, per-basis calibration,factory.estimate_new), the manual's cost section, and the changelog.🤖 Generated with Claude Code