Repository navigation
feat(reconcile): start the reconciler in the service - #96
Open
tbhb-dev-agent-pull-requests[bot] wants to merge 1 commit into
Open
tbhb-dev-agent-pull-requests[bot] wants to merge 1 commit into
tbhb-dev-agent-pull-requests[bot] wants to merge 1 commit into
Conversation
Generated-by: LLM effort=high;harness=codex:0.171.0;model=openai:gpt-6.2-sol;session=sha-256-64:1793db4db68f803a;surface=exec
This branch has not been deployed
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 service can drain webhook deliveries, but the incremental reconciler must also run to repair pull request metrics after a missed delivery.
Behavior change
The reconciler runs beside the queue worker when the collector endpoint, both GitHub IDs, and the key file are set. Missing credentials disable reconciliation when all three are absent. A partial set fails startup and names the missing variables. If the loop returns an error, the service cancels its context and includes that error in the shutdown result. The worker and the loop finish before the store closes.
Decisions
The loop and worker share the recorder and store. The App key is read once during startup. The GitHub client uses one request budget and one tag cache for the life of the service.
Deviations from the task
Compose supplies the mounted key path only when
GITHUB_APP_IDis set. That keeps the default deployment in the disabled path under the partial configuration rule. The complete configuration test covers parsing.Needs human judgment
Obtain two reviews for this Tier 2 change. Review the App key handling, token source construction, and the deployment environment before enabling reconciliation.
Risk
An enabled installation starts making GitHub API requests at service startup. A partial credential rollout can cause startup failures, so set both IDs together.
Verification
Gazelle, formatting, and
bazelisk test //:golangci_lint_testpassed.bazelisk test //...reported 33 passing tests and one platform-specific skip. The command test starts the service without GitHub credentials and checks the disabled log. The deployment test passed on macOS.The committed change measured
pr_size: code=272/400 raw=361/1500.Human steering
The driver will push the build branch and open the pull request after a successful run.