Skip to content

fix(results): keep dashboard status read-only for repo paths#1542

Merged
christso merged 1 commit into
mainfrom
debug-dashboard-remote-corruption
Jun 27, 2026
Merged

fix(results): keep dashboard status read-only for repo paths#1542
christso merged 1 commit into
mainfrom
debug-dashboard-remote-corruption

Conversation

@christso

Copy link
Copy Markdown
Collaborator

Summary

  • Prevent getResultsRepoSyncStatus() from fetching configured storage branches for repo_path/same-checkout results configs.
  • Add a regression proving status inspection leaves both the existing origin URL and missing refs/remotes/origin/agentv/results/v1 untouched.

Root cause / investigation

  • Current Dashboard startup, /api/config, /api/remote/status, and /api/projects/:id/remote/status did not rewrite a disposable repo origin to https://github.com/..git.
  • The historical https://github.com/..git corruption path was PR fix(results): push same-repo results to project origin, not a synthesized URL #1502-era results sync code: resolveResultsRepoUrl('.') synthesized the placeholder URL and ensureResultsRepoRemote() ran git remote set-url. That path is already removed on current main.
  • A remaining Dashboard read path was still not read-only: remote status for results.repo.path: . fetched the storage branch into the source checkout on page-load status polling. This did not rewrite origin, but it did mutate source checkout Git refs from a read-only Dashboard status request.

Red / green evidence

  • Red regression before fix: bun test ./packages/core/test/evaluation/results-repo.test.ts --test-name-pattern "does not fetch a repo_path storage branch during status inspection" failed because refs/remotes/origin/agentv/results/v1 became present.
  • Green after fix: the same regression passes.
  • Disposable Dashboard UAT after rebuild:
    • Before startup: origin URL correct, remote results ref absent.
    • After startup and GET /api/remote/status: origin URL unchanged, remote results ref still absent, run_count 0.
    • After explicit POST /api/remote/sync: origin URL unchanged, remote results ref present, run_count 1.

Verification

  • bun test ./packages/core/test/evaluation/results-repo.test.ts --test-name-pattern "does not fetch a repo_path storage branch during status inspection"
  • bun test ./packages/core/test/evaluation/results-repo.test.ts
  • bun test ./apps/cli/test/commands/results/serve.test.ts --test-name-pattern "remote/status|remote/sync|project-scoped remote status"
  • bun --filter @agentv/core typecheck
  • bun --filter @agentv/core lint
  • bun run build
  • Verified git remote -v in both worker and primary checkout remained https://github.com/EntityProcess/agentv.git for fetch/push.

Bead: av-0p9

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 27, 2026

Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: f44c39a
Status: ✅  Deploy successful!
Preview URL: https://ba73a106.agentv.pages.dev
Branch Preview URL: https://debug-dashboard-remote-corru.agentv.pages.dev

View logs

@christso christso force-pushed the debug-dashboard-remote-corruption branch from 214a8ed to f44c39a Compare June 27, 2026 09:56
@christso christso marked this pull request as ready for review June 27, 2026 10:00
@christso christso merged commit 5e3c8f4 into main Jun 27, 2026
8 checks passed
@christso christso deleted the debug-dashboard-remote-corruption branch June 27, 2026 10:00
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