refactor: unify record/payload naming + ContentBlock.Source field#20
Merged
Conversation
3 tasks
Naming rule: every record type follows <entity>.<verb> past tense, lowercase,
dot-separated. Payload key matches the first segment of type.
Renames:
transcript.started/forked/.compacted (JSON value) → session.*
RecordStarted/Forked/Compacted → SessionStarted/Forked/Compacted
RecordMessageAppended/RecordStatePatched → MessageAppended/StatePatched
SystemRecord (lifecycle payload) → SessionRecord
(the struct holds provider/model/parentId/boundaryId — name now matches
intent; it never carried system-prompt data)
Record.System field → Record.Session
Record.TranscriptID + json tag → SessionID / "sessionId"
*Command.TranscriptID → SessionID
ForkCommand.Source/NewTranscriptID → Source/NewSessionID
ListItem.TranscriptID, fileIndexEntry.TranscriptID → SessionID
ContentBlock gains a Source string field for provenance attribution
(populated in a later commit). The existing inline-image data field,
which used JSON tag "source", is renamed to ImageSource / "imageSource"
to free the namespace.
Projector's applyStatePatch now ignores unknown patch paths
(default: continue) instead of returning an error — keeps the projector
forward-compatible with patch paths added by later schema iterations.
The error-expecting test becomes IsIgnored, asserting subsequent ops
still apply.
238e838 to
e714a07
Compare
2 tasks
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.
PR 2 of 5 — stacked on #19.
Schema cleanup. No behavior change.
Test
🤖 Generated with Claude Code