Skip to content

[schemas] Document workflow-status prerequisite for enhanced-thoughts#328

Draft
drewyd wants to merge 1 commit into
NateBJones-Projects:mainfrom
drewyd:docs/enhanced-thoughts-workflow-status-dep
Draft

[schemas] Document workflow-status prerequisite for enhanced-thoughts#328
drewyd wants to merge 1 commit into
NateBJones-Projects:mainfrom
drewyd:docs/enhanced-thoughts-workflow-status-dep

Conversation

@drewyd
Copy link
Copy Markdown

@drewyd drewyd commented May 26, 2026

Summary

The enhanced-thoughts schema has a hidden dependency on the workflow-status schema that isn't documented in the README. This PR adds a clearly placed Prerequisites callout.

Symptom (fresh install)

Running schemas/enhanced-thoughts/schema.sql on a project that hasn't applied workflow-status first fails with:

ERROR:  column "status" of relation "thoughts" does not exist

The failure happens inside the CREATE OR REPLACE FUNCTION public.upsert_thought block.

Why

schemas/enhanced-thoughts/schema.sql writes to two columns on the thoughts table that enhanced-thoughts does not itself create:

  • INSERT at lines 347-370 writes to status and status_updated_at
  • ON CONFLICT UPDATE at lines 379-383 updates those same columns

Those columns are created by schemas/workflow-status/ (see its README and migration).

Fix

Single doc-only change to schemas/enhanced-thoughts/README.md: adds an > [!IMPORTANT] callout at the top of the existing Prerequisites section, plus a new bullet linking to ../workflow-status/. No SQL, code, or metadata.json changes.

Note: I considered adding a requires.schemas array to metadata.json to make this machine-checkable, but .github/metadata.schema.json sets additionalProperties: false on requires and only allows open_brain / services / tools — adding a schemas dependency field would need a schema spec change first. Happy to follow up with a separate PR if you'd like that.

File changes

  • schemas/enhanced-thoughts/README.md (+4 lines, -0)

Test plan

  • On a fresh Open Brain Supabase project: apply workflow-status first, then enhanced-thoughts — both succeed
  • On a fresh project: apply enhanced-thoughts directly — reproduces the column "status" does not exist error referenced in the README callout
  • Rendered README: confirm the IMPORTANT callout displays at the top of Prerequisites and the relative link to ../workflow-status/ resolves on github.com

Caught while installing five schemas during a Brain Architecture build on 2026-05-26.


Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

The enhanced-thoughts schema's upsert_thought function writes to the
status and status_updated_at columns on the thoughts table (schema.sql
lines 347-383), but those columns are created by the workflow-status
schema. Applying enhanced-thoughts on a fresh install without first
applying workflow-status fails with:

  column "status" of relation "thoughts" does not exist

Adds a clearly placed Prerequisites callout near the top of the
enhanced-thoughts README pointing to the workflow-status schema as a
hard dependency. No code or SQL changes — docs only.

Caught during a 5-schema install on 2026-05-26.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the schema Contribution: database extension label May 26, 2026
@github-actions
Copy link
Copy Markdown

Hey @drewyd — welcome to Open Brain Source! 👋

Thanks for submitting your first PR. The automated review will run shortly and check things like metadata, folder structure, and README completeness. If anything needs fixing, the review comment will tell you exactly what.

Once the automated checks pass, a human admin will review for quality and clarity. Expect a response within a few days.

If you have questions, check out CONTRIBUTING.md or open an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

schema Contribution: database extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant