[PR #6973] [MERGED] test(erlang): cover lambdas names filter and chunks miss in BEAM views #7487

Closed
opened 2026-11-01 21:48:11 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6973
Author: @saiyam-jain-dev
Created: 10/24/2026
Status: ✅ Merged
Merged: 10/24/2026
Merged by: @morluto

Base: main ← Head: test/beam-views-coverage


📝 Commits (1)

  • bb34b6b test(erlang): cover lambdas names filter and chunks miss in BEAM views

📊 Changes

2 files changed (+17 additions, -0 deletions)

View changed files

📝 docs/erlang-beam.md (+7 -0)
📝 tests/acceptance/applications/erlangBeamViews.test.ts (+10 -0)

📄 Description

Summary

Extends regression test coverage for BEAM analysis view queries (inspect_erlang_beam with --view / inspect-analysis-view), adding negative and positive selector checks for the lambdas and chunks collections. Also clarifies in docs/erlang-beam.md what target names are selected across each BEAM collection type.

Problem and expected behavior

The recently added BEAM view projection (#6943) supports five collection kinds (atoms, exports, imports, lambdas, and chunks). However:

  1. tests/acceptance/applications/erlangBeamViews.test.ts only asserted field projections on lambdas without exercising name filtering, and lacked an explicit negative check for nonexistent chunk tags.
  2. docs/erlang-beam.md listed available collection names but did not explicitly define the exact string resolution targets for chunks (4-char IFF tags), lambdas (resolved function names, excluding nulls), and atoms (decoded atom names).

Expected behavior:

  • names: ["start"] on lambdas selects only lambda entries whose resolved function name matches "start".
  • Missing names on lambdas and missing chunk tags on chunks return empty items ([]).
  • Documentation explicitly states the string resolution semantics for each collection.

Change and scope

  • Added collection: "lambdas" selector cases to checkSelectors in tests/acceptance/applications/erlangBeamViews.test.ts:
    • names: ["start"] -> returns the matching lambda record with requested fields.
    • names: ["missing"] -> returns [].
  • Added collection: "chunks" negative selector case:
    • names: ["Xyzz"] -> returns [].
  • Added clarifying documentation in docs/erlang-beam.md specifying what names matches across chunks, lambdas, and atoms.

Not applicable for maintainer scope decisions (this is focused test and documentation coverage within existing boundaries).

Contract and boundary impact

  • Semantic owner and earliest changed stage: src/domain/analysisView/erlangBeamView.ts / acceptance tests & docs
  • Contribution scope fit and linked maintainer decision: not applicable (standard test & doc enhancement)
  • CLI and MCP/tool-catalog contract: none (no schema or tool signatures changed)
  • Provider, bridge, target-format, or platform compatibility: all platforms
  • Evidence, artifact, provenance, or reconstruction contract: none
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): none
  • Generated metadata impact: none

Expected effects:

  • Documentation or usability only; no target interaction.

Evidence and regression coverage

  • Tests added or updated: tests/acceptance/applications/erlangBeamViews.test.ts
  • Base reproduction or other evidence: Source-derived inspection of erlangBeamView.ts and existing selector table.
  • User-visible CLI/MCP output (if applicable): none
  • Remaining proof gaps: Full test suite requires pinned Node.js 24 environment.

Validation performed

  • git diff — verified clean, focused diff touching only the test file and documentation.
  • git rebase main — rebased cleanly on latest upstream/main (4a041ae75).

Compatibility, safety, and release

  • Breaking changes or migration steps: none
  • Real Hopper/Ghidra, browser, or OS coverage: platform-independent
  • Package or release metadata impact: none
  • Security, privacy, process, or containment review: safe

Author readiness

Human owner: @saiyam-jain-dev

  • 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

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 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/6973 **Author:** [@saiyam-jain-dev](https://github.com/saiyam-jain-dev) **Created:** 10/24/2026 **Status:** ✅ Merged **Merged:** 10/24/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `test/beam-views-coverage` --- ### 📝 Commits (1) - [`bb34b6b`](https://github.com/morluto/rea/commit/bb34b6b59180df6312e34a66e3e07e51bfd9a488) test(erlang): cover lambdas names filter and chunks miss in BEAM views ### 📊 Changes **2 files changed** (+17 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/erlang-beam.md` (+7 -0) 📝 `tests/acceptance/applications/erlangBeamViews.test.ts` (+10 -0) </details> ### 📄 Description ## Summary Extends regression test coverage for BEAM analysis view queries (`inspect_erlang_beam` with `--view` / `inspect-analysis-view`), adding negative and positive selector checks for the `lambdas` and `chunks` collections. Also clarifies in `docs/erlang-beam.md` what target names are selected across each BEAM collection type. ## Problem and expected behavior The recently added BEAM view projection (`#6943`) supports five collection kinds (`atoms`, `exports`, `imports`, `lambdas`, and `chunks`). However: 1. `tests/acceptance/applications/erlangBeamViews.test.ts` only asserted field projections on `lambdas` without exercising name filtering, and lacked an explicit negative check for nonexistent chunk tags. 2. `docs/erlang-beam.md` listed available collection names but did not explicitly define the exact string resolution targets for `chunks` (4-char IFF tags), `lambdas` (resolved function names, excluding nulls), and `atoms` (decoded atom names). Expected behavior: - `names: ["start"]` on `lambdas` selects only lambda entries whose resolved function name matches `"start"`. - Missing names on `lambdas` and missing chunk tags on `chunks` return empty items (`[]`). - Documentation explicitly states the string resolution semantics for each collection. ## Change and scope - Added `collection: "lambdas"` selector cases to `checkSelectors` in `tests/acceptance/applications/erlangBeamViews.test.ts`: - `names: ["start"]` -> returns the matching lambda record with requested fields. - `names: ["missing"]` -> returns `[]`. - Added `collection: "chunks"` negative selector case: - `names: ["Xyzz"]` -> returns `[]`. - Added clarifying documentation in `docs/erlang-beam.md` specifying what `names` matches across `chunks`, `lambdas`, and `atoms`. Not applicable for maintainer scope decisions (this is focused test and documentation coverage within existing boundaries). ## Contract and boundary impact - Semantic owner and earliest changed stage: `src/domain/analysisView/erlangBeamView.ts` / acceptance tests & docs - Contribution scope fit and linked maintainer decision: not applicable (standard test & doc enhancement) - CLI and MCP/tool-catalog contract: none (no schema or tool signatures changed) - Provider, bridge, target-format, or platform compatibility: all platforms - Evidence, artifact, provenance, or reconstruction contract: none - Target selection, authority, upstream behavior, and cleanup details (if applicable): none - Generated metadata impact: none Expected effects: - [x] Documentation or usability only; no target interaction. ## Evidence and regression coverage - Tests added or updated: `tests/acceptance/applications/erlangBeamViews.test.ts` - Base reproduction or other evidence: Source-derived inspection of `erlangBeamView.ts` and existing selector table. - User-visible CLI/MCP output (if applicable): none - Remaining proof gaps: Full test suite requires pinned Node.js 24 environment. ## Validation performed - `git diff` — verified clean, focused diff touching only the test file and documentation. - `git rebase main` — rebased cleanly on latest `upstream/main` (`4a041ae75`). ## Compatibility, safety, and release - Breaking changes or migration steps: none - Real Hopper/Ghidra, browser, or OS coverage: platform-independent - Package or release metadata impact: none - Security, privacy, process, or containment review: safe ## Author readiness Human owner: @saiyam-jain-dev - [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 - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:48:11 +00:00
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#7487
No description provided.