[PR #6306] chore(experiments): prototype MCAP summary inspection #7272

Open
opened 2026-11-01 21:46:39 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6306
Author: @diyasharma05
Created: 10/22/2026
Status: 🔄 Open

Base: main ← Head: feat/mcap-inspection-prototype


📝 Commits (10+)

  • 6f21e34 chore(experiments): prototype MCAP summary inspection
  • 4d058ae fix(experiments): bound MCAP records and preserve failure evidence
  • 3d8c034 fix(ci): include MCAP experiment in Knip cache inputs
  • bc23221 fix(experiments): separate Node tests from Vitest ownership
  • 7b48000 test(experiments): cover MCAP variable-field overruns
  • a9c39fe chore(experiments): merge main into MCAP prototype
  • 4d1d075 test(experiments): bind MCAP mutation to final range
  • 14f0c2d fix(experiments): retain MCAP failure evidence
  • 42b538f fix(mcap): preserve partial file admission evidence
  • cf1672f fix(ci): retain MCAP sources in lint cache inputs

📊 Changes

24 files changed (+2862 additions, -20 deletions)

View changed files

➕ experiments/mcap-inspection/README.md (+199 -0)
➕ experiments/mcap-inspection/admission-fixture.ts (+59 -0)
➕ experiments/mcap-inspection/admission.node-test.ts (+205 -0)
➕ experiments/mcap-inspection/cli.node-test.ts (+102 -0)
➕ experiments/mcap-inspection/cli.ts (+195 -0)
➕ experiments/mcap-inspection/evidence.node-test.ts (+171 -0)
➕ experiments/mcap-inspection/file-state.ts (+126 -0)
➕ experiments/mcap-inspection/fixtures.ts (+36 -0)
➕ experiments/mcap-inspection/lifecycle.node-test.ts (+159 -0)
➕ experiments/mcap-inspection/limits.node-test.ts (+86 -0)
➕ experiments/mcap-inspection/limits.ts (+126 -0)
➕ experiments/mcap-inspection/output.node-test.ts (+104 -0)
➕ experiments/mcap-inspection/package-lock.json (+444 -0)
➕ experiments/mcap-inspection/package.json (+22 -0)
➕ experiments/mcap-inspection/partial-read.node-test.ts (+118 -0)
➕ experiments/mcap-inspection/records.node-test.ts (+99 -0)
➕ experiments/mcap-inspection/records.ts (+30 -0)
➕ experiments/mcap-inspection/request.node-test.ts (+199 -0)
➕ experiments/mcap-inspection/request.ts (+98 -0)
➕ experiments/mcap-inspection/summary.node-test.ts (+121 -0)

...and 4 more files

📄 Description

Summary

This standalone MCAP experiment reports channels, schemas, declared counts/times and chunk compression from a recording's summary. --schema ID returns original schema bytes as base64. It lives under experiments/mcap-inspection, outside REA's CLI/MCP catalog and published package.

Review fixes preserve caller arguments, consumed read ranges and hashes, independent final file observations, and now partial admission evidence. A rejected directory or failed open/stat retains its resolved path and facts already observed; identity mismatch retains both metadata snapshots. Successful receipts keep their existing shape. The lint cache explicitly includes the experiment's TypeScript files after merging with upstream.

Scope and boundaries

  • Private package with pinned @mcap/core; no REA runtime dependency added.
  • Reads a caller-selected regular local file. No payload decoding, decompression, robot connection, target execution or inspection-time network access.
  • Reads are capped at 4 MiB before allocation; JSON at 1 MiB. Overflow preserves file/read evidence and explicitly omits the report or oversized request, retaining request JSON size/hash. Unreportable requests fail before target access.
  • Counts are declarations; range hashes are not whole-file hashes. Unknown facts and unsupported summaries remain explicit.
  • Maintainer scope/dependency approval and retained-Evidence integration remain pending. This is an exploratory prototype, not authorization for integration.

Validation performed

For cf1672f907ef5cd3f67160927b680002e4417dfd, Windows x64, Node 24.22.1 / npm 11.16.0:

  • npm test --prefix experiments/mcap-inspection built successfully: 47 passed, 1 existing symlink privilege skip. Six admission CLI regressions failed before the fix and passed afterward. They cover directory/missing input, open/stat errors, real pathname replacement and combined admission/close failure; guards require the intended stages, no target reads, and actual descriptor closure. A near-budget case preserves admission and cleanup facts when request provenance is omitted.
  • Manual directory and missing-file invocations retain partial observations. The pinned public demo succeeds with the same successful receipt shape and unchanged input hash.
  • npm run check:fast passed typecheck and lint. npm run verify:test-discovery found all 2,483 root test files exactly once.
  • The focused lint-cache inventory assertion passed. A real three-way configuration merge and Turbo 2.11.7 probe confirmed the new input survives upstream's changes and source edits invalidate the cache. The full local static-check report test file had 7 passes and 1 existing Windows jscpd path-format failure; no full-file pass is claimed.

The README records wall time, CPU, peak memory and output size; concurrent validation prevents attributing timing differences to the fix. Cold-storage and token costs are unmeasured. Root CI does not run the standalone suite. Linux was not rerun for these fixes; the earlier WSL2 run covered a prior revision. Whole-file integrity, real robot recordings, macOS and large recordings remain unverified. The historical intermittent Windows metadata change remains unexplained; failures now retain the observations.

Author readiness

Human owner: @diyasharma05

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • Material scope and reader-dependency questions are resolved.
  • The human owner has reviewed the change and declared it ready.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/6306 **Author:** [@diyasharma05](https://github.com/diyasharma05) **Created:** 10/22/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/mcap-inspection-prototype` --- ### 📝 Commits (10+) - [`6f21e34`](https://github.com/morluto/rea/commit/6f21e34253719ee07d740fb407811583a243002f) chore(experiments): prototype MCAP summary inspection - [`4d058ae`](https://github.com/morluto/rea/commit/4d058aee7a99a0616cbf592afa936146407f1ea1) fix(experiments): bound MCAP records and preserve failure evidence - [`3d8c034`](https://github.com/morluto/rea/commit/3d8c034f5764115647cc9127d141a5c37c5343f8) fix(ci): include MCAP experiment in Knip cache inputs - [`bc23221`](https://github.com/morluto/rea/commit/bc23221d31c2a7c061d7898167fc47260cb5de98) fix(experiments): separate Node tests from Vitest ownership - [`7b48000`](https://github.com/morluto/rea/commit/7b48000dca4c4e559d72c0bd2ff072b1dfb10ddc) test(experiments): cover MCAP variable-field overruns - [`a9c39fe`](https://github.com/morluto/rea/commit/a9c39fe24628d704f4b134b546d27610c41a1b99) chore(experiments): merge main into MCAP prototype - [`4d1d075`](https://github.com/morluto/rea/commit/4d1d075a8d95364a4d0151f1fa8b239551b7ea50) test(experiments): bind MCAP mutation to final range - [`14f0c2d`](https://github.com/morluto/rea/commit/14f0c2d3043596a1d0de684f8749422586175a6e) fix(experiments): retain MCAP failure evidence - [`42b538f`](https://github.com/morluto/rea/commit/42b538f9ce873a8d66fb34aafe232bb9287c7d8f) fix(mcap): preserve partial file admission evidence - [`cf1672f`](https://github.com/morluto/rea/commit/cf1672f907ef5cd3f67160927b680002e4417dfd) fix(ci): retain MCAP sources in lint cache inputs ### 📊 Changes **24 files changed** (+2862 additions, -20 deletions) <details> <summary>View changed files</summary> ➕ `experiments/mcap-inspection/README.md` (+199 -0) ➕ `experiments/mcap-inspection/admission-fixture.ts` (+59 -0) ➕ `experiments/mcap-inspection/admission.node-test.ts` (+205 -0) ➕ `experiments/mcap-inspection/cli.node-test.ts` (+102 -0) ➕ `experiments/mcap-inspection/cli.ts` (+195 -0) ➕ `experiments/mcap-inspection/evidence.node-test.ts` (+171 -0) ➕ `experiments/mcap-inspection/file-state.ts` (+126 -0) ➕ `experiments/mcap-inspection/fixtures.ts` (+36 -0) ➕ `experiments/mcap-inspection/lifecycle.node-test.ts` (+159 -0) ➕ `experiments/mcap-inspection/limits.node-test.ts` (+86 -0) ➕ `experiments/mcap-inspection/limits.ts` (+126 -0) ➕ `experiments/mcap-inspection/output.node-test.ts` (+104 -0) ➕ `experiments/mcap-inspection/package-lock.json` (+444 -0) ➕ `experiments/mcap-inspection/package.json` (+22 -0) ➕ `experiments/mcap-inspection/partial-read.node-test.ts` (+118 -0) ➕ `experiments/mcap-inspection/records.node-test.ts` (+99 -0) ➕ `experiments/mcap-inspection/records.ts` (+30 -0) ➕ `experiments/mcap-inspection/request.node-test.ts` (+199 -0) ➕ `experiments/mcap-inspection/request.ts` (+98 -0) ➕ `experiments/mcap-inspection/summary.node-test.ts` (+121 -0) _...and 4 more files_ </details> ### 📄 Description ## Summary This standalone MCAP experiment reports channels, schemas, declared counts/times and chunk compression from a recording's summary. `--schema ID` returns original schema bytes as base64. It lives under `experiments/mcap-inspection`, outside REA's CLI/MCP catalog and published package. Review fixes preserve caller arguments, consumed read ranges and hashes, independent final file observations, and now partial admission evidence. A rejected directory or failed open/stat retains its resolved path and facts already observed; identity mismatch retains both metadata snapshots. Successful receipts keep their existing shape. The lint cache explicitly includes the experiment's TypeScript files after merging with upstream. ## Scope and boundaries - Private package with pinned `@mcap/core`; no REA runtime dependency added. - Reads a caller-selected regular local file. No payload decoding, decompression, robot connection, target execution or inspection-time network access. - Reads are capped at 4 MiB before allocation; JSON at 1 MiB. Overflow preserves file/read evidence and explicitly omits the report or oversized request, retaining request JSON size/hash. Unreportable requests fail before target access. - Counts are declarations; range hashes are not whole-file hashes. Unknown facts and unsupported summaries remain explicit. - Maintainer scope/dependency approval and retained-Evidence integration remain pending. This is an exploratory prototype, not authorization for integration. ## Validation performed For `cf1672f907ef5cd3f67160927b680002e4417dfd`, Windows x64, Node **24.22.1** / npm **11.16.0**: - `npm test --prefix experiments/mcap-inspection` built successfully: **47 passed, 1 existing symlink privilege skip**. Six admission CLI regressions failed before the fix and passed afterward. They cover directory/missing input, open/stat errors, real pathname replacement and combined admission/close failure; guards require the intended stages, no target reads, and actual descriptor closure. A near-budget case preserves admission and cleanup facts when request provenance is omitted. - Manual directory and missing-file invocations retain partial observations. The pinned public demo succeeds with the same successful receipt shape and unchanged input hash. - `npm run check:fast` passed typecheck and lint. `npm run verify:test-discovery` found all **2,483** root test files exactly once. - The focused lint-cache inventory assertion passed. A real three-way configuration merge and Turbo 2.11.7 probe confirmed the new input survives upstream's changes and source edits invalidate the cache. The full local static-check report test file had **7 passes and 1 existing Windows jscpd path-format failure**; no full-file pass is claimed. The [README](https://github.com/diyasharma05/rea/blob/cf1672f907ef5cd3f67160927b680002e4417dfd/experiments/mcap-inspection/README.md) records wall time, CPU, peak memory and output size; concurrent validation prevents attributing timing differences to the fix. Cold-storage and token costs are unmeasured. Root CI does not run the standalone suite. Linux was not rerun for these fixes; the earlier WSL2 run covered a prior revision. Whole-file integrity, real robot recordings, macOS and large recordings remain unverified. The historical intermittent Windows metadata change remains unexplained; failures now retain the observations. ## Author readiness Human owner: @diyasharma05 - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge - [ ] Material scope and reader-dependency questions are resolved. - [ ] The human owner has reviewed the change and declared it ready. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#7272
No description provided.