Closed
[Feedback/bug][setup] Admin Maintenance renders selected target but posts an empty repo_id after Caches navigation #150
urandonAdd on  Sep 18Closed at  28 days ago
urandon
urandonCollaborators
Sep 18 Create

Feedback summary

Admin Maintenance renders selected target but posts an empty repo_id after Caches navigation

Classification

  • Category: bug
  • Surface: setup
  • Reporter: agent

Observed behavior

After opening a repository under Caches and navigating to Maintenance, the Managed target selector displays that repository, but Render plan posts an empty repo_id and fails with repo_id is required.

Expected behavior

The visible managed target and the submitted maintenance intent must share the same cache_ref and repo_id on every navigation path.

Impact

Operators cannot enable or update daemon-managed RAG from the documented Admin flow; the UI falsely attributes the failure to a missing selection.

Reproduction

  1. Open a bound repository from Caches.
  2. Navigate to Maintenance without changing Managed target.
  3. Click Render plan.

Workaround or fallback

None reported.

Sanitized runtime evidence

  • gitcode-mcp version: 0.3.4
  • commit: 64485cdad2b52830d8c6590053e695aec8377cad
  • provider mode: live
  • cache schema: 21/21 (compatible: true)
  • sink binding: configured
  • OS family: darwin
  • observed at: 2026-09-17T16:47:56Z
  • Reproduced for a public repository binding on gitcode-mcp main commit 0904973b18ec40768760c44eb9423317803c608e.
  • openRepository updates maintenanceTargetKey but does not load maintenanceIntent; ensureControlSelections skips reload because the key is already valid.
  • Changing Managed target away and back repopulates the intent and is a temporary workaround.

None provided.

Acceptance signal

The reported workflow completes without the observed friction or fallback.


Generated from structured, sanitized feedback. Do not edit this issue description after intake; add later evidence and design decisions as comments.

likedislike
urandonurandonCollaborators
Sep 18 Added label: dogfoodfeedback
urandonurandonCollaborators
28 days ago Associated milestone: Bugfix and feedback wave v0.3.5
urandon
urandonCollaborators
28 days ago Comments:

Taking #150 next in the bugfix-only v0.3.5 wave, from green main 57b2359175b18c0ca08527046c05adf072b06682.

Fresh issue intake and public comment readback are reviewed (no later correction comment exists). Current code confirms the reported split: repository navigation and snapshot/deep-link restoration set maintenanceTargetKey, while maintenanceIntent is only populated by loadMaintenanceTarget; ensureControlSelections ignores an already valid key even when the intent belongs to another or no repository.

Scope: make selected maintenance identity and submitted intent agree across repository navigation, URL/deep-link restoration, refresh, registration redirects and explicit target selection. Preserve unsaved policy edits on same-target refresh; invalidate prior plan/receipt on a real target change. Do not silently retarget a missing repository or add browser authority.

Acceptance/verification: deterministic semantic Playwright regression for the reported Caches → Maintenance flow without touching the selector; multi-repository and same-repository/different-cache identity cases; deep-link/reload/history and unchanged-target refresh/edit preservation where applicable. Assert request JSON and DOM selection, not pixels. Add the regression first and observe it fail on this base. Then run frontend check/unit/semantic suite, embedded-asset rebuild/validation, artifact guard, full uncached Go, applicable Admin race/vet, docs and whitespace gates; independent exact-SHA review and head/main CI before closure.

UX cohort: repair to the existing Admin selection/control cohort only. CLI/MCP/shared service contracts are unchanged. Risk is stale UI policy/plan crossing a target or overwriting unsaved edits; tests must cover both. No external write, provider setup or working-cache change is required for the repro.

likedislike
urandon
urandonCollaborators
28 days ago Comments:

Implementation and local verification — exact candidate 4b385840f739f56966fba905bd447f39acf5a7ff, base 57b2359175b18c0ca08527046c05adf072b06682.

Fail-first semantic browser regression reproduced both defects on the base: Caches deep-link → Maintenance posted empty cache_ref/repo_id; repository-list navigation showed the new repository but posted the previous repository/profile. The fix synchronizes target identity and intent at navigation/restoration boundaries, keeps cache/repository plus canonical registration URL state (including unenrolled targets), preserves same-target policy drafts on refresh, invalidates prior plans/receipts on target change, and fences late planning responses by intent generation. Shared backend/CLI/MCP behavior and authority are unchanged.

Passed: 11 new navigation/planning regressions; full CI=1 npm run test:e2e -- --retries=0 (50 passed, 1 skipped); browser artifact guard (semantic-only); npm run check (0 errors/warnings), npm test (9 passed); UI build and repeat scripts/check-admin-ui-assets.sh (no second generated diff), licenses; go test -count=1 ./...; go vet ./...; docs/whitespace gates. Live visual smoke was skipped because no explicit local QA launch URL/output directory was supplied; no screenshot, trace or video evidence is claimed.

Race evidence, retaining first failure: overlapping full Go and Admin race gate processes produced two service fixture writer-lock contention failures (four other race packages passed). Isolated go test -race -count=1 ./internal/service passed, then the entire exact command go test -race -count=1 ./internal/adminhttp ./internal/servicectl ./internal/cache ./internal/rag ./internal/service passed without an overlapping regular-Go process. No race/test flags were weakened. This independent fixture/process isolation defect is tracked as #166, added to epic #165 after the pre-existing queue, not hidden or bundled into this UI repair.

Dependencies unchanged; npm reported pre-existing audit summaries during npm ci, which are not claimed as remediated by this patch. Independent exact-SHA review and remote CI are pending before merge.

likedislike
urandonurandonCollaborators
28 days ago Associated pull request
urandon
urandonCollaborators
28 days ago Comments:

Independent review of exact SHA 4b385840f739f56966fba905bd447f39acf5a7ff found two P2 defects, both independently reproduced with mocked Chromium routes:

  1. Browser Back/Forward can change the selected registration while a Disable/Reconcile confirmation remains open. The subsequent action resolves the new registration under the old confirmation key. Target changes must cancel or freeze reviewed confirmations.
  2. An explicit missing repository target falls back to a different repository. Preserve the explicit identity and block submission; default selection is allowed only when no identity was selected.

Both will be fixed with deterministic semantic regressions and reviewed again on the new exact SHA. Merge remains blocked.

Required CI run 37967166672 on that SHA failed in TestBulkSyncIssuesBoundedCancelMidway_CancelAfterPage3Progress: frontier readback reported no such table: sync_frontiers. The Admin suite passed (50 passed, 1 opt-in test skipped). This unrelated Go failure is being investigated as a blocking integration defect, not treated as green.

likedislike
urandon
urandonCollaborators
28 days ago Comments:

Review corrections are implemented locally:

  • Target changes close mutable target-bound confirmations and discard their key; late control receipts/errors are generation-fenced. Immutable conflict-resolution replay remains unchanged.
  • Explicit missing cache/repository/registration identities no longer fall back. The selector shows unavailable state, Render plan is blocked, and recovery requires an explicit valid choice.

All six new initial regressions failed against 4b38584. After the fix, those six plus the existing ambiguous conflict replay test passed. Full local gates are running.

The unrelated red Go CI is now tracked as #167, same bugfix milestone, a blocking dependency of this PR. #150 will remain open and unmerged until that integration defect is fixed and the updated exact SHA is independently reviewed and green.

likedislike
urandon
urandonCollaborators
28 days ago Comments:

Pushed review-corrected candidate: b306b1a313b7bd406597ec1457bf3fc4de383dd4, base 57b2359175b18c0ca08527046c05adf072b06682. !147 now points to this SHA; worktree is clean.

Local gates on the candidate tree passed:

  • go test -count=1 ./... (run again after rebuilding embedded assets), go vet ./....
  • go test -race -count=1 ./internal/adminhttp ./internal/servicectl ./internal/cache ./internal/rag ./internal/service, without overlapping normal Go test processes.
  • scripts/build-admin-ui.sh: Svelte 0 errors/0 warnings, 9 unit tests passed, build passed.
  • scripts/check-admin-ui-assets.sh: deterministic rebuild and dependency licenses passed; lockfile unchanged.
  • CI=1 npm run test:e2e -- --retries=0: 58 passed, 1 opt-in live-launch test skipped (launch prerequisite not supplied).
  • Browser artifact guard, product-doc contracts and diff whitespace passed.

The six fail-first review regressions now pass, with two additional late-control response tests. New independent exact-SHA review requested. CI on the earlier SHA remains red; #167 is an explicit blocking dependency, not waived by these local passes.

likedislike
urandon
urandonCollaborators
28 days ago Comments:

Independent re-review of exact SHA b306b1a313b7bd406597ec1457bf3fc4de383dd4 found one residual P2: replacing a registration with another ID for the same cache/repository leaves a pending confirmation open. The UI marks the explicit old registration unavailable, but the dynamic action can still target the replacement under the old key.

Previous two findings are otherwise fixed. Follow-up correction will include registration identity in the confirmation fence, cancel/invalidate on unavailable or replaced registration, guard registration controls and execution, and add mocked SSE replacement regressions. No merge; #167 remains the separate CI blocker.

likedislike
urandon
urandonCollaborators
28 days ago Comments:

Clean pushed correction/handoff SHA: 728eac28a558e91bc158a433e6284cc12322907f on codex/issue-150-maintenance-target, !147, base 57b2359175b18c0ca08527046c05adf072b06682.

The residual finding is fixed with registration-ID capture and validation at confirmation, refresh and execution. Both new SSE replacement regressions failed first and now pass, including a URL without an explicit registration. Unavailable targets disable registration controls. Immutable conflict replay is preserved.

Repeated applicable gates passed: full uncached Go + vet, the five race packages, build/check-assets/license, Svelte check (0/0), 9 unit tests, full semantic browser suite (60 passed / 1 opt-in live-launch skipped), semantic artifact guard, docs/diff. Independent review of this exact SHA requested. Prior b306b1a CI passed but does not satisfy review or CI for this new head.

#150 remains OPEN and UNMERGED while the separate blocking #167 is fixed. This is a clean pushed dependency handoff, not completion; after #167 main is green, update this branch against main and repeat exact-SHA review/CI before merge.

likedislike
urandon
urandonCollaborators
28 days ago Comments:

Independent re-review is clear for exact SHA 728eac28a558e91bc158a433e6284cc12322907f: no P0–P2 findings. Reviewer inspected an immutable exported commit after the working checkout moved to #167; 29 maintenance/conflict semantic browser tests passed, docs/diff passed, canonical !147 head/base/comments verified. Direct comparison against all 18 committed Git-blob embedded asset hashes also passed.

This does not unblock merge yet: #167 remains a required dependency. After its green main integration, #150 will be updated and reviewed/CI-verified on the resulting exact SHA.

likedislike
urandon
urandonCollaborators
28 days ago Comments:

Luna watcher confirmed required CI 37969598615 passed for exact SHA 728eac28a558e91bc158a433e6284cc12322907f (CI workflow, push, issue branch). Together with the clear independent review, the UI patch has passed its candidate gates. Merge still intentionally waits on #167; update and re-review/recheck the integrated head afterwards.

likedislike
urandonurandonCollaborators
28 days ago Associated pull request
urandon
urandonCollaborators
28 days ago Comments:

Blocking #167 is merged in main 13a7b5d80f489bc2ffcf8e607c8f7cf4ad3aa7b5; its main CI is still pending. Updated #150 by normally merging that main into the issue branch (no rewritten history / no further UI edits).

New clean pushed head: 8a51599c726b0a6b2dcdd0707ff9e5409cb985b5, base 13a7b5d80f489bc2ffcf8e607c8f7cf4ad3aa7b5. Diff against base contains only the same #150 UI/docs/assets/regressions already independently reviewed. Final integrated review and repeated local gates are running.

Luna is observing #167 main CI 37971087008 and #150 head CI 37971087054. Both must finish green before !147 can merge; previous SHA evidence is not substituted.

likedislike
urandon
urandonCollaborators
28 days ago Comments:

Integrated candidate 8a51599c726b0a6b2dcdd0707ff9e5409cb985b5 has independent review clear (no P0–P2 findings) and exact-head CI green: https://github.com/urandon/gitcode-mcp/actions/runs/37971087054. Local Admin asset validation, Svelte checks, 9 unit tests, semantic browser suite (60 passed; 1 opt-in live test skipped), and semantic artifact guard passed. However, the full uncached local go test ./... failed in TestMigrateCacheEndToEndReplacesOldDaemonAfterSchemaUpgrade, with cache_schema_service_restart_failed / migration_complete_service_restart_failed. Five isolated repetitions subsequently passed, which does not erase the original failure. Merge remains held while the cause and regression tracking are investigated. No installed service or user cache was modified by the test.

likedislike
urandonurandonCollaborators
28 days ago Associated pull request
urandon
urandonCollaborators
28 days ago Comments:

Dependency update: #167 is merged and closed with green main CI. #168 / !149 fixes the independently proven non-atomic runtime-state publication; review and exact-head CI are clear. Its CLI race gate exposed fixture startup-persistence issue #169 / !150, now fixed in a separate test-only candidate with all local gates and independent review clear. Delivery order is #169 → #168 → integrate/reverify #150 / !147. Existing #150 UI implementation remains unchanged from reviewed 728eac28…; the held integrated candidate is 8a51599c726b0a6b2dcdd0707ff9e5409cb985b5. Original issue input remains untouched.

likedislike
urandon
urandonCollaborators
28 days ago Comments:

Final integrated candidate is ebf211985c06127c9912abdab5c70515fe9be739, base/main 4e5881235ad404064bc93bb66c0f9d39dc0bcc73. Includes merged #167, #168 and #169 without force push. Independent exact-SHA review clear: no P0–P2 findings; UI/tests/assets/docs byte-identical to previously reviewed 728eac28…; prerequisite files unchanged from their reviewed commits, canonical !147 head/base match, no blocking discussions. Full uncached Go/vet/docs/whitespace passed. Admin asset/type/unit/browser and relevant race gates are being finalized; new exact-head and prerequisite main CI are being observed. No merge until every gate is clear.

likedislike
urandon
urandonCollaborators
28 days ago Comments:

All local gates passed on final candidate ebf211985c06127c9912abdab5c70515fe9be739: full uncached Go, vet, docs/whitespace; Admin asset/license validation, Svelte 0 errors/warnings, 9 unit tests; semantic browser suite 60 passed / 1 opt-in live visual-QA test skipped (requires explicit local launch URL/output and is disabled by CI semantic policy); semantic artifact guard passed, no screenshot/video/trace artifacts. Relevant race packages adminhttp/servicectl/cache/rag/service/cli passed, including migration and RAG fixture regressions. Independent review clear. CI pending: head https://github.com/urandon/gitcode-mcp/actions/runs/37974602130 and prerequisite main https://github.com/urandon/gitcode-mcp/actions/runs/37974601524. No required check is skipped or replaced by earlier SHA evidence. Working tree remains unchanged by verification.

likedislike
urandon
urandonCollaborators
28 days ago Comments:

Final candidate ebf211985c06127c9912abdab5c70515fe9be739 exact-head CI passed: https://github.com/urandon/gitcode-mcp/actions/runs/37974602130 (CI / .github/workflows/ci.yml, push, intended branch), independently confirmed by Luna watcher. Prerequisite main 4e5881235ad404064bc93bb66c0f9d39dc0bcc73 also passed: https://github.com/urandon/gitcode-mcp/actions/runs/37974601524. #167/#168/#169 are complete. All local/Admin/race gates and exact-SHA independent review clear, current discussions refresh has zero unresolved threads. Proceeding to SHA-guarded !147 merge; issue will close only after resulting-main CI.

likedislike
urandon
urandonCollaborators
28 days ago Comments:

!147 merged reviewed ebf211985c06127c9912abdab5c70515fe9be739 at resulting-main SHA e8250ee6de503201594da60407828ba1b5883895. Full local, Admin, race, independent review and exact-head CI gates were clear; merge guarded by full SHA. Final main CI observation is pending; the issue stays open until success. No release tag or installed binary change has been made.

likedislike
urandon
urandonCollaborators
28 days ago Comments:

Resulting-main CI run is now observed for exact e8250ee6de503201594da60407828ba1b5883895: https://github.com/urandon/gitcode-mcp/actions/runs/37975223083 (CI / .github/workflows/ci.yml, main, push). Pending terminal result. git diff --exit-code ebf211985c06127c9912abdab5c70515fe9be739 main passed: merged tree is identical to the reviewed candidate. Checkout is clean. No release/installation/cache migration was performed; these remain gated on the entire bugfix wave.

likedislike
urandon
urandonCollaborators
28 days ago Comments:

Final delivery / handoff

!147 merged reviewed exact head ebf211985c06127c9912abdab5c70515fe9be739 at main e8250ee6de503201594da60407828ba1b5883895. Independent reviewer: no P0–P2 findings; canonical PR head/base match and zero unresolved discussions. Exact-head CI https://github.com/urandon/gitcode-mcp/actions/runs/37974602130 and resulting-main CI https://github.com/urandon/gitcode-mcp/actions/runs/37975223083 both succeeded for their exact SHAs, independently confirmed by Luna watcher. Merged tree equals reviewed candidate; checkout clean.

Passed: full uncached Go, vet, docs/whitespace; Admin asset/license validation, Svelte checks, 9 unit tests, 60 semantic browser tests and semantic artifact guard; adminhttp/servicectl/cache/rag/service/cli race gates. One opt-in local live visual-QA test skipped by semantic CI policy, not reported as passed. No screenshot/video/trace artifacts. New semantic regressions cover navigation/deep links/history, identity round-trip, draft preservation, missing explicit targets, late responses, target-change confirmation cancellation and registration replacement fencing. Previously reported reviewer P2s resolved and rereviewed.

#167, #168 and #169 delivery blockers are separately merged/closed with green main CI. The selected maintenance target now agrees with submitted repo/cache identity and cannot silently retarget a confirmed action. Original issue input unchanged. No release tag, binary installation or user-cache migration performed. Acceptance complete; next original-queue task is #148.

likedislike
urandonurandonCollaborators
28 days ago Close issue