Skip to content

refactor!: three changes that cannot be made after the 1.0 freeze (1.0.0) - #239

Merged
facontidavide merged 2 commits into
mainfrom
refactor/pre-1.0-freeze-touchups
Nov 14, 2026
Merged

facontidavide merged 2 commits into
mainfrom
refactor/pre-1.0-freeze-touchups

Conversation

@facontidavide

Copy link
Copy Markdown
Contributor

Three small changes, each of which needs a 2.0 once 1.0.0 is tagged.

1. timestamp_ns on every builtin struct (source break)

Four builtin structs named their timestamp member timestamp; the other sixteen use timestamp_ns.

Struct Before After
sdk::ImageAnnotations timestamp timestamp_ns
sdk::FrameTransform timestamp timestamp_ns
sdk::SceneEntity timestamp timestamp_ns
sdk::SceneEntityDeletion timestamp timestamp_ns

The field-table name changes with the member, so a script reads timestamp_ns on these types too. The wire format is unchanged: the proto field is still timestamp.

Consumers: PlotJuggler and pj-official-plugins must rename their uses when they move to the next SDK pre-release. User scripts that read .timestamp on these four types must change as well.

2. Dialog tree events tolerate other top-level keys

DialogPluginTyped dispatched a tree event only when its key was the sole top-level key of the event. That check is compiled into each plugin, so a later host could never have added a key to the envelope without every existing plugin dropping the event.

Now a valid tree key claims the event and other keys are ignored, which is already the rule beside a file-picker result. Two tree keys, or a malformed tree payload, still fail closed. No host emits tree events yet, so nothing running changes.

docs/dialog-sdk-reference.md rule 3 is updated to match.

3. PJ_widget_value_t names its padding

The 4 bytes of alignment padding after kind become uint32_t flags. No bit is defined. Size (96), alignment (8) and every offset are unchanged, and the layout sentinels now pin flags at offset 12.

A host built against 1.0 or later writes 0. A host built earlier leaves those bytes unset, and the header says so: a widget may read a bit only once a later SDK defines one together with a way to tell that the host sets it.

Verification

  • ./build.sh --debug && ./test.sh: 107/107 under ASAN. Pre-commit clean. check_feature_floors.py passes (158 surfaces).
  • The two new tree-dispatch tests replace a test that asserted the opposite result on the same payload; I did not separately run them against the old code.
  • Not run: ./test_sdk_install.sh (no packaging change).

🤖 Generated with Claude Code

@facontidavide
facontidavide force-pushed the refactor/pre-1.0-freeze-touchups branch from 2df1090 to 4b28e6b Compare November 14, 2026 08:31
facontidavide and others added 2 commits November 14, 2026 09:45
…0.0)

timestamp_ns everywhere. ImageAnnotations, FrameTransform, SceneEntity and
SceneEntityDeletion named their timestamp member `timestamp`; the other
sixteen builtin structs use `timestamp_ns`. The four are renamed, with
their field-table names, so scripts read the same name on every type. The
wire format is unchanged.

Dialog tree events tolerate other top-level keys. DialogPluginTyped
dispatched a tree event only when its key was the sole key of the event.
That check is compiled into each plugin, so no later host could have added
a key to the envelope. A valid tree key now claims the event and other
keys are ignored, as beside a file-picker result. Two tree keys or a
malformed payload still fail closed.

PJ_widget_value_t names its padding. The 4 bytes after `kind` become
`uint32_t flags` with no bit defined; size, alignment and offsets are
unchanged and pinned by the layout sentinels.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… 1.0 layout

The bridge entry said no official parser returns Log or DepthImage. That
stopped being true when parser_ros 1.4.0 landed. It is built against the
1.0 layout, and both new members sit at the tail of their structs.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@facontidavide
facontidavide force-pushed the refactor/pre-1.0-freeze-touchups branch from 4b28e6b to 1f6a2f2 Compare November 14, 2026 08:46
@facontidavide
facontidavide merged commit a286624 into main Nov 14, 2026
4 checks passed
@facontidavide
facontidavide deleted the refactor/pre-1.0-freeze-touchups branch November 14, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant