Repository navigation
autonomousRunner split, slice F (AGT-4867): runnerMaintenance.ts and its MaintenanceHost also take maybeRunLedgerRetrosp - #966
Merged
Conversation
…s out of autonomousRunner (AGT-4867 slice F)
- runnerMaintenance.ts and its MaintenanceHost also take
maybeRunLedgerRetrospective, completeParentIfChildrenMerged and
reconcileStalledInProgress.
- New src/automation/runnerProviderConfig.ts takes startPeriodicReviews,
runPeriodicReviewAcrossProjects, startOrchestrator, getAdapterSummary,
applyProviderConfig, providerSwitchViolation and switchProvider.
- The provider host is built lazily and is safe during construction:
- The constructor's applyProviderConfig reads only config.
- durableRuns and the scheduler are read later, through getters.
- Building the host reads nothing.
- Late-bound access as in the earlier slices: state through getters,
rateLimitUntil, periodicReviewJobs and orchestratorSupervisor through
setters, and every runner method through closures at call time. Moved
code calls other moved code through the host.
- Public getAdapterSummary, providerSwitchViolation and switchProvider keep
their signatures as delegators. Private same-name delegators remain for
every name a test or start() reaches.
- Pure move. No existing test changed. New tests:
- runnerProviderConfig.test.ts covers the host contract, construction
safety through a Proxy host, late binding, and that a rejected switch
leaves the role adapters and the override file unchanged.
- runnerMaintenance.sweeps.test.ts covers the moved sweeps.
- autonomousRunner.ts goes from 2278 to 1975 lines and from 1689 to 1443
code LOC (counted with scripts/loc-check.mjs countCodeLines). Its
.loc-allowlist entry is removed, because a stale entry would fail
loc-check (AGT-4513's close condition).
Assumption: the frozen runnerMaintenance.test.ts fakeHost does not type-check
against the widened MaintenanceHost. Test files are not type-checked by
tsconfig.check.json, the pre-commit tsc or vitest, so it is left unedited, as
the no-existing-test-changes rule requires.
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.
Milestone of an auto-claude run.
Check:
(test -d node_modules || npm ci --prefer-offline --no-audit --no-fund) && npm run lint && npm run typecheck && test -f src/automation/runnerProviderConfig.ts && test -f src/automation/runnerProviderConfig.test.ts && test "$(wc -l < src/automation/autonomousRunner.ts)" -le "$(( $(git show origin/main:src/automation/autonomousRunner.ts | wc -l) - 200 ))" && node scripts/loc-check.mjs && test -z "$(git diff --name-only --diff-filter=MD origin/main...HEAD -- 'src/*.test.ts' 'src/**/*.test.ts' 'tests/*' | grep -v -e runnerProviderConfig -e runnerMaintenance)" && npx vitest run src/automation/autonomousRunner src/automation/runner src/support/web.provider src/core/service tests/locCheckPlan: .claude/auto-plan.md (local to the run).