Skip to content

Sync fork with upstream OB1 (176 commits) + preserve local hardening#4

Merged
Humestone merged 178 commits into
mainfrom
stone/upstream-sync-2026-06-11
Jun 11, 2026
Merged

Sync fork with upstream OB1 (176 commits) + preserve local hardening#4
Humestone merged 178 commits into
mainfrom
stone/upstream-sync-2026-06-11

Conversation

@Humestone

Copy link
Copy Markdown
Owner

What

Brings the Humestone fork current with upstream NateBJones-Projects/OB1 (main was 178 commits behind) while preserving all local divergence.

Upstream capabilities gained (the reason for this sync, per the approved structural-audit remediation):

  • integrations/smart-ingest - validated, chunked, deduplicated embedding ingestion (structural fix for boilerplate-dominated source-content captures)
  • recipes/atomizer - re-atomization toolkit (the pattern for the 308-stub source-content backlog promotion, step 2 of the remediation)
  • schemas/ provenance chains - derivation tracking (derived_from wiring for syntheses/dossiers)
  • integrations/update-thought-mcp - safe thought updates with if_unchanged_since
  • integrations/telegram-capture - directly relevant to the locked step-5 Telegram pilot
  • integrations/hermes-agent-memory - native Hermes provider with workspace_mode isolation
  • Brain smoke test recipe, readwise capture, dashboard updates, and ~160 other upstream commits

Local divergence preserved:

  • Two local-only hardening commits folded in first: "Harden agent memory API scope harness" and "feat(agent-memory): harden local recall and governance guards" (they existed on the local clone's main but never reached the fork)
  • Modularized agent-memory-api (auth.ts / policy.ts / read-only.ts + full test suites), which upstream still lacks
  • ob1-gate hardening (env-passed untrusted values, fail-closed diffs, title-bypass fix) carried into the upstream-renamed ob1-gate-v2.yml

Merge surface: 226 files; exactly one conflict (the comment header of ob1-gate-v2.yml, resolved by keeping upstream's rename note plus the local branch-protection steps).

Verification

  • deno test integrations/agent-memory-api: 46/46 passed (local modularized tests + upstream smoke tests together)
  • deno check integrations/smart-ingest: passes
  • node --test dashboards/open-brain-dashboard-next/lib/agent-memory.test.mjs: 0 failures

Notes for review

  • This is a sync PR, not a single-folder contribution, so the OB1 PR Gate's PR-format and scope rules will flag it; admin merge is expected.
  • No deploys performed; production functions untouched. The deployed agent-memory-api v6 dual-key change remains a separate pending commit/PR (existing queue item).
  • After merge: step 2 of the remediation (Atomizer-pattern backlog promotion over the 308 source-content stubs) and step 3 (classifier taxonomy + dossier tagging) follow as separate approvals.

🤖 Generated with Claude Code

Reb-Elle-Art and others added 30 commits April 17, 2026 14:56
Scheduled script that queries the past N days of thoughts, paginates and ranks by importance, synthesizes with an LLM, and delivers to Telegram or stdout. Filters restricted/personal by default; opt in with --include-personal.
Weekly quality audit across three cost tiers: SQL-only orphan/dup lint (free), graph-based edge-weakness lint (free), and LLM-assisted contradiction sampling (budget-capped). Read-only — produces a report, never mutates.
…test_path + traverse_graph)

The previous recursive-CTE implementations enumerated every path to every
reachable node, which exploded on densely connected graphs (a hub with 1k+
neighbours at depth 2 produced tens of thousands of rows) and depended on
the per-path ANY(path) check to break cycles. On a cyclic graph that
exceeded the statement_timeout the planner never actually pruned the walk.

Replace both functions with iterative plpgsql BFS:

- Global seen-set (UUID[]) so each node is visited at most once
- JSONB parent-pointer map records the first (parent, relation) that
  reached each node; BFS's "first discovery wins" invariant is enforced
  with DISTINCT ON (next_id)
- Shared reconstruct_bfs_path() helper walks the parent map end -> start
  with a safety guard against malformed maps
- find_shortest_path keeps bidirectional edge traversal; traverse_graph
  keeps outgoing-only with optional relationship_type filter
- Signatures, argument order, RETURNS shape, and language (plpgsql, no
  SECURITY DEFINER) match the original so this is a body-only rewrite
- All queries scope by p_user_id to preserve the multi-tenant isolation
  the edge function relies on (service_role bypasses RLS)

Update the README's "How It Works" section and function table to describe
the new implementation so the docs don't contradict the SQL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Standalone Node script that exercises traverse_graph and find_shortest_path
against a live Supabase project with ob-graph installed. Picks an arbitrary
edge, calls both RPCs at depth 1/2/6, and prints row counts + timings so
maintainers can confirm the iterative-BFS rewrite stays inside the
statement_timeout and returns sensible shapes before shipping.

Reads SUPABASE_PROJECT_REF, SUPABASE_SERVICE_ROLE_KEY, and OB_GRAPH_USER_ID
from recipes/ob-graph/.env.local so the service-role key never lands in
repo history. Sets process.exitCode=1 on any RPC failure so CI or shell
chaining picks up a non-zero exit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
justfinethanku and others added 25 commits June 5, 2026 13:18
…wicegood/dashboard-next-bump

[dashboards] open-brain-dashboard-next: bump next to 16.2.4
…estone/ob1-gate-v2

[docs] Refresh OB1 PR gate workflow registration
…estone/openclaw-tool-schemas

[integrations] Add OpenClaw Agent Memory tool schemas
…enclaw-memory-host-hooks

fix(openclaw-agent-memory): wire memory-host hooks for auto-recall (NateBJones-Projects#279)
…it/local-brain-no-mcp

[recipes] Add local-brain-no-mcp recipe + ob1-local-http skill
…napsynapse/canonical-landing-page

[dashboards] Canonical landing page for openbrain.fyi
…egram-markdownlint-fix

[docs] Fix Telegram README Markdownlint
…rib/spiritualsystems/fix-typed-edges-comment-syntax

[schemas] Fix invalid || concatenation in typed-reasoning-edges COMMENT
…-agent-memory

feat(integrations): add hermes-agent-memory native provider for OB1
…lanshurafa/smart-ingest

[integrations] Smart ingest Edge Function
…wicegood/dashboard-open-next-cloudflare

[dashboards] open-brain-dashboard-next: add Cloudflare Workers deploy support
…026-06-11

# Conflicts:
#	.github/workflows/ob1-gate-v2.yml
@github-actions github-actions Bot added dashboard documentation Improvements or additions to documentation integration extension labels Jun 11, 2026
@Humestone Humestone merged commit 644f89c into main Jun 11, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard documentation Improvements or additions to documentation extension integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.