Skip to content

Report bootstrap alignment, and ignore a bare .bak suffix - #41

Merged
matteopasseri407 merged 2 commits into
mainfrom
fix/engine-hygiene-bugs
Jul 29, 2026
Merged

Report bootstrap alignment, and ignore a bare .bak suffix#41
matteopasseri407 merged 2 commits into
mainfrom
fix/engine-hygiene-bugs

Conversation

@matteopasseri407

Copy link
Copy Markdown
Owner

What

Three defects reported from a Windows 11 host on v0.92.3.

.gitignore missed a bare .bak. *.bak-* matched file.bak-<timestamp> but not file.bak. A Chrome profile backup made during maintenance landed in 03-INFRA/Cookies.bak, Login Data.bak, Local State.bak, Secure Preferences.bak, i.e. session cookies, the saved-password database, and its encryption keys — and git check-ignore confirmed none of them were ignored. One git add -A from a permanent history and the credential rotation SECURITY.md mandates. 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 under 03-INFRA/.

The bootstrap inventory reported existence, not alignment. agent-sync inventory printed present whenever 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 as present as one written a second ago. The reporter lost an afternoon to Antigravity working from 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 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.md implied a command that does not exist. It 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 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.sh compares resolved symlink targets and agent-doctor.ps1 compares SHA-256 and fails on mismatch. agent-sync re-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 agy on 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-ignore on 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

matteopasseri407 and others added 2 commits July 30, 2026 00:58
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
matteopasseri407 merged commit a3c5def into main Jul 29, 2026
9 checks passed
@matteopasseri407
matteopasseri407 deleted the fix/engine-hygiene-bugs branch July 29, 2026 23:20
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>
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