Files
gbrain/test
Garry TanandClaude Fable 5 91674d59c2 fix(extract): let custom schema packs drive plain link extraction (#3190)
Three gates made custom packs decorative for gbrain extract links / put_page
auto-link:
1. DIR_PATTERN whitelist: entity regexes now union in the active pack's
   page_types[].path_prefixes (slug-safe, longest-first).
2. Verb inference: extractPageLinks consults pack link_types via
   inferLinkTypeFromPack (under a per-page ReDoS budget) before the legacy
   matchers, exactly the wrap link-inference.ts documents.
3. frontmatter_links: pack mappings extend FRONTMATTER_LINK_MAP at
   extraction time (outgoing, pack entity dirs as resolution hints); the
   hardcoded map wins on any (pageType, field) it already covers so a pack
   restating built-ins cannot emit reversed/duplicate edges.

Codegen'd base packs (gbrain-base, gbrain-base-v2) are excluded — their
semantics ARE the in-code tables; consulting their sketch regexes would
double-apply worse copies. Threaded through extract links --source db,
extract --stale, and put_page runAutoLink via loadActivePackBestEffort.
LINK_EXTRACTOR_VERSION_TS bumped so stale sweeps re-extract.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-23 11:08:00 -07:00
..