fix(config): route repository-settings reads through the resolver, not the raw DB accessor - #2920
Merged
Merged
Conversation
…t the raw DB accessor backfillRegisteredRepositories, enqueueRepositoryOpenDataBackfill, buildInstallationRepairDiagnostics, refreshInstallationHealthRecords, and the MCP getAutomationState tool all read settings via the raw getRepositorySettings DB accessor instead of resolveRepositorySettings, so a .gittensory.yml override for backfillEnabled/checkRunMode/gateCheckMode/reviewCheckMode/autonomy/ agentPaused/agentDryRun was silently ignored at these call sites even though the real gate/action pipeline already honors it. loadPublicRepoBadge, buildRegistrationReadinessResponse, buildGittensorConfigRecommendationResponse, and loadContributorIssueDraftContext keep the raw DB read intentionally (a high-frequency public route, and advisory tools that need the raw settings/manifest layers unmerged for comparison) — each now has a comment explaining why.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2920 +/- ##
=======================================
Coverage 96.05% 96.05%
=======================================
Files 258 258
Lines 28423 28423
Branches 10341 10341
=======================================
Hits 27301 27301
Misses 489 489
Partials 633 633
🚀 New features to boost your workflow:
|
Contributor
|
Important 🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪🟪 🔍 Gittensory is reviewing…AI analysis is in progress. This comment will update when the review is complete. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed · 🟪 Reviewing |
This was referenced Jul 9, 2026
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.
Summary
backfillRegisteredRepositories,enqueueRepositoryOpenDataBackfill,buildInstallationRepairDiagnostics,refreshInstallationHealthRecords, and the MCPgetAutomationStatetool all read repository settings via the rawgetRepositorySettingsDB accessor instead ofresolveRepositorySettings. A.gittensory.ymloverride forbackfillEnabled/checkRunMode/gateCheckMode/reviewCheckMode/autonomy/agentPaused/agentDryRunwas silently ignored at these five call sites, even though the actual gate/action-execution pipeline (agent-approval-queue.tsand friends) already resolves these correctly.resolveRepositorySettings.loadPublicRepoBadge,buildRegistrationReadinessResponse+buildGittensorConfigRecommendationResponse,loadContributorIssueDraftContext) were investigated and found to be intentional, not bugs — each now has a comment explaining why:loadPublicRepoBadgeis an unauthenticated, high-frequency public route (a README-embedded badge image); it deliberately trades honoring a yml-only override for avoiding a manifest-cache lookup on every image load..gittensory.ymlmanifest separately, because their entire purpose is to show the two config layers side-by-side for comparison/recommendation — merging them would defeat that purpose.Resolves #2912. First of a series of follow-ups tracked under #1667 from a 2026-07-04 self-host review-engine audit.
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run typecheckvitest runon all affected test files (test/unit/backfill.test.ts,test/unit/mcp-automation-state.test.ts,test/unit/contributor-issue-draft.test.ts,test/unit/self-dogfood-registration-pack.test.ts,test/integration/api.test.ts) — 306 tests passednpm run test:changed(Vitest's real-import-graph diff selection againstmain) — 203 files / 5005 tests passed, 0 failednpm run actionlint/npm run test:workers/npm run build:mcp/npm run test:mcp-pack/npm audit/ui:*— not run locally; no workflow, worker-pool, MCP-package, or UI files touched. CI runs the full gate..gittensory.yml-only override taking effect (3 new regression tests) alongside the pre-existing DB-only-override tests, which still pass unchanged.If any required check was skipped, explain why:
test:coverage/test:cinot run locally — this diff only swaps one function call per site (no new branches beyond the three regression tests, which are covered by the targeted run above) plus doc-only comments at the four intentional-exception sites. Per this repo's established practice, CI's full gate covers the rest.Safety
getAutomationStatetool's output can now change based on yml, and is covered by a new regression test. No schema shape changed.)Notes
test/unit/mcp-automation-state.test.tshad noafterEach(() => vi.unstubAllGlobals()), so my new regression test'svi.stubGlobal("fetch", ...)leaked into two unrelated later tests in the same file. Added the missing cleanup hook (a no-op for every existing test, since none of them stub globals).