Skip to content

feat(reconcile): start the reconciler in the service - #96

Open
tbhb-dev-agent-pull-requests[bot] wants to merge 1 commit into
mainfrom
agent/gm-rec-g2-codex
Open

tbhb-dev-agent-pull-requests[bot] wants to merge 1 commit into
mainfrom
agent/gm-rec-g2-codex

Conversation

@tbhb-dev-agent-pull-requests

Copy link
Copy Markdown

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_ID is 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_test passed. 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.

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant