[DEV-95] Worker scheduled estimation via [[estimations]] in workspace.toml - #88
Open
danii1 wants to merge 1 commit into
Open
[DEV-95] Worker scheduled estimation via [[estimations]] in workspace.toml#88danii1 wants to merge 1 commit into
danii1 wants to merge 1 commit into
Conversation
…s]] in workspace.toml
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.
Task: DEV-95
Summary: Worker scheduled estimation via [[estimations]] in workspace.toml
Implementation Details
Now update
automation-config.tsto rejectkind, and wire estimations into the workspace config:Now the workspace config — add
estimations, reject[defaults].estimate_query, and enforce tracker estimate support at startup:Now the run-origin plumbing — recorder first:
Now the dashboard-ui side:
Now wire run records into the CLI estimation path in
index.ts:Now wire it into
workspace-worker.ts:Now add the
withCoordinatorSlothelper nearresolveWorkspaceAutomationContext, and pass the coordinator to the remaining acquirers:Now update
fleet-events.tsso review/conflict runs also serialize:The
EstimationAcquirerrelies on scheduler extension points (name,jobKind,stateId) that don't exist yet onAutomationAcquirer. Adding them now:Now update
AutomationStateStore.registerto accept a namespaced state id:Now run a typecheck on the code package to catch integration errors:
Now write the tests. First the config parser tests:
Now the acquirer tests:
Now rewrite the acquirer test to match the final API:
Now extend
workspace-config.test.tswith estimations coverage:Now run the new and related tests:
The test overrides need to be top-level on
EstimationAcquirerOptions. Flattening the API:Now workspaces.md and dashboard.md:
Now rewrite the
story-points-estimation.md"Automated Estimation" section — lead with[[estimations]], drop systemd/cron:Let me mirror the implement-pipeline outcome tracking (
finishTaskRun) for scheduled estimate runs so usage outcomes analytics cover them too:DEV-95 is implemented on
feature/dev-95-attempt-6. All checks pass: 980 tests (0 fail), typecheck clean, lint clean, formatted.What was built
Config —
[[estimations]]in workspace.tomlestimation-config.ts: same schedule grammar as automations (id,enabled, exactly one ofcron/interval) plus requiredquery; rejectsprompt,repo, andkindworkspace/config.ts: parses the table intoWorkspaceConfig.estimations, rejects[defaults].estimate_query, rejects[[automations]] kind=..., and fails startup for trackers without estimate support (Trello/markdown) with a clear error[defaults].task_queryis never estimated;worker inituntouchedRuntime —
estimation-acquirer.tsEstimationAcquirerextendsAutomationAcquirer(durablenextDueAt, lease, heartbeat, overlap coalescing — gained genericname/jobKind/stateIdoptions; state lives underestimation:<id>keys in queue.db)devintern --estimate --query "<q>" --no-gitfrom the workspace home with env originestimate+ schedule id. Reuses the existing skip gates (<24h, unchanged-since-estimate), update-in-place comments, points field write, and usage-limit → exit 0Serialization —
run-coordinator.ts: when enabled estimations exist, all agent runs in the worker process (implement tasks, automations, reviews, mentions, conflict resolution, estimation sweeps) take turns through a FIFO process-level gate, since usage limits are account-globalDashboard/analytics: new distinct
estimaterun origin throughrun-recorder, dashboard API filter, and dashboard-ui labels/filters/stats; scheduled sweeps also emit the worker outcome event with triggerestimateDocs:
story-points-estimation.mdnow leads with[[estimations]]and deletes the systemd/cron recipes (--estimatedocumented as one-shot); new "Scheduled story-point estimation" section inworker.md; updates inworkspaces.mdanddashboard.mdTests added/extended: estimation-config, estimation-acquirer, run-coordinator, run-recorder (estimate origin), dashboard-api (origin filter), workspace-config ([[estimations]] + rejections + tracker errors), automation-config (kind rejection), workspace-worker (coordinator serialization; unchanged legacy behavior without it).
This PR was automatically created by @devintern/code