feat(abi): set_dataset_metadata runtime-host tail slot (0.32.0) - #196
Merged
Conversation
A data source attaches one descriptive UTF-8 JSON object about the
loaded artifact (embedded manifests, recording timestamps, file facts)
for the host to display generically. Deliberately disjoint from
attach_source_record: observations ABOUT the artifact, never request
identity — a refused document has no effect on ingestion, caching, or
completion. Each successful call replaces the whole document; "{}"
clears it. Old hosts negotiate via struct_size as usual.
Surface: the slot after complete_ingest (offset 120, vtable 120 -> 128),
DataSourceRuntimeHostView::setDatasetMetadata, DatasetIngestHostView
forwarding, pinned ABI sentinels, a dedicated slot test suite
(flow-through/replace, missing-slot and short-struct_size negotiation,
rejection reason, unbound view, ingest-view forward), a
data-source-guide row, and the 0.32.0 changelog entry.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TTJvEsHX26rG4cHmqppvQg
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.
First of the three dataset-metadata PRs (SDK → PJ4 → plugins): a generic channel for a loader to attach descriptive metadata to the dataset it produces, so the host can show provenance for any loaded artifact (the motivating case: an MCAP restored from the source cache showing its embedded
pj.capture/pj.recordingfacts on plain File → Open).New tail slot on
PJ_data_source_runtime_host_vtable_t, appended aftercomplete_ingest(offset 120, vtable 120 → 128):Contract highlights:
attach_source_record(request identity): it never affects caching, restore routing, or trust."{}"clears it; callable at any point while the ingest context is live.false+ error with no effect on sample ingestion, completion, or cache eligibility.struct_size(PJ_HAS_TAIL_SLOT); plugins degrade to "no metadata".C++ surface:
DataSourceRuntimeHostView::setDatasetMetadata+DatasetIngestHostViewforwarding, mirroring theattachSourceRecord/completeIngestwrapper pattern. Nogetcounterpart by design — the only reader is the host GUI (own store), and the writer owns the whole document; a getter is one more compatible tail slot if a real cross-plugin consumer ever appears.Tests: pinned ABI layout sentinels; new
dataset_metadata_test.cpp(flow-through + replace semantics, missing-slot and short-struct_sizenegotiation — a stale non-null pointer past the reported size is never read —, host-rejection reason surfacing, unbound view, ingest-view forwarding). The three test vtables using designated initializers gained the explicit member (-Werror=missing-field-initializers).Docs: data-source-guide host-view table row; CHANGELOG
0.32.0 — unreleasedentry.Validation: full build + 96/96 tests,
./test_sdk_install.shPASSED (incl. the fmt-symbol guard).Merge order: this PR first, then release 0.32.0; the PJ4 and plugins PRs carry
TODO(sdk-0.32)seams that get wired once the release exists.🤖 Generated with Claude Code
https://claude.ai/code/session_01TTJvEsHX26rG4cHmqppvQg