Report bootstrap alignment, and ignore a bare .bak suffix - #41
Merged
Conversation
The pattern `*.bak-*` matched a timestamped backup but not a plain `.bak`. On 2026-07-26 a Chrome profile backup made during maintenance landed in `03-INFRA/`: `Cookies.bak`, `Login Data.bak`, `Local State.bak`, `Secure Preferences.bak` — session cookies, the saved-password database, and its encryption keys. `git check-ignore` confirmed none of them were ignored. One `git add -A` away from a permanent public history and the credential rotation SECURITY.md mandates. It was caught before any commit, but nothing in the repo prevented it. Cover the bare suffix, and name the browser-profile files explicitly since this repo actively invites infrastructure runbooks under `03-INFRA/`. No tracked file matches these patterns, so nothing already in the index changes meaning. Verified by writing the four files and running `git check-ignore` before and after the change: not ignored -> ignored. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GhAWHT7uwbvrvJg2Swibpt
`agent-sync inventory` printed `present` for a per-CLI bootstrap whenever a file existed at that path. On a host without symlink privilege — Windows with developer mode off, the ordinary case — `make_link()` falls back to a real copy, and a copy three weeks stale is exactly as `present` as one written a second ago. Reported after Antigravity spent an afternoon on an `AGENTS.md` 42 lines behind the canonical one: the CLI reads as confused rather than out of date, which is the hard part to diagnose from the outside. The inventory now reports what is actually true per mechanism, because the three are not comparable: Claude reads a short pointer that is SUPPOSED to differ from the canonical file, Codex and Antigravity read the file itself (a link where the host allows one, a real copy otherwise), and OpenCode carries the canonical path inside its own config. A diverged copy says so and carries the recovery command; an identical copy says it is a copy that only re-aligns when agent-sync runs, rather than implying a live link. Alignment computed from an unreadable canonical file reports `unknown`, never a green state. The copy fallback itself also stops being silent: it is the only thing that works without the privilege, so it stays, but the sync log now says the file is a copy and that a canonical edit is invisible to that CLI until the next run. Previously nothing anywhere told the user their host was in copy mode. The misleading `relinked` log line, emitted even when make_link() changed nothing, is now conditional on it having changed something. Also: `INIT.md` listed `agent-healthcheck` among the commands not installed in MINIMAL, which implied it exists in FULL. It does not exist at all — the healthcheck is a step inside agent-sync — so `grep agent-healthcheck` sent readers looking for a script that was removed. 9 new tests, mutation-checked: 7 deliberate regressions, 7 red. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GhAWHT7uwbvrvJg2Swibpt
matteopasseri407
added a commit
that referenced
this pull request
Jul 29, 2026
They are user-facing product behaviour, not internal cleanup: an unignored credential backup, a health report that could not tell an aligned bootstrap from a three-week-stale one, and a documented command that does not exist. Claude-Session: https://claude.ai/code/session_01GhAWHT7uwbvrvJg2Swibpt Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Three defects reported from a Windows 11 host on v0.92.3.
.gitignoremissed a bare.bak.*.bak-*matchedfile.bak-<timestamp>but notfile.bak. A Chrome profile backup made during maintenance landed in03-INFRA/—Cookies.bak,Login Data.bak,Local State.bak,Secure Preferences.bak, i.e. session cookies, the saved-password database, and its encryption keys — andgit check-ignoreconfirmed none of them were ignored. Onegit add -Afrom a permanent history and the credential rotationSECURITY.mdmandates. Caught before any commit, but nothing in the repo prevented it. The bare suffix and the known-sensitive browser-profile names are now covered explicitly, since this repo actively invites infrastructure runbooks under03-INFRA/.The bootstrap inventory reported existence, not alignment.
agent-sync inventoryprintedpresentwhenever a file existed at a per-CLI bootstrap path. On a host without symlink privilege — Windows with developer mode off, the ordinary case —make_link()falls back to a real copy, and a copy three weeks stale is exactly aspresentas one written a second ago. The reporter lost an afternoon to Antigravity working from anAGENTS.md42 lines behind the canonical one: the CLI reads as confused rather than out of date, which is the hard part to diagnose from outside.The inventory now reports what is true per mechanism, because the three are not comparable — Claude reads a pointer that is supposed to differ from the canonical file, Codex and Antigravity read the file itself, OpenCode carries the path in its own config. A diverged copy says so and carries the recovery command; an identical copy says it is a copy that re-aligns only when agent-sync runs. Alignment computed from an unreadable canonical file reports
unknown, never a green state.The copy fallback also stops being silent. It stays — it is the only thing that works without the privilege — but the sync log now says the file is a copy and that a canonical edit is invisible to that CLI until the next run. Nothing anywhere told the user their host was in copy mode.
INIT.mdimplied a command that does not exist. It listedagent-healthcheckamong the commands not installed in MINIMAL, which implied it exists in FULL. It does not exist at all — the healthcheck is a step inside agent-sync — sogrep agent-healthchecksent readers after a removed script.Not changed, and why
The report also flagged that the doctor cannot see bootstrap drift. It can, on both platforms:
agent-doctor.shcompares resolved symlink targets andagent-doctor.ps1compares SHA-256 and fails on mismatch.agent-syncre-aligns a diverged copy on every run. The real gap was the inventory and the silence, which is what this changes.The report's suggestion to reconcile declared manifest targets against installed CLIs is left out deliberately: mapping a target to a command name is a guess (Antigravity ships as
agyon one host and may not elsewhere), and a wrong map produces false warnings on third-party machines. The doctor already warns explicitly when a target's CLI is absent from PATH.Verification
git check-ignoreon the four real filenames, before and after: not ignored → ignored. 9 new tests on the alignment reporting, mutation-checked with 7 deliberate regressions, 7 red. Full suite 700 passed, ruff baseline clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01GhAWHT7uwbvrvJg2Swibpt