Skip to content

Fix HEAD-scoped index freshness - #2935

Merged
Widthdom merged 1 commit into
mainfrom
fix-issue2809
Jun 2, 2026
Merged

Fix HEAD-scoped index freshness#2935
Widthdom merged 1 commit into
mainfrom
fix-issue2809

Conversation

@Widthdom

@Widthdom Widthdom commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Resolve commit-ish refs such as HEAD when stamping commit-scoped freshness for --commits.
  • Treat --changed-between <old-ref> HEAD as covering the current HEAD for status --check without advancing the full-scan-only indexed_head_commit.
  • Pre-validate invalid --commits refs before DB/exclude setup, and update help text, agent guidance, tests, and the changelog fragment.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~IndexCommandRunnerTests.Run_CommitsInvalidCommitRef_JsonRejectsBeforeDbSetup|FullyQualifiedName~IndexCommandRunnerTests.RunStatusCheck_AfterChangedBetweenRefreshAtHead_DotCommandRestampsFullScanHead|FullyQualifiedName~IndexCommandRunnerTests.RunStatusCheck_AfterCommitScopedRefreshAtHead_DoesNotReportHeadChanged|FullyQualifiedName~IndexCommandRunnerTests.Run_UpdateMode_DoesNotOverwriteIndexedHeadCommit|FullyQualifiedName~IndexCommandRunnerTests.RunStatusCheck_AfterFilesRefreshAtHead_StillReportsHeadChanged|FullyQualifiedName~IndexCommandRunnerTests.ParseArgs_CommitsAcceptsCommitishRefsForGitValidation|FullyQualifiedName~IndexCommandRunnerTests.Run_RebuildWithCommits_JsonIncludesHint|FullyQualifiedName~ConsoleUiTests|FullyQualifiedName~ProgramCliTests.HelpAll_ContainsFullCommandReference"
  • dotnet build
  • dotnet format CodeIndex.sln --verify-no-changes
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check --json
  • Codex adversarial review follow-up: No blocking/actionable issues found.

Follow-up candidates

None.

Fixes #2809

@Widthdom
Widthdom marked this pull request as ready for review June 2, 2026 14:05
@Widthdom
Widthdom merged commit ea621fd into main Jun 2, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue2809 branch June 2, 2026 14:05
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.

cdidx dot-command does not refresh full-scan HEAD stamp

1 participant