Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
9255ab3
docs(design): add 045 — retire aimdb-ws-protocol, converge every tran…
Jul 17, 2026
33e2c4c
feat(core): wildcard subscribe + topic-tagged subscription streams fo…
Jul 17, 2026
89d8209
feat(websocket-connector): speak AimX on the WebSocket transport (des…
Jul 17, 2026
2ea53d2
feat(wasm-adapter): rewrite WsBridge on run_client with the AimX code…
Jul 17, 2026
a8a40e2
chore(workspace): delete aimdb-ws-protocol and retire the ws wire res…
Jul 17, 2026
377869c
chore(external): update embassy subproject commit reference
Jul 17, 2026
12bdbdb
Merge branch 'main' into feat/retire-aimdb-ws-protocol
lxsaah Jul 17, 2026
c49e9ef
feat: retire aimdb-ws-protocol in favor of AimX, update related compo…
lxsaah Jul 18, 2026
9fb3be1
feat: add embassy-futures dependency and update embassy submodule
lxsaah Jul 18, 2026
74fd1b8
fix README output
lxsaah Jul 18, 2026
94fd894
feat: remove aimdb-ws-protocol and update related components to AimX
lxsaah Jul 19, 2026
cbf715b
feat: enhance safety for wasm32 by feature-gating Send and Sync for C…
lxsaah Jul 19, 2026
8d2d6ac
feat: update AimX protocol to version 3.0 with breaking changes in ha…
lxsaah Jul 19, 2026
9da13a9
feat: update topic separator from '/' to '.' for wildcard subscriptio…
lxsaah Jul 19, 2026
c70263f
feat: enhance subscription updates to include skipped record count
lxsaah Jul 19, 2026
2ef058f
Refactor documentation and comments across multiple modules
lxsaah Jul 19, 2026
c06b07e
feat: remove collect_outbound_topic_type_ids method from AimDb
lxsaah Jul 19, 2026
1714e62
feat: add fan-out encoding benchmarks for allocation and latency comp…
lxsaah Jul 20, 2026
548de31
feat: add fan-out socket-driven benchmark for performance measurement
lxsaah Jul 20, 2026
266e34b
feat: add splicing method for outbound event data to optimize seriali…
lxsaah Jul 20, 2026
0fa1346
format
lxsaah Jul 22, 2026
aba0fef
feat: refine SendFuture implementation and simplify recv method in Wa…
lxsaah Jul 22, 2026
182849a
Merge branch 'main' into feat/retire-aimdb-ws-protocol
lxsaah Jul 24, 2026
e8b2cb9
perf(remote): carry subscribe updates as JSON bytes, not a Value tree
lxsaah Jul 24, 2026
9d0930d
format
lxsaah Jul 24, 2026
60fd1e1
Merge branch 'main' into feat/retire-aimdb-ws-protocol
lxsaah Jul 24, 2026
a32b05e
chore: update changelogs and design documents to reflect Design 047 c…
lxsaah Jul 25, 2026
ce23c1a
doc: add contract clarification for write_frame_splicing_data function
lxsaah Jul 25, 2026
c9a803e
feat: implement pattern containment check for subscription ACLs
lxsaah Jul 25, 2026
da0db91
feat: implement WebSocket protocol versioning via upgrade URL for Aim…
lxsaah Jul 25, 2026
eadfab1
fix: clarify serialization behavior in write_frame and add assertions…
lxsaah Jul 25, 2026
a61c02b
chore: update changelogs and documentation to reflect design 047 changes
lxsaah Jul 25, 2026
a5ac2e2
feat: enhance broadcast mechanism to surface dropped updates as seq gaps
lxsaah Jul 25, 2026
baf1327
fix: update subscription topic syntax from 'sensors/#' to 'sensors.#'…
lxsaah Jul 25, 2026
7bcdcf9
fix: clarify documentation for SendFuture and its safety guarantees i…
lxsaah Jul 25, 2026
ce990f1
feat: add CancelToken and CancelHandle for wasm-runtime support
lxsaah Jul 25, 2026
0d35d19
fix: ensure non-terminal `#` in grants only covers its suffix
lxsaah Jul 27, 2026
443631b
feat: implement late-join snapshot sequence numbering to improve loss…
lxsaah Jul 27, 2026
eaab01d
feat: implement loss-aware subscription updates and reporting for Aim…
lxsaah Jul 27, 2026
182bd47
feat: enhance WebSocket connection handling and add integration tests…
lxsaah Jul 27, 2026
97f475e
feat: update WebSocket connection URL to use versioned endpoint
lxsaah Jul 27, 2026
9dfb52d
feat: implement pending call management to reclaim abandoned calls in…
lxsaah Jul 27, 2026
5b5b081
feat: enhance late-join snapshot handling with sequence numbering and…
lxsaah Jul 28, 2026
153a9da
feat: enhance snapshot handling and error logging in client-server co…
lxsaah Jul 28, 2026
4d4afa1
feat: implement cancellation for abandoned calls in client engine to …
lxsaah Jul 28, 2026
1987cc6
feat: limit inbound frame funnel to prevent memory overflow and impro…
lxsaah Jul 28, 2026
ab7755e
feat: add headless browser toolchain for WASM tests and ensure Chrome…
lxsaah Jul 28, 2026
8e73a32
feat: add Docker features to devcontainer configuration for improved …
lxsaah Jul 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,34 @@ RUN apt-get update && apt-get install -y \
unzip \
&& rm -rf /var/lib/apt/lists/*

# --------------------------------------------------------------------
# Chrome + chromedriver for headless WASM tests (make wasm-test)
#
# chromedriver is pinned to the installed Chrome's major version. wasm-pack
# would otherwise download the newest driver on its own, which refuses to drive
# an older browser, and the bare driver binary also needs Chrome's shared libs
# (libnspr4 & friends) that only the browser package pulls in.
# --------------------------------------------------------------------
RUN curl -fsSL https://dl.google.com/linux/linux_signing_key.pub \
| gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/google-chrome.gpg] https://dl.google.com/linux/chrome/deb/ stable main" \
> /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update && apt-get install -y --no-install-recommends google-chrome-stable \
&& rm -rf /var/lib/apt/lists/* \
&& CHROME_MAJOR="$(google-chrome --version | sed -E 's/[^0-9]*([0-9]+).*/\1/')" \
&& DRIVER_URL="$(curl -fsSL https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json \
| jq -r --arg m "${CHROME_MAJOR}." '[.versions[] | select(.version | startswith($m))] | last | .downloads.chromedriver[] | select(.platform == "linux64") | .url')" \
&& [ -n "$DRIVER_URL" ] && [ "$DRIVER_URL" != "null" ] \
&& curl -fsSL -o /tmp/chromedriver.zip "$DRIVER_URL" \
&& unzip -oq /tmp/chromedriver.zip -d /tmp \
&& install -m 0755 /tmp/chromedriver-linux64/chromedriver /usr/local/bin/chromedriver \
&& rm -rf /tmp/chromedriver.zip /tmp/chromedriver-linux64 \
&& chromedriver --version

# Points wasm-pack/wasm-bindgen-test at the pinned driver instead of letting them
# download the newest one into ~/.cache/.wasm-pack.
ENV CHROMEDRIVER=/usr/local/bin/chromedriver

# --------------------------------------------------------------------
# Create non-root user (with sudo) as root
# --------------------------------------------------------------------
Expand Down
9 changes: 8 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
"name": "Rust Dev-Container",
"image": "ghcr.io/aimdb-dev/devcontainer:latest",
"workspaceFolder": "/aimdb",
"features": {
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"moby": true,
"installDockerBuildx": true,
"dockerDashComposeVersion": "v2"
}
},
"runArgs": [
"--privileged",
"--network=host",
Expand Down Expand Up @@ -38,4 +45,4 @@
"containerEnv": {
"SHELL": "/bin/bash"
}
}
}
17 changes: 17 additions & 0 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,23 @@ jobs:
pkg-config --version
"

- name: Test headless browser toolchain
run: |
docker run --rm aimdb-devcontainer:test bash -c '
set -e
google-chrome --version
chromedriver --version
# wasm-bindgen-test drives Chrome through chromedriver, which refuses a
# browser from a different major version.
chrome_major="$(google-chrome --version | sed -E "s/[^0-9]*([0-9]+).*/\1/")"
driver_major="$(chromedriver --version | sed -E "s/[^0-9]*([0-9]+).*/\1/")"
[ "$chrome_major" = "$driver_major" ] || {
echo "Chrome $chrome_major and chromedriver $driver_major disagree"; exit 1;
}
[ "$CHROMEDRIVER" = /usr/local/bin/chromedriver ]
google-chrome --headless --no-sandbox --disable-gpu --dump-dom about:blank >/dev/null
'

- name: Test user permissions
run: |
docker run --rm aimdb-devcontainer:test bash -c "
Expand Down
64 changes: 63 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
> - [aimdb-uds-connector/CHANGELOG.md](aimdb-uds-connector/CHANGELOG.md)
> - [aimdb-serial-connector/CHANGELOG.md](aimdb-serial-connector/CHANGELOG.md)
> - [aimdb-tcp-connector/CHANGELOG.md](aimdb-tcp-connector/CHANGELOG.md)
> - [aimdb-ws-protocol/CHANGELOG.md](aimdb-ws-protocol/CHANGELOG.md)
> - [aimdb-wasm-adapter/CHANGELOG.md](aimdb-wasm-adapter/CHANGELOG.md)
> - [aimdb-sync/CHANGELOG.md](aimdb-sync/CHANGELOG.md)
> - [aimdb-client/CHANGELOG.md](aimdb-client/CHANGELOG.md)
Expand All @@ -30,6 +29,69 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed — Design 047: AimX protocol version handshake gate (breaking)

`PROTOCOL_VERSION` is bumped **`"2.0"` → `"3.0"`** to mark the design-047
convergence as a breaking wire change (`record.query` results moved from
`{values, count}` to `{records, total}`; wildcard subscribe / auto-subscribe
added). The `hello` handshake now **negotiates** the version instead of ignoring
it: the server refuses a client whose declared major version is incompatible —
or absent — with a new `RpcError::VersionMismatch` (wire code
`version_mismatch`), and the client rejects a pre-3.x server's `welcome`
symmetrically. Compatibility is by **major** version (`version_compatible()`,
exported from `aimdb_core::remote`); a missing/malformed version fails closed.

- **Breaking:** a pre-3.x client (including any hand-parsing the old
`ServerMessage` shape) is refused at `hello` and can no longer connect — it
fails fast at the handshake rather than tripping over the new reply shapes on
its first call. First-party clients (`aimdb-client`, and the `aimdb-cli` /
`aimdb-mcp` tools riding it) declare `"3.0"` and are unaffected.
- **Caveat carried from design 047 §3.6:** server-seeded auto-subscriptions are
invisible to `run_client`-based consumers. Client authors upgrading to 3.0
must drive their own `subscribe` for records they want streamed.
- **WebSocket / browser upgrade gate.** The socket transports negotiate the
version inside `hello`, but the WS server runs `reads_hello:false` and a
browser cannot set WebSocket handshake headers — so a WS client declares its
version in the upgrade URL (`…/ws?v=3.0`) and the server refuses an
incompatible/absent one with **HTTP 426 Upgrade Required** before the socket
opens. New `aimdb_core::remote::{VERSION_PARAM, ws_url_with_version}` hold the
contract; the browser `WsBridge`/`WasmDb.discover` and the Rust
`WsClientConnector` append it automatically. A stale browser client now fails
at the upgrade rather than on its first frame.
- Schema-level record migration over AimX (the `Migratable` trait) is
**out of scope** here and tracked as a follow-up (`with_migration`).

### Changed — Design 047: dot is the one topic separator (breaking)

`topic_matches` (wildcard subscribe / WS fan-out) now splits topic patterns on
**`.` only** — RabbitMQ topic-exchange semantics (dot segments, `*`
single-level, `#` multi-level). Previously it split on `/`, so a dot-separated
key like `temp.vienna` (the codebase's dominant key style) silently failed to
match `temp.*` — a correctness bug. `/` is no longer a segment separator; it
stays only in external broker addresses (`mqtt://sensors/temp/x`), which are
unaffected.

- **Breaking:** WebSocket / browser clients must subscribe with dot patterns
(`sensors.#`, not `sensors/#`). The WS connector, its e2e suite, ACL topics,
and the wasm-adapter README were migrated accordingly.
- `topic_leaf` (entity extraction) remains tolerant of both `.` and `/`.

### Changed — Design 047: one wire protocol (AimX) for every transport (breaking)

Implementation of [design 047](docs/design/047-retire-ws-protocol-converge-on-aimx.md)
(the 038 §3.9 / 036 A2 protocol unification). The `aimdb-ws-protocol` crate is
**deleted**; the WebSocket connector and the browser `WsBridge` now speak the
same AimX tagged frames as UDS/serial/TCP, over the same session engines.
AimX gained the two features that justified the ws fork: wildcard /
multi-record subscribe (one subscription fans in every matching record, events
tagged with the record that fired, one late-join snapshot per match) and the
shared `record.query`/`record.list` result shapes (`{records, total}` with
`QueryRecord{topic, payload, ts}` rows; `{name, schema_type, entity}` topic
rows). **Breaking for browser clients** (the JS `WsBridge` API is unchanged,
but the wire is new); breaking Rust API changes are listed per crate
(`aimdb-core`, `aimdb-websocket-connector`, `aimdb-wasm-adapter`,
`aimdb-client`, `aimdb-persistence`).

### Changed — knx-pico submodule

- **Submodule:** bump `_external/knx-pico` to upstream `0.3` (commit 158325bd4)
Expand Down
11 changes: 1 addition & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ members = [
"aimdb-uds-connector",
"aimdb-serial-connector",
"aimdb-tcp-connector",
"aimdb-ws-protocol",
"aimdb-wasm-adapter",
"tools/aimdb-cli",
"tools/aimdb-mcp",
Expand Down
Loading