fix(sync): detect untracked-only changes; reconcile timer-era memories

sync.sh: replace `git diff-index --quiet HEAD --` with
`[ -n "$(git status --porcelain)" ]` in both the main-repo (Phase 1) and
vault change-detection, so brand-new untracked files are no longer silently
skipped (the bug Howard hit 2026-04-17). Mark project_sync_script_bug.md
RESOLVED.

.gitignore: exclude the datto BSOD dumps (6 MB zip + 48 MB extracted) so the
detection fix doesn't sweep 54 MB of binaries into the repo.

memory: finish the add_line_item reconciliation — drop legacy "time entry" /
timer-billable framing from feedback_syncro_labor_type and
feedback_syncro_warranty_product (and their index lines); the product-selection
rules themselves are unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-21 10:19:52 -07:00
parent a201140e92
commit 0897e5e317
6 changed files with 25 additions and 12 deletions

View File

@@ -92,7 +92,9 @@ fi
echo ""
echo "=== Phase 1: Local changes ==="
if ! git diff-index --quiet HEAD -- 2>/dev/null; then
# Detect any change including untracked-only (git diff-index ignores untracked files,
# so a brand-new file with no tracked changes would otherwise be silently skipped).
if [ -n "$(git status --porcelain)" ]; then
echo -e "${YELLOW}[INFO]${NC} Local changes detected:"
git status --short
echo ""
@@ -270,8 +272,8 @@ else
cd "$VAULT_PATH"
echo -e "${GREEN}[OK]${NC} Vault: $VAULT_PATH"
# Commit any local vault changes
if ! git diff-index --quiet HEAD -- 2>/dev/null; then
# Commit any local vault changes (porcelain catches untracked-only too)
if [ -n "$(git status --porcelain)" ]; then
echo -e "${YELLOW}[INFO]${NC} Local vault changes detected — committing..."
git add -A
git commit -m "sync: auto-sync vault from $MACHINE at $TIMESTAMP"