The plan and apply split left exists declared but unused in run_managed_sync
(SC2034), which failed the CI Bash lint.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plan each sync before writing, record the plan in .ai-config-transaction.json,
and roll an interrupted destination back from its backups on the next run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Skip the semantic-search skill while semantic retrieval is disabled and remove
a setup-owned copy when it is turned off.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Create <destination>/.ai-config.lock exclusively while syncing so parallel
installs or updates fail instead of interleaving writes. A lock left by an
exited process of the same shell on the same host is replaced.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Write config.toml, settings.json, the manifest, and every other managed file to
a temporary sibling and rename it over the target, so an interrupted run
cannot leave a partly written file. Previously only SKILL.md was replaced
this way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bash's manifest reader stripped only the trailing newline, so a
CRLF-terminated manifest left a stray \r on every hash, a UTF-8 BOM on the
header line was folded into the "path" field, and an uppercase hash never
matched sha256sum's lowercase output. Reproduced against a real
manifest written by an earlier version of the PowerShell installer, where
every single managed file was misreported as locally modified.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
All tracked .sh files were stored as mode 100644 (non-executable), even
though the CI workflow and normal usage invoke several of them directly
(./scripts/build.sh) rather than through `bash`. On a fresh Linux
checkout this fails with a permission error.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Bash equivalent of the PowerShell manifest module: sync_managed_destination
plus its read/write/hash helpers, using sha256sum and a TSV manifest so
the same idempotent-install, stale-detection, and local-modification
protection behavior is available without a PowerShell dependency.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>