mirror of
https://github.com/morluto/rea.git
synced 2026-11-10 00:36:35 +00:00
test: guard target format vocabularies and DOL snapshot saves (#7481)
* test(mcp): save and reopen a GameCube DOL snapshot
#7290 reported that DOL Evidence could not be bundled or saved; 50822e1ef
fixed the bundle manifest and added bundle export/import coverage, but no
test saved a DOL session through close_binary. Save a DOL snapshot with
recorded Evidence, check its target and artifact manifest, then reopen it
and replay the read without running the provider again.
* test(binary): require every target format in each target vocabulary
A new target format must be added by hand to the Evidence subject,
bundle manifest, snapshot target and live summary vocabularies; missing
one caused #7290. Give every BinaryTarget format a fixture through a
mapped type, so a new format fails compilation until it has one, and
push each fixture through the producers that persist or project targets.
Caller-selected format hints must name executable target formats.
This is a guard until target formats have a single owner.
* test(mcp): assert the replayed DOL result and the owned replay limitation
The DOL snapshot replay test checked the subject and the provider-call
count but not the answer, so a replay returning null or another value
would pass. Compare the replayed normalized result with the original.
Name the replay limitation as SNAPSHOT_REPLAY_LIMITATION in the snapshot
cache that adds it, and assert that value instead of repeating the
sentence.
* test: list Intel HEX and S-record targets in the vocabulary guard
Upstream added the intel-hex and srec formats (#7136). The guard requires
a fixture for every target format, so after merging main it no longer
typechecked; both formats now have archive fixtures and pass the same
persistence and projection checks.
* test: list UnityFS among the target format fixtures
Upstream #7699 added the unityfs target format, so the vocabulary test's
per-format fixtures must name it; without one the test no longer typechecks
against main.
* test: list uImage among the target format fixtures
Upstream #7234 added the uimage target format, so the vocabulary test's
per-format fixtures must name it; without one the test no longer typechecks
against main.
* test: list the ESP image among the target format fixtures
Upstream #7498 added the esp-image target format, so the vocabulary test's
per-format fixtures must name it; without one the test no longer typechecks
against main.
This commit is contained in:
1 parent
19ab239278
commit
54756ff24e
3 files changed
+250
-1
No files matched your search
@@ -140,6 +140,10 @@ export const requiresNativeSourceAdmissionBeforeReplay = (
|
||||
providerId: string | undefined,
|
||||
): boolean => process.platform === "win32" && providerId === "ghidra";
|
||||
|
||||
/** Limitation that marks every observation replayed from a snapshot. */
|
||||
export const SNAPSHOT_REPLAY_LIMITATION =
|
||||
"Loaded from a local REA analysis snapshot; this call did not re-run the provider.";
|
||||
|
||||
/** Bounded in-memory cache for one immutable binary identity. */
|
||||
export class AnalysisSnapshotCache {
|
||||
readonly #entries = new Map<string, AnalysisSnapshotEntry>();
|
||||
@@ -496,7 +500,7 @@ export class AnalysisSnapshotCache {
|
||||
analysisProfile: structuredClone(profile),
|
||||
limitations: [
|
||||
...cached.execution.limitations,
|
||||
"Loaded from a local REA analysis snapshot; this call did not re-run the provider.",
|
||||
SNAPSHOT_REPLAY_LIMITATION,
|
||||
],
|
||||
...(cached.execution.relationship_coverage === null &&
|
||||
RELATIONSHIP_OPERATIONS.has(operation)
|
||||
|
||||
Reference in new issue
Block a user