[schemas] Thought lifecycle receipt log - #460
Open
Nev-Harris wants to merge 1 commit into
Open
Conversation
Append-only thought_lifecycle_events log plus a single transactional write path so every lifecycle/correction action on an Open Brain thought commits together with its receipt. Additive: no changes to the core thoughts table structure or the MCP server. Optional touchpoints with other schemas are exception-guarded, so the pack stands alone. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Hey @Nev-Harris — 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. |
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.
Contribution Type
/schemas)What does this do?
Adds
schemas/thought-lifecycle/— an append-onlythought_lifecycle_eventsreceipt log plus a single transactional write path for lifecycle and correction actions (done / defer / needs-review / archive / supersede / correct) on Open Brain thoughts. The mutation and its receipt commit or roll back together, so a thought can't be changed without a matching receipt; a partialUNIQUEindex makes "one execution per brief item" a database rule rather than a check-then-write race.It's purely additive — no changes to the core
thoughtstable structure and none to the MCP server. The action→status projection lives in the database, so upstream consumers (dashboards, status filters) only ever see legal Open Brain statuses. The pack stands alone: its optional touchpoints withprovenance-chainsand a brief-store outcome table are exception-guarded, so their absence is a graceful no-op with a warning, not a failure.Requirements
thoughtstable).workflow-statusschema applied (thoughts.status/status_updated_at).pgvector(ships with core Open Brain) —correct_thoughtrewritesthoughts.embedding.service_role(RLS and function grants are restricted to it).No external services, no paid dependencies.
Checklist