Skip to content

[codex] avoid false drift reports in setup check with OMX coexistence#101

Draft
majiayu000 wants to merge 1 commit intomainfrom
codex/fix-setup-check-coexistence
Draft

[codex] avoid false drift reports in setup check with OMX coexistence#101
majiayu000 wants to merge 1 commit intomainfrom
codex/fix-setup-check-coexistence

Conversation

@majiayu000
Copy link
Copy Markdown
Owner

Summary

This PR fixes a noisy setup.sh --check false positive when VibeGuard coexists with OMX/Codex-managed config files.

Specifically it:

  • stops install-state drift detection from treating shared mutable config files as immutable checksum targets
  • clarifies the Claude-side warning text so missing Claude hooks are reported as Claude config problems, not generic hook drift
  • adds a regression test that simulates benign coexistence edits after installation

Root Cause

VibeGuard was recording whole-file checksums for:

  • ~/.claude/settings.json
  • ~/.codex/hooks.json
  • ~/.codex/config.toml

Those files are merge/upsert targets that other toolchains continue to edit after setup. As long as the required VibeGuard entries were still present, the whole-file checksum check was too strict and turned normal coexistence into spurious drift.

Impact

  • setup.sh --check no longer reports checksum mismatch for benign OMX/Codex coexistence edits
  • real semantic checks still validate that the required VibeGuard entries exist
  • Claude warning output is more explicit when only Claude hooks are missing

Validation

  • bash tests/test_setup.sh

Notes

This PR intentionally keeps the change narrow:

  • it does not weaken symlink drift detection
  • it does not remove semantic validation for managed hook/config content
  • it does not change unrelated install behavior

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Hook Latency (P95)

Details
Benchmark suite Current: a3999a7 Previous: 075c3ed Ratio
pre-edit-guard (P95) 144 ms 188 ms 0.77
pre-write-guard (P95) 166 ms 213 ms 0.78
pre-bash-guard (P95) 205 ms 255 ms 0.80
post-edit-guard (100) (P95) 240 ms 298 ms 0.81
post-write-guard (100) (P95) 160 ms 208 ms 0.77
post-edit-guard (5000) (P95) 251 ms 314 ms 0.80
post-write-guard (5000) (P95) 163 ms 209 ms 0.78
stop-guard (5000) (P95) 94 ms 132 ms 0.71
learn-evaluator (5000) (P95) 94 ms 132 ms 0.71

This comment was automatically generated by workflow using github-action-benchmark.

…nfig

VibeGuard was treating shared mutable config files as immutable install
artifacts, so setup.sh --check reported checksum drift even when the
required hooks and flags were still present. This changes install-state
drift detection to skip whole-file checksum enforcement for the
semantically validated merge targets, tightens the Claude-side warning
text so missing Claude hooks are called out explicitly, and adds a setup
regression covering benign coexistence edits after installation.

Constraint: ~/.claude/settings.json, ~/.codex/hooks.json, and ~/.codex/config.toml are shared merge targets that other toolchains continue to edit after setup
Rejected: Keep whole-file checksum drift on shared config files | produces false positives under normal OMX/Codex coexistence
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Preserve semantic validation for shared config files; do not reintroduce whole-file checksum drift checks unless config ownership becomes exclusive
Tested: bash tests/test_setup.sh
Not-tested: GitHub Actions run on this branch; non-OMX external toolchains beyond the setup regression fixture
@majiayu000 majiayu000 force-pushed the codex/fix-setup-check-coexistence branch from 330995d to a3999a7 Compare April 21, 2026 21:19
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