mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-30 03:12:32 +00:00
Three community-PR takeovers rebased onto master: - import-file (#840): importCodeFile skips empty (0-byte) code files instead of writing a page with empty compiled_truth that fails every reindex-code pass. When a previously-imported file BECOMES empty, the stale page is deleted (chunks cascade) instead of ghosting in search — mirrors the markdown importer's empty-content branch. - cycle (#1079): runPhaseSync now enumerates every registered, non-archived, sync-enabled source with a local checkout instead of syncing only the single brainDir-matched source. Preserves the SyncLockBusyError per-source skip (#1794), keeps the legacy brainDir fallback when no source covers it, and respects explicit --source scoping (#1503) so a scoped cycle stays single-source. Single-target result shape is unchanged. - link-extraction (#1101): ENTITY_REF_RE gains a root-level branch so [Name](action-tracker.md) resolves to slug 'action-tracker'. The bare branch requires the .md suffix and excludes '#', '/', ':' so anchors, non-markdown assets, and URLs don't emit bogus refs; the capture's .md is stripped in extractEntityRefs and dir is '' (not the filename). LINK_EXTRACTOR_VERSION_TS bumped so stamped pages re-extract. Takeover of #840, #1079, #1101 (rebased; flaws named in review fixed). Co-authored-by: nightlaro <nightlaro@users.noreply.github.com> Co-authored-by: samvilian <samvilian@users.noreply.github.com> Co-authored-by: essexcanning <essexcanning@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>