docs(meta/design): clarify DB-backed devtools source storage#8715
Merged
hyf0 merged 2 commits into03-13-docs_meta_design_add_devtools.md_from Mar 15, 2026
Merged
docs(meta/design): clarify DB-backed devtools source storage#8715hyf0 merged 2 commits into03-13-docs_meta_design_add_devtools.md_from
hyf0 merged 2 commits into03-13-docs_meta_design_add_devtools.md_from
Conversation
Co-authored-by: hyf0 <49502170+hyf0@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add historical context about devtools
docs(meta/design): clarify DB-backed devtools source storage
Mar 15, 2026
fae3744
into
03-13-docs_meta_design_add_devtools.md_
2 checks passed
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the devtools design document to make the intended database-backed storage model explicit: large source-like payloads should be stored once and referenced by ID from hook/action records, aligning the future DB approach with the current StringRef dedup concept.
Changes:
- Replaced the
hook_call_contentsketch with a dedicatedsources(source_id, content)table for large payload storage. - Updated the
hook_callsandassetsschema examples to reference payloads via*_source_idfields. - Clarified in prose that DB-backed backends should avoid inlining large payloads into action rows and instead reference standalone content rows.
You can also share your feedback on Copilot code review. Take the survey.
| hook_calls(build_id, call_id, hook_type, plugin_name, plugin_id, module_id, started_at, ended_at) | ||
| hook_call_content(call_id, content_before, content_after) -- large text in separate table | ||
| assets(build_id, filename, chunk_id, size) | ||
| sources(source_id, content) -- store large payloads/source text once |
Comment on lines
+236
to
+240
| hook_calls(build_id, call_id, hook_type, plugin_name, plugin_id, module_id, started_at, ended_at, input_source_id, output_source_id) | ||
| assets(build_id, filename, chunk_id, size, content_source_id) | ||
| ``` | ||
|
|
||
| Separating large content (`hook_call_content`) from metadata (`hook_calls`) means consumers querying plugin timing never touch the multi-GB source text. This is the relational equivalent of the current `StringRef` dedup pattern, but with proper query support. | ||
| Separating large content from metadata means consumers querying plugin timing never touch the multi-GB source text. For a database-backed design specifically, source-like payloads should live in standalone fields/rows (for example, `sources.content`) and actions should reference them by ID (`input_source_id`, `output_source_id`, `content_source_id`) instead of inlining the same source everywhere. This is the relational equivalent of the current `StringRef` dedup pattern, but with proper query support. |
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.
The devtools design doc now makes the intended database storage model explicit: large source-like payloads should be stored once and referenced by ID, rather than duplicated across hook and asset records. This tightens the future-backend guidance in the section describing a database-backed devtools store.
Schema sketch
hook_call_contentexample with a dedicatedsources(source_id, content)table.hook_callsandassetsto reference payloads viainput_source_id,output_source_id, andcontent_source_id.Storage model
StringRefapproach, but framed it as relational deduplication with queryable references.Illustrative shape
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.