v0.42.13.0 fix(search): archive/ content findable by default, demoted not hard-excluded (#1777)#1797
Merged
Merged
Conversation
…1777) Move archive/ out of DEFAULT_HARD_EXCLUDES into a 0.5 source-boost demote so archived historical content is findable by default, ranked below curated content. Add a hidden_by_search_policy doctor check so the surviving exclude policy (test/, attachments/, .raw/) is auditable. Bump KNOBS_HASH_VERSION 8->9 so the policy change invalidates archive-excluded query_cache rows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…1777 # Conflicts: # src/commands/doctor.ts
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…1777) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…1777 # Conflicts: # CHANGELOG.md # CLAUDE.md # VERSION # llms-full.txt # package.json
…1777 # Conflicts: # CHANGELOG.md # VERSION # package.json
mgunnin
added a commit
to mgunnin/gbrain
that referenced
this pull request
Jun 3, 2026
* upstream/master: v0.42.23.0 feat(jobs): --nice scheduling-priority flag for jobs work/supervisor (garrytan#1815) (garrytan#1820) v0.42.22.0 fix(minions): supervisor progress watchdog + worker DB self-defense — alive-but-wedged worker self-heals (garrytan#1801) (garrytan#1824) v0.42.21.0 fix(postgres): module-singleton ownership — canonical landing for the dream-cycle "connect() has not been called" class (garrytan#1404/garrytan#1471/garrytan#1619) (garrytan#1805) v0.42.20.0 fix: reliability wave — PGLite capture lock-pin + Postgres reconnect race + search embed-hang (garrytan#1762 garrytan#1745 garrytan#1775) (garrytan#1810) v0.42.19.0 fix(skillopt): close the last gap in the AI SDK v6 tool-loop fix (write-capture mapper + regression test) (garrytan#1809) v0.42.18.0 fix: sync orphan-pileup watchdog (garrytan#1633) + links-lag µs stamp (garrytan#1768) (garrytan#1807) v0.42.17.0 fix(sync): resumable incremental sync — killed mid-import no longer loses progress (garrytan#1794) (garrytan#1808) v0.42.16.0 feat(doctor): brain health as a solved problem — cause-ranked doctor + OOM-loop line + auto-drain + pool-reap (garrytan#1685) (garrytan#1802) v0.42.15.0 fix: decouple CLI primary output from process.stdout.isTTY (garrytan#1784) (garrytan#1806) v0.42.14.0 fix(zero-config): code-* readiness signal + init embedding-key validation + lock self-heal (garrytan#1780) (garrytan#1804) v0.42.13.0 fix(search): archive/ content findable by default, demoted not hard-excluded (garrytan#1777) (garrytan#1797) v0.42.12.0 feat: self-upgrading gbrain — invocation-riding update check + opt-in auto-upgrade (garrytan#1798) v0.42.11.0 feat(skillopt): held-out eval gate, honest receipts, ENFORCE + ablation opts (garrytan#1759) v0.42.10.0 feat(extract): opt-in global-basename wikilink resolution (closes garrytan#972) (garrytan#1388)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Closes #1777. Content committed under
archive/was being synced, embedded, and graphed, then silently hard-excluded from every default search. You could search an exact phrase you knew was in an archived page, get nothing, and wrongly conclude the page didn't exist. A hardcodedDEFAULT_HARD_EXCLUDESlist dropped the wholearchive/subtree unless the caller passedinclude_slug_prefixes.Guiding principle the bug violated: if it's committed to the brain, it should be findable. Findability should be opt-out, not opt-in.
The fix
archive/moves out ofDEFAULT_HARD_EXCLUDES(nowtest/,attachments/,.raw/only) intoDEFAULT_SOURCE_BOOSTSat0.5— findable by default, ranked below curated content. The demote is a prior applied at the SQL/fusion layer; the cross-encoder reranker can still promote a genuinely best-match archive page that survives into the rerank window.gbrain doctorcheckhidden_by_search_policy(local + remote/thin-client paths) counts chunked pages withheld by each active exclude prefix in one SQL query, reusing the canonicalresolveHardExcludes+buildVisibilityClause+ the now-exportedescapeLikePatternso the count can't drift from what search filters.okfor intentional default excludes (prescriptive, agent-readable message),warnonly when a non-defaultGBRAIN_SEARCH_EXCLUDEprefix hides pages.KNOBS_HASH_VERSION8→9 — the exclude policy isn't in the cache key, so the bump invalidates archive-excludedquery_cacherows on upgrade (one-time global cold-miss, refills within TTL).Acceptance criteria (#1777)
archive/page is returned by search by default (ranked, demoted), no caller flag.test//attachments//.raw/remain excluded.gbrain doctorreports how many pages are hidden from default search by prefix policy.Testing
bun run verify: 29/29 (incl. typecheck).sql-ranking,search-mode,knobs-hash-reranker,cross-modal-phase1,search-alias-resolved-boost, newdoctor-hidden-by-search-policy, e2esearch-exclude).KNOBS_HASHversion pins updated 8→9).test/hidden, the new doctor SQL runs clean on both engines.Note
Reviewed via
/plan-eng-review(CLEARED) + two/codexrounds (PASS). Benign side-effect documented in the CHANGELOG:archive/: 0.5reclassifies archive pages in the contradictions probe's source-tier breakdown fromothertobulk.🤖 Generated with Claude Code