mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-28 06:23:01 +00:00
Two adversarial-review fixes on the #840/#1079 takeovers: 1. importCodeFile's empty-file skip returned skipped WITH an error string. performSync treats skipped-with-error as a parse failure (failedFiles → applySyncFailureGate), so any repo containing a legitimate empty code file (__init__.py, barrel stubs) would BLOCK last_commit for 3 consecutive syncs and then live in the ledger as auto-skipped — the fix recreated #840's spurious-failure complaint one layer up, and the became-empty branch reported its own successful stale-page deletion as a failure. The skip now carries no error, matching the content-hash short-circuit (banked via markCompleted, never ledgered). 2. runPhaseSync passed noExtract: willRunExtractPhase to EVERY sync target, but the cycle's extract phase (runPhaseExtract → extractForSlugs) walks brainDir only — slugs synced from other sources' checkouts are invisible to it, so their link/timeline extraction was silently dropped forever. Inline extract is now deduped only for the brainDir target; other targets keep it, matching standalone 'gbrain sync --source X' behavior. Pinned by a new cycle.serial test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>