Skip to content

[recipes] Add brain-bootstrap one-command installer#406

Open
alanshurafa wants to merge 9 commits into
NateBJones-Projects:mainfrom
alanshurafa:upstream/brain-bootstrap
Open

[recipes] Add brain-bootstrap one-command installer#406
alanshurafa wants to merge 9 commits into
NateBJones-Projects:mainfrom
alanshurafa:upstream/brain-bootstrap

Conversation

@alanshurafa

Copy link
Copy Markdown
Collaborator

Adds recipes/brain-bootstrap: a one-command installer that provisions the schema, deploys the gateway, and points a Vercel deploy at the dashboard.

Depends on #405 (stacked; diff includes ancestors until they merge).

Note for maintainers: the installer's DASHBOARD_REPO and Vercel button currently default to the alanshurafa/OB1 fork, where the complete milestone dashboard (CRM + wiki) lives until these PRs land upstream. Repoint to the canonical repo once merged.

alanshurafa and others added 3 commits June 13, 2026 14:38
The integration was ported from a bigint-id codebase and parsed thought
and job ids as numbers. On Open Brain (UUID primary keys) that breaks at
runtime: upsert_thought returns a UUID that extractThoughtId rejects as
"no thought_id", /execute 400s on a UUID job_id, and the pro dashboard's
ingest routes reject every UUID with a positive-integer guard.

Convert every ingestion id field (integration + both dashboards) from
number to string, validate job ids as UUIDs, and replace the 0 "no id"
sentinel with an empty string. Pairs with the smart-ingest-tables schema
so a job completes end to end on a fresh UUID install.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Post-UUID conversion, the integer job_id examples return 400 ("must be a UUID"). Align the docs with the handler's UUID_RE check.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added dashboard Contribution: frontend template integration Contribution: MCP extension or capture source recipe Contribution: step-by-step recipe labels Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

OB1 PR Gate

Folder structure — All files are in allowed directories
Required files — README.md and metadata.json found in all contribution folders
Metadata valid — All metadata.json files passed JSON Schema validation
No credentials — No API keys, tokens, or secrets detected
SQL safety — No destructive SQL or core table modifications
Category artifacts — Required file types present for each category
PR format — Title follows [category] Description format
No binary blobs — No oversized or binary files
README completeness — All READMEs include Prerequisites, Steps, and Expected Outcome
Contribution dependencies — All declared skill and primitive dependencies exist and are linked in README
LLM clarity review — Covered by Claude PR Review workflow
Remote MCP pattern — No local MCP server patterns detected — uses remote MCP correctly
Tool audit link — Extensions/integrations link to the MCP Tool Audit guide
Scope check — All changes are within the contribution folder(s)
Internal links — All relative links in READMEs resolve to existing files

Result: All 15 checks passed! Ready for human review.


Post-Merge Tasks

These don't block merge — they're reminders for admins after this PR lands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3512d4d90b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +270 to +272
"wikiPages",
"crmCore",
"crmEngagement",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Ship the schemas used by the default bundle

The default wiki-crm bundle walks these schema keys through readSchemaSql, which calls fail(...) when the referenced file is absent. In this checkout, find schemas -maxdepth 2 -type f shows no schemas/wiki-pages/schema.sql, schemas/crm-core/schema.sql, or schemas/crm-engagement/schema.sql, so the advertised one-command default aborts in step 2 before any functions or verification run. Either include those schemas in the repo or remove them from bundles that are meant to run from this checkout.

Useful? React with 👍 / 👎.

"crmCore",
"crmEngagement",
],
functions: ["open-brain-rest", "wiki-mcp", "crm-mcp", "wiki-profile"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Ship the functions used by the default bundle

The deploy loop calls deployFunction for every name here, and that helper returns a missing-source failure that is treated as fatal at the end of the run. This checkout has no integrations/wiki-mcp or integrations/crm-mcp directories (checked with find integrations -maxdepth 2), so even after the SQL issue is fixed the default wiki-crm bundle cannot complete a live install. Add those functions or keep them out of live bundles until they exist.

Useful? React with 👍 / 👎.

Comment on lines +904 to +907
const jobId = typeof body.job_id === "string" && UUID_RE.test(body.job_id.trim())
? body.job_id.trim()
: "";
if (!jobId) return json({ error: "job_id is required (must be a UUID)" }, 400);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Accept the ingest job IDs produced by the schema

The checked-in schemas/smart-ingest/schema.sql still creates ingestion_jobs.id as bigserial and ingestion_items.job_id as bigint, and createJob returns the raw data.id at runtime. Requiring a UUID string here means a dry-run job created with the repo's own schema cannot be executed through /smart-ingest/execute because it is rejected with 400 before the lookup; the dashboard proxy added the same UUID guard, so dry-run execution is broken unless a matching ID migration is shipped.

Useful? React with 👍 / 👎.

@alanshurafa alanshurafa force-pushed the upstream/brain-bootstrap branch from 3512d4d to f443406 Compare July 6, 2026 01:30
@alanshurafa alanshurafa force-pushed the upstream/brain-bootstrap branch from f443406 to 6ba5727 Compare July 6, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard Contribution: frontend template integration Contribution: MCP extension or capture source recipe Contribution: step-by-step recipe

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant