chasm: persist links and user_metadata at framework level#10409
Open
Quinn-With-Two-Ns wants to merge 2 commits into
Open
chasm: persist links and user_metadata at framework level#10409Quinn-With-Two-Ns wants to merge 2 commits into
Quinn-With-Two-Ns wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6c00468d4
ℹ️ 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".
Add per-request links (keyed by request_id) and user_metadata fields to ChasmComponentAttributes so any CHASM component can store them uniformly without each library defining its own proto field.
b6c0046 to
279ee3a
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 279ee3a. Configure here.
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 changed?
Add per-request links (keyed by request_id) and user_metadata fields to ChasmComponentAttributes so any CHASM component can store them uniformly without each library defining its own proto field. This first PR just adds support, I will open up follow up PRs to update any existing components use these new fields.
Why?
Per the discussion here we think links and user metadata will be common components across CHASM components so it makes sense for the framework to handle this for us vs each component implementing it themselves.
How did you test it?
Note
Medium Risk
Touches persisted CHASM component attributes and transaction close/replication paths; changes are additive and well-tested but affect core execution state layout.
Overview
Adds framework-level persistence for per-request links and user metadata on any CHASM component via new
ChasmComponentAttributesfields (requestskeyed byrequest_id, plususer_metadata).MutableContext gains
SetRequestLinks/SetUserMetadata; Context gainsLinks,RequestLinks, andUserMetadata. Writes are staged on the tree and flushed into component attributes duringCloseTransaction(including versioned-transition bumps and replication updates). Reads prefer in-transaction pending values over persisted data; emptyrequest_idis rejected; metadata for unregistered components is dropped with a warning.Mocks and unit tests cover dirty-state, replace/remove semantics, and cross-transaction persistence. No individual CHASM libraries are migrated yet.
Reviewed by Cursor Bugbot for commit 279ee3a. Bugbot is set up for automated code reviews on this repo. Configure here.