diff --git a/docs/erlang-beam.md b/docs/erlang-beam.md index 0ca020f748..703d2ecf49 100644 --- a/docs/erlang-beam.md +++ b/docs/erlang-beam.md @@ -91,6 +91,13 @@ nothing, and `fields: []` returns only `source_index`. Offset/limit page matchin rows in original order (defaults 0/64). Unfiltered pages slice the retained collection; queries do not decode the file again. +For `chunks`, `names` matches the four-character IFF chunk tag (for example +`"AtU8"`, `"Code"`, `"ExpT"`); available `fields` are `index`, `name`, +`location`, and `payload`. For `lambdas`, `names` matches the resolved function +name from the atom table; `null` names (unresolved atom indices) are never +selected by a name filter. For `atoms`, `names` matches the decoded atom name +string. + `beam` keeps the module, form/Code bounds, original source coverage, and table counts. A null count means no table was decoded; zero means a decoded empty table. Missing tables and unresolved atom names remain explicit, and an empty diff --git a/tests/acceptance/applications/erlangBeamViews.test.ts b/tests/acceptance/applications/erlangBeamViews.test.ts index 8eca0f211f..b8778311c3 100644 --- a/tests/acceptance/applications/erlangBeamViews.test.ts +++ b/tests/acceptance/applications/erlangBeamViews.test.ts @@ -74,10 +74,20 @@ const checkSelectors = async ( { collection: "lambdas", fields: ["index", "old_unique"] }, [{ source_index: 0, index: 0, old_unique: 42 }], ], + [ + { + collection: "lambdas", + names: ["start"], + fields: ["function", "arity", "old_unique"], + }, + [{ source_index: 0, function: "start", arity: 1, old_unique: 42 }], + ], + [{ collection: "lambdas", names: ["missing"], fields: [] }, []], [ { collection: "chunks", names: ["Code"], fields: ["index", "name"] }, [{ source_index: 1, index: 1, name: "Code" }], ], + [{ collection: "chunks", names: ["Xyzz"], fields: [] }, []], ] as const) { const result = await call("inspect_analysis_view", { source: { kind: "retained-evidence", evidence_id },