Skip to content

fix(sdk): warn when repository HEAD drifts - #360

Open
Mr-Neutr0n wants to merge 1 commit into
openai:mainfrom
Mr-Neutr0n:fix/warn-head-drift
Open

fix(sdk): warn when repository HEAD drifts#360
Mr-Neutr0n wants to merge 1 commit into
openai:mainfrom
Mr-Neutr0n:fix/warn-head-drift

Conversation

@Mr-Neutr0n

Copy link
Copy Markdown

Summary

  • warn once while a scan is running when the registered Git HEAD changes
  • cover clean repository, worktree, and working-tree diff scans without changing immutable ref behavior
  • keep final target validation authoritative and include target_changed warning details

Fixes #164.

Verification

  • focused monitor and SDK orchestration tests pass
  • pnpm run types passes
  • Prettier, diff, secret, burst, title, and repository-preflight checks pass
  • the broader API suite has five existing environment failures on this host because /usr/bin/python3 is Python 3.9 and the host Node is v25, outside the repository test matrix

Signed-off-by: Mr-Neutr0n <harikp2002@gmail.com>
@github-actions github-actions Bot added the bug Something isn't working label Aug 12, 2026

@ting-hong-shieh ting-hong-shieh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at eae65c543150f3dfe1040de1a6a7fcad07801fda. The monitor is limited to mutable Git targets, warns once, treats transient HEAD-read failures as non-fatal, and leaves completion-time target validation authoritative.

Validation snapshot:

  • Exact head: target-drift.test.ts 2/2; focused orchestration test 1/1; pnpm lint; pnpm format.
  • Synthetic merge onto current main (2f785900d2cefb932cf97fb1d675491d14790839): clean merge; the same three focused tests, typecheck, formatting, and git diff --check pass.
  • The broader API run is not part of this approval evidence: its five failures are host-environment failures under macOS /usr/bin/python3 3.9, while the focused exact-head and current-main checks above are clean.

No issues found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detect and warn from HEAD drifting earlier

2 participants