Prioritize filtered repos during manual sync#405
Conversation
Manual refreshes used the configured repository order even when the user had narrowed the dashboard to a small set of repos. That made the visible repos wait behind unrelated sync work, especially on larger configurations with bounded parallelism.\n\nThe refresh endpoint now accepts the current repo filter as an ordered priority list and the syncer only reorders the local run snapshot, leaving the tracked repo set unchanged. Filter values that do not resolve to tracked repos are ignored so stale UI state cannot break a sync.\n\nValidation: go test ./internal/github/syncertest -run TestSyncerTriggerRunWithPrioritySyncsSelectedReposFirst -shuffle=on; go test ./internal/server/e2etest -run TestTriggerSyncE2EPrioritizesFilteredRepos -shuffle=on; go test ./internal/server -run 'TestOpenAPIDocumentsCustomStatusCodes|TestAPITriggerSyncBypassesNextSyncAfter' -shuffle=on; bun --cwd frontend vitest run ../packages/ui/src/stores/sync.svelte.test.ts; bun run typecheck (frontend) Generated with Codex Co-authored-by: Codex <codex@openai.com>
roborev: Combined Review (
|
The roborev design pass flagged that priority_repo's accepted wire format was implicit. Documenting the accepted repeated/comma-separated values and host-qualified versus bare repo path matching in the API source keeps the OpenAPI-generated clients and schema self-describing.\n\nValidation: go test ./internal/server -run TestOpenAPIDocumentsCustomStatusCodes -shuffle=on; go test ./internal/server/e2etest -run TestTriggerSyncE2EPrioritizesFilteredRepos -shuffle=on Generated with Codex Co-authored-by: Codex <codex@openai.com>
roborev: Combined Review (
|
Roborev caught that documenting bare repo paths exposed an existing ambiguity: a nested repo path such as group/subgroup/project was interpreted as host/repo_path and could never match a tracked GitLab repo. Try the tracked repo_path match before host-qualified parsing, and only treat a value as host-qualified when the leading segment looks like a platform host.\n\nValidation: go test ./internal/server -run TestMatchPriorityRepoSupportsNestedBareRepoPaths -shuffle=on; go test ./internal/server/e2etest -run TestTriggerSyncE2EPrioritizesFilteredRepos -shuffle=on Generated with Codex Co-authored-by: Codex <codex@openai.com>
roborev: Combined Review (
|
Manual sync priority filters can be host-qualified, but the previous matcher rejected single-label self-hosted hosts such as gitea before comparing against tracked repositories. Compare the host segment against tracked repo hosts so those filters prioritize the intended repository while preserving bare nested repo path matching.
roborev: Combined Review (
|
The manual sync priority matcher now supports host-qualified filters for non-default provider hosts. Add an HTTP and SQLite e2e case that configures a GitHub Enterprise-style host and verifies the selected repository is dispatched first through the refresh endpoint.
roborev: Combined Review (
|
The manual sync priority bug affected single-label self-hosted provider hosts. Adjust the new e2e coverage to use that host shape so the HTTP sync endpoint verifies the regression-prone filter format directly.
roborev: Combined Review (
|
Summary
Testing
go test ./internal/github/syncertest -run TestSyncerTriggerRunWithPrioritySyncsSelectedReposFirst -shuffle=ongo test ./internal/server/e2etest -run TestTriggerSyncE2EPrioritizesFilteredRepos -shuffle=ongo test ./internal/server -run 'TestOpenAPIDocumentsCustomStatusCodes|TestAPITriggerSyncBypassesNextSyncAfter' -shuffle=onbun --cwd frontend vitest run ../packages/ui/src/stores/sync.svelte.test.tsbun run typecheck(frontend)test-short