Compare commits
378
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
25e0709b2b | ||
|
|
8aad04e82c | ||
|
|
0bc422d7be | ||
|
|
2895a18ca9 | ||
|
|
1f5fb6a9c9 | ||
|
|
7a6defab18 | ||
|
|
dbbf649f89 | ||
|
|
71a0e347e1 | ||
|
|
8fef2aa64e | ||
|
|
ebaaa79ca0 | ||
|
|
1d5f95dc4a | ||
|
|
f652709cac | ||
|
|
c8ef1f916c | ||
|
|
f1045001f0 | ||
|
|
4c66974724 | ||
|
|
69bd81f7f2 | ||
|
|
95b53e9584 | ||
|
|
1b6c899b03 | ||
|
|
93e29d242a | ||
|
|
c6631814e0 | ||
|
|
62c8b3da1b | ||
|
|
0c9ee56c2f | ||
|
|
501c5d45fe | ||
|
|
df3d96da80 | ||
|
|
7e3a198638 | ||
|
|
72b9ab4af1 | ||
|
|
1f2e8499dc | ||
|
|
d4f0c5e664 | ||
|
|
3f80b75708 | ||
|
|
855ed9689e | ||
|
|
59298923a5 | ||
|
|
af782dd5f5 | ||
|
|
d86d29c411 | ||
|
|
77e71d55ec | ||
|
|
168bfe5060 | ||
|
|
554ea7611e | ||
|
|
911894d758 | ||
|
|
75e7965dc3 | ||
|
|
522b9927c8 | ||
|
|
2b98fc5f51 | ||
|
|
8b1549a264 | ||
|
|
782cc3b060 | ||
|
|
f825c869d6 | ||
|
|
9240a4e9ac | ||
|
|
ba06d9ec52 | ||
|
|
af7638fa9d | ||
|
|
48b90fbaa4 | ||
|
|
c580ba940a | ||
|
|
2a78763e20 | ||
|
|
70611713e1 | ||
|
|
43e33cd49e | ||
|
|
efc491ab45 | ||
|
|
b19f9e4d2d | ||
|
|
af142f656c | ||
|
|
ffd8c9c03d | ||
|
|
7dcd23c005 | ||
|
|
ed93abed02 | ||
|
|
d005bd5dcd | ||
|
|
688defca0f | ||
|
|
3c39a3f536 | ||
|
|
e6c6fdd21a | ||
|
|
40e94aeb9d | ||
|
|
d06bfb12e5 | ||
|
|
3e7c630223 | ||
|
|
204a6f3f20 | ||
|
|
e13da084e7 | ||
|
|
94072364c7 | ||
|
|
e103a89889 | ||
|
|
edd9939879 | ||
|
|
1e38a038c6 | ||
|
|
6e25cc3c76 | ||
|
|
7369b5ee63 | ||
|
|
c85abacdb2 | ||
|
|
cbe769b504 | ||
|
|
865c35e25a | ||
|
|
1016c96e6b | ||
|
|
f0b8ae1fc8 | ||
|
|
c9982ad8bf | ||
|
|
9b08c2b1cb | ||
|
|
21aa877e5a | ||
|
|
b17487f482 | ||
|
|
30e9b83a68 | ||
|
|
5278835b53 | ||
|
|
e3a012d6c9 | ||
|
|
fd65e278be | ||
|
|
5996d8160f | ||
|
|
c938f97fb2 | ||
|
|
c45d912c91 | ||
|
|
ce748be2f3 | ||
|
|
173da755cd | ||
|
|
1eca600515 | ||
|
|
ae9a7f34e1 | ||
|
|
96d1f0f3fb | ||
|
|
beca34f522 | ||
|
|
48a683ac8c | ||
|
|
a3daf8a07b | ||
|
|
9680da76c8 | ||
|
|
46f51ee6cc | ||
|
|
c22d7cd756 | ||
|
|
4c79127fcb | ||
|
|
c8e85b962a | ||
|
|
fc0dbe7f9d | ||
|
|
23f72141d5 | ||
|
|
0b46590f8f | ||
|
|
5d12a0b4b6 | ||
|
|
9958754f6c | ||
|
|
a4b8e9ccee | ||
|
|
c6503edfc4 | ||
|
|
5dd2ce3125 | ||
|
|
811bd9f635 | ||
|
|
9e019ad27d | ||
|
|
2f1f944b6f | ||
|
|
117bd23dd5 | ||
|
|
6637161e02 | ||
|
|
dea770d5d9 | ||
|
|
48b92e1be1 | ||
|
|
003707f712 | ||
|
|
dd4bfed614 | ||
|
|
84ec40f1af | ||
|
|
5eb296649d | ||
|
|
cae7620b77 | ||
|
|
c44d17fd3c | ||
|
|
59d33a2733 | ||
|
|
11268fe241 | ||
|
|
e46bed73f1 | ||
|
|
ece15ed6a1 | ||
|
|
97dc6581f4 | ||
|
|
cdc41fc86c | ||
|
|
9c14999efd | ||
|
|
352c46aa75 | ||
|
|
91830f1e0e | ||
|
|
df04f99df0 | ||
|
|
ce3a418715 | ||
|
|
d2e16b2a49 | ||
|
|
928b4d5fe4 | ||
|
|
4ea24f9767 | ||
|
|
2a61deafc6 | ||
|
|
5f8af4ee5f | ||
|
|
e0bd31c18c | ||
|
|
8e6f37e2a0 | ||
|
|
ce6bce4389 | ||
|
|
43738bec57 | ||
|
|
03ab521db3 | ||
|
|
0ca70e121c | ||
|
|
f63674cac0 | ||
|
|
d3a55720fc | ||
|
|
36132d3e17 | ||
|
|
1ca5fd38b4 | ||
|
|
84cf7791a8 | ||
|
|
ec4f4ddc58 | ||
|
|
8823c55b0c | ||
|
|
2f3dee3fcf | ||
|
|
324afce053 | ||
|
|
813cb3afc9 | ||
|
|
8c113fa959 | ||
|
|
d853744969 | ||
|
|
fcfa5b7e88 | ||
|
|
a8b50ea147 | ||
|
|
eeeb4ca379 | ||
|
|
2b1cc586ab | ||
|
|
f974353c32 | ||
|
|
cd2ad1f240 | ||
|
|
f90382756d | ||
|
|
68ecdcd7a1 | ||
|
|
1dd6c2dff9 | ||
|
|
c95315d2ce | ||
|
|
fb28ec1537 | ||
|
|
490a285070 | ||
|
|
fa0a9b2d32 | ||
|
|
c8d861f976 | ||
|
|
bd2c202dd9 | ||
|
|
9f3f392eb8 | ||
|
|
f0f09950f3 | ||
|
|
3af8f847f0 | ||
|
|
747e729914 | ||
|
|
2995ec6910 | ||
|
|
ec3db37457 | ||
|
|
f1f5582ce8 | ||
|
|
3d78a57043 | ||
|
|
b06751b703 | ||
|
|
806ff57567 | ||
|
|
ca07373e44 | ||
|
|
8583a190c0 | ||
|
|
fe496bd1cf | ||
|
|
f8e95799f9 | ||
|
|
6c816af119 | ||
|
|
ab02f3c8d6 | ||
|
|
9928f357fb | ||
|
|
d13c9f840d | ||
|
|
0cf224e762 | ||
|
|
52d4ce6ced | ||
|
|
e05d3399f1 | ||
|
|
db3c9f084b | ||
|
|
0c7f4dfbd9 | ||
|
|
c02fb0ea80 | ||
|
|
96fc84f1fb | ||
|
|
b69d20a300 | ||
|
|
11f8b76257 | ||
|
|
11f1d952e7 | ||
|
|
a0317cf732 | ||
|
|
67c7a24e60 | ||
|
|
c7a890d129 | ||
|
|
b955b825fc | ||
|
|
9cf49c7a78 | ||
|
|
c923fb0dc9 | ||
|
|
ded199abcd | ||
|
|
ed881c6d2e | ||
|
|
eaa9616585 | ||
|
|
bf34d0d2fc | ||
|
|
e802441bce | ||
|
|
e7882b34f4 | ||
|
|
9049dbaf0c | ||
|
|
7fc0b5ec9c | ||
|
|
6a05248d46 | ||
|
|
20f51d7286 | ||
|
|
6bd2b28161 | ||
|
|
d9e9fb2273 | ||
|
|
b953f96c0a | ||
|
|
4276aaf18b | ||
|
|
fe8d0bdd36 | ||
|
|
9c34c091b3 | ||
|
|
b9ee921560 | ||
|
|
15463bdbe6 | ||
|
|
55e21a2eec | ||
|
|
f6775a3669 | ||
|
|
a07ceaec36 | ||
|
|
6a04f922e1 | ||
|
|
e74e4e951b | ||
|
|
68ecf3df8c | ||
|
|
ab62ee9dcf | ||
|
|
2c6a4fac4f | ||
|
|
c6acd19b6d | ||
|
|
1a1b67c888 | ||
|
|
12303812a8 | ||
|
|
f6556ad2bc | ||
|
|
5f0f25ad61 | ||
|
|
d73ed6fce2 | ||
|
|
60f771a11e | ||
|
|
650237efb0 | ||
|
|
26bffb94bf | ||
|
|
7017c4d68c | ||
|
|
141d2095f5 | ||
|
|
1b953021ea | ||
|
|
e1cd292aa6 | ||
|
|
18831491cf | ||
|
|
18d56f5321 | ||
|
|
91886982fc | ||
|
|
3ae826ceba | ||
|
|
73dd8d6ed5 | ||
|
|
ec0b081371 | ||
|
|
2187e16f14 | ||
|
|
bb96afdbe3 | ||
|
|
1991542e59 | ||
|
|
1f7f808c4f | ||
|
|
3c57e1a8b2 | ||
|
|
63e796d50e | ||
|
|
16f5ded446 | ||
|
|
1447fd2f99 | ||
|
|
7a2cd1ea0a | ||
|
|
8b181716ac | ||
|
|
10935b7b11 | ||
|
|
acf75e6700 | ||
|
|
c105391db5 | ||
|
|
d867136cec | ||
|
|
a73a55f53c | ||
|
|
9581e067ad | ||
|
|
c74142e6bd | ||
|
|
042dcaa1ee | ||
|
|
b045df100e | ||
|
|
fa4b828865 | ||
|
|
45984a4319 | ||
|
|
bb540826d6 | ||
|
|
2c7240cf9d | ||
|
|
4303dcdcf6 | ||
|
|
a86deecac5 | ||
|
|
a6efa4fcef | ||
|
|
172407787f | ||
|
|
23de4f77c7 | ||
|
|
bb154d1067 | ||
|
|
a2d8b94dd5 | ||
|
|
f254f5ac2b | ||
|
|
ca2d15b3ee | ||
|
|
4773c152bc | ||
|
|
eeba61826c | ||
|
|
4f4f6cd7b5 | ||
|
|
ee87111009 | ||
|
|
37b7550ecc | ||
|
|
51aa6eeca3 | ||
|
|
c462a4ebd3 | ||
|
|
b8f8d39cb5 | ||
|
|
ebc22d99d6 | ||
|
|
9a18251426 | ||
|
|
34a4bb6508 | ||
|
|
3bb92dbee8 | ||
|
|
f09bb8a997 | ||
|
|
9435c7aae2 | ||
|
|
d8ceb3f276 | ||
|
|
951b095e11 | ||
|
|
82cfcee19f | ||
|
|
f43fc02475 | ||
|
|
dc038d16bb | ||
|
|
653067d799 | ||
|
|
3b0ea590fc | ||
|
|
ae8051302b | ||
|
|
ea504fac97 | ||
|
|
8fc2043eb8 | ||
|
|
fdd8f82602 | ||
|
|
c59fbf5e9c | ||
|
|
81cca2e0e3 | ||
|
|
1dd20ce1ff | ||
|
|
7bc57e1e64 | ||
|
|
5c2956587a | ||
|
|
85e124253a | ||
|
|
af29247a78 | ||
|
|
d59ab6d977 | ||
|
|
86fab11fbe | ||
|
|
6ce5903e7a | ||
|
|
91b8f587cd | ||
|
|
5f79c852af | ||
|
|
ea2f94d4de | ||
|
|
7b15762d09 | ||
|
|
3ee6ff43c1 | ||
|
|
4dd44ddf16 | ||
|
|
8224aeba9d | ||
|
|
ac57c88efe | ||
|
|
fd9588089d | ||
|
|
b7169c8b74 | ||
|
|
049132ab43 | ||
|
|
c89972c877 | ||
|
|
5ab0cbb48e | ||
|
|
921bb95755 | ||
|
|
c339f9ebe7 | ||
|
|
1c37914306 | ||
|
|
ed485a3dc8 | ||
|
|
8d4d631606 | ||
|
|
7fb097d72c | ||
|
|
c9fed50691 | ||
|
|
f611d8ce72 | ||
|
|
570c40cde5 | ||
|
|
221c856481 | ||
|
|
02cedc3796 | ||
|
|
2397137615 | ||
|
|
cecc6ecbff | ||
|
|
b123b2e51c | ||
|
|
a97b713f74 | ||
|
|
d1aaeee400 | ||
|
|
f76163c246 | ||
|
|
bb26622670 | ||
|
|
0365454a57 | ||
|
|
e20994a8ea | ||
|
|
0043d9b134 | ||
|
|
aeee5074d1 | ||
|
|
916ac97bf9 | ||
|
|
fd985dbc5b | ||
|
|
47a51b08f4 | ||
|
|
f941968eb1 | ||
|
|
ec2d251c0a | ||
|
|
2e45b4d7a5 | ||
|
|
11fe5a13f8 | ||
|
|
ad08510a11 | ||
|
|
d96550f2f6 | ||
|
|
8cbd57cafa | ||
|
|
59be866719 | ||
|
|
8e004522f2 | ||
|
|
d80b55e11b | ||
|
|
85c5477930 | ||
|
|
7724edbdd3 | ||
|
|
0baad58e60 | ||
|
|
1770f38cfc | ||
|
|
428eee00fd | ||
|
|
94153f1c75 | ||
|
|
ac6ef95e12 | ||
|
|
b1bf4a70d4 | ||
|
|
7711b00005 | ||
|
|
c9aecde580 | ||
|
|
ae412654d5 | ||
|
|
86de439ba4 | ||
|
|
109769319a |
@@ -6,7 +6,7 @@ description: Prepare or rewrite REA release changelogs and GitHub release notes
|
|||||||
# REA changelog update
|
# REA changelog update
|
||||||
|
|
||||||
Use this for release-note preparation and contributor attribution. Read
|
Use this for release-note preparation and contributor attribution. Read
|
||||||
[docs/releasing.md](../../../docs/releasing.md) from the repository root for
|
[docs/development/releasing.md](../../../docs/development/releasing.md) from the repository root for
|
||||||
publication authority and the existing checkpoint checks. This skill prepares
|
publication authority and the existing checkpoint checks. This skill prepares
|
||||||
notes; it does not authorize merging, tagging, or publishing.
|
notes; it does not authorize merging, tagging, or publishing.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,112 @@
|
|||||||
|
---
|
||||||
|
name: rea-ci-tests-audit
|
||||||
|
description: Audit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.
|
||||||
|
---
|
||||||
|
|
||||||
|
# REA CI and tests audit
|
||||||
|
|
||||||
|
Establish which checks still catch real regressions and which costs can be
|
||||||
|
removed without losing that protection. The outcome may be a verified fix,
|
||||||
|
an evidence-backed recommendation, or an explicit decision to stop.
|
||||||
|
|
||||||
|
Follow the checkout's `AGENTS.md`, [testing guide](../../../docs/development/testing.md),
|
||||||
|
and [contribution rules](../../../CONTRIBUTING.md). Use their current commands
|
||||||
|
and pinned toolchain, rather than commands remembered from an earlier audit.
|
||||||
|
Preserve the requested scope: investigation alone does not authorize edits;
|
||||||
|
this skill does not grant permission to publish issues, push, or merge. Existing
|
||||||
|
user authorization still applies. Keep audit notes and raw results outside the
|
||||||
|
tracked tree, normally in a task-specific `/tmp` directory.
|
||||||
|
|
||||||
|
## Establish the executed baseline
|
||||||
|
|
||||||
|
Fetch when the user asks for latest main. Pin the baseline SHA and inspected
|
||||||
|
workflow revision; use an isolated worktree when changing or comparing code.
|
||||||
|
Do not modify another task's checkout. Record dirty changes and the exact
|
||||||
|
command, toolchain, host, selected tests, instrumentation, and prerequisites.
|
||||||
|
An old run is evidence for its executed revision, even if main advances.
|
||||||
|
|
||||||
|
Trace workflow triggers, changed-path selection, job dependencies, reusable
|
||||||
|
actions, package scripts, test discovery, artifact producers, and report gates
|
||||||
|
through to the commands that actually execute. Include scripts, generated data,
|
||||||
|
runtime registration, and subprocess boundaries missing from import graphs.
|
||||||
|
Check positive and negative selection paths: required files must be discovered
|
||||||
|
once per intended test configuration; deliberate platform/configuration repeats
|
||||||
|
are separate coverage. A missing explicit test or missing required report must
|
||||||
|
not turn green. Optional lanes may skip; preserve their stated prerequisites.
|
||||||
|
|
||||||
|
Use existing timing and failure artifacts to select suspicious families. Run
|
||||||
|
relevant checks to establish a baseline; reserve a full local suite for broad
|
||||||
|
CI diagnosis or uncertainty that focused checks cannot resolve. Do not rebuild
|
||||||
|
or rerun an unchanged complete suite after every documentation edit.
|
||||||
|
|
||||||
|
## Prove the failure or protection
|
||||||
|
|
||||||
|
For each candidate, state the expected observable behavior and its owner,
|
||||||
|
then construct the smallest reproduction against production behavior. Follow
|
||||||
|
the producer and affected consumers before deciding where to fix it.
|
||||||
|
|
||||||
|
- For drift, compare fixtures with current admission requirements, protocol
|
||||||
|
replies, named contracts, tool versions, and actual public entrypoints. A
|
||||||
|
plausible-looking mock can fail before the behavior its test claims to cover.
|
||||||
|
Search the whole affected fixture family, including other version strings.
|
||||||
|
Preserve intentionally malformed fixtures and test their intended rejection.
|
||||||
|
- For a suspicious green test, perturb the relevant behavior in an isolated
|
||||||
|
copy or inject a controlled failure. Verify that the existing assertion or
|
||||||
|
gate detects it. A test may merely repeat its mock, import abandoned code,
|
||||||
|
or hide a subprocess/checker failure. Restore mutations after the experiment.
|
||||||
|
- For shared setup or pruning, map distinct assertions to their retained
|
||||||
|
scenarios. Preserve malformed inputs, cancellation, cleanup failure,
|
||||||
|
permissions, capacity, identity, and meaningful concurrency interactions.
|
||||||
|
A faster run that skips a case or weakens its oracle is not an improvement.
|
||||||
|
- For provider coverage, separate fake-producer, boundary, and actual-engine
|
||||||
|
evidence. Inspect named skips and prerequisites; fixtures do not establish
|
||||||
|
real Ghidra, LLDB, browser, or other provider behavior.
|
||||||
|
|
||||||
|
Classify findings as reproduced defects, supported costs, hypotheses, or
|
||||||
|
unavailable evidence. Record the baseline command, observed output/exit status,
|
||||||
|
expected result, affected scope, and competing explanation. A failure on main
|
||||||
|
may be pre-existing; that does not by itself make it irrelevant to a CI audit.
|
||||||
|
Attribute PR failures using the executed revision and a clean baseline, not
|
||||||
|
just their resemblance to a previous failure. Retry only to test a specific
|
||||||
|
transient explanation; retain the original failure and stop when repetition
|
||||||
|
adds no evidence. A passing retry does not establish a root cause or a fix.
|
||||||
|
|
||||||
|
## Assess efficiency without losing the gate
|
||||||
|
|
||||||
|
Read [measurement and CI checks](references/measurement-and-ci.md) when
|
||||||
|
investigating slowness, caching, runner waits, shared artifacts, or log noise.
|
||||||
|
Compare equivalent completed work before claiming a speedup. Distinguish
|
||||||
|
setup/build time, test execution, coverage instrumentation, dependency waits,
|
||||||
|
and runner scheduling; state which costs remain unmeasured.
|
||||||
|
|
||||||
|
Prefer removing proven duplicate preparation, reusing immutable setup, and
|
||||||
|
reducing repeated subprocess work before shrinking correctness coverage.
|
||||||
|
Preserve independent sessions where lifecycle or concurrency is the oracle.
|
||||||
|
Keep live tests fresh; a cached previous pass cannot validate current host,
|
||||||
|
installed provider contents, permissions, or external state.
|
||||||
|
|
||||||
|
## Fix, verify, and hand off within scope
|
||||||
|
|
||||||
|
If implementation is authorized, make the smallest structural change at the
|
||||||
|
owning boundary and add a regression that fails on the baseline for the right
|
||||||
|
reason. Retest affected consumers and meaningful negative paths; verify cache
|
||||||
|
invalidation or discovery when those mechanisms change. Read the installed
|
||||||
|
Turbo documentation before changing its configuration or commands.
|
||||||
|
|
||||||
|
Run the repository's applicable checks and inspect complete current-head CI
|
||||||
|
results before an authorized merge. Preserve required coverage and discovery
|
||||||
|
gates. Do not suppress a failure, add blanket retries, raise timeouts, or delete
|
||||||
|
distinct assertions solely to make CI green. Changes to these controls need
|
||||||
|
their own demonstrated reason and retained failure detection.
|
||||||
|
|
||||||
|
Report each confirmed issue with exact revision, reproduction, consequence,
|
||||||
|
proposed correction, and validation limits. Report performance with workload
|
||||||
|
and measurements, not just a percentage. Use English issue/PR records when
|
||||||
|
requested; follow the user's assignment, commit identity, review, and merge
|
||||||
|
preferences without assuming them for other users. Open ready-for-review PRs
|
||||||
|
only when that lifecycle is authorized. Resolve necessary review findings and
|
||||||
|
check final main against the tested tree after merging.
|
||||||
|
|
||||||
|
Stop when the authorized work is verified, remaining benefits are unproven,
|
||||||
|
or further changes would trade correctness for speculative speed. List genuine
|
||||||
|
uncertainties without turning them into additional optimization rounds.
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
interface:
|
||||||
|
display_name: "REA CI and tests audit"
|
||||||
|
short_description: "Audit CI/test correctness and measured performance"
|
||||||
|
default_prompt: "Use $rea-ci-tests-audit to investigate CI and test correctness, drift, and performance before proposing changes."
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# Measurement and CI checks
|
||||||
|
|
||||||
|
## Equivalent completed work
|
||||||
|
|
||||||
|
Record the source/workflow SHA, command, test identities and counts, skips,
|
||||||
|
assertions or output contract, exit status, coverage scope and thresholds,
|
||||||
|
toolchain/provider versions, host resources, and prepared artifacts. Inspect
|
||||||
|
both the child result and its report: a profiling wrapper may exit successfully
|
||||||
|
after the measured command failed. Focused tests can pass while global coverage
|
||||||
|
thresholds fail; describe both rather than calling the command green.
|
||||||
|
|
||||||
|
Measure wall time, user/system CPU, and peak process-family memory for relevant
|
||||||
|
completed tasks. Parent-only RSS misses workers and their children. On Linux,
|
||||||
|
summed RSS can double-count shared pages; report RSS/PSS semantics, sampling
|
||||||
|
interval, missing samples, and observed cleanup limits. Use equivalent host
|
||||||
|
tools elsewhere. State unknown costs, including agent tokens; fewer log bytes
|
||||||
|
alone prove neither fewer tokens nor faster tests.
|
||||||
|
|
||||||
|
Separate cold execution, warm build/file caches, and warm runtime caches.
|
||||||
|
Use repeated or alternating runs when variance affects the decision, with
|
||||||
|
enough observations to distinguish the proposed benefit from noise. Keep
|
||||||
|
workload, instrumentation, and host conditions comparable; record interference.
|
||||||
|
A run with fewer tests, early rejection, lost coverage, or a different runner
|
||||||
|
does not prove suite acceleration. CI-wide claims need end-to-end measurements,
|
||||||
|
not an extrapolation from one improved family.
|
||||||
|
|
||||||
|
## Workflow, caches, and shared artifacts
|
||||||
|
|
||||||
|
Trace each reused result from producer to consumers and identify its lifetime.
|
||||||
|
Check key/input coverage against the actual file inventory and result-affecting
|
||||||
|
configuration, environment, generated data, tool versions, and host state.
|
||||||
|
Exercise an affected input change to prove invalidation; exercise an irrelevant
|
||||||
|
change to support reuse where useful. Cache deterministic preparation and
|
||||||
|
static analysis only when their inputs fully describe the result.
|
||||||
|
|
||||||
|
Verify downloaded artifacts match the expected revision, platform, runtime,
|
||||||
|
and schema. Check restore misses, failed/partial producers, stale reports,
|
||||||
|
removed output files, and consumers after producer failures. Shared writers
|
||||||
|
need output ownership or locks; tests need isolated state, not an unnecessary
|
||||||
|
global lock. Worker counts do not bound children spawned within each test.
|
||||||
|
Preserve intentionally concurrent scenarios while bounding unrelated batches.
|
||||||
|
|
||||||
|
Check matrix expansion and all job pages before saying CI passed. Inspect
|
||||||
|
required gates after failed, cancelled, and skipped dependencies. `always()`
|
||||||
|
alone does not preserve failures; inspect the aggregation logic. Test/report
|
||||||
|
uploads should retain available diagnostics after failure, while absent or
|
||||||
|
malformed required results must fail closed. Do not demand an optional report
|
||||||
|
from a lane intentionally excluded by the selector.
|
||||||
|
|
||||||
|
## Runner waits and console noise
|
||||||
|
|
||||||
|
Use per-job and per-step timestamps where available. Workflow creation to job
|
||||||
|
start includes dependencies and other delays; it is not necessarily runner
|
||||||
|
queue time. Identify when the job became eligible before attributing waits to
|
||||||
|
runner capacity. If eligibility/queue timestamps are unavailable, report the
|
||||||
|
combined delay and unknown split. Compare equivalent lanes and runner types
|
||||||
|
across enough runs; a single busy runner is not a workflow regression.
|
||||||
|
|
||||||
|
For console reductions, retain checker exit codes, actionable errors, useful
|
||||||
|
summary counts, and complete machine-readable artifacts. Verify authored code
|
||||||
|
remains in the actual checker inventory when excluding generated outputs.
|
||||||
|
Introduce an authored error as a control; it must still fail. An ignore pattern
|
||||||
|
can hide real source as well as noise. Show that cached reports are restored,
|
||||||
|
stale successful reports cannot mask current failures, and report parse errors
|
||||||
|
remain failures. Measure readability or byte reduction separately from runtime.
|
||||||
@@ -5,7 +5,7 @@ description: Design or change REA investigation tools, CLI/MCP contracts, provid
|
|||||||
|
|
||||||
# REA tool design
|
# REA tool design
|
||||||
|
|
||||||
Use the [tool-design guide](../../../docs/tool-design.md) for tool boundaries,
|
Use the [tool-design guide](../../../docs/development/tool-design.md) for tool boundaries,
|
||||||
contract semantics, provider ownership, and discoverability. Inspect the current
|
contract semantics, provider ownership, and discoverability. Inspect the current
|
||||||
contract and nearest existing tool relevant to the analyst question; source,
|
contract and nearest existing tool relevant to the analyst question; source,
|
||||||
documentation, and live catalogs may describe different versions.
|
documentation, and live catalogs may describe different versions.
|
||||||
@@ -14,7 +14,7 @@ For a design request, return the proposed boundary, input/result shape, Evidence
|
|||||||
semantics, nearest alternative, and verification approach. Implement when
|
semantics, nearest alternative, and verification approach. Implement when
|
||||||
requested, preserving the user's scope and existing authorization.
|
requested, preserving the user's scope and existing authorization.
|
||||||
|
|
||||||
For implementation or verification, consult [testing](../../../docs/testing.md)
|
For implementation or verification, consult [testing](../../../docs/development/testing.md)
|
||||||
for the affected consumer and provider lanes, and
|
for the affected consumer and provider lanes, and
|
||||||
[contributing](../../../CONTRIBUTING.md) for generated-file ownership. Read
|
[contributing](../../../CONTRIBUTING.md) for generated-file ownership. Read
|
||||||
provider/workflow guides only as the task requires.
|
provider/workflow guides only as the task requires.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
name: reverse-engineer-anything
|
name: reverse-engineer-anything
|
||||||
description: Reverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.
|
description: Reverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.
|
||||||
metadata:
|
metadata:
|
||||||
version: "40"
|
version: "41"
|
||||||
---
|
---
|
||||||
|
|
||||||
# REA
|
# REA
|
||||||
@@ -56,43 +56,91 @@ explicit path or endpoint and do not need it.
|
|||||||
- Firmware image: `inspect_firmware_regions` when advertised. Use
|
- Firmware image: `inspect_firmware_regions` when advertised. Use
|
||||||
`extract_firmware` when extraction is requested, with a caller-selected new
|
`extract_firmware` when extraction is requested, with a caller-selected new
|
||||||
absolute output directory. These tools use caller-supplied Binwalk/Unblob on
|
absolute output directory. These tools use caller-supplied Binwalk/Unblob on
|
||||||
Linux; see the [firmware guide](https://github.com/morluto/rea/blob/main/docs/firmware-analysis.md).
|
Linux; see the [firmware guide](https://github.com/morluto/rea/blob/main/docs/guides/firmware/firmware-analysis.md).
|
||||||
- .NET NativeAOT PE/ELF: native Ghidra analysis. Native code can yield pseudocode;
|
- .NET NativeAOT PE/ELF: native Ghidra analysis. Native code can yield pseudocode;
|
||||||
consult the NativeAOT workflow in `references/native-and-artifacts.md` for
|
consult the NativeAOT workflow in `references/native-and-artifacts.md` for
|
||||||
optional metadata recovery and its supported host/layout boundary.
|
optional metadata recovery and its supported host/layout boundary.
|
||||||
- User-owned browser page already open: `list_browser_targets`.
|
- User-owned browser page already open: `list_browser_targets`.
|
||||||
- Retained HAR/native mitmproxy capture: `inspect_web_network_capture`. Select
|
- Fiddler Everywhere traffic or a native `.saz` capture: read the
|
||||||
|
[Fiddler workflow](references/runtime-observation.md#fiddler-everywhere-traffic-debugging).
|
||||||
|
Inspect saved SAZ with `inspect_web_network_capture` and `format: "saz"`;
|
||||||
|
connect Everywhere's separate MCP server for live traffic.
|
||||||
|
- Retained HAR/SAZ/native mitmproxy/aioquic qlog capture: `inspect_web_network_capture`. Select
|
||||||
original record ordinals when useful; inspect producer fields and byte/number
|
original record ordinals when useful; inspect producer fields and byte/number
|
||||||
sidecars without fetching recorded URLs or claiming live attribution. See
|
sidecars without fetching recorded URLs or claiming live attribution. See
|
||||||
[historical captures](https://github.com/morluto/rea/blob/main/docs/web-network-captures.md) for the exact upstream
|
[historical captures](https://github.com/morluto/rea/blob/main/docs/guides/web/web-network-captures.md) for the exact upstream
|
||||||
profile and credential exclusions.
|
profile and credential exclusions. Qlog support starts with aioquic 1.5.0
|
||||||
|
JSON 0.3; stream coverage and endpoint loss declarations do not recover bodies
|
||||||
|
or establish network loss. Prefer detail summary, then kind qlog trace/stream
|
||||||
|
pages; select one trace, stream ID and direction for contribution/range pages.
|
||||||
|
Facts retain all-recorded-events-before-selection scope. Other qlog layouts
|
||||||
|
and PCAP correlation are unsupported.
|
||||||
- User-owned Electron runtime already open: `list_electron_targets`.
|
- User-owned Electron runtime already open: `list_electron_targets`.
|
||||||
|
- Packet-field discovery: `inspect_packet_fields` searches installed protocols
|
||||||
|
and field names/types before choosing fields for `inspect_packet_capture`.
|
||||||
|
Query/page the relevant records; registrations do not establish observed traffic.
|
||||||
|
- Recorded packet captures: `inspect_packet_capture` with selected TShark fields,
|
||||||
|
display filters and decode-as rules. Requires Linux, util-linux prlimit and `REA_TSHARK_COMMAND`; see
|
||||||
|
[capture guide](https://github.com/morluto/rea/blob/main/docs/guides/data/packet-captures.md).
|
||||||
|
Packet limits count input packets before filtering. Output defaults to 50 matching
|
||||||
|
frames; use `match_offset` / `match_limit` for later pages, or explicit null
|
||||||
|
limit for complete matching output. Preserve the source digest across pages.
|
||||||
|
This does not perform live capture.
|
||||||
|
For address/DNS/SNI/protocol summaries use `inspect_pcap_capture` with MCP
|
||||||
|
detail summary, then retained kind pcap pages. Requires Wireshark 4.x tshark
|
||||||
|
and capinfos, with Linux prlimit or Windows Job Objects; see
|
||||||
|
[packet summaries](https://github.com/morluto/rea/blob/main/docs/guides/data/pcap-analysis.md).
|
||||||
|
Select an exact DNS question for address pages; page exhaustion does not prove
|
||||||
|
network completeness. This reads recordings and does not acquire traffic.
|
||||||
|
- Decoder discovery: `inspect_signal_decoders` searches installed decoder IDs
|
||||||
|
or selected decoder help, including channels and options. Query and page the
|
||||||
|
relevant details before choosing settings; this does not scan hardware.
|
||||||
|
- Recorded logic/signal traces: `decode_signal_recording` with explicit decoder,
|
||||||
|
channel and protocol settings. On Linux with util-linux prlimit, supply sigrok-cli 0.7.2 through
|
||||||
|
`REA_SIGROK_COMMAND`; see [recording guide](https://github.com/morluto/rea/blob/main/docs/guides/signals/signal-recordings.md).
|
||||||
|
Output defaults to 50 literal lines; select annotation classes and page with
|
||||||
|
`line_offset` / `line_limit`, or explicit null for all remaining output.
|
||||||
|
Window counts are display lines, not annotations or samples. Preserve source digests across pages.
|
||||||
|
This reads existing files; it does not acquire hardware signals.
|
||||||
- Explicit local WebAssembly artifact: `inspect_wasm_artifact`. Supply WABT 1.0.42
|
- Explicit local WebAssembly artifact: `inspect_wasm_artifact`. Supply WABT 1.0.42
|
||||||
through `REA_WABT_BIN_DIRECTORY`; retain exact byte/tool identity and decoded WAT.
|
through `REA_WABT_BIN_DIRECTORY`; retain exact byte/tool identity and decoded WAT.
|
||||||
Select JavaScript glue and candidate paths explicitly and preserve URL/path
|
Select JavaScript glue and candidate paths explicitly and preserve URL/path
|
||||||
ambiguity. No implicit fetch or target execution; WAT is not original source.
|
ambiguity. No implicit fetch or target execution; WAT is not original source.
|
||||||
See the [WASM guide](https://github.com/morluto/rea/blob/main/docs/wasm-artifacts.md).
|
See the [WASM guide](https://github.com/morluto/rea/blob/main/docs/guides/wasm/wasm-artifacts.md).
|
||||||
- Explicit local EVM bytecode carrier: `inspect_evm_interface` with caller-selected
|
- Explicit local EVM bytecode carrier: `inspect_evm_interface` with caller-selected
|
||||||
`raw` or `hex` encoding. Preserve carrier/decoded digests and treat selectors,
|
`raw` or `hex` encoding. Preserve carrier/decoded digests and treat selectors,
|
||||||
argument strings and mutability as inferred candidates; this performs no chain
|
argument strings and mutability as inferred candidates; this performs no chain
|
||||||
lookup or target execution. See the
|
lookup or target execution. For the complete inferred interface without hex or
|
||||||
[EVM bytecode guide](https://github.com/morluto/rea/blob/main/docs/evm-bytecode.md).
|
duplicate stdout, discover support and select `detail: "summary"`; complete
|
||||||
|
Evidence stays retained under its original identity. Use the returned
|
||||||
|
`parent_evidence_id` for exact function or `bytecode_hex`/stdout/stderr pages.
|
||||||
|
Candidate coverage does not establish interface completeness. See the
|
||||||
|
[EVM bytecode guide](https://github.com/morluto/rea/blob/main/docs/guides/evm/evm-bytecode.md).
|
||||||
- Embedded Go compiler, module or build-setting metadata: `inspect_go_binary`
|
- Embedded Go compiler, module or build-setting metadata: `inspect_go_binary`
|
||||||
with the explicit local file. This built-in target-free inspection requires no
|
with the explicit local file. This built-in target-free inspection requires no
|
||||||
Go installation or disassembler. Preserve raw module bytes and source ranges;
|
Go installation or disassembler. Preserve raw module bytes and source ranges;
|
||||||
absent metadata does not prove a binary is not Go, and unparsed text records
|
absent metadata does not prove a binary is not Go, and unparsed text records
|
||||||
remain explicit. See the
|
remain explicit. See the
|
||||||
[Go binary guide](https://github.com/morluto/rea/blob/main/docs/go-binaries.md).
|
[Go binary guide](https://github.com/morluto/rea/blob/main/docs/guides/native/go-binaries.md).
|
||||||
|
|
||||||
|
- Explicit local SQLite database snapshot: `inspect_sqlite_database`. Inspect
|
||||||
|
with Node.js 24.x >=24.15 or 26+ providing native SQLite limits. Read schema
|
||||||
|
first (compact inventory by default), or select an exact ordinary table
|
||||||
|
and `columns` when rows are needed. Defaults are selected-table schema and
|
||||||
|
20 rows; request `schema_scope: "database"` for the complete stored schema. Preserve both database and existing sibling WAL identity; row samples
|
||||||
|
report truncation and have unspecified order. Use a quiescent snapshot rather
|
||||||
|
than assuming a live database/WAL pair was copied atomically. See the
|
||||||
|
[SQLite guide](https://github.com/morluto/rea/blob/main/docs/guides/data/sqlite-databases.md).
|
||||||
- Explicit Linux ELF file for offline layout, symbols, relocations or static
|
- Explicit Linux ELF file for offline layout, symbols, relocations or static
|
||||||
mitigation evidence: `inspect_binary_layout`. This target-free operation uses
|
mitigation evidence: `inspect_binary_layout`. This target-free operation uses
|
||||||
caller-supplied pwntools without opening a disassembler database. Preserve its
|
caller-supplied pwntools without opening a disassembler database. Preserve its
|
||||||
raw locations and inference/coverage limits; see the
|
raw locations and inference/coverage limits; see the
|
||||||
[offline binary guide](https://github.com/morluto/rea/blob/main/docs/binary-diagnostics.md).
|
[offline binary guide](https://github.com/morluto/rea/blob/main/docs/guides/native/binary-diagnostics.md).
|
||||||
- Supplied Linux x86-64 ELF core: `inspect_recorded_crash`. Read every recorded
|
- Supplied Linux x86-64 ELF core: `inspect_recorded_crash`. Read every recorded
|
||||||
thread, raw note and source-bound register without opening a live target.
|
thread, raw note and source-bound register without opening a live target.
|
||||||
Historical PIDs do not select live processes. Request `include_debugger_context`
|
Historical PIDs do not select live processes. Request `include_debugger_context`
|
||||||
only when core-only mapping candidates help; see the
|
only when core-only mapping candidates help; see the
|
||||||
[recorded crash guide](https://github.com/morluto/rea/blob/main/docs/recorded-crashes.md).
|
[recorded crash guide](https://github.com/morluto/rea/blob/main/docs/guides/native/recorded-crashes.md).
|
||||||
- PE resource type/name/language trees and static icon group references:
|
- PE resource type/name/language trees and static icon group references:
|
||||||
`inspect_pe_resources` with an explicit path. This portable operation requires
|
`inspect_pe_resources` with an explicit path. This portable operation requires
|
||||||
no active target or engine; opaque payloads retain file ranges and SHA-256.
|
no active target or engine; opaque payloads retain file ranges and SHA-256.
|
||||||
@@ -106,7 +154,7 @@ The legacy attached profile binds the already-open GUI input by SHA-256 and
|
|||||||
leaves its database open. The modern headless profile creates and closes an
|
leaves its database open. The modern headless profile creates and closes an
|
||||||
owned private database without saving. Installation and registration reuse
|
owned private database without saving. Installation and registration reuse
|
||||||
[mrexodia/ida-pro-mcp](https://github.com/mrexodia/ida-pro-mcp); see the
|
[mrexodia/ida-pro-mcp](https://github.com/mrexodia/ida-pro-mcp); see the
|
||||||
[IDA provider guide](https://github.com/morluto/rea/blob/main/docs/ida-provider.md).
|
[IDA provider guide](https://github.com/morluto/rea/blob/main/docs/providers/ida-provider.md).
|
||||||
Proceed directly to `analyze_function`, pseudocode, or function/string searches
|
Proceed directly to `analyze_function`, pseudocode, or function/string searches
|
||||||
after opening; IDA does not supply `binary_overview`. Consult session availability
|
after opening; IDA does not supply `binary_overview`. Consult session availability
|
||||||
when composing broader workflows. Modern direct callers and unsupported dossier
|
when composing broader workflows. Modern direct callers and unsupported dossier
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ rea setup --client codex --dry-run --json
|
|||||||
Use the current supported client's ID: `claude_code`, `claude_desktop`, `codex`,
|
Use the current supported client's ID: `claude_code`, `claude_desktop`, `codex`,
|
||||||
`cursor`, `gemini_cli`, `windsurf`, `devin`, `opencode`, `antigravity`,
|
`cursor`, `gemini_cli`, `windsurf`, `devin`, `opencode`, `antigravity`,
|
||||||
`copilot_cli`, `commandcode`, `qwen_code`, `vscode`, `trae`, `grok_build`, `omp`, `pi`,
|
`copilot_cli`, `commandcode`, `qwen_code`, `vscode`, `trae`, `grok_build`, `omp`, `pi`,
|
||||||
`hermes`, `zcode`, `dsh`, or `grok_bot`. If unknown, inspect `doctor --json` before choosing a
|
`hermes`, `qoder`, `droid`, `zcode`, `dsh`, or `grok_bot`. If unknown, inspect `doctor --json` before choosing a
|
||||||
scope. `grok_bot` uses a chat registration step rather than local `mcp.json`.
|
scope. `grok_bot` uses a chat registration step rather than local `mcp.json`.
|
||||||
For unsupported clients, use version-pinned manual stdio registration or CLI.
|
For unsupported clients, use version-pinned manual stdio registration or CLI.
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ For captured or bundled JavaScript that needs readable source recovery, use
|
|||||||
`additional_paths` when advertised, then analyze the returned `analysis_input`
|
`additional_paths` when advertised, then analyze the returned `analysis_input`
|
||||||
directory together. Each input retains its own snapshot, digest and byte-range
|
directory together. Each input retains its own snapshot, digest and byte-range
|
||||||
provenance; inputs and recovered code are never executed. Recovery requires a
|
provenance; inputs and recovered code are never executed. Recovery requires a
|
||||||
caller-supplied Wakaru on Linux x64; see [the recovery guide](https://github.com/morluto/rea/blob/main/docs/javascript-recovery.md).
|
caller-supplied Wakaru on Linux x64; see [the recovery guide](https://github.com/morluto/rea/blob/main/docs/guides/javascript/javascript-recovery.md).
|
||||||
|
|
||||||
Use `analyze_javascript_application` directly on the operator-supplied ASAR or
|
Use `analyze_javascript_application` directly on the operator-supplied ASAR or
|
||||||
extracted tree. When the question concerns known source paths and the connected
|
extracted tree. When the question concerns known source paths and the connected
|
||||||
|
|||||||
@@ -11,6 +11,21 @@ unparsed module-text line. A missing record is an unknown, not proof of a
|
|||||||
non-Go binary; observed metadata does not authenticate its claims. Function,
|
non-Go binary; observed metadata does not authenticate its claims. Function,
|
||||||
source and type recovery remain a separate native-analysis question.
|
source and type recovery remain a separate native-analysis question.
|
||||||
|
|
||||||
|
## SQLite snapshots
|
||||||
|
|
||||||
|
Use `inspect_sqlite_database` with an explicit local database snapshot for its
|
||||||
|
schema and optional rows from one exact ordinary table. It requires Node.js
|
||||||
|
24.x >=24.15 or 26+ with the native `DatabaseSync.limits` API. It also consumes the
|
||||||
|
existing sibling `-wal`; retain both original digests when citing its result.
|
||||||
|
Default output is a compact inventory; a selected table expands only its own
|
||||||
|
schema and samples 20 rows. Select `columns` to avoid irrelevant or large cells,
|
||||||
|
and request `schema_scope: "database"` only for complete schema details.
|
||||||
|
Choose `row_limit` when a finite sample is useful and keep truncation and
|
||||||
|
unspecified row order explicit. Virtual tables, shadow tables and views are
|
||||||
|
schema facts, not row-read targets. REA inspects private copies and leaves
|
||||||
|
the source files untouched; obtain a coherent quiescent database/WAL snapshot
|
||||||
|
before inspection. See [SQLite snapshots](https://github.com/morluto/rea/blob/main/docs/guides/data/sqlite-databases.md).
|
||||||
|
|
||||||
## Recorded Linux crashes
|
## Recorded Linux crashes
|
||||||
|
|
||||||
Use `inspect_recorded_crash` with an explicit Linux x86-64 ELF core path to
|
Use `inspect_recorded_crash` with an explicit Linux x86-64 ELF core path to
|
||||||
@@ -24,7 +39,7 @@ The optional `include_debugger_context` facet adds mapping candidates through
|
|||||||
caller-supplied GDB/pwndbg in an owned core-only session. Display names do not
|
caller-supplied GDB/pwndbg in an owned core-only session. Display names do not
|
||||||
establish current file identity; zero reported flags leave permissions unknown.
|
establish current file identity; zero reported flags leave permissions unknown.
|
||||||
Requested unavailable context fails with setup guidance. See
|
Requested unavailable context fails with setup guidance. See
|
||||||
[recorded crashes](https://github.com/morluto/rea/blob/main/docs/recorded-crashes.md)
|
[recorded crashes](https://github.com/morluto/rea/blob/main/docs/guides/native/recorded-crashes.md)
|
||||||
for exact upstream profiles, bounds and verification coverage.
|
for exact upstream profiles, bounds and verification coverage.
|
||||||
|
|
||||||
## Offline ELF layout
|
## Offline ELF layout
|
||||||
@@ -68,6 +83,14 @@ names, the native API record, and value-flow summaries. Pseudocode offsets and l
|
|||||||
code units; use the returned `next_offset` for continuation. Provider limitations
|
code units; use the returned `next_offset` for continuation. Provider limitations
|
||||||
and unavailable facts remain explicit; the complete parent Evidence is retained.
|
and unavailable facts remain explicit; the complete parent Evidence is retained.
|
||||||
|
|
||||||
|
`inspect_macho` on a large framework returns megabytes of imports and exports.
|
||||||
|
Select `detail: "summary"` for slice identity, UUID and per-collection counts,
|
||||||
|
then page rows with `view: {kind: "macho", facet: "exports", offset: 0, limit: 64}`
|
||||||
|
and `normalized_result.parent_evidence_id`. Facets are entrypoints,
|
||||||
|
architectures, build_metadata, load_commands, dependencies, imports, exports,
|
||||||
|
segments and provenance. `source_exhaustive: false` means unreturned symbols
|
||||||
|
may exist.
|
||||||
|
|
||||||
To see which functions or Objective-C methods a Mach-O actually calls in one
|
To see which functions or Objective-C methods a Mach-O actually calls in one
|
||||||
run, use `observe_native_calls` with explicit breakpoints and a bounded
|
run, use `observe_native_calls` with explicit breakpoints and a bounded
|
||||||
`duration_ms`/`max_events`. It launches a new process under LLDB, so the target
|
`duration_ms`/`max_events`. It launches a new process under LLDB, so the target
|
||||||
@@ -96,6 +119,8 @@ loaded bytes, file mappings, relocations and the entry against the immutable
|
|||||||
snapshot. Keep `mismatch` and `unsupported` explicit. Verified import covers the
|
snapshot. Keep `mismatch` and `unsupported` explicit. Verified import covers the
|
||||||
reported static image, not runtime DOS or PC-98 hardware behavior.
|
reported static image, not runtime DOS or PC-98 hardware behavior.
|
||||||
|
|
||||||
|
For Ghidra decompilation, `procedure_pseudo_code` also accepts `procedure: "file-offset:0x..."`; CLI `rea decompile <path> --file-offset=0x... --provider ghidra` resolves the source byte offset internally. An unresolved 0x-prefixed numeric procedure selector also falls back to a unique file mapping. Existing symbols and analysis addresses win; multiple mappings fail as ambiguous. Preserve the returned file-offset and address locations and raw selection observations. ELF virtual addresses are distinct from file offsets; never assume an arbitrary offset plus image base is an analysis address.
|
||||||
|
|
||||||
Use `read_bytes` for initialized analysis memory and `address_to_file_offset` to
|
Use `read_bytes` for initialized analysis memory and `address_to_file_offset` to
|
||||||
anchor one observed address to original file bytes. Loader fixups can change a
|
anchor one observed address to original file bytes. Loader fixups can change a
|
||||||
word; a source offset does not imply byte equality. Complete function body ranges
|
word; a source offset does not imply byte equality. Complete function body ranges
|
||||||
@@ -120,6 +145,18 @@ assembly. Keep managed/native boundaries and unavailable reconstruction facts
|
|||||||
explicit. A bring-your-own reconstruction oracle is separate from the canonical
|
explicit. A bring-your-own reconstruction oracle is separate from the canonical
|
||||||
parser and must not become an implicit setup dependency.
|
parser and must not become an implicit setup dependency.
|
||||||
|
|
||||||
|
For identity/classification questions, `inspect_managed_artifact` can explicitly
|
||||||
|
select `detail: "summary"` on the first MCP call. It retains complete metadata
|
||||||
|
and returns a linked overview with full classification/evidence, nullable
|
||||||
|
module/MVID, frameworks, metadata coverage/issues/limitations and returned-row
|
||||||
|
counts. Default complete requests remain unchanged. Read original rows with
|
||||||
|
`inspect_analysis_view`, source `normalized_result.parent_evidence_id`, and
|
||||||
|
`view: {kind: "managed", collection: "attributes", offset: 0, limit: 16}`.
|
||||||
|
Collections are `references`, `resources` and `attributes`. Paging does not
|
||||||
|
repeat parsing. Returned-row exhaustion
|
||||||
|
does not prove complete metadata or absence under partial/unavailable coverage;
|
||||||
|
preserve build-local tokens and their artifact/MVID scope.
|
||||||
|
|
||||||
### .NET NativeAOT
|
### .NET NativeAOT
|
||||||
|
|
||||||
NativeAOT binaries contain native machine code, so ordinary CIL decompilers
|
NativeAOT binaries contain native machine code, so ordinary CIL decompilers
|
||||||
@@ -138,8 +175,10 @@ additional evidence only when the provider accepts and matches them.
|
|||||||
REA has a built-in read-only snapshot parser for x64 PE targets with .NET 8 RTR
|
REA has a built-in read-only snapshot parser for x64 PE targets with .NET 8 RTR
|
||||||
9.1 metadata. An optional headless Ghidra adapter adds database annotations and
|
9.1 metadata. An optional headless Ghidra adapter adds database annotations and
|
||||||
broader metadata recovery on Linux; it requires an explicitly configured
|
broader metadata recovery on Linux; it requires an explicitly configured
|
||||||
NativeAOT JAR. These are separate routes. See the
|
NativeAOT JAR. These are separate routes. The built-in parser also runs on
|
||||||
[NativeAOT guide](https://github.com/morluto/rea/blob/main/docs/ghidra-nativeaot.md)
|
Windows Ghidra P0; read frozen literals from its report, because
|
||||||
|
`search_strings` does not include them. See the
|
||||||
|
[NativeAOT guide](https://github.com/morluto/rea/blob/main/docs/providers/ghidra-nativeaot.md)
|
||||||
for setup, supported layouts, and host restrictions. Preserve binary identity
|
for setup, supported layouts, and host restrictions. Preserve binary identity
|
||||||
and distinguish derived metadata from Ghidra database observations. Recovered
|
and distinguish derived metadata from Ghidra database observations. Recovered
|
||||||
types and native pseudocode are not original C# source. Windows Ghidra P0 has
|
types and native pseudocode are not original C# source. Windows Ghidra P0 has
|
||||||
@@ -167,8 +206,9 @@ every executable in the bundle. It also lists missing or weak loads and earlier
|
|||||||
`architecture`. System paths stay undetermined because the dyld shared cache
|
`architecture`. System paths stay undetermined because the dyld shared cache
|
||||||
provides them.
|
provides them.
|
||||||
|
|
||||||
Use `extract_artifact` when materialized files are needed. It takes no arguments
|
Use `extract_artifact` when materialized files are needed. It extracts the active
|
||||||
and materializes all regular files into a fresh temporary directory chosen by
|
target and accepts optional `integrity_policy`; see the [MCP contracts](https://github.com/morluto/rea/blob/main/docs/reference/mcp-contracts.md).
|
||||||
|
It materializes all regular files into a fresh temporary directory chosen by
|
||||||
REA. Symlinks and encrypted entries are inventory facts, not extractable files.
|
REA. Symlinks and encrypted entries are inventory facts, not extractable files.
|
||||||
The result reports the materialized directory; callers do not choose the
|
The result reports the materialized directory; callers do not choose the
|
||||||
destination. No separate permission grant is needed.
|
destination. No separate permission grant is needed.
|
||||||
@@ -182,14 +222,17 @@ separate filesystem-writing operation.
|
|||||||
For headerless DOS COM, explicitly open with `format: "dos-com"` (CLI
|
For headerless DOS COM, explicitly open with `format: "dos-com"` (CLI
|
||||||
`--target-format dos-com`). Inspect the load image before trusting function
|
`--target-format dos-com`). Inspect the load image before trusting function
|
||||||
analysis: the entry is `0x10100`, file offset zero, with imposed real-mode segment
|
analysis: the entry is `0x10100`, file offset zero, with imposed real-mode segment
|
||||||
context. PSP/stack/device state remains unmodeled. See [DOS guide](https://github.com/morluto/rea/blob/main/docs/ghidra-dos.md).
|
context. PSP/stack/device state remains unmodeled. See [DOS guide](https://github.com/morluto/rea/blob/main/docs/providers/ghidra-dos.md).
|
||||||
|
|
||||||
For other headerless images (embedded firmware without ELF/Mach-O/PE/MZ
|
For other headerless images (embedded firmware without ELF/Mach-O/PE/MZ
|
||||||
headers), open with `format: "raw-binary"`, `architecture` (`x86`, `x86_64`,
|
headers), open with `format: "raw-binary"`, `architecture` (`x86`, `x86_64`,
|
||||||
`arm`, or `arm64`), and `entry_point` (`0x` hex). File offset 0 is mapped at
|
`arm`, `arm64`, or `6502`), and `entry_point` (`0x` hex). File offset 0 is mapped at
|
||||||
that address. Hopper and IDA refuse this interpretation; Ghidra uses
|
that address. Hopper and IDA refuse this interpretation; Ghidra uses
|
||||||
`BinaryLoader` with a little-endian generic language. Big-endian, Thumb-only,
|
`BinaryLoader` with a little-endian generic language. Big-endian, Thumb-only,
|
||||||
and Cortex-M variants are unsupported. See [raw binary guide](https://github.com/morluto/rea/blob/main/docs/raw-binary.md).
|
and Cortex-M variants are unsupported. `6502` selects NMOS 6502; the entry and
|
||||||
|
complete file mapping must fit within `0x0000..0xffff`. 65C02, 65816, cartridge
|
||||||
|
containers, bank switching, and mapper semantics are unsupported. Windows
|
||||||
|
Ghidra P0 admits raw images only for `6502`. See [raw binary guide](https://github.com/morluto/rea/blob/main/docs/providers/raw-binary.md).
|
||||||
|
|
||||||
### Function annotations in Ghidra
|
### Function annotations in Ghidra
|
||||||
|
|
||||||
@@ -205,4 +248,10 @@ code pages, payload hashes and static icon-group references. Same-language icon
|
|||||||
resolution is explicit; missing references and size mismatch remain visible.
|
resolution is explicit; missing references and size mismatch remain visible.
|
||||||
Other payloads are opaque, and this operation does not decode images or simulate
|
Other payloads are opaque, and this operation does not decode images or simulate
|
||||||
Windows resource loading. Consult the budgets and supported tree profile in
|
Windows resource loading. Consult the budgets and supported tree profile in
|
||||||
[offline binary diagnostics](https://github.com/morluto/rea/blob/main/docs/binary-diagnostics.md).
|
[offline binary diagnostics](https://github.com/morluto/rea/blob/main/docs/guides/native/binary-diagnostics.md).
|
||||||
|
|
||||||
|
For exact core-module import/export differences, use `compare_wasm_interfaces`
|
||||||
|
with two complete inspection Evidence records (or current-session retained
|
||||||
|
references) and explicit scope. Preserve unknown types/duplicate names; static
|
||||||
|
interface equality is not runtime compatibility. CLI accepts complete inline
|
||||||
|
Evidence in `rea compare-wasm-interfaces input.json --json`.
|
||||||
|
|||||||
@@ -26,3 +26,18 @@ passive browser/Electron Evidence exist. Prefer captured-source digest identity;
|
|||||||
report path/digest disagreement as a mismatch and preserve ambiguity. Explicit
|
report path/digest disagreement as a mismatch and preserve ambiguity. Explicit
|
||||||
path mappings are inference inputs and never broaden filesystem or CDP authority.
|
path mappings are inference inputs and never broaden filesystem or CDP authority.
|
||||||
A bundle observed at runtime does not prove every contained module executed.
|
A bundle observed at runtime does not prove every contained module executed.
|
||||||
|
|
||||||
|
## Fiddler Everywhere traffic debugging
|
||||||
|
|
||||||
|
For large saved captures, request `detail: "summary"`, then page retained Evidence
|
||||||
|
with `inspect_analysis_view` and `view: {kind: "capture", detail: "preview", offset: 0, limit: 20}`.
|
||||||
|
Select complete record pages only for needed headers, metadata or payloads; views
|
||||||
|
read the historical parent without repeating capture decoding.
|
||||||
|
|
||||||
|
Inspect native `.saz` snapshots with `inspect_web_network_capture` and
|
||||||
|
`format: "saz"`; encrypted archives are unsupported. For live
|
||||||
|
traffic analysis, connect Everywhere's separate MCP server and use its
|
||||||
|
advertised session tools with an explicit `sessionsSource` (`LiveTraffic` or
|
||||||
|
`AgentCalls`). Preserve existing sessions and filters when inspecting a
|
||||||
|
recorded run. See the [capture and MCP guide](https://github.com/morluto/rea/blob/main/docs/guides/web/web-network-captures.md)
|
||||||
|
for the workflow and Telerik's public setup and traffic-debugging skills.
|
||||||
|
|||||||
@@ -3,3 +3,6 @@
|
|||||||
|
|
||||||
# Windows command fixtures retain their native line endings.
|
# Windows command fixtures retain their native line endings.
|
||||||
*.cmd text eol=crlf
|
*.cmd text eol=crlf
|
||||||
|
|
||||||
|
# Preserve whitespace in original upstream licensing texts.
|
||||||
|
licenses/npm-runtime-notices.txt whitespace=-blank-at-eol
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
blank_issues_enabled: false
|
blank_issues_enabled: false
|
||||||
contact_links:
|
contact_links:
|
||||||
|
- name: Contribution scope and integration requirements
|
||||||
|
url: https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope
|
||||||
|
about: Check supported capabilities, excluded workflows, and the fail-closed integration rule before proposing a feature.
|
||||||
- name: REA Documentation
|
- name: REA Documentation
|
||||||
url: https://github.com/morluto/rea#readme
|
url: https://github.com/morluto/rea#readme
|
||||||
about: Read the README and AGENTS.md for usage guides and configuration details.
|
about: Read the README and AGENTS.md for usage guides and configuration details.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: Design discussion
|
name: Design discussion
|
||||||
description: Resolve an REA architecture, provider, or contract question before implementation
|
description: Discuss an REA architecture, provider, contract, or scope decision
|
||||||
title: "[Design] "
|
title: "[Design] "
|
||||||
labels:
|
labels:
|
||||||
- enhancement
|
- enhancement
|
||||||
@@ -9,7 +9,12 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
value: |
|
value: |
|
||||||
Use this for a substantial provider, public/persisted contract, or
|
Use this for a substantial provider, public/persisted contract, or
|
||||||
authority-boundary decision. Keep one decision per discussion.
|
authority-boundary decision. One question and a short explanation are
|
||||||
|
enough to start. Choose "Not sure yet" where needed; maintainers can help
|
||||||
|
with technical details, alternatives, and verification.
|
||||||
|
|
||||||
|
Read the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope).
|
||||||
|
Unresolved boundaries block integration, not opening a discussion.
|
||||||
|
|
||||||
- type: checkboxes
|
- type: checkboxes
|
||||||
id: before-submitting
|
id: before-submitting
|
||||||
@@ -18,14 +23,16 @@ body:
|
|||||||
options:
|
options:
|
||||||
- label: I searched the open and closed issues and pull requests for a related discussion.
|
- label: I searched the open and closed issues and pull requests for a related discussion.
|
||||||
required: true
|
required: true
|
||||||
- label: I removed credentials, tokens, private paths, and sensitive target data.
|
- label: I understand the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope) must be reviewed before integration; open questions are welcome here.
|
||||||
|
required: true
|
||||||
|
- label: This discussion does not include credentials, private samples, or sensitive target data.
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: decision
|
id: decision
|
||||||
attributes:
|
attributes:
|
||||||
label: Decision needed
|
label: Decision needed
|
||||||
description: State the exact question maintainers need to resolve.
|
description: What would you like maintainers to help decide? A short question is enough.
|
||||||
placeholder: Should REA ... or ...?
|
placeholder: Should REA ... or ...?
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
@@ -34,23 +41,57 @@ body:
|
|||||||
id: context-evidence
|
id: context-evidence
|
||||||
attributes:
|
attributes:
|
||||||
label: Context and evidence
|
label: Context and evidence
|
||||||
description: Explain why the decision is needed now. Separate observed behavior, derived evidence, and inference.
|
description: Explain the problem or motivation. If you have evidence, distinguish observed behavior from ideas or guesses.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
id: target-interaction
|
||||||
|
attributes:
|
||||||
|
label: Expected interaction with targets
|
||||||
|
description: >-
|
||||||
|
Select all known effects, including upstream tool behavior. Add "Not sure
|
||||||
|
yet" if anything is unclear. Use "No target interaction" only on its own.
|
||||||
|
These selections help discussion and do not establish scope approval.
|
||||||
|
multiple: true
|
||||||
|
options:
|
||||||
|
- Read existing files or captured data
|
||||||
|
- Launch or attach to a process
|
||||||
|
- Inject instrumentation or run scripts/code
|
||||||
|
- Change process memory or registers
|
||||||
|
- Write or change files/configuration
|
||||||
|
- Contact network services
|
||||||
|
- Recover protected code or work around protections
|
||||||
|
- No target interaction (documentation or usability only)
|
||||||
|
- Not sure yet
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: boundary-invariants
|
id: boundary-invariants
|
||||||
attributes:
|
attributes:
|
||||||
label: Boundary and invariants
|
label: Boundary details (optional)
|
||||||
description: Identify the owning layer, provider/bridge boundary, artifact or evidence invariants, and any process or authorization constraints.
|
description: >-
|
||||||
validations:
|
If known, clarify target selection, selected effects, provider boundaries,
|
||||||
required: true
|
non-goals, or evidence invariants. Leave blank if you need help identifying
|
||||||
|
them. Do not include private samples or proof-of-authorization documents.
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: options
|
id: options
|
||||||
attributes:
|
attributes:
|
||||||
label: Options and tradeoffs
|
label: Options and tradeoffs
|
||||||
description: Compare a small number of viable approaches, including platform, compatibility, safety, evidence, and maintenance costs.
|
description: Optional approaches or tradeoffs. One idea is enough; maintainers can help compare alternatives.
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
id: verification-readiness
|
||||||
|
attributes:
|
||||||
|
label: Verification available so far
|
||||||
|
description: Pick the closest match. An idea without samples or test results is welcome.
|
||||||
|
options:
|
||||||
|
- Idea only; I need help defining checks
|
||||||
|
- I can suggest a sample or manual check
|
||||||
|
- I have a prototype or observed results
|
||||||
|
- Not sure yet
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
@@ -58,9 +99,10 @@ body:
|
|||||||
id: success-criteria
|
id: success-criteria
|
||||||
attributes:
|
attributes:
|
||||||
label: Success criteria and open questions
|
label: Success criteria and open questions
|
||||||
description: State what outcome would settle the decision and list only unresolved questions that could change the choice.
|
description: >-
|
||||||
validations:
|
Optional expected output, sample, possible check, or unresolved question.
|
||||||
required: true
|
A complete test plan is not required to start; maintainers and implementers
|
||||||
|
will resolve material verification gaps before integration.
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: references
|
id: references
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
label: Documentation location
|
label: Documentation location
|
||||||
description: Link the page, section, command, API, skill, or inline comment.
|
description: Link the page, section, command, API, skill, or inline comment.
|
||||||
placeholder: README.md#quick-start or docs/mcp-contracts.md
|
placeholder: README.md#quick-start or docs/reference/mcp-contracts.md
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,13 @@ body:
|
|||||||
- type: markdown
|
- type: markdown
|
||||||
attributes:
|
attributes:
|
||||||
value: |
|
value: |
|
||||||
Keep one primary capability or workflow outcome per request. For a
|
Describe one problem and the outcome you would like. Short answers are
|
||||||
substantial provider, public contract, or architecture change, explain
|
welcome. Choose "Not sure yet" wherever needed; you do not need code, a
|
||||||
the decision maintainers need to make before implementation.
|
finished design, or a complete test plan to propose an idea.
|
||||||
|
|
||||||
|
Read the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope).
|
||||||
|
Maintainers can help resolve scope and technical questions. Unresolved
|
||||||
|
boundaries block integration, not opening a request for discussion.
|
||||||
|
|
||||||
- type: checkboxes
|
- type: checkboxes
|
||||||
id: before-submitting
|
id: before-submitting
|
||||||
@@ -19,7 +23,9 @@ body:
|
|||||||
options:
|
options:
|
||||||
- label: I searched the open and closed issues and pull requests for a related proposal.
|
- label: I searched the open and closed issues and pull requests for a related proposal.
|
||||||
required: true
|
required: true
|
||||||
- label: I removed credentials, tokens, private paths, and sensitive target data.
|
- label: I understand the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope) must be reviewed before integration; open questions are welcome here.
|
||||||
|
required: true
|
||||||
|
- label: This request does not include credentials, private samples, or sensitive target data.
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: dropdown
|
- type: dropdown
|
||||||
@@ -36,6 +42,7 @@ body:
|
|||||||
- MCP or agent integration
|
- MCP or agent integration
|
||||||
- Documentation
|
- Documentation
|
||||||
- Other
|
- Other
|
||||||
|
- Not sure yet
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
@@ -43,7 +50,7 @@ body:
|
|||||||
id: current-limitation
|
id: current-limitation
|
||||||
attributes:
|
attributes:
|
||||||
label: Current limitation
|
label: Current limitation
|
||||||
description: What user or agent workflow is blocked, ambiguous, or unnecessarily difficult today?
|
description: What are you trying to understand or do, and what is difficult today? A short example is enough.
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
@@ -51,23 +58,69 @@ body:
|
|||||||
id: use-cases
|
id: use-cases
|
||||||
attributes:
|
attributes:
|
||||||
label: Use cases
|
label: Use cases
|
||||||
description: Give concrete applications, targets, callers, or investigation workflows. Explain why current tools are insufficient.
|
description: Optional additional examples of applications, targets, or callers. Leave blank if covered above.
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: desired-outcome
|
id: desired-outcome
|
||||||
attributes:
|
attributes:
|
||||||
label: Desired outcome and success criteria
|
label: Desired outcome and success criteria
|
||||||
description: Describe observable behavior, inputs, outputs, evidence, and compatibility criteria that would make this useful.
|
description: What would a useful result look like? Describe the output or behavior you want; implementation details are optional.
|
||||||
|
placeholder: For a selected APK, show whether it is packed and include the detection evidence.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
id: target-interaction
|
||||||
|
attributes:
|
||||||
|
label: Expected interaction with targets
|
||||||
|
description: >-
|
||||||
|
Select all known effects, including upstream tool behavior. Add "Not sure
|
||||||
|
yet" if anything is unclear. Use "No target interaction" only on its own.
|
||||||
|
These selections help discussion and do not establish scope approval.
|
||||||
|
multiple: true
|
||||||
|
options:
|
||||||
|
- Read existing files or captured data
|
||||||
|
- Launch or attach to a process
|
||||||
|
- Inject instrumentation or run scripts/code
|
||||||
|
- Change process memory or registers
|
||||||
|
- Write or change files/configuration
|
||||||
|
- Contact network services
|
||||||
|
- Recover protected code or work around protections
|
||||||
|
- No target interaction (documentation or usability only)
|
||||||
|
- Not sure yet
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: boundaries
|
id: boundaries
|
||||||
attributes:
|
attributes:
|
||||||
label: Authority boundaries and non-goals
|
label: Target and scope details (optional)
|
||||||
description: Call out process execution, target mutation, provider licensing, evidence provenance, supported platforms, and work that should remain out of scope.
|
description: >-
|
||||||
|
If known, name the target/platform, clarify selected effects, or list a
|
||||||
|
non-goal or scope question. You can leave this blank; maintainers can help.
|
||||||
|
Do not include private samples or proof-of-authorization documents.
|
||||||
|
|
||||||
|
- type: dropdown
|
||||||
|
id: verification-readiness
|
||||||
|
attributes:
|
||||||
|
label: Verification available so far
|
||||||
|
description: Pick the closest match. An idea without samples or test results is welcome.
|
||||||
|
options:
|
||||||
|
- Idea only; I need help defining checks
|
||||||
|
- I can suggest a sample or manual check
|
||||||
|
- I have a prototype or observed results
|
||||||
|
- Not sure yet
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: verification
|
||||||
|
attributes:
|
||||||
|
label: Verification details (optional)
|
||||||
|
description: >-
|
||||||
|
Share an expected output, a possible check, or existing results if you have
|
||||||
|
them. Self-owned or appropriately licensed samples can help, but are not
|
||||||
|
required to open a request. Do not attach private or sensitive data.
|
||||||
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: alternatives
|
id: alternatives
|
||||||
|
|||||||
@@ -1,17 +1,27 @@
|
|||||||
name: Portable build cache
|
name: Portable build cache
|
||||||
description: Reuse Turbo build outputs without serializing verification jobs.
|
description: Restore portable Turbo build outputs from the current run or cross-run cache.
|
||||||
inputs:
|
inputs:
|
||||||
save:
|
save:
|
||||||
description: Save newly built outputs after the job succeeds.
|
description: Save newly built outputs after the job succeeds.
|
||||||
default: "false"
|
default: "false"
|
||||||
|
build_cache_artifact:
|
||||||
|
description: Reuse portable Turbo outputs uploaded by the current workflow run.
|
||||||
|
default: ""
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
|
- name: Download portable build outputs from this workflow run
|
||||||
|
if: inputs.build_cache_artifact != ''
|
||||||
|
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
|
with:
|
||||||
|
name: ${{ inputs.build_cache_artifact }}
|
||||||
|
path: .turbo/cache/
|
||||||
- name: Resolve portable build task hashes
|
- name: Resolve portable build task hashes
|
||||||
id: plan
|
id: plan
|
||||||
|
if: inputs.build_cache_artifact == ''
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
BUILD_CACHE_PREFIX: rea-portable-build-v1-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.npmrc') }}
|
BUILD_CACHE_PREFIX: rea-portable-build-v2-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.npmrc', '.nvmrc', 'package-lock.json') }}
|
||||||
run: |
|
run: |
|
||||||
npm run --silent test:prepare -- --dry=json |
|
npm run --silent test:prepare -- --dry=json |
|
||||||
node --input-type=module -e '
|
node --input-type=module -e '
|
||||||
@@ -25,16 +35,19 @@ runs:
|
|||||||
}).sort();
|
}).sort();
|
||||||
const hash = createHash("sha256").update(hashes.join("\n")).digest("hex");
|
const hash = createHash("sha256").update(hashes.join("\n")).digest("hex");
|
||||||
console.log(`key=${process.env.BUILD_CACHE_PREFIX}-${hash}`);
|
console.log(`key=${process.env.BUILD_CACHE_PREFIX}-${hash}`);
|
||||||
|
console.log(`prefix=${process.env.BUILD_CACHE_PREFIX}-`);
|
||||||
' >> "$GITHUB_OUTPUT"
|
' >> "$GITHUB_OUTPUT"
|
||||||
- name: Restore portable build outputs
|
- name: Restore portable build outputs
|
||||||
if: inputs.save != 'true'
|
if: inputs.build_cache_artifact == '' && inputs.save != 'true'
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||||
with:
|
with:
|
||||||
path: .turbo/cache/
|
path: .turbo/cache/
|
||||||
key: ${{ steps.plan.outputs.key }}
|
key: ${{ steps.plan.outputs.key }}
|
||||||
|
restore-keys: ${{ steps.plan.outputs.prefix }}
|
||||||
- name: Restore and save portable build outputs
|
- name: Restore and save portable build outputs
|
||||||
if: inputs.save == 'true'
|
if: inputs.build_cache_artifact == '' && inputs.save == 'true'
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||||
with:
|
with:
|
||||||
path: .turbo/cache/
|
path: .turbo/cache/
|
||||||
key: ${{ steps.plan.outputs.key }}
|
key: ${{ steps.plan.outputs.key }}
|
||||||
|
restore-keys: ${{ steps.plan.outputs.prefix }}
|
||||||
|
|||||||
@@ -19,17 +19,39 @@ describe the use case and observable outcome. -->
|
|||||||
<!-- Explain the chosen approach, why it fits REA's architecture, and what is
|
<!-- Explain the chosen approach, why it fits REA's architecture, and what is
|
||||||
intentionally not included. -->
|
intentionally not included. -->
|
||||||
|
|
||||||
|
Follow the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope).
|
||||||
|
Unresolved scope, authority, side effects, or required verification block
|
||||||
|
integration. Link the required maintainer scope decision for new providers or
|
||||||
|
capabilities involving target execution, injection, mutation, or protection
|
||||||
|
recovery; ordinary fixes within existing boundaries may state "not applicable".
|
||||||
|
Draft PRs may leave the scope decision pending and the final review checklist
|
||||||
|
unchecked. Maintainers can help resolve open questions.
|
||||||
|
|
||||||
## Contract and boundary impact
|
## Contract and boundary impact
|
||||||
|
|
||||||
<!-- Complete the applicable lines; use "none" or "not applicable" explicitly. -->
|
<!-- Short answers are welcome. Complete applicable lines; mark unresolved facts as "unknown".
|
||||||
|
Use "none" or "not applicable" only when established. -->
|
||||||
|
|
||||||
- Semantic owner and earliest changed stage:
|
- Semantic owner and earliest changed stage:
|
||||||
|
- Contribution scope fit and linked maintainer decision:
|
||||||
- CLI and MCP/tool-catalog contract:
|
- CLI and MCP/tool-catalog contract:
|
||||||
- Provider, bridge, target-format, or platform compatibility:
|
- Provider, bridge, target-format, or platform compatibility:
|
||||||
- Evidence, artifact, provenance, or reconstruction contract:
|
- Evidence, artifact, provenance, or reconstruction contract:
|
||||||
- Process execution, authorization, cleanup, or containment impact:
|
- Target selection, authority, upstream behavior, and cleanup details (if applicable):
|
||||||
- Generated metadata (`docs/public/product-catalog.json`), package, or installation impact (CI generates and validates ignored catalogs and `skills/`; edit authored instructions in `.agents/skills/reverse-engineer-anything/` and never commit build outputs):
|
- Generated metadata (`docs/public/product-catalog.json`), package, or installation impact (CI generates and validates ignored catalogs and `skills/`; edit authored instructions in `.agents/skills/reverse-engineer-anything/` and never commit build outputs):
|
||||||
|
|
||||||
|
Expected effects (check known effects; use documentation-only on its own).
|
||||||
|
Unchecked items do not establish absence; leave uncertainties visible.
|
||||||
|
|
||||||
|
- [ ] Read existing files or captured data.
|
||||||
|
- [ ] Launch or attach to a process.
|
||||||
|
- [ ] Inject instrumentation or run scripts/code.
|
||||||
|
- [ ] Change process memory, registers, files, or configuration.
|
||||||
|
- [ ] Contact network services.
|
||||||
|
- [ ] Recover protected code or work around protections.
|
||||||
|
- [ ] Documentation or usability only; no target interaction.
|
||||||
|
- [ ] Not sure yet; investigation or maintainer guidance needed.
|
||||||
|
|
||||||
## Evidence and regression coverage
|
## Evidence and regression coverage
|
||||||
|
|
||||||
<!-- State whether evidence is executed, source-derived, or proposed. For fixes,
|
<!-- State whether evidence is executed, source-derived, or proposed. For fixes,
|
||||||
@@ -63,14 +85,18 @@ limits, security/privacy/containment implications, and meaningful proof gaps. --
|
|||||||
its new behavior and migration, and why compatibility/deprecation cannot
|
its new behavior and migration, and why compatibility/deprecation cannot
|
||||||
preserve it. Every release increments minor, including breaking changes;
|
preserve it. Every release increments minor, including breaking changes;
|
||||||
keep breaking markers and migration notes so callers can assess compatibility.
|
keep breaking markers and migration notes so callers can assess compatibility.
|
||||||
See docs/releasing.md. -->
|
See docs/development/releasing.md. -->
|
||||||
- Real Hopper/Ghidra, browser, or OS coverage:
|
- Real Hopper/Ghidra, browser, or OS coverage:
|
||||||
- Package or release metadata impact:
|
- Package or release metadata impact:
|
||||||
- Security, privacy, process, or containment review:
|
- Security, privacy, process, or containment review:
|
||||||
|
|
||||||
## Review checklist
|
## Before merge
|
||||||
|
|
||||||
|
<!-- Draft PRs may leave pending items unchecked. Resolve material scope and
|
||||||
|
authority questions before integration. -->
|
||||||
|
|
||||||
- [ ] This PR addresses a concrete problem or an agreed enhancement.
|
- [ ] 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`.
|
- [ ] The PR has one focused outcome and the title follows `type(scope): outcome`.
|
||||||
- [ ] Related issue is linked, or the reason for not linking one is stated above.
|
- [ ] Related issue is linked, or the reason for not linking one is stated above.
|
||||||
- [ ] Tests cover changed observable behavior and meaningful failure paths.
|
- [ ] Tests cover changed observable behavior and meaningful failure paths.
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
name: Full PR qualification
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [main, "release/*"]
|
||||||
|
types: [labeled]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
actions: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
qualification:
|
||||||
|
name: Qualify labeled PR revision
|
||||||
|
if: github.event.label.name == 'ci:full'
|
||||||
|
uses: ./.github/workflows/ci.yml
|
||||||
|
with:
|
||||||
|
source_sha: ${{ github.sha }}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
name: CI timings
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "17 * * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ci-timings-${{ github.repository }}
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
actions: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
report:
|
||||||
|
name: Collect recent completed workflow attempts
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 5
|
||||||
|
steps:
|
||||||
|
# Consume only API data and execute batch code from the trusted default branch.
|
||||||
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.repository.default_branch }}
|
||||||
|
persist-credentials: false
|
||||||
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
|
with:
|
||||||
|
node-version-file: .nvmrc
|
||||||
|
- name: Record queue, execution, and matched step timing
|
||||||
|
continue-on-error: true
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
CI_REPOSITORY: ${{ github.repository }}
|
||||||
|
run: node scripts/ci/job-timings-batch.mjs
|
||||||
|
- name: Upload CI timing artifacts
|
||||||
|
if: always() && hashFiles('.cache/ci-job-timings/*') != ''
|
||||||
|
continue-on-error: true
|
||||||
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
|
with:
|
||||||
|
name: ci-job-timings-batch
|
||||||
|
path: .cache/ci-job-timings/
|
||||||
|
include-hidden-files: true
|
||||||
|
if-no-files-found: error
|
||||||
|
overwrite: true
|
||||||
|
retention-days: 14
|
||||||
+300
-141
@@ -5,42 +5,44 @@ on:
|
|||||||
branches: [main]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main, "release/*"]
|
branches: [main, "release/*"]
|
||||||
|
schedule:
|
||||||
|
- cron: "23 0-2,4-23 * * *"
|
||||||
|
- cron: "23 3 * * *"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
source_sha:
|
||||||
|
description: Exact qualification source; must match the caller revision.
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ci-${{ github.event.pull_request.number || github.ref }}
|
# Complete qualification finishes even while main receives more pushes.
|
||||||
# The latest main push verifies the full tree, including earlier changes.
|
# Main feedback also finishes, coalescing newer pushes to one pending run.
|
||||||
# Publication uses its own release workflow and concurrency group.
|
# Scheduled/manual main runs coalesce to one active and the latest pending;
|
||||||
cancel-in-progress: true
|
# release and label-triggered qualification use exact-revision groups.
|
||||||
|
group: ci-${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || inputs.source_sha != '' || contains(github.event.pull_request.labels.*.name, 'ci:full')) && 'qualification' || 'feedback' }}-${{ inputs.source_sha || github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: ${{ github.event_name == 'pull_request' && inputs.source_sha == '' && !contains(github.event.pull_request.labels.*.name, 'ci:full') }}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
HUSKY: "0"
|
HUSKY: "0"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pr-title:
|
|
||||||
name: Conventional PR title
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Validate title for Release Please
|
|
||||||
env:
|
|
||||||
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
||||||
run: >-
|
|
||||||
node -e 'const title = process.env.PR_TITLE ?? "";
|
|
||||||
const conventional = /^(?:feat|fix|docs|refactor|perf|test|build|ci|chore|revert)(?:\([a-z0-9._/-]+\))?!?: .+/u;
|
|
||||||
if (!conventional.test(title)) {
|
|
||||||
console.error("PR title must use Conventional Commits, for example: feat: add historical source import");
|
|
||||||
process.exit(1);
|
|
||||||
}'
|
|
||||||
|
|
||||||
changes:
|
changes:
|
||||||
name: Classify changes
|
name: Classify changes
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
|
timeout-minutes: 5
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
actions: read
|
||||||
outputs:
|
outputs:
|
||||||
|
tier: ${{ steps.plan.outputs.tier }}
|
||||||
|
qualification_run_id: ${{ steps.qualification.outputs.run_id }}
|
||||||
code: ${{ steps.plan.outputs.code }}
|
code: ${{ steps.plan.outputs.code }}
|
||||||
|
sqlite: ${{ steps.plan.outputs.sqlite }}
|
||||||
runtime: ${{ steps.plan.outputs.runtime }}
|
runtime: ${{ steps.plan.outputs.runtime }}
|
||||||
package: ${{ steps.plan.outputs.package }}
|
package: ${{ steps.plan.outputs.package }}
|
||||||
apple: ${{ steps.plan.outputs.apple }}
|
apple: ${{ steps.plan.outputs.apple }}
|
||||||
@@ -59,68 +61,123 @@ jobs:
|
|||||||
nativeaot: ${{ steps.plan.outputs.nativeaot }}
|
nativeaot: ${{ steps.plan.outputs.nativeaot }}
|
||||||
website: ${{ steps.plan.outputs.website }}
|
website: ${{ steps.plan.outputs.website }}
|
||||||
matrix: ${{ steps.plan.outputs.matrix }}
|
matrix: ${{ steps.plan.outputs.matrix }}
|
||||||
|
test_selection: ${{ steps.plan.outputs.test_selection }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
with:
|
with:
|
||||||
|
ref: ${{ inputs.source_sha || github.sha }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
|
- name: Bind qualification to the caller revision
|
||||||
|
if: inputs.source_sha != ''
|
||||||
|
env:
|
||||||
|
SOURCE_SHA: ${{ inputs.source_sha }}
|
||||||
|
run: |
|
||||||
|
test "${SOURCE_SHA}" = "${GITHUB_SHA}"
|
||||||
|
test "${SOURCE_SHA}" = "$(git rev-parse HEAD)"
|
||||||
|
- name: Find a verified ancestor for push selection
|
||||||
|
id: baseline
|
||||||
|
if: github.event_name == 'push' && inputs.source_sha == ''
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
HEAD_SHA: ${{ github.sha }}
|
||||||
|
CI_REPOSITORY: ${{ github.repository }}
|
||||||
|
CI_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
||||||
|
run: node scripts/ci/baseline.mjs
|
||||||
|
- name: Admit scheduled full qualification
|
||||||
|
id: qualification
|
||||||
|
if: github.event_name == 'schedule' && inputs.source_sha == ''
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
HEAD_SHA: ${{ github.sha }}
|
||||||
|
CI_REPOSITORY: ${{ github.repository }}
|
||||||
|
CI_REPOSITORY_ID: ${{ github.repository_id }}
|
||||||
|
CI_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
||||||
|
CI_FORCE_FULL: ${{ github.event.schedule == '23 3 * * *' }}
|
||||||
|
run: node scripts/ci/qualification.mjs
|
||||||
- name: Select verification lanes
|
- name: Select verification lanes
|
||||||
id: plan
|
id: plan
|
||||||
env:
|
env:
|
||||||
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
BASE_SHA: ${{ steps.baseline.outputs.base || github.event.pull_request.base.sha }}
|
||||||
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
BASELINE_REASON: ${{ steps.baseline.outputs.reason }}
|
||||||
CI_FULL: ${{ contains(github.event.pull_request.labels.*.name, 'ci:full') }}
|
HEAD_SHA: ${{ inputs.source_sha || github.event.pull_request.head.sha || github.sha }}
|
||||||
|
CI_FULL: ${{ inputs.source_sha != '' || contains(github.event.pull_request.labels.*.name, 'ci:full') }}
|
||||||
|
CI_SKIP_FULL: ${{ steps.qualification.outputs.run_full == 'false' }}
|
||||||
run: node scripts/ci/plan.mjs
|
run: node scripts/ci/plan.mjs
|
||||||
|
|
||||||
static:
|
static:
|
||||||
name: Static checks
|
name: Static checks
|
||||||
needs: changes
|
needs: changes
|
||||||
if: ${{ always() }}
|
if: ${{ !cancelled() && needs.changes.outputs.tier != 'reused' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- name: Require successful change classification
|
- name: Require successful change classification
|
||||||
env:
|
env:
|
||||||
CHANGES_RESULT: ${{ needs.changes.result }}
|
CHANGES_RESULT: ${{ needs.changes.result }}
|
||||||
run: test "${CHANGES_RESULT}" = "success"
|
run: test "${CHANGES_RESULT}" = "success"
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
|
- name: Validate workflow syntax and expressions
|
||||||
|
if: needs.changes.outputs.workflows == 'true'
|
||||||
|
run: go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 -shellcheck= -pyflakes=
|
||||||
- if: needs.changes.outputs.code == 'true'
|
- if: needs.changes.outputs.code == 'true'
|
||||||
run: npm run check:ci
|
run: npm run check:ci
|
||||||
- if: needs.changes.outputs.code == 'true'
|
- if: needs.changes.outputs.code == 'true'
|
||||||
run: npm run verify:test-discovery
|
run: npm run verify:test-discovery
|
||||||
|
- name: Check LLDB producer retention and launch contracts
|
||||||
|
if: needs.changes.outputs.code == 'true'
|
||||||
|
run: npm run test:python
|
||||||
- if: needs.changes.outputs.code != 'true'
|
- if: needs.changes.outputs.code != 'true'
|
||||||
run: npm run format:check
|
run: npm run format:check
|
||||||
|
- name: Upload complete static diagnostics
|
||||||
|
if: always() && needs.changes.outputs.code == 'true'
|
||||||
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
|
with:
|
||||||
|
name: static-check-reports
|
||||||
|
path: .cache/static-checks/
|
||||||
|
include-hidden-files: true
|
||||||
|
if-no-files-found: ignore
|
||||||
|
retention-days: 7
|
||||||
|
|
||||||
test-shard:
|
test-shard:
|
||||||
name: Test shard (${{ matrix.shard }})
|
name: Test shard (${{ matrix.shard }})
|
||||||
needs: [changes, build]
|
needs: [changes, build]
|
||||||
if: needs.changes.outputs.code == 'true'
|
if: needs.changes.outputs.code == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 30
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
shard: [1/6, 2/6, 3/6, 4/6, 5/6, 6/6]
|
shard: [1/6, 2/6, 3/6, 4/6, 5/6, 6/6]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
with:
|
with:
|
||||||
name: rea-test-runtime
|
name: rea-test-runtime
|
||||||
path: .
|
path: .
|
||||||
- run: npm run test:ci:shard:run -- --shard=${{ matrix.shard }}
|
- name: Run complete portable suite with coverage
|
||||||
|
if: needs.changes.outputs.tier == 'full'
|
||||||
|
run: npm run test:ci:shard:run -- --shard=${{ matrix.shard }}
|
||||||
env:
|
env:
|
||||||
REA_CI_TEST_HISTORY: .cache/ci-test-history/test-results.json
|
REA_CI_TEST_HISTORY: .cache/ci-test-history/test-results.json
|
||||||
- uses: actions/upload-artifact@v4
|
- name: Run complete portable suite for fast feedback
|
||||||
|
if: needs.changes.outputs.tier == 'fast'
|
||||||
|
run: npm run test:run -- --reporter=default --reporter=blob --shard=${{ matrix.shard }}
|
||||||
|
env:
|
||||||
|
REA_CI_TEST_HISTORY: .cache/ci-test-history/test-results.json
|
||||||
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
with:
|
with:
|
||||||
name: vitest-report-${{ strategy.job-index }}
|
name: vitest-report-${{ strategy.job-index }}
|
||||||
@@ -133,14 +190,26 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: Build package
|
name: Build package
|
||||||
needs: changes
|
needs: changes
|
||||||
if: needs.changes.outputs.code == 'true'
|
# Reusable provider workflows consume this run's portable build artifact,
|
||||||
|
# even when a workflow-only edit selects the lane without portable tests.
|
||||||
|
if: >-
|
||||||
|
needs.changes.outputs.code == 'true' ||
|
||||||
|
needs.changes.outputs.browser == 'true' ||
|
||||||
|
needs.changes.outputs.binary_layout == 'true' ||
|
||||||
|
needs.changes.outputs.evm == 'true' ||
|
||||||
|
needs.changes.outputs.javascript_recovery == 'true' ||
|
||||||
|
needs.changes.outputs.recorded_crash == 'true' ||
|
||||||
|
needs.changes.outputs.web_network == 'true' ||
|
||||||
|
needs.changes.outputs.web_runtime == 'true' ||
|
||||||
|
needs.changes.outputs.web_source_map == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
actions: read
|
actions: read
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -148,31 +217,27 @@ jobs:
|
|||||||
- name: Reuse portable build outputs across runs
|
- name: Reuse portable build outputs across runs
|
||||||
uses: ./.github/actions/portable-build-cache
|
uses: ./.github/actions/portable-build-cache
|
||||||
with:
|
with:
|
||||||
save: "true"
|
save: ${{ github.event_name != 'pull_request' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
|
||||||
- run: npm run test:prepare
|
- run: npm run test:prepare
|
||||||
- name: Find successful default-branch timing history
|
- name: Find available trusted full-suite timing history
|
||||||
id: history
|
id: history
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
CI_REPOSITORY: ${{ github.repository }}
|
CI_REPOSITORY: ${{ github.repository }}
|
||||||
|
CI_REPOSITORY_ID: ${{ github.repository_id }}
|
||||||
CI_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
CI_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
||||||
run: |
|
run: node scripts/ci/test-history.mjs
|
||||||
run_id="$(gh api --method GET \
|
|
||||||
"repos/${CI_REPOSITORY}/actions/workflows/ci.yml/runs" \
|
|
||||||
-f branch="${CI_DEFAULT_BRANCH}" -f event=push -f status=success -f per_page=1 \
|
|
||||||
--jq '.workflow_runs[0].id // empty')"
|
|
||||||
echo "run-id=${run_id}" >> "${GITHUB_OUTPUT}"
|
|
||||||
- name: Download previous timing report
|
- name: Download previous timing report
|
||||||
if: steps.history.outputs.run-id != ''
|
if: steps.history.outputs.run-id != ''
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
with:
|
with:
|
||||||
name: test-results
|
name: test-timings
|
||||||
run-id: ${{ steps.history.outputs.run-id }}
|
run-id: ${{ steps.history.outputs.run-id }}
|
||||||
github-token: ${{ github.token }}
|
github-token: ${{ github.token }}
|
||||||
path: .cache/ci-test-history
|
path: .cache/ci-test-history
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: rea-test-runtime
|
name: rea-test-runtime
|
||||||
path: |
|
path: |
|
||||||
@@ -189,7 +254,7 @@ jobs:
|
|||||||
# test:prepare caches only portable JS, skill, and catalog outputs.
|
# test:prepare caches only portable JS, skill, and catalog outputs.
|
||||||
# Native package jobs still run their build and prepack checks; Turbo
|
# Native package jobs still run their build and prepack checks; Turbo
|
||||||
# restores matching outputs or rebuilds when their inputs differ.
|
# restores matching outputs or rebuilds when their inputs differ.
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: rea-build-cache
|
name: rea-build-cache
|
||||||
path: .turbo/cache/
|
path: .turbo/cache/
|
||||||
@@ -197,37 +262,47 @@ jobs:
|
|||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
|
sqlite-runtime:
|
||||||
|
# Preserve all selected coverage, but admit expensive host/provider work
|
||||||
|
# only after static validation. Portable tests still provide early feedback.
|
||||||
|
needs: [changes, static, build]
|
||||||
|
if: needs.changes.outputs.sqlite == 'true'
|
||||||
|
uses: ./.github/workflows/sqlite-runtime.yml
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test (coverage + timing)
|
name: Portable tests
|
||||||
needs: [changes, test-shard]
|
needs: [changes, test-shard]
|
||||||
if: ${{ always() }}
|
if: ${{ !cancelled() && needs.changes.outputs.tier != 'reused' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- name: Require successful test shards
|
- name: Require successful change classification
|
||||||
env:
|
env:
|
||||||
CHANGES_RESULT: ${{ needs.changes.result }}
|
CHANGES_RESULT: ${{ needs.changes.result }}
|
||||||
CODE_REQUIRED: ${{ needs.changes.outputs.code }}
|
run: test "${CHANGES_RESULT}" = "success"
|
||||||
SHARD_RESULT: ${{ needs.test-shard.result }}
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
run: |
|
|
||||||
test "${CHANGES_RESULT}" = "success"
|
|
||||||
test "${CODE_REQUIRED}" != "true" || test "${SHARD_RESULT}" = "success"
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
if: needs.changes.outputs.code == 'true' && success()
|
if: needs.changes.outputs.code == 'true' && success()
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
if: needs.changes.outputs.code == 'true' && success()
|
if: needs.changes.outputs.code == 'true' && success()
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
- if: needs.changes.outputs.code == 'true' && success()
|
- if: needs.changes.outputs.code == 'true' && success()
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
if: needs.changes.outputs.code == 'true' && success()
|
if: >-
|
||||||
|
!cancelled() && needs.changes.outputs.code == 'true' &&
|
||||||
|
(needs.test-shard.result == 'success' || needs.test-shard.result == 'failure')
|
||||||
with:
|
with:
|
||||||
path: .vitest/blob
|
path: .vitest/blob
|
||||||
pattern: vitest-report-*
|
pattern: vitest-report-*
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
- name: Merge coverage, JUnit, and timing reports
|
- name: Merge coverage, JUnit, and timing reports
|
||||||
if: needs.changes.outputs.code == 'true' && success()
|
id: merge
|
||||||
|
if: >-
|
||||||
|
!cancelled() && needs.changes.outputs.code == 'true' &&
|
||||||
|
needs.changes.outputs.tier == 'full' &&
|
||||||
|
(needs.test-shard.result == 'success' || needs.test-shard.result == 'failure')
|
||||||
run: >-
|
run: >-
|
||||||
npm run test:ci:merge --
|
npm run test:ci:merge --
|
||||||
--coverage.reportsDirectory=coverage
|
--coverage.reportsDirectory=coverage
|
||||||
@@ -237,59 +312,81 @@ jobs:
|
|||||||
--reporter=default
|
--reporter=default
|
||||||
--reporter=junit
|
--reporter=junit
|
||||||
--reporter=json
|
--reporter=json
|
||||||
|
--reporter=./scripts/ci/test-timing-reporter.mjs
|
||||||
|
--outputFile.junit=test-results.xml
|
||||||
|
--outputFile.json=test-results.json
|
||||||
|
- name: Merge fast-suite JUnit and timing reports
|
||||||
|
id: merge-fast
|
||||||
|
if: >-
|
||||||
|
!cancelled() && needs.changes.outputs.code == 'true' &&
|
||||||
|
needs.changes.outputs.tier == 'fast' &&
|
||||||
|
(needs.test-shard.result == 'success' || needs.test-shard.result == 'failure')
|
||||||
|
run: >-
|
||||||
|
npm exec -- vitest --merge-reports
|
||||||
|
--reporter=default
|
||||||
|
--reporter=junit
|
||||||
|
--reporter=json
|
||||||
|
--reporter=./scripts/ci/test-timing-reporter.mjs
|
||||||
--outputFile.junit=test-results.xml
|
--outputFile.junit=test-results.xml
|
||||||
--outputFile.json=test-results.json
|
--outputFile.json=test-results.json
|
||||||
- name: Summarize slowest test files
|
- name: Summarize slowest test files
|
||||||
if: needs.changes.outputs.code == 'true' && success()
|
if: needs.changes.outputs.code == 'true' && !cancelled() && hashFiles('test-timings.json') != ''
|
||||||
shell: bash
|
env:
|
||||||
run: |
|
SHARD_RESULT: ${{ needs.test-shard.result }}
|
||||||
node <<'NODE' >> "${GITHUB_STEP_SUMMARY}"
|
MERGE_RESULT: ${{ needs.changes.outputs.tier == 'full' && steps.merge.outcome || steps.merge-fast.outcome }}
|
||||||
const report = JSON.parse(require("node:fs").readFileSync("test-results.json", "utf8"));
|
CI_VERIFY_TEST_INVENTORY: "true"
|
||||||
const files = (report.testResults ?? [])
|
CI_TEST_SELECTION: ${{ needs.changes.outputs.test_selection }}
|
||||||
.map((result) => ({
|
CI_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||||
name: result.name,
|
run: node scripts/ci/test-report.mjs
|
||||||
duration: Math.max(0, (result.endTime ?? result.startTime) - result.startTime),
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
}))
|
if: needs.changes.outputs.code == 'true' && !cancelled() && hashFiles('test-results.json') != ''
|
||||||
.sort((left, right) => right.duration - left.duration)
|
|
||||||
.slice(0, 20);
|
|
||||||
console.log("## Slowest deterministic test files\n");
|
|
||||||
console.log("| File | Duration (ms) |");
|
|
||||||
console.log("| --- | ---: |");
|
|
||||||
for (const file of files) {
|
|
||||||
console.log(`| \`${file.name}\` | ${file.duration} |`);
|
|
||||||
}
|
|
||||||
NODE
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
if: needs.changes.outputs.code == 'true' && always()
|
|
||||||
with:
|
with:
|
||||||
name: test-results
|
name: test-results
|
||||||
path: |
|
path: |
|
||||||
test-results.xml
|
test-results.xml
|
||||||
test-results.json
|
test-results.json
|
||||||
|
test-timings.json
|
||||||
coverage/
|
coverage/
|
||||||
|
.cache/ci-test-selection/report.json
|
||||||
|
include-hidden-files: true
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 30
|
retention-days: 30
|
||||||
|
- name: Publish successful timing history
|
||||||
|
if: needs.changes.outputs.code == 'true' && needs.changes.outputs.tier == 'full' && success() && needs.test-shard.result == 'success'
|
||||||
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
|
with:
|
||||||
|
name: test-timings
|
||||||
|
path: .cache/ci-test-history/test-results.json
|
||||||
|
include-hidden-files: true
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 30
|
||||||
|
- name: Require successful test shards
|
||||||
|
if: ${{ !cancelled() }}
|
||||||
|
env:
|
||||||
|
CODE_REQUIRED: ${{ needs.changes.outputs.code }}
|
||||||
|
SHARD_RESULT: ${{ needs.test-shard.result }}
|
||||||
|
run: test "${CODE_REQUIRED}" != "true" || test "${SHARD_RESULT}" = "success"
|
||||||
|
|
||||||
conformance-fixtures:
|
conformance-fixtures:
|
||||||
name: Source-built conformance fixtures
|
name: Source-built conformance fixtures
|
||||||
needs: changes
|
needs: [changes, static]
|
||||||
if: needs.changes.outputs.fixtures == 'true'
|
if: needs.changes.outputs.fixtures == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- name: Verify fixtures from a clean checkout
|
- name: Verify fixtures from a clean checkout
|
||||||
run: npm run verify:fixtures
|
run: npm run verify:fixtures
|
||||||
|
|
||||||
windows-native-build:
|
windows-native-build:
|
||||||
name: Build bundled Windows x64 native controls
|
name: Build bundled Windows x64 native controls
|
||||||
needs: changes
|
needs: [changes, static]
|
||||||
if: needs.changes.outputs.runtime == 'true'
|
if: needs.changes.outputs.runtime == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
- name: Prepare cross compiler
|
- name: Prepare cross compiler
|
||||||
@@ -306,12 +403,27 @@ jobs:
|
|||||||
- run: npm run build:windows-native
|
- run: npm run build:windows-native
|
||||||
- run: npm run verify:windows-native:artifact
|
- run: npm run verify:windows-native:artifact
|
||||||
- run: node scripts/build-windows-native.mjs --inspection-fixture
|
- run: node scripts/build-windows-native.mjs --inspection-fixture
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: windows-native-inspection-fixture
|
name: windows-native-inspection-fixture
|
||||||
path: .cache/windows-native-inspection-fixture/
|
path: .cache/windows-native-inspection-fixture/
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- uses: actions/upload-artifact@v4
|
# The process boundary observations are independent of the addon: they
|
||||||
|
# report the caller's and child's own token, environment and breakaway
|
||||||
|
# results from a separate executable. Cross-build it in the lane that
|
||||||
|
# already has MinGW so the Windows job can observe them too.
|
||||||
|
- name: Build Windows process boundary fixture
|
||||||
|
run: |
|
||||||
|
mkdir -p .cache/windows-process-boundary
|
||||||
|
x86_64-w64-mingw32-g++ -municode -std=c++17 -O2 -static -Wall -Wextra \
|
||||||
|
-o .cache/windows-process-boundary/process-boundary.exe \
|
||||||
|
tests/fixtures/windows/processBoundary.cc -ladvapi32
|
||||||
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
|
with:
|
||||||
|
name: windows-process-boundary-fixture
|
||||||
|
path: .cache/windows-process-boundary/
|
||||||
|
if-no-files-found: error
|
||||||
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: windows-native-controls
|
name: windows-native-controls
|
||||||
path: native/windows/build/
|
path: native/windows/build/
|
||||||
@@ -319,7 +431,7 @@ jobs:
|
|||||||
|
|
||||||
package-e2e:
|
package-e2e:
|
||||||
name: Native package baseline (${{ matrix.platform }} ${{ matrix.architecture }})
|
name: Native package baseline (${{ matrix.platform }} ${{ matrix.architecture }})
|
||||||
needs: [changes, build, windows-native-build]
|
needs: [changes, static, build, windows-native-build]
|
||||||
if: needs.changes.outputs.runtime == 'true'
|
if: needs.changes.outputs.runtime == 'true'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -334,8 +446,8 @@ jobs:
|
|||||||
NODE_OPTIONS: "--max-old-space-size=1024"
|
NODE_OPTIONS: "--max-old-space-size=1024"
|
||||||
UV_THREADPOOL_SIZE: "2"
|
UV_THREADPOOL_SIZE: "2"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -349,15 +461,17 @@ jobs:
|
|||||||
assert.equal(process.arch, process.env.EXPECTED_CI_ARCHITECTURE);
|
assert.equal(process.arch, process.env.EXPECTED_CI_ARCHITECTURE);
|
||||||
console.log(JSON.stringify({ platform: process.platform, architecture: process.arch, node: process.version }));"
|
console.log(JSON.stringify({ platform: process.platform, architecture: process.arch, node: process.version }));"
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
with:
|
with:
|
||||||
name: rea-build-cache
|
name: rea-build-cache
|
||||||
path: .turbo/cache/
|
path: .turbo/cache/
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
with:
|
with:
|
||||||
name: windows-native-controls
|
name: windows-native-controls
|
||||||
path: native/windows/build/
|
path: native/windows/build/
|
||||||
- run: npm run verify:windows-native:artifact
|
- run: npm run verify:windows-native:artifact
|
||||||
|
- name: Verify NativeAOT diagnostic applicability on this host
|
||||||
|
run: npm run test:focused -- tests/evaluation/package/nativeAotDiagnostics.test.ts
|
||||||
- name: Resolve npm cache before verifier HOME isolation
|
- name: Resolve npm cache before verifier HOME isolation
|
||||||
id: npm-cache
|
id: npm-cache
|
||||||
run: |
|
run: |
|
||||||
@@ -366,24 +480,35 @@ jobs:
|
|||||||
- run: npm run verify:package
|
- run: npm run verify:package
|
||||||
env:
|
env:
|
||||||
npm_config_cache: ${{ steps.npm-cache.outputs.path }}
|
npm_config_cache: ${{ steps.npm-cache.outputs.path }}
|
||||||
|
REA_VERIFIED_PACKAGE_DIRECTORY: ${{ needs.changes.outputs.tier == 'full' && matrix.platform == 'linux' && matrix.architecture == 'x64' && '.cache/verified-package' || '' }}
|
||||||
- name: Verify real Node Inspector discovery and observation
|
- name: Verify real Node Inspector discovery and observation
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
run: npm run verify:inspector
|
run: npm run verify:inspector
|
||||||
|
- name: Retain the exact qualified release package
|
||||||
|
if: needs.changes.outputs.tier == 'full' && matrix.platform == 'linux' && matrix.architecture == 'x64'
|
||||||
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
|
with:
|
||||||
|
name: verified-release-package
|
||||||
|
path: .cache/verified-package/
|
||||||
|
include-hidden-files: true
|
||||||
|
if-no-files-found: error
|
||||||
|
overwrite: true
|
||||||
|
retention-days: 7
|
||||||
|
|
||||||
apple-artifacts:
|
apple-artifacts:
|
||||||
name: Real Apple artifact CLI/MCP E2E
|
name: Real Apple artifact CLI/MCP E2E
|
||||||
needs: [changes, build]
|
needs: [changes, static, build]
|
||||||
if: needs.changes.outputs.apple == 'true'
|
if: needs.changes.outputs.apple == 'true'
|
||||||
runs-on: macos-15
|
runs-on: macos-15
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
with:
|
with:
|
||||||
name: rea-build-cache
|
name: rea-build-cache
|
||||||
path: .turbo/cache/
|
path: .turbo/cache/
|
||||||
@@ -420,13 +545,13 @@ jobs:
|
|||||||
|
|
||||||
reconstruction-readiness:
|
reconstruction-readiness:
|
||||||
name: Reconstruction readiness
|
name: Reconstruction readiness
|
||||||
needs: changes
|
needs: [changes, static]
|
||||||
if: needs.changes.outputs.readiness == 'true'
|
if: needs.changes.outputs.readiness == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -437,7 +562,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
npm run verify:readiness | tee readiness-summary.json
|
npm run verify:readiness | tee readiness-summary.json
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
if: ${{ !cancelled() }}
|
if: ${{ !cancelled() }}
|
||||||
with:
|
with:
|
||||||
name: reconstruction-readiness
|
name: reconstruction-readiness
|
||||||
@@ -449,23 +574,23 @@ jobs:
|
|||||||
|
|
||||||
windows-curated:
|
windows-curated:
|
||||||
name: Windows capability and package lane
|
name: Windows capability and package lane
|
||||||
needs: [changes, build, windows-native-build]
|
needs: [changes, static, build, windows-native-build]
|
||||||
if: needs.changes.outputs.package == 'true'
|
if: needs.changes.outputs.package == 'true'
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
timeout-minutes: 25
|
timeout-minutes: 25
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
with:
|
with:
|
||||||
name: rea-build-cache
|
name: rea-build-cache
|
||||||
path: .turbo/cache/
|
path: .turbo/cache/
|
||||||
- run: npm run build:cached
|
- run: npm run build:cached
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
with:
|
with:
|
||||||
name: windows-native-controls
|
name: windows-native-controls
|
||||||
path: native/windows/build/
|
path: native/windows/build/
|
||||||
@@ -494,6 +619,9 @@ jobs:
|
|||||||
tests/boundary/providers/native/artifactProvider.extractionCompleteness.test.ts
|
tests/boundary/providers/native/artifactProvider.extractionCompleteness.test.ts
|
||||||
tests/boundary/filesystem/setupUnavailableProvider.test.ts
|
tests/boundary/filesystem/setupUnavailableProvider.test.ts
|
||||||
tests/boundary/filesystem/windowsNpxRegistration.test.ts
|
tests/boundary/filesystem/windowsNpxRegistration.test.ts
|
||||||
|
tests/boundary/android/workspaceGuardianRetry.test.ts
|
||||||
|
tests/acceptance/setup/homeDirectoryFallback.test.ts
|
||||||
|
tests/boundary/filesystem/javascriptApplicationWorkflows.test.ts
|
||||||
tests/boundary/filesystem/webScriptManifestPaths.test.ts
|
tests/boundary/filesystem/webScriptManifestPaths.test.ts
|
||||||
tests/boundary/process/ProcessEvidence.host.test.ts
|
tests/boundary/process/ProcessEvidence.host.test.ts
|
||||||
tests/acceptance/webModuleCli.test.ts
|
tests/acceptance/webModuleCli.test.ts
|
||||||
@@ -503,6 +631,7 @@ jobs:
|
|||||||
tests/boundary/filesystem/javascript-applications/javascriptArtifactReconstruction.test.ts
|
tests/boundary/filesystem/javascript-applications/javascriptArtifactReconstruction.test.ts
|
||||||
tests/conformance/providers/ghidra/windowsCapabilities.test.ts
|
tests/conformance/providers/ghidra/windowsCapabilities.test.ts
|
||||||
src/ghidra/GhidraInstallation.test.ts
|
src/ghidra/GhidraInstallation.test.ts
|
||||||
|
tests/boundary/filesystem/ghidraJavaProbe.test.ts
|
||||||
tests/boundary/providers/ghidra/ghidraTransport.test.ts
|
tests/boundary/providers/ghidra/ghidraTransport.test.ts
|
||||||
tests/boundary/providers/ghidra/ghidraTargetSnapshot.test.ts
|
tests/boundary/providers/ghidra/ghidraTargetSnapshot.test.ts
|
||||||
tests/boundary/providers/ghidra/ghidraLauncher.test.ts
|
tests/boundary/providers/ghidra/ghidraLauncher.test.ts
|
||||||
@@ -517,8 +646,17 @@ jobs:
|
|||||||
src/application/Update.test.ts
|
src/application/Update.test.ts
|
||||||
tests/process-global/updateMaintenance.test.ts
|
tests/process-global/updateMaintenance.test.ts
|
||||||
tests/conformance/providers/ghidra/realGhidraWindowsWorkflow.test.ts
|
tests/conformance/providers/ghidra/realGhidraWindowsWorkflow.test.ts
|
||||||
- run: npm run verify:windows-native
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
- uses: actions/download-artifact@v4
|
with:
|
||||||
|
name: windows-process-boundary-fixture
|
||||||
|
path: .cache/windows-process-boundary/
|
||||||
|
# Passing the fixture adds the breakaway, caller/child token, environment
|
||||||
|
# semantics and ancestor reparse observations, which the lane skips
|
||||||
|
# entirely when it is absent.
|
||||||
|
- run: >-
|
||||||
|
npm run verify:windows-native -- .
|
||||||
|
"${{ github.workspace }}\.cache\windows-process-boundary\process-boundary.exe"
|
||||||
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
with:
|
with:
|
||||||
name: windows-native-inspection-fixture
|
name: windows-native-inspection-fixture
|
||||||
path: .cache/windows-native-inspection-fixture/
|
path: .cache/windows-native-inspection-fixture/
|
||||||
@@ -537,7 +675,7 @@ jobs:
|
|||||||
tests/boundary/filesystem/directoryArtifactReaderOpen.test.ts
|
tests/boundary/filesystem/directoryArtifactReaderOpen.test.ts
|
||||||
tests/boundary/filesystem/javascriptPackagePrecedence.test.ts
|
tests/boundary/filesystem/javascriptPackagePrecedence.test.ts
|
||||||
tests/boundary/filesystem/javascriptArtifactContentIdentity.test.ts
|
tests/boundary/filesystem/javascriptArtifactContentIdentity.test.ts
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version: 22.19.0
|
node-version: 22.19.0
|
||||||
- name: Verify native path boundaries on Node 22
|
- name: Verify native path boundaries on Node 22
|
||||||
@@ -547,7 +685,7 @@ jobs:
|
|||||||
tests/boundary/filesystem/javascriptPackagePrecedence.test.ts
|
tests/boundary/filesystem/javascriptPackagePrecedence.test.ts
|
||||||
tests/boundary/filesystem/javascriptArtifactContentIdentity.test.ts
|
tests/boundary/filesystem/javascriptArtifactContentIdentity.test.ts
|
||||||
tests/boundary/process/sourceMapUncHosts.test.ts
|
tests/boundary/process/sourceMapUncHosts.test.ts
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: windows-capabilities
|
name: windows-capabilities
|
||||||
@@ -559,17 +697,20 @@ jobs:
|
|||||||
needs: changes
|
needs: changes
|
||||||
if: needs.changes.outputs.docs == 'true'
|
if: needs.changes.outputs.docs == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run docs:check
|
- run: npm run docs:check
|
||||||
|
- name: Verify published routes, source links and local anchors
|
||||||
|
run: npm run verify:docs:routes
|
||||||
- name: Generation leaves authored files unchanged
|
- name: Generation leaves authored files unchanged
|
||||||
run: git diff --exit-code
|
run: git diff --exit-code
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: generated-docs
|
name: generated-docs
|
||||||
path: |
|
path: |
|
||||||
@@ -578,76 +719,83 @@ jobs:
|
|||||||
skills/reverse-engineer-anything
|
skills/reverse-engineer-anything
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
workflows:
|
|
||||||
name: Validate workflows
|
|
||||||
needs: changes
|
|
||||||
if: needs.changes.outputs.workflows == 'true'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Validate workflow syntax and expressions
|
|
||||||
run: go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 -shellcheck= -pyflakes=
|
|
||||||
|
|
||||||
browser:
|
browser:
|
||||||
needs: changes
|
needs: [changes, static, build]
|
||||||
if: needs.changes.outputs.browser == 'true'
|
if: needs.changes.outputs.browser == 'true'
|
||||||
uses: ./.github/workflows/real-browser.yml
|
uses: ./.github/workflows/real-browser.yml
|
||||||
|
with:
|
||||||
|
build_cache_artifact: rea-build-cache
|
||||||
|
|
||||||
binary_layout:
|
binary_layout:
|
||||||
needs: changes
|
needs: [changes, static, build]
|
||||||
if: needs.changes.outputs.binary_layout == 'true'
|
if: needs.changes.outputs.binary_layout == 'true'
|
||||||
uses: ./.github/workflows/real-binary-layout.yml
|
uses: ./.github/workflows/real-binary-layout.yml
|
||||||
|
with:
|
||||||
|
build_cache_artifact: rea-build-cache
|
||||||
|
|
||||||
evm:
|
evm:
|
||||||
needs: changes
|
needs: [changes, static, build]
|
||||||
if: needs.changes.outputs.evm == 'true'
|
if: needs.changes.outputs.evm == 'true'
|
||||||
uses: ./.github/workflows/real-evm-interface.yml
|
uses: ./.github/workflows/real-evm-interface.yml
|
||||||
|
with:
|
||||||
|
build_cache_artifact: rea-build-cache
|
||||||
|
|
||||||
javascript_recovery:
|
javascript_recovery:
|
||||||
needs: changes
|
needs: [changes, static, build]
|
||||||
if: needs.changes.outputs.javascript_recovery == 'true'
|
if: needs.changes.outputs.javascript_recovery == 'true'
|
||||||
uses: ./.github/workflows/real-javascript-recovery.yml
|
uses: ./.github/workflows/real-javascript-recovery.yml
|
||||||
|
with:
|
||||||
|
build_cache_artifact: rea-build-cache
|
||||||
|
|
||||||
recorded_crash:
|
recorded_crash:
|
||||||
needs: changes
|
needs: [changes, static, build]
|
||||||
if: needs.changes.outputs.recorded_crash == 'true'
|
if: needs.changes.outputs.recorded_crash == 'true'
|
||||||
uses: ./.github/workflows/real-recorded-crash.yml
|
uses: ./.github/workflows/real-recorded-crash.yml
|
||||||
|
with:
|
||||||
|
build_cache_artifact: rea-build-cache
|
||||||
|
|
||||||
web_network:
|
web_network:
|
||||||
needs: changes
|
needs: [changes, static, build]
|
||||||
if: needs.changes.outputs.web_network == 'true'
|
if: needs.changes.outputs.web_network == 'true'
|
||||||
uses: ./.github/workflows/real-web-network-captures.yml
|
uses: ./.github/workflows/real-web-network-captures.yml
|
||||||
|
with:
|
||||||
|
build_cache_artifact: rea-build-cache
|
||||||
|
|
||||||
web_runtime:
|
web_runtime:
|
||||||
needs: changes
|
needs: [changes, static, build]
|
||||||
if: needs.changes.outputs.web_runtime == 'true'
|
if: needs.changes.outputs.web_runtime == 'true'
|
||||||
uses: ./.github/workflows/real-web-runtime.yml
|
uses: ./.github/workflows/real-web-runtime.yml
|
||||||
|
with:
|
||||||
|
build_cache_artifact: rea-build-cache
|
||||||
|
|
||||||
web_source_map:
|
web_source_map:
|
||||||
needs: changes
|
needs: [changes, static, build]
|
||||||
if: needs.changes.outputs.web_source_map == 'true'
|
if: needs.changes.outputs.web_source_map == 'true'
|
||||||
uses: ./.github/workflows/real-web-source-map.yml
|
uses: ./.github/workflows/real-web-source-map.yml
|
||||||
|
with:
|
||||||
|
build_cache_artifact: rea-build-cache
|
||||||
|
|
||||||
nativeaot:
|
nativeaot:
|
||||||
needs: changes
|
needs: [changes, static]
|
||||||
if: needs.changes.outputs.nativeaot == 'true'
|
if: needs.changes.outputs.nativeaot == 'true'
|
||||||
uses: ./.github/workflows/nativeaot-fixtures.yml
|
uses: ./.github/workflows/nativeaot-fixtures.yml
|
||||||
|
|
||||||
website:
|
website:
|
||||||
needs: changes
|
needs: [changes, static]
|
||||||
if: needs.changes.outputs.website == 'true'
|
if: needs.changes.outputs.website == 'true'
|
||||||
uses: ./.github/workflows/website-check.yml
|
uses: ./.github/workflows/website-check.yml
|
||||||
|
|
||||||
required:
|
required:
|
||||||
name: CI required
|
name: CI required
|
||||||
if: ${{ always() }}
|
# Report failed dependencies, but release superseded PR concurrency slots.
|
||||||
|
if: ${{ !cancelled() }}
|
||||||
needs:
|
needs:
|
||||||
[
|
[
|
||||||
changes,
|
changes,
|
||||||
pr-title,
|
|
||||||
static,
|
static,
|
||||||
build,
|
build,
|
||||||
test-shard,
|
test-shard,
|
||||||
|
sqlite-runtime,
|
||||||
test,
|
test,
|
||||||
conformance-fixtures,
|
conformance-fixtures,
|
||||||
windows-native-build,
|
windows-native-build,
|
||||||
@@ -656,7 +804,6 @@ jobs:
|
|||||||
reconstruction-readiness,
|
reconstruction-readiness,
|
||||||
windows-curated,
|
windows-curated,
|
||||||
docs,
|
docs,
|
||||||
workflows,
|
|
||||||
browser,
|
browser,
|
||||||
binary_layout,
|
binary_layout,
|
||||||
evm,
|
evm,
|
||||||
@@ -668,13 +815,25 @@ jobs:
|
|||||||
nativeaot,
|
nativeaot,
|
||||||
website,
|
website,
|
||||||
]
|
]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-24.04
|
||||||
|
timeout-minutes: 5
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
- name: Require every selected lane to pass
|
- name: Require every selected lane to pass
|
||||||
|
id: gate
|
||||||
env:
|
env:
|
||||||
CI_JOBS: ${{ toJSON(needs) }}
|
CI_JOBS: ${{ toJSON(needs) }}
|
||||||
|
CI_QUALIFICATION_DIRECTORY: .cache/ci-qualification
|
||||||
run: node scripts/ci/required.mjs
|
run: node scripts/ci/required.mjs
|
||||||
|
- name: Upload full qualification receipt artifact
|
||||||
|
if: needs.changes.outputs.tier == 'full' && success()
|
||||||
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
|
with:
|
||||||
|
name: ${{ steps.gate.outputs.receipt_name }}
|
||||||
|
path: ${{ steps.gate.outputs.receipt_path }}
|
||||||
|
if-no-files-found: error
|
||||||
|
overwrite: true
|
||||||
|
retention-days: 7
|
||||||
|
|||||||
@@ -12,22 +12,23 @@ jobs:
|
|||||||
name: Build Windows x64 NativeAOT fixture
|
name: Build Windows x64 NativeAOT fixture
|
||||||
# .NET 8.0.22's bundled linker discovery supports VS 2019/2022.
|
# .NET 8.0.22's bundled linker discovery supports VS 2019/2022.
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
timeout-minutes: 15
|
# Two bounded restore attempts and one compile can each take five minutes.
|
||||||
|
timeout-minutes: 20
|
||||||
env:
|
env:
|
||||||
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
|
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
|
||||||
DOTNET_PROCESSOR_COUNT: "1"
|
DOTNET_PROCESSOR_COUNT: "1"
|
||||||
COMPlus_GCHeapHardLimit: "30000000"
|
COMPlus_GCHeapHardLimit: "30000000"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
- uses: actions/setup-dotnet@v4
|
- uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
|
||||||
with:
|
with:
|
||||||
dotnet-version: "8.0.416"
|
dotnet-version: "8.0.416"
|
||||||
- name: Build benign fixture and independent byte oracle
|
- name: Build benign fixture and independent byte oracle
|
||||||
run: node scripts/generate-nativeaot-fixtures.mjs
|
run: node scripts/generate-nativeaot-fixtures.mjs
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: nativeaot-win-x64-${{ github.event.pull_request.head.sha || github.sha }}
|
name: nativeaot-win-x64-${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
path: |
|
path: |
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run docs:build
|
- run: npm run verify:docs:routes
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
name: PR title
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [main, "release/*"]
|
||||||
|
types: [opened, synchronize, reopened, edited]
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: pr-title-${{ github.event.pull_request.number }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pr-title:
|
||||||
|
name: Conventional PR title
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
timeout-minutes: 2
|
||||||
|
steps:
|
||||||
|
- name: Validate title for Release Please
|
||||||
|
env:
|
||||||
|
PR_TITLE: ${{ github.event.pull_request.title }}
|
||||||
|
run: >-
|
||||||
|
node -e 'const title = process.env.PR_TITLE ?? "";
|
||||||
|
const conventional = /^(?:feat|fix|docs|refactor|perf|test|build|ci|chore|revert)(?:\([a-z0-9._/-]+\))?!?: .+/u;
|
||||||
|
if (!conventional.test(title)) {
|
||||||
|
console.error("PR title must use Conventional Commits, for example: feat: add historical source import");
|
||||||
|
process.exit(1);
|
||||||
|
}'
|
||||||
@@ -8,14 +8,16 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build_cache_artifact:
|
||||||
|
description: Portable build cache artifact from the calling CI run.
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: real-binary-layout-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: --max-old-space-size=768
|
NODE_OPTIONS: --max-old-space-size=768
|
||||||
HUSKY: "0"
|
HUSKY: "0"
|
||||||
@@ -26,13 +28,15 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- uses: ./.github/actions/portable-build-cache
|
- uses: ./.github/actions/portable-build-cache
|
||||||
|
with:
|
||||||
|
build_cache_artifact: ${{ inputs.build_cache_artifact }}
|
||||||
- name: Acquire exact upstream libraries in an isolated runner environment
|
- name: Acquire exact upstream libraries in an isolated runner environment
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -2,12 +2,14 @@ name: Real browser verification
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build_cache_artifact:
|
||||||
|
description: Portable build cache artifact from the calling CI run.
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: real-browser-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
HUSKY: "0"
|
HUSKY: "0"
|
||||||
|
|
||||||
@@ -19,13 +21,15 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- uses: ./.github/actions/portable-build-cache
|
- uses: ./.github/actions/portable-build-cache
|
||||||
|
with:
|
||||||
|
build_cache_artifact: ${{ inputs.build_cache_artifact }}
|
||||||
- run: npm run verify:browser
|
- run: npm run verify:browser
|
||||||
env:
|
env:
|
||||||
REA_BROWSER_EXECUTABLE: /usr/bin/google-chrome
|
REA_BROWSER_EXECUTABLE: /usr/bin/google-chrome
|
||||||
|
|||||||
@@ -3,14 +3,16 @@ name: Real offline EVM interface
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build_cache_artifact:
|
||||||
|
description: Portable build cache artifact from the calling CI run.
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: real-evm-interface-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: --max-old-space-size=768
|
NODE_OPTIONS: --max-old-space-size=768
|
||||||
HUSKY: "0"
|
HUSKY: "0"
|
||||||
@@ -20,13 +22,15 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- uses: ./.github/actions/portable-build-cache
|
- uses: ./.github/actions/portable-build-cache
|
||||||
|
with:
|
||||||
|
build_cache_artifact: ${{ inputs.build_cache_artifact }}
|
||||||
- name: Acquire unchanged fixture compiler in isolated runner storage
|
- name: Acquire unchanged fixture compiler in isolated runner storage
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -39,3 +43,5 @@ jobs:
|
|||||||
echo "REA_VERIFY_SOLC_MODULE=${evm_fixture_root}/node_modules/solc/index.js" >> "${GITHUB_ENV}"
|
echo "REA_VERIFY_SOLC_MODULE=${evm_fixture_root}/node_modules/solc/index.js" >> "${GITHUB_ENV}"
|
||||||
- name: Verify source-owned compiled bytecode through public CLI and MCP
|
- name: Verify source-owned compiled bytecode through public CLI and MCP
|
||||||
run: npm run verify:evm:interface
|
run: npm run verify:evm:interface
|
||||||
|
- name: Verify content-hash-free and CBOR-free owned compiler artifacts
|
||||||
|
run: npm run verify:solidity:metadata
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ jobs:
|
|||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
- name: Prepare cross compiler
|
- name: Prepare cross compiler
|
||||||
@@ -31,11 +31,25 @@ jobs:
|
|||||||
sudo apt-get install --no-install-recommends -y g++-mingw-w64-x86-64
|
sudo apt-get install --no-install-recommends -y g++-mingw-w64-x86-64
|
||||||
- run: npm run build:windows-native
|
- run: npm run build:windows-native
|
||||||
- run: npm run verify:windows-native:artifact
|
- run: npm run verify:windows-native:artifact
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: real-ghidra-windows-native
|
name: real-ghidra-windows-native
|
||||||
path: native/windows/build/
|
path: native/windows/build/
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
# The boundary observations need a separate Windows executable, which the
|
||||||
|
# native lane skips when it is absent. Cross-build it here, where MinGW is
|
||||||
|
# already installed, so the proof run observes them too.
|
||||||
|
- name: Build Windows process boundary fixture
|
||||||
|
run: |
|
||||||
|
mkdir -p .cache/windows-process-boundary
|
||||||
|
x86_64-w64-mingw32-g++ -municode -std=c++17 -O2 -static -Wall -Wextra \
|
||||||
|
-o .cache/windows-process-boundary/process-boundary.exe \
|
||||||
|
tests/fixtures/windows/processBoundary.cc -ladvapi32
|
||||||
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
|
with:
|
||||||
|
name: real-ghidra-windows-process-boundary
|
||||||
|
path: .cache/windows-process-boundary/
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
verify:
|
verify:
|
||||||
name: Real Ghidra 12.1.4 Windows x64 PE proof
|
name: Real Ghidra 12.1.4 Windows x64 PE proof
|
||||||
@@ -45,17 +59,23 @@ jobs:
|
|||||||
runs-on: [self-hosted, Windows, x64, ghidra-12-1-2]
|
runs-on: [self-hosted, Windows, x64, ghidra-12-1-2]
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
with:
|
with:
|
||||||
name: real-ghidra-windows-native
|
name: real-ghidra-windows-native
|
||||||
path: native/windows/build/
|
path: native/windows/build/
|
||||||
- run: npm run verify:windows-native:artifact
|
- run: npm run verify:windows-native:artifact
|
||||||
- run: npm run verify:windows-native
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
|
with:
|
||||||
|
name: real-ghidra-windows-process-boundary
|
||||||
|
path: .cache/windows-process-boundary/
|
||||||
|
- run: >-
|
||||||
|
npm run verify:windows-native -- .
|
||||||
|
"${{ github.workspace }}\.cache\windows-process-boundary\process-boundary.exe"
|
||||||
- name: Verify all admitted Windows Ghidra operations
|
- name: Verify all admitted Windows Ghidra operations
|
||||||
env:
|
env:
|
||||||
REA_ANALYSIS_PROVIDER: ghidra
|
REA_ANALYSIS_PROVIDER: ghidra
|
||||||
@@ -88,7 +108,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
REA_ANALYSIS_PROVIDER: ghidra
|
REA_ANALYSIS_PROVIDER: ghidra
|
||||||
run: npm run verify:ghidra:windows:package -- --x86 --dll | Tee-Object -FilePath windows-ghidra-x86-dll-package-proof.log
|
run: npm run verify:ghidra:windows:package -- --x86 --dll | Tee-Object -FilePath windows-ghidra-x86-dll-package-proof.log
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: windows-ghidra-proof
|
name: windows-ghidra-proof
|
||||||
|
|||||||
@@ -44,12 +44,12 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
|
||||||
with:
|
with:
|
||||||
go-version: "1.26.1"
|
go-version: "1.26.1"
|
||||||
cache: false
|
cache: false
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
timeout-minutes: 25
|
timeout-minutes: 25
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -36,8 +36,8 @@ jobs:
|
|||||||
runs-on: [self-hosted, Linux, hopper]
|
runs-on: [self-hosted, Linux, hopper]
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ jobs:
|
|||||||
runs-on: [self-hosted, macOS, hopper]
|
runs-on: [self-hosted, macOS, hopper]
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|||||||
@@ -2,15 +2,17 @@ name: Real JavaScript recovery
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build_cache_artifact:
|
||||||
|
description: Portable build cache artifact from the calling CI run.
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: javascript-recovery-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
HUSKY: "0"
|
HUSKY: "0"
|
||||||
NODE_OPTIONS: "--max-old-space-size=768"
|
NODE_OPTIONS: "--max-old-space-size=768"
|
||||||
@@ -21,13 +23,15 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- uses: ./.github/actions/portable-build-cache
|
- uses: ./.github/actions/portable-build-cache
|
||||||
|
with:
|
||||||
|
build_cache_artifact: ${{ inputs.build_cache_artifact }}
|
||||||
- name: Fetch pinned Wakaru release into the job workspace
|
- name: Fetch pinned Wakaru release into the job workspace
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
name: Real packet capture
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "tests/boundary/captures/**"
|
||||||
|
- "tests/boundary/cli/captureCleanup.test.ts"
|
||||||
|
- "tests/boundary/mcp/packetCaptureMcp.test.ts"
|
||||||
|
- "src/captures/**"
|
||||||
|
- "src/pcap/**"
|
||||||
|
- "src/domain/pcap/**"
|
||||||
|
- "src/domain/analysisView/pcapCaptureView.ts"
|
||||||
|
- "src/application/pcap/**"
|
||||||
|
- "src/contracts/pcap/**"
|
||||||
|
- "src/server/registerPcapTools.ts"
|
||||||
|
- "tests/boundary/pcap/**"
|
||||||
|
- "src/domain/captures/**"
|
||||||
|
- "src/application/captures/**"
|
||||||
|
- "src/contracts/captures/**"
|
||||||
|
- "src/composition/captures.ts"
|
||||||
|
- "src/cli/captureCommands.ts"
|
||||||
|
- "src/server/registerCaptureTools.ts"
|
||||||
|
- "src/server/createServer.ts"
|
||||||
|
- "src/server/sessionAvailabilityPolicy.ts"
|
||||||
|
- "src/application/CapabilityInventory.ts"
|
||||||
|
- "src/contracts/toolContracts.ts"
|
||||||
|
- "src/contracts/toolEffects.ts"
|
||||||
|
- "src/cli.ts"
|
||||||
|
- "src/cliCommandNames.ts"
|
||||||
|
- "src/process/**"
|
||||||
|
- "src/artifacts/readStableArtifact.ts"
|
||||||
|
- "scripts/verify-packet-capture.mjs"
|
||||||
|
- ".github/workflows/real-packet-capture.yml"
|
||||||
|
- "package*.json"
|
||||||
|
- ".nvmrc"
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
concurrency:
|
||||||
|
group: real-packet-capture-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
jobs:
|
||||||
|
tshark:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
timeout-minutes: 15
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
|
with:
|
||||||
|
node-version-file: .nvmrc
|
||||||
|
cache: npm
|
||||||
|
- run: sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y tshark util-linux python3
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm run build:cached
|
||||||
|
- run: npm run test:focused -- tests/boundary/captures/fieldDiscovery.test.ts src/process/LinuxResourceLimits.test.ts tests/boundary/captures/captureProvider.test.ts tests/boundary/captures/captureDescriptorCleanup.test.ts tests/boundary/captures/resourceLimits.test.ts tests/boundary/captures/packetOutput.test.ts tests/boundary/mcp/packetCaptureMcp.test.ts tests/boundary/cli/captureCleanup.test.ts
|
||||||
|
- run: node scripts/verify-packet-capture.mjs
|
||||||
|
env:
|
||||||
|
REA_TSHARK_COMMAND: /usr/bin/tshark
|
||||||
|
REA_CAPINFOS_COMMAND: /usr/bin/capinfos
|
||||||
@@ -3,14 +3,16 @@ name: Real recorded crash evidence
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build_cache_artifact:
|
||||||
|
description: Portable build cache artifact from the calling CI run.
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: real-recorded-crash-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
NODE_OPTIONS: --max-old-space-size=768
|
NODE_OPTIONS: --max-old-space-size=768
|
||||||
HUSKY: "0"
|
HUSKY: "0"
|
||||||
@@ -23,13 +25,15 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- uses: ./.github/actions/portable-build-cache
|
- uses: ./.github/actions/portable-build-cache
|
||||||
|
with:
|
||||||
|
build_cache_artifact: ${{ inputs.build_cache_artifact }}
|
||||||
- name: Install GDB on the disposable CI runner
|
- name: Install GDB on the disposable CI runner
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
name: Real signal recording
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "tests/boundary/signals/**"
|
||||||
|
- "tests/boundary/cli/signalCleanup.test.ts"
|
||||||
|
- "tests/boundary/mcp/signalRecordingMcp.test.ts"
|
||||||
|
- "src/signals/**"
|
||||||
|
- "src/domain/signals/**"
|
||||||
|
- "src/application/signals/**"
|
||||||
|
- "src/contracts/signals/**"
|
||||||
|
- "src/composition/signals.ts"
|
||||||
|
- "src/cli/signalCommands.ts"
|
||||||
|
- "src/server/registerSignalTools.ts"
|
||||||
|
- "src/server/createServer.ts"
|
||||||
|
- "src/server/sessionAvailabilityPolicy.ts"
|
||||||
|
- "src/application/CapabilityInventory.ts"
|
||||||
|
- "src/contracts/toolContracts.ts"
|
||||||
|
- "src/contracts/toolEffects.ts"
|
||||||
|
- "src/cli.ts"
|
||||||
|
- "src/cliCommandNames.ts"
|
||||||
|
- "src/process/**"
|
||||||
|
- "src/artifacts/readStableArtifact.ts"
|
||||||
|
- "scripts/verify-signal-recording.mjs"
|
||||||
|
- ".github/workflows/real-signal-recording.yml"
|
||||||
|
- "package*.json"
|
||||||
|
- ".nvmrc"
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
concurrency:
|
||||||
|
group: real-signal-recording-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
jobs:
|
||||||
|
sigrok:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
timeout-minutes: 15
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
|
with:
|
||||||
|
node-version-file: .nvmrc
|
||||||
|
cache: npm
|
||||||
|
- run: sudo apt-get update && sudo apt-get install -y sigrok-cli util-linux python3
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm run build:cached
|
||||||
|
- run: npm run test:focused -- tests/boundary/signals/decoderDiscovery.test.ts src/process/LinuxResourceLimits.test.ts src/domain/signals/annotationTextWindow.test.ts tests/boundary/signals/recordingProvider.test.ts tests/boundary/signals/recordingDescriptorCleanup.test.ts tests/boundary/signals/resourceLimits.test.ts tests/boundary/mcp/signalRecordingMcp.test.ts tests/boundary/cli/signalCleanup.test.ts
|
||||||
|
- run: node scripts/verify-signal-recording.mjs
|
||||||
|
env:
|
||||||
|
REA_SIGROK_COMMAND: /usr/bin/sigrok-cli
|
||||||
@@ -18,7 +18,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- name: Download the pinned Termux app and verify its release checksum
|
- name: Download the pinned Termux app and verify its release checksum
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
sudo udevadm control --reload-rules
|
sudo udevadm control --reload-rules
|
||||||
sudo udevadm trigger --name-match=kvm
|
sudo udevadm trigger --name-match=kvm
|
||||||
- name: Build and capture a page inside Termux
|
- name: Build and capture a page inside Termux
|
||||||
uses: reactivecircus/android-emulator-runner@4c44018e59b437e86cdfc41da381398f93ed8808 # v2
|
uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d # v2.38.0
|
||||||
with:
|
with:
|
||||||
api-level: 30
|
api-level: 30
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
@@ -50,7 +50,7 @@ jobs:
|
|||||||
script: bash scripts/verify/termux/emulator.sh
|
script: bash scripts/verify/termux/emulator.sh
|
||||||
- name: Upload Termux and Android diagnostics
|
- name: Upload Termux and Android diagnostics
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
with:
|
with:
|
||||||
name: termux-browser-diagnostics
|
name: termux-browser-diagnostics
|
||||||
path: ${{ runner.temp }}/rea-termux/diagnostics
|
path: ${{ runner.temp }}/rea-termux/diagnostics
|
||||||
|
|||||||
@@ -3,14 +3,16 @@ name: Real historical web network captures
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build_cache_artifact:
|
||||||
|
description: Portable build cache artifact from the calling CI run.
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: real-web-network-captures-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
HUSKY: "0"
|
HUSKY: "0"
|
||||||
NODE_OPTIONS: --max-old-space-size=768
|
NODE_OPTIONS: --max-old-space-size=768
|
||||||
@@ -20,8 +22,8 @@ jobs:
|
|||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
@@ -29,6 +31,8 @@ jobs:
|
|||||||
run: npm install --global npm@11.16.0
|
run: npm install --global npm@11.16.0
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- uses: ./.github/actions/portable-build-cache
|
- uses: ./.github/actions/portable-build-cache
|
||||||
|
with:
|
||||||
|
build_cache_artifact: ${{ inputs.build_cache_artifact }}
|
||||||
- name: Acquire fixed upstream native profile in runner temporary storage
|
- name: Acquire fixed upstream native profile in runner temporary storage
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
name: Real website runtime attribution
|
name: Real website runtime attribution
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build_cache_artifact:
|
||||||
|
description: Portable build cache artifact from the calling CI run.
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
concurrency:
|
|
||||||
group: real-web-runtime-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
env:
|
env:
|
||||||
HUSKY: "0"
|
HUSKY: "0"
|
||||||
jobs:
|
jobs:
|
||||||
@@ -14,13 +17,15 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- uses: ./.github/actions/portable-build-cache
|
- uses: ./.github/actions/portable-build-cache
|
||||||
|
with:
|
||||||
|
build_cache_artifact: ${{ inputs.build_cache_artifact }}
|
||||||
- run: npm run verify:browser:runtime
|
- run: npm run verify:browser:runtime
|
||||||
env:
|
env:
|
||||||
REA_BROWSER_EXECUTABLE: /usr/bin/google-chrome
|
REA_BROWSER_EXECUTABLE: /usr/bin/google-chrome
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
name: Real website source-map verification
|
name: Real website source-map verification
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build_cache_artifact:
|
||||||
|
description: Portable build cache artifact from the calling CI run.
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
concurrency:
|
|
||||||
group: real-web-source-map-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
||||||
env:
|
env:
|
||||||
HUSKY: "0"
|
HUSKY: "0"
|
||||||
jobs:
|
jobs:
|
||||||
@@ -14,13 +17,15 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
cache: npm
|
cache: npm
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- uses: ./.github/actions/portable-build-cache
|
- uses: ./.github/actions/portable-build-cache
|
||||||
|
with:
|
||||||
|
build_cache_artifact: ${{ inputs.build_cache_artifact }}
|
||||||
- name: Install the pinned compiler into an isolated fixture directory
|
- name: Install the pinned compiler into an isolated fixture directory
|
||||||
run: npm install --prefix "$RUNNER_TEMP/rea-web-source-map-compiler" --no-audit --no-fund --package-lock=false esbuild@0.25.10
|
run: npm install --prefix "$RUNNER_TEMP/rea-web-source-map-compiler" --no-audit --no-fund --package-lock=false esbuild@0.25.10
|
||||||
- run: npm run verify:browser:source-maps
|
- run: npm run verify:browser:source-maps
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ jobs:
|
|||||||
echo "frozen=true" >> "$GITHUB_OUTPUT"
|
echo "frozen=true" >> "$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- uses: googleapis/release-please-action@v4
|
- uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1
|
||||||
if: steps.editorial.outputs.frozen != 'true'
|
if: steps.editorial.outputs.frozen != 'true'
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
@@ -70,13 +70,13 @@ jobs:
|
|||||||
sha: ${{ steps.release.outputs.sha }}
|
sha: ${{ steps.release.outputs.sha }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out reviewed release merge
|
- name: Check out reviewed release merge
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.merge_commit_sha }}
|
ref: ${{ github.event.pull_request.merge_commit_sha }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- uses: actions/setup-node@v6
|
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
package-manager-cache: false
|
package-manager-cache: false
|
||||||
@@ -104,7 +104,7 @@ jobs:
|
|||||||
node scripts/release-notes.mjs publication --repository "$GH_REPO" \
|
node scripts/release-notes.mjs publication --repository "$GH_REPO" \
|
||||||
--source "$SOURCE_SHA" --pr "$RELEASE_PR"
|
--source "$SOURCE_SHA" --pr "$RELEASE_PR"
|
||||||
|
|
||||||
- uses: googleapis/release-please-action@v4
|
- uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1
|
||||||
id: release
|
id: release
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.GITHUB_TOKEN }}
|
||||||
@@ -191,14 +191,14 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Check out release controller and Git history
|
- name: Check out release controller and Git history
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.sha }}
|
ref: ${{ github.sha }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Set up Node.js for checkpoint validation
|
- name: Set up Node.js for checkpoint validation
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
package-manager-cache: false
|
package-manager-cache: false
|
||||||
@@ -226,7 +226,7 @@ jobs:
|
|||||||
node scripts/release-notes.mjs publication --repository "$GH_REPO" \
|
node scripts/release-notes.mjs publication --repository "$GH_REPO" \
|
||||||
--source "$SOURCE_SHA"
|
--source "$SOURCE_SHA"
|
||||||
|
|
||||||
- uses: googleapis/release-please-action@v4
|
- uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1
|
||||||
id: release
|
id: release
|
||||||
with:
|
with:
|
||||||
# A dedicated credential starts PR CI automatically; the built-in
|
# A dedicated credential starts PR CI automatically; the built-in
|
||||||
@@ -255,7 +255,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Check out release pull request
|
- name: Check out release pull request
|
||||||
if: inputs.phase == 'prepare' && steps.release.outputs.prs_created == 'true'
|
if: inputs.phase == 'prepare' && steps.release.outputs.prs_created == 'true'
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||||
with:
|
with:
|
||||||
ref: ${{ fromJSON(steps.release.outputs.pr).headBranchName }}
|
ref: ${{ fromJSON(steps.release.outputs.pr).headBranchName }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -263,7 +263,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up Node.js for generated documentation
|
- name: Set up Node.js for generated documentation
|
||||||
if: inputs.phase == 'prepare' && steps.release.outputs.prs_created == 'true'
|
if: inputs.phase == 'prepare' && steps.release.outputs.prs_created == 'true'
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
package-manager-cache: false
|
package-manager-cache: false
|
||||||
@@ -290,24 +290,36 @@ jobs:
|
|||||||
if: inputs.phase == 'prepare' && steps.release.outputs.prs_created == 'true'
|
if: inputs.phase == 'prepare' && steps.release.outputs.prs_created == 'true'
|
||||||
run: npm run docs:check && git diff --exit-code
|
run: npm run docs:check && git diff --exit-code
|
||||||
|
|
||||||
publish:
|
qualification:
|
||||||
name: Publish to npm
|
name: Qualify exact release revision
|
||||||
needs: [merged-release, release-please]
|
needs: [merged-release, release-please]
|
||||||
if: >-
|
if: >-
|
||||||
always() && !cancelled() &&
|
always() && !cancelled() &&
|
||||||
((needs.merged-release.result == 'success' && needs.merged-release.outputs.release_created == 'true') ||
|
((needs.merged-release.result == 'success' && needs.merged-release.outputs.release_created == 'true') ||
|
||||||
(needs.release-please.result == 'success' && inputs.phase == 'publish' && needs.release-please.outputs.release_created == 'true'))
|
(needs.release-please.result == 'success' && inputs.phase == 'publish' && needs.release-please.outputs.release_created == 'true'))
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
actions: read
|
||||||
|
uses: ./.github/workflows/ci.yml
|
||||||
|
with:
|
||||||
|
source_sha: ${{ needs.merged-release.outputs.sha || needs.release-please.outputs.sha }}
|
||||||
|
|
||||||
|
publish:
|
||||||
|
name: Publish to npm
|
||||||
|
needs: [merged-release, release-please, qualification]
|
||||||
|
if: >-
|
||||||
|
always() && !cancelled() && needs.qualification.result == 'success'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
id-token: write
|
id-token: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||||
with:
|
with:
|
||||||
ref: ${{ needs.merged-release.outputs.sha || needs.release-please.outputs.sha }}
|
ref: ${{ needs.merged-release.outputs.sha || needs.release-please.outputs.sha }}
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- uses: actions/setup-node@v6
|
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
package-manager-cache: false
|
package-manager-cache: false
|
||||||
@@ -315,17 +327,20 @@ jobs:
|
|||||||
|
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
|
|
||||||
- name: Prepare Windows native build toolchain
|
- name: Download the exact qualified package
|
||||||
run: sudo apt-get update && sudo apt-get install --no-install-recommends -y g++-mingw-w64-x86-64
|
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
|
with:
|
||||||
|
name: verified-release-package
|
||||||
|
path: .cache/verified-package/
|
||||||
|
|
||||||
- name: Build and verify bundled Windows native controls
|
- name: Verify qualified package provenance and digest
|
||||||
run: npm run build:windows-native && npm run verify:windows-native:artifact
|
id: package
|
||||||
|
run: node scripts/ci/verified-package.mjs validate .cache/verified-package
|
||||||
- name: Verify packaged release before publishing
|
|
||||||
run: npm run verify:package
|
|
||||||
|
|
||||||
- name: Publish
|
- name: Publish
|
||||||
shell: bash
|
shell: bash
|
||||||
|
env:
|
||||||
|
VERIFIED_PACKAGE_TARBALL: ${{ steps.package.outputs.tarball }}
|
||||||
run: |
|
run: |
|
||||||
version="$(node --input-type=module -e 'import packageJson from "./package.json" with { type: "json" }; process.stdout.write(packageJson.version)')"
|
version="$(node --input-type=module -e 'import packageJson from "./package.json" with { type: "json" }; process.stdout.write(packageJson.version)')"
|
||||||
published_version="$(npm view "rea-agents@${version}" version --json 2>/dev/null || true)"
|
published_version="$(npm view "rea-agents@${version}" version --json 2>/dev/null || true)"
|
||||||
@@ -333,7 +348,7 @@ jobs:
|
|||||||
echo "rea-agents@${version} is already published; verifying the existing package."
|
echo "rea-agents@${version} is already published; verifying the existing package."
|
||||||
else
|
else
|
||||||
tag="$(node scripts/release-npm-tag.mjs "${version}")"
|
tag="$(node scripts/release-npm-tag.mjs "${version}")"
|
||||||
npm publish --access public --tag "${tag}"
|
npm publish "${VERIFIED_PACKAGE_TARBALL}" --access public --tag "${tag}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Verify published CLI from npm
|
- name: Verify published CLI from npm
|
||||||
@@ -377,7 +392,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
id-token: write
|
id-token: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
|
||||||
with:
|
with:
|
||||||
ref: ${{ needs.merged-release.outputs.sha || needs.release-please.outputs.sha }}
|
ref: ${{ needs.merged-release.outputs.sha || needs.release-please.outputs.sha }}
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
name: SQLite runtime compatibility
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
env:
|
||||||
|
HUSKY: "0"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sqlite:
|
||||||
|
name: SQLite runtime compatibility (Node ${{ matrix.node }})
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 15
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
# Exercise unavailable-runtime diagnostics, the first supported release,
|
||||||
|
# and new patches on both supported lines without hand-editing versions.
|
||||||
|
# The repository-pinned Node 24 version also runs the complete test suite.
|
||||||
|
node: ["22.x", "24.15.0", "24.x", "26.x"]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node }}
|
||||||
|
check-latest: true
|
||||||
|
cache: npm
|
||||||
|
- run: npm ci
|
||||||
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
|
with:
|
||||||
|
name: rea-test-runtime
|
||||||
|
path: .
|
||||||
|
- name: Verify SQLite discovery, inspection and cleanup
|
||||||
|
run: npm run test:sqlite:run
|
||||||
@@ -7,10 +7,6 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: website-check-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
name: Website checks
|
name: Website checks
|
||||||
@@ -18,9 +14,9 @@ jobs:
|
|||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repository
|
- name: Check out the repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- name: Set up Python for website assets
|
- name: Set up Python for website assets
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
cache: pip
|
cache: pip
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
- name: Check out the repository
|
- name: Check out the repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- name: Set up Python for website assets
|
- name: Set up Python for website assets
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
cache: pip
|
cache: pip
|
||||||
@@ -74,9 +74,9 @@ jobs:
|
|||||||
)
|
)
|
||||||
PY
|
PY
|
||||||
- name: Configure Pages
|
- name: Configure Pages
|
||||||
uses: actions/configure-pages@v5
|
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
|
||||||
- name: Upload the website
|
- name: Upload the website
|
||||||
uses: actions/upload-pages-artifact@v4
|
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
|
||||||
with:
|
with:
|
||||||
path: website/_site
|
path: website/_site
|
||||||
|
|
||||||
@@ -95,15 +95,15 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Check out publishing configuration
|
- name: Check out publishing configuration
|
||||||
if: inputs.target == 'both'
|
if: inputs.target == 'both'
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||||
- name: Set up Node.js for Wrangler
|
- name: Set up Node.js for Wrangler
|
||||||
if: inputs.target == 'both'
|
if: inputs.target == 'both'
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||||
with:
|
with:
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
- name: Download the verified website
|
- name: Download the verified website
|
||||||
if: inputs.target == 'both'
|
if: inputs.target == 'both'
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||||
with:
|
with:
|
||||||
name: github-pages
|
name: github-pages
|
||||||
path: ${{ runner.temp }}/website-archive
|
path: ${{ runner.temp }}/website-archive
|
||||||
@@ -114,7 +114,7 @@ jobs:
|
|||||||
tar -xf "$RUNNER_TEMP/website-archive/artifact.tar" -C "$RUNNER_TEMP/rea-website-public"
|
tar -xf "$RUNNER_TEMP/website-archive/artifact.tar" -C "$RUNNER_TEMP/rea-website-public"
|
||||||
- name: Publish the website to Cloudflare
|
- name: Publish the website to Cloudflare
|
||||||
if: inputs.target == 'both'
|
if: inputs.target == 'both'
|
||||||
uses: cloudflare/wrangler-action@v4
|
uses: cloudflare/wrangler-action@953926a2e2182532811c01a25e53647d93bf07c0 # v4.1.3
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
@@ -123,7 +123,7 @@ jobs:
|
|||||||
command: deploy --cwd website --env production --assets "${{ runner.temp }}/rea-website-public"
|
command: deploy --cwd website --env production --assets "${{ runner.temp }}/rea-website-public"
|
||||||
- name: Publish to GitHub Pages
|
- name: Publish to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v4
|
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
|
||||||
- name: Verify the selected published revisions
|
- name: Verify the selected published revisions
|
||||||
env:
|
env:
|
||||||
PAGES_URL: ${{ steps.deployment.outputs.page_url }}
|
PAGES_URL: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ coverage/
|
|||||||
.vitest/
|
.vitest/
|
||||||
.vitest-reports/
|
.vitest-reports/
|
||||||
test-results.xml
|
test-results.xml
|
||||||
|
test-timings.json
|
||||||
.turbo/
|
.turbo/
|
||||||
.cache/
|
.cache/
|
||||||
docs/.vitepress/cache/
|
docs/.vitepress/cache/
|
||||||
@@ -72,3 +73,5 @@ Thumbs.db
|
|||||||
|
|
||||||
# Complete static website output, including generated language editions.
|
# Complete static website output, including generated language editions.
|
||||||
website/_site/
|
website/_site/
|
||||||
|
# Temporary translation output prepared before replacing the complete site.
|
||||||
|
website/.i18n-*/
|
||||||
|
|||||||
+1
-2
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"_comment": "Test files remain included so the gate measures duplication across both src/ and tests/. The 3.0% limit leaves headroom for ordinary changes while keeping duplication visible.",
|
"threshold": 3.5,
|
||||||
"threshold": 3.0,
|
|
||||||
"reporters": ["consoleFull"],
|
"reporters": ["consoleFull"],
|
||||||
"ignore": [
|
"ignore": [
|
||||||
"node_modules/**",
|
"node_modules/**",
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
REA is a local-only reverse-engineering tool with shared CLI/MCP workflows. Distinguish observations, derivations, inferences, and unknowns; preserve Evidence provenance and session semantics through both adapters. Provider support and setup live in [README.md](README.md#choosing-a-deep-analysis-provider) and its linked guides.
|
REA is a local-only reverse-engineering tool with shared CLI/MCP workflows. Distinguish observations, derivations, inferences, and unknowns; preserve Evidence provenance and session semantics through both adapters. Provider support and setup live in [README.md](README.md#choosing-a-deep-analysis-provider) and its linked guides.
|
||||||
|
|
||||||
|
Follow the [contribution scope and fail-closed integration rule](CONTRIBUTING.md#contribution-scope). Do not integrate capabilities while material scope, authority, side-effect, or required verification questions remain unresolved. For new providers or capabilities involving target execution, injection, mutation, or protection recovery, seek the required maintainer scope decision before substantial implementation for integration. Welcome early proposals, small exploratory prototypes, and draft PRs that help resolve questions; they do not authorize integration.
|
||||||
|
|
||||||
Ghidra uses ephemeral databases without modifying executable bytes or controlling a GUI; Windows Ghidra P0 has no mutation authority. IDA analysis is read-only; never save or close an attached GUI database.
|
Ghidra uses ephemeral databases without modifying executable bytes or controlling a GUI; Windows Ghidra P0 has no mutation authority. IDA analysis is read-only; never save or close an attached GUI database.
|
||||||
|
|
||||||
Configuration changes must be additive and idempotent, with backups. Installers must not install or upgrade unrelated software, including Homebrew, Node.js, npm, Java, or Ghidra. Ghidra and IDA are bring-your-own. `rea setup` must show its planned changes and require approval before writing files or installing Hopper.
|
Configuration changes must be additive and idempotent, with backups. Installers must not install or upgrade unrelated software, including Homebrew, Node.js, npm, Java, or Ghidra. Ghidra and IDA are bring-your-own. `rea setup` must show its planned changes and require approval before writing files or installing Hopper.
|
||||||
@@ -12,7 +14,7 @@ Preserve caller-selected inputs and local evidence, including output, URLs, path
|
|||||||
|
|
||||||
## Architecture and Cleanup
|
## Architecture and Cleanup
|
||||||
|
|
||||||
Dependencies flow inward: domain semantics and contracts, provider adapters, shared application workflows, then CLI/MCP adapters. Keep engine protocols and provider-specific code out of domain/application layers. See [docs/architecture.mermaid](docs/architecture.mermaid) when changing composition.
|
Dependencies flow inward: domain semantics and contracts, provider adapters, shared application workflows, then CLI/MCP adapters. Keep engine protocols and provider-specific code out of domain/application layers. See [docs/architecture/architecture.mermaid](docs/architecture/architecture.mermaid) when changing composition.
|
||||||
|
|
||||||
Give each interpretation and resource a clear owner. Consumers must use that owner's parsed facts rather than reinterpret raw source. Preserve identity, omission, uncertainty, and source evidence across boundaries. Retain ownership of resources whose cleanup failed. Reuse `src/process/` supervision and identity primitives; a PID and executable path alone do not establish ownership after exit or reuse.
|
Give each interpretation and resource a clear owner. Consumers must use that owner's parsed facts rather than reinterpret raw source. Preserve identity, omission, uncertainty, and source evidence across boundaries. Retain ownership of resources whose cleanup failed. Reuse `src/process/` supervision and identity primitives; a PID and executable path alone do not establish ownership after exit or reuse.
|
||||||
|
|
||||||
@@ -22,12 +24,45 @@ Assess brittleness in touched code during implementation, debugging, review, and
|
|||||||
|
|
||||||
When fixing a bug, inspect the producing boundary and affected consumers for duplicated interpretation or unclear ownership. Complete any directly related refactor in the same change and remove superseded code. Passing regression tests alone does not establish that the brittleness is resolved. If related cleanup remains, explain what remains and why.
|
When fixing a bug, inspect the producing boundary and affected consumers for duplicated interpretation or unclear ownership. Complete any directly related refactor in the same change and remove superseded code. Passing regression tests alone does not establish that the brittleness is resolved. If related cleanup remains, explain what remains and why.
|
||||||
|
|
||||||
|
When addressing a review thread, inspect the producing boundary and affected consumers for brittleness. Complete directly related refactoring in the same change. Before resolving the thread, explain the root cause, structural fix, validation, and any remaining cleanup.
|
||||||
|
|
||||||
Parse unknown boundary values and model expected failures with the tagged error algebra and `Result`. Preserve partial facts and meaningful failure reasons. Keep identity and lookup values separate from display formatting; preserve source values and explicit unknowns when normalization loses information. Absolute paths, file URLs, and HTTP paths have different semantics.
|
Parse unknown boundary values and model expected failures with the tagged error algebra and `Result`. Preserve partial facts and meaningful failure reasons. Keep identity and lookup values separate from display formatting; preserve source values and explicit unknowns when normalization loses information. Absolute paths, file URLs, and HTTP paths have different semantics.
|
||||||
|
|
||||||
Validate advertised JSON Schemas after SDK conversion against their declared dialect and actual clients. Bind handlers to named contracts with exact types; catalog ordering must never select an operation or schema.
|
Validate advertised JSON Schemas after SDK conversion against their declared dialect and actual clients. Bind handlers to named contracts with exact types; catalog ordering must never select an operation or schema.
|
||||||
|
|
||||||
|
## Performance
|
||||||
|
|
||||||
|
Design analysis workflows and agent interfaces for efficiency from the first
|
||||||
|
implementation. Correctness, useful answers, Evidence provenance, caller choices,
|
||||||
|
compatibility and safe resource bounds remain required.
|
||||||
|
|
||||||
|
Optimize in this order:
|
||||||
|
|
||||||
|
1. Agent tokens and context. Return the smallest sufficient answer with
|
||||||
|
necessary provenance, coverage and limitations. Use task selection,
|
||||||
|
summaries, paging and retained Evidence where supported; honor requested
|
||||||
|
detail and keep complete Evidence accessible. Count the whole task,
|
||||||
|
including schemas, extra calls and retries.
|
||||||
|
2. Analysis time. Reuse validated results and shared work. Cache keys must
|
||||||
|
cover result-affecting inputs; define invalidation and lifetime. Validate
|
||||||
|
freshness before reporting cached live state as current.
|
||||||
|
3. CPU and memory. Avoid unnecessary work and copies; bound concurrency,
|
||||||
|
retained state and serialization growth.
|
||||||
|
|
||||||
|
For changes affecting these costs, measure representative completed tasks and
|
||||||
|
compare equivalent workflows before and after where available. Report token
|
||||||
|
usage, elapsed time, CPU time and peak process-family memory. Separate cold
|
||||||
|
and warm runs, label estimates, and state unmeasured costs. Fewer bytes alone
|
||||||
|
do not establish fewer tokens or faster analysis.
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
|
Documentation ownership and authoring conventions live in
|
||||||
|
[docs/development/documentation.md](docs/development/documentation.md). A feature
|
||||||
|
uses `docs/specs/<domain>/<feature-slug>/spec.md`, one `plan.md` and `tasks.md`;
|
||||||
|
individual architectural decisions use `docs/adr/<domain>/<decision-slug>.md`.
|
||||||
|
Consult the [documentation directory](docs/README.md) before adding a guide.
|
||||||
|
|
||||||
Use [.nvmrc](.nvmrc) and `package.json#packageManager` for the pinned toolchain. Cursor Cloud may place older Node.js first on `PATH`; environment setup installs the pinned toolchain under `/usr/local/bin`.
|
Use [.nvmrc](.nvmrc) and `package.json#packageManager` for the pinned toolchain. Cursor Cloud may place older Node.js first on `PATH`; environment setup installs the pinned toolchain under `/usr/local/bin`.
|
||||||
|
|
||||||
- `npm ci`: install locked dependencies.
|
- `npm ci`: install locked dependencies.
|
||||||
@@ -43,9 +78,9 @@ Use relevant checks for the change. The complete local gate, `npm run check:pr`,
|
|||||||
|
|
||||||
## Tool and Test Changes
|
## Tool and Test Changes
|
||||||
|
|
||||||
For tool design, follow [docs/tool-design.md](docs/tool-design.md): start from the analyst question, reuse existing contracts, preserve caller choices, and return useful evidence inline. Limits must follow real format, protocol, authority, or resource constraints. Account for representation expansion before allocation; derive completeness from examined coverage.
|
For tool design, follow [docs/development/tool-design.md](docs/development/tool-design.md): start from the analyst question, reuse existing contracts, preserve caller choices, and return useful evidence inline. Limits must follow real format, protocol, authority, or resource constraints. Account for representation expansion before allocation; derive completeness from examined coverage.
|
||||||
|
|
||||||
For test changes or provider claims, use [docs/testing.md](docs/testing.md). Prefer real public CLI/MCP workflows, then production-boundary integration, then producer goldens. Keep module tests for distinct semantics stronger workflows cannot reliably reproduce. Preserve malformed-input, cancellation, cleanup, permission, capacity, and target-identity coverage when pruning. Report unverified coverage explicitly; simulated providers do not establish real-provider behavior.
|
For test changes or provider claims, use [docs/development/testing.md](docs/development/testing.md). Prefer real public CLI/MCP workflows, then production-boundary integration, then producer goldens. Keep module tests for distinct semantics stronger workflows cannot reliably reproduce. Preserve malformed-input, cancellation, cleanup, permission, capacity, and target-identity coverage when pruning. Report unverified coverage explicitly; simulated providers do not establish real-provider behavior.
|
||||||
|
|
||||||
Use Conventional Commit subjects and PR titles. Mark breaking changes with `!` or a `BREAKING CHANGE:` footer. Describe behavior changes, relevant validation, and real-provider verification scope.
|
Use Conventional Commit subjects and PR titles. Mark breaking changes with `!` or a `BREAKING CHANGE:` footer. Describe behavior changes, relevant validation, and real-provider verification scope.
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -69,7 +69,7 @@ Full contribution record: [336 commits and 163 merged PRs](https://github.com/mo
|
|||||||
|
|
||||||
### ⚠ BREAKING CHANGES
|
### ⚠ BREAKING CHANGES
|
||||||
|
|
||||||
* **captures:** Historical captures without current producer accounting or transaction identity, and web diffs missing accessibility or storage dimensions, are rejected. Preserve original captures and recapture with the current producer; update comparison consumers to include every dimension rather than synthesizing missing observations. See the [process capture guide](docs/process-capture.md) and [browser scenario contract](docs/browser-scenario-contract.md). ([3283a45](https://github.com/morluto/rea/commit/3283a45d09457c79e3adadb50a48620926d4bc5b))
|
* **captures:** Historical captures without current producer accounting or transaction identity, and web diffs missing accessibility or storage dimensions, are rejected. Preserve original captures and recapture with the current producer; update comparison consumers to include every dimension rather than synthesizing missing observations. See the [process capture guide](docs/guides/runtime/process-capture.md) and [browser scenario contract](docs/guides/web/browser-scenario-contract.md). ([3283a45](https://github.com/morluto/rea/commit/3283a45d09457c79e3adadb50a48620926d4bc5b))
|
||||||
* **browser:** JSON shape paths now contain typed property and array-element segments. WebMCP input_schema_shape is replaced by input_schema and input_schema_sha256, retaining declared examples and defaults.
|
* **browser:** JSON shape paths now contain typed property and array-element segments. WebMCP input_schema_shape is replaced by input_schema and input_schema_sha256, retaining declared examples and defaults.
|
||||||
* **process:** Filesystem digest omission entries now require system_code; budget and changed-file omissions use null, and unavailable-file omissions preserve the operating-system error code.
|
* **process:** Filesystem digest omission entries now require system_code; budget and changed-file omissions use null, and unavailable-file omissions preserve the operating-system error code.
|
||||||
* **contracts:** Provider analysis outputs must explicitly supply metadata previously repaired with defaults; unsupported nullable facets must be reported as null.
|
* **contracts:** Provider analysis outputs must explicitly supply metadata previously repaired with defaults; unsupported nullable facets must be reported as null.
|
||||||
@@ -237,7 +237,7 @@ Full contribution record: [336 commits and 163 merged PRs](https://github.com/mo
|
|||||||
|
|
||||||
### ⚠ BREAKING CHANGES
|
### ⚠ BREAKING CHANGES
|
||||||
|
|
||||||
Read the [6.1 to 6.2 migration guide](docs/migration-6.2.md) before upgrading. REA's `always-bump-minor` policy includes breaking changes; 6.2 is not a backward-compatibility promise. Preserve original saved files and regenerate missing observations rather than fabricating identities or facts.
|
Read the [6.1 to 6.2 migration guide](docs/migrations/migration-6.2.md) before upgrading. REA's `always-bump-minor` policy includes breaking changes; 6.2 is not a backward-compatibility promise. Preserve original saved files and regenerate missing observations rather than fabricating identities or facts.
|
||||||
|
|
||||||
* **MCP / Evidence / snapshots / artifacts:** Success results are direct canonical Evidence; read `normalized_result` rather than the old `result`/`evidence` wrapper. Evidence requires nullable `analysis_profile`, session provider aliases are removed, snapshots require complete profile-bound query records, and artifact roles/permissions belong to occurrences. Recreate incompatible saved data; adding fields without recomputing their semantic identity is invalid. ([63bf914](https://github.com/morluto/rea/commit/63bf91405cf97b114a84f337fb1272d98a267999))
|
* **MCP / Evidence / snapshots / artifacts:** Success results are direct canonical Evidence; read `normalized_result` rather than the old `result`/`evidence` wrapper. Evidence requires nullable `analysis_profile`, session provider aliases are removed, snapshots require complete profile-bound query records, and artifact roles/permissions belong to occurrences. Recreate incompatible saved data; adding fields without recomputing their semantic identity is invalid. ([63bf914](https://github.com/morluto/rea/commit/63bf91405cf97b114a84f337fb1272d98a267999))
|
||||||
* **Process captures:** Legacy v3 conversion is removed. Explicit executable identity and `event_journal` are required; retain old captures and recapture when current comparisons are needed instead of inventing launch identity or event order. ([2a77469](https://github.com/morluto/rea/commit/2a7746998d47446c4db6d4f524e0f183d6803f3f))
|
* **Process captures:** Legacy v3 conversion is removed. Explicit executable identity and `event_journal` are required; retain old captures and recapture when current comparisons are needed instead of inventing launch identity or event order. ([2a77469](https://github.com/morluto/rea/commit/2a7746998d47446c4db6d4f524e0f183d6803f3f))
|
||||||
|
|||||||
+138
-7
@@ -11,20 +11,120 @@ incorrect user instructions warrant standalone corrections. Collect other
|
|||||||
cosmetic-only suggestions in an issue rather than separate PRs.
|
cosmetic-only suggestions in an issue rather than separate PRs.
|
||||||
|
|
||||||
For capability organization and provider composition, use the
|
For capability organization and provider composition, use the
|
||||||
[architecture map](docs/architecture.mermaid). Production factories in
|
[architecture map](docs/architecture/architecture.mermaid). Production factories in
|
||||||
`src/composition/` construct fresh providers without starting engines or acquiring
|
`src/composition/` construct fresh providers without starting engines or acquiring
|
||||||
targets; optional adapter failures must preserve successful peers. Run
|
targets; optional adapter failures must preserve successful peers. Run
|
||||||
`npm run verify:test-discovery` after adding or moving tests. Resolved import
|
`npm run verify:test-discovery` after adding or moving tests. Resolved import
|
||||||
boundaries are checked by `npm run verify:module-boundaries`, included in lint.
|
boundaries are checked by `npm run verify:module-boundaries`, included in lint.
|
||||||
|
|
||||||
When adding or changing an MCP tool, follow the [tool design guide](docs/tool-design.md) and preserve the canonical contracts and generated catalog.
|
For analysis workflows and agent interfaces, follow the
|
||||||
|
[performance priorities](AGENTS.md#performance). Explain the selected output
|
||||||
|
scope, reuse/cache decisions, and relevant before/after measurements when these
|
||||||
|
costs change.
|
||||||
|
|
||||||
|
When adding or changing an MCP tool, follow the [tool design guide](docs/development/tool-design.md) and preserve the canonical contracts and generated catalog.
|
||||||
|
|
||||||
|
## Contribution scope
|
||||||
|
|
||||||
|
REA focuses on software structure, runtime behavior, and evidence through
|
||||||
|
general-purpose reverse-engineering workflows. Evaluate a proposal by its actual
|
||||||
|
capabilities, side effects, defaults, and complete workflow. A tool name or a
|
||||||
|
reference to vulnerability research, malware analysis, or CTFs does not determine
|
||||||
|
whether it belongs in REA.
|
||||||
|
|
||||||
|
Supported contributions include format inspection, ordinary archive and standard
|
||||||
|
compression extraction, disassembly, decompilation, cross-references, general
|
||||||
|
static deobfuscation, vulnerability analysis, and evidence reporting. Static
|
||||||
|
protection detection is distinct from defeating that protection. Security fixes
|
||||||
|
and isolated regression tests remain in scope.
|
||||||
|
|
||||||
|
Runtime investigation needs explicit boundaries. Launching or attaching to a
|
||||||
|
process, injecting instrumentation, running scripts, and changing memory or
|
||||||
|
registers require review of target selection, execution and mutation authority,
|
||||||
|
provenance, resource limits, cancellation, and cleanup. General Frida or debugger
|
||||||
|
support is not inherently read-only, and existing support does not authorize
|
||||||
|
every workflow built on it. General-purpose interfaces are not classified as
|
||||||
|
dedicated bypass workflows solely because caller-provided code could be misused;
|
||||||
|
their execution and mutation authority must still be reviewed.
|
||||||
|
|
||||||
|
REA does not integrate or officially distribute:
|
||||||
|
|
||||||
|
- Purpose-built workflows to defeat commercial packing or code-virtualization
|
||||||
|
protections and automatically recover protected code.
|
||||||
|
- Anti-debugging or anti-instrumentation evasion, or DRM, license, anti-cheat, or
|
||||||
|
access-control bypass workflows.
|
||||||
|
- Exploit or attack-payload automation, credential theft, covert persistence,
|
||||||
|
unauthorized access, or bulk attack workflows.
|
||||||
|
|
||||||
|
These boundaries apply to first-party providers, adapters, plugins, bundled
|
||||||
|
scripts, defaults, examples, and documentation. Moving a capability into an
|
||||||
|
optional dependency or plugin does not exempt it. Review what the integration
|
||||||
|
exposes, including upstream defaults and raw-command or script execution paths.
|
||||||
|
Ordinary extraction and general static deobfuscation are not excluded merely
|
||||||
|
because the input is packed or obfuscated; assess added bypass or execution
|
||||||
|
behavior separately.
|
||||||
|
|
||||||
|
This is a product and maintenance boundary, not a judgment about a contributor's
|
||||||
|
intentions or a declaration that all excluded research is unlawful. Contributors
|
||||||
|
must have the rights and authorization needed for their work. A local-only design
|
||||||
|
or an "authorized use only" disclaimer does not establish containment or settle
|
||||||
|
legal and scope questions.
|
||||||
|
|
||||||
|
### Fail-closed integration
|
||||||
|
|
||||||
|
If scope fit, target or authorization boundaries, side effects, or the verification
|
||||||
|
needed to establish those boundaries remain materially unresolved, **do not merge,
|
||||||
|
enable, or include the capability in official packages or distributions**. Keep
|
||||||
|
the proposal pending, narrow it, or decline it. Record unknowns explicitly; do not
|
||||||
|
turn them into "none" or assumed safety. Passing CI, completed implementation,
|
||||||
|
upstream popularity, or silence from maintainers is not scope approval.
|
||||||
|
|
||||||
|
For a new provider or a capability involving target execution, injection,
|
||||||
|
mutation, or protection recovery, seek an explicit maintainer scope decision in
|
||||||
|
the linked issue or design discussion before substantial implementation intended
|
||||||
|
for integration. Small exploratory prototypes and draft PRs may help inform that
|
||||||
|
decision; they do not authorize integration. The decision must cover the final
|
||||||
|
proposed behavior; a scope expansion needs a new decision. Routine fixes and
|
||||||
|
documentation changes within existing boundaries do not need a separate advance
|
||||||
|
decision, but must not silently expand those boundaries.
|
||||||
|
|
||||||
|
### Starting a proposal
|
||||||
|
|
||||||
|
To open a feature request or design discussion, describe the problem and desired
|
||||||
|
outcome or decision. Short answers and the forms' "Not sure yet" options are
|
||||||
|
welcome. You do not need code, a complete design or test plan, legal analysis, or
|
||||||
|
private proof-of-authorization documents to start a discussion. Share what you
|
||||||
|
know and leave optional details blank when you need help.
|
||||||
|
|
||||||
|
Form selections guide triage; they are not proof of authorization or scope
|
||||||
|
approval. Unselected effects must not be treated as established absence.
|
||||||
|
Maintainers and implementers work together to resolve the following before
|
||||||
|
integration:
|
||||||
|
|
||||||
|
- The concrete analyst question, requested inputs and outputs, and why existing
|
||||||
|
REA operations are insufficient.
|
||||||
|
- Why the workflow fits this scope, its non-goals, and any protection recovery,
|
||||||
|
bypass, or attack automation it would expose.
|
||||||
|
- The selected targets and every execution, injection, mutation, network, or
|
||||||
|
persistence effect, including behavior inherited from upstream tools.
|
||||||
|
- How the boundaries and outcome will be verified with self-owned or appropriately
|
||||||
|
licensed samples; identify real CLI/MCP and provider coverage, cleanup and
|
||||||
|
resource checks, and remaining unknowns. Do not publish private binaries,
|
||||||
|
credentials, or sensitive target data; follow [SECURITY.md](SECURITY.md) for
|
||||||
|
private vulnerability reports.
|
||||||
|
|
||||||
|
Mixed proposals should separate acceptable analysis capabilities from excluded
|
||||||
|
workflows so each can be decided independently. An issue may discuss unresolved
|
||||||
|
questions; opening an issue or PR does not authorize integration. This is a
|
||||||
|
maintainer integration gate, not a per-call confirmation requirement or a sandbox
|
||||||
|
guarantee.
|
||||||
|
|
||||||
## Development setup
|
## Development setup
|
||||||
|
|
||||||
Use the development toolchain pinned in `.nvmrc` and
|
Use the development toolchain pinned in `.nvmrc` and
|
||||||
`package.json#packageManager`. Run `nvm use` before installing dependencies;
|
`package.json#packageManager`. Run `nvm use` before installing dependencies;
|
||||||
installed-package runtime support is documented in
|
installed-package runtime support is documented in
|
||||||
[installation](docs/installation.md#start-setup).
|
[installation](docs/getting-started/installation.md#start-setup).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm ci
|
npm ci
|
||||||
@@ -42,8 +142,27 @@ caches deterministic builds and static checks across Git worktrees. After a pack
|
|||||||
Repository invariants live in [AGENTS.md](AGENTS.md). Keep provider-specific
|
Repository invariants live in [AGENTS.md](AGENTS.md). Keep provider-specific
|
||||||
protocols in adapters and shared CLI/MCP workflows in the application layer.
|
protocols in adapters and shared CLI/MCP workflows in the application layer.
|
||||||
|
|
||||||
|
### Windows source checkouts
|
||||||
|
|
||||||
|
The published npm package includes the Windows x64 native addon and its
|
||||||
|
manifest. A source checkout does not: `native/windows/build/` is ignored by
|
||||||
|
Git, and neither `npm ci` nor `npm run build:cached` (or `npm run build`)
|
||||||
|
produces `rea-windows-x64.node` or `manifest.json` in that directory.
|
||||||
|
Windows workflows and tests that require native controls need these artifacts;
|
||||||
|
without them, those controls are unavailable even after a successful runtime build.
|
||||||
|
|
||||||
|
Follow the [Windows native build guide](native/windows/README.md#build) before
|
||||||
|
running those workflows from source. The artifact build requires Linux,
|
||||||
|
MinGW-w64, and `tar`; the build script does not run on Windows. See that guide
|
||||||
|
for the build and artifact-verification commands and the separate real Windows
|
||||||
|
verification prerequisites. Keep the generated addon and manifest uncommitted.
|
||||||
|
|
||||||
## Documentation website
|
## Documentation website
|
||||||
|
|
||||||
|
Use the [documentation directory](docs/README.md) and
|
||||||
|
[authoring guide](docs/development/documentation.md) for document ownership,
|
||||||
|
domain-based feature specifications and architectural decision records.
|
||||||
|
|
||||||
The VitePress site uses the Markdown files in `docs/`. Run `npm run docs:dev`
|
The VitePress site uses the Markdown files in `docs/`. Run `npm run docs:dev`
|
||||||
for live editing, `npm run docs:build` to check the production build and
|
for live editing, `npm run docs:build` to check the production build and
|
||||||
links, and `npm run docs:preview` to preview that build at `/rea/`.
|
links, and `npm run docs:preview` to preview that build at `/rea/`.
|
||||||
@@ -66,6 +185,10 @@ The separate GitHub Pages host uses only the manual
|
|||||||
|
|
||||||
## Development feedback and PR verification
|
## Development feedback and PR verification
|
||||||
|
|
||||||
|
For routine merges, wait for the required checks to pass for the current PR
|
||||||
|
revision. Administrators retain an override for deliberate maintainer recovery.
|
||||||
|
If `main` is broken, prioritize a focused repair before updating affected PRs.
|
||||||
|
|
||||||
Select checks for the behavior changed. For a source edit:
|
Select checks for the behavior changed. For a source edit:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -76,7 +199,7 @@ npm run check:fast
|
|||||||
`test:local` runs source tests without building. `check:changed` combines cached
|
`test:local` runs source tests without building. `check:changed` combines cached
|
||||||
static checks with source tests affected since the merge base with `origin/main`.
|
static checks with source tests affected since the merge base with `origin/main`.
|
||||||
Import-graph selection can miss runtime registration, bridges, and generated data;
|
Import-graph selection can miss runtime registration, bridges, and generated data;
|
||||||
select relevant boundary tests explicitly. See [testing](docs/testing.md#developer-commands)
|
select relevant boundary tests explicitly. See [testing](docs/development/testing.md#developer-commands)
|
||||||
for commands, test placement, pruning, and real-provider prerequisites.
|
for commands, test placement, pruning, and real-provider prerequisites.
|
||||||
|
|
||||||
Before requesting review, run relevant tests and `npm run check`; add
|
Before requesting review, run relevant tests and `npm run check`; add
|
||||||
@@ -87,6 +210,14 @@ CI diagnosis. Packaging/setup/distribution changes additionally require
|
|||||||
`npm run verify:package` and `npm pack --dry-run`; provider changes require the
|
`npm run verify:package` and `npm pack --dry-run`; provider changes require the
|
||||||
matching real-provider lane. State which host/provider workflows ran.
|
matching real-provider lane. State which host/provider workflows ran.
|
||||||
|
|
||||||
|
For CI/test correctness, drift, or performance investigations, use the
|
||||||
|
[`rea-ci-tests-audit` contributor skill](.agents/skills/rea-ci-tests-audit/SKILL.md).
|
||||||
|
It guides reproduction and comparable measurements before changing checks.
|
||||||
|
|
||||||
|
`check:pr` reuses build and static-check outputs while executing the test suite
|
||||||
|
fresh, including the fast Python producer checks. `docs:check` also runs the
|
||||||
|
onboarding example consistency suite for README-only changes.
|
||||||
|
|
||||||
Pre-commit formats and lints staged files; pre-push runs `check:fast`.
|
Pre-commit formats and lints staged files; pre-push runs `check:fast`.
|
||||||
|
|
||||||
### Generated files and command ownership
|
### Generated files and command ownership
|
||||||
@@ -135,8 +266,8 @@ Run `npm run verify:hopper` on a supported macOS host or
|
|||||||
`npm run verify:hopper:linux` on the supported Linux demo runner. These build
|
`npm run verify:hopper:linux` on the supported Linux demo runner. These build
|
||||||
native fixtures and verify the installed engine through CLI/MCP; package or
|
native fixtures and verify the installed engine through CLI/MCP; package or
|
||||||
simulated-provider checks do not establish engine behavior. See
|
simulated-provider checks do not establish engine behavior. See
|
||||||
[real-toolchain verification](docs/testing.md#end-to-end-integration-and-golden-evidence)
|
[real-toolchain verification](docs/development/testing.md#end-to-end-integration-and-golden-evidence)
|
||||||
for prerequisites and scope, and [Hopper setup](docs/installation.md#hopper)
|
for prerequisites and scope, and [Hopper setup](docs/getting-started/installation.md#hopper)
|
||||||
for supported hosts and unattended startup.
|
for supported hosts and unattended startup.
|
||||||
|
|
||||||
Use the default `build/conformance/manifest.json` unless explicitly verifying
|
Use the default `build/conformance/manifest.json` unless explicitly verifying
|
||||||
@@ -145,7 +276,7 @@ Generated fixtures and manifests remain ignored.
|
|||||||
|
|
||||||
## Maintainer release checklist
|
## Maintainer release checklist
|
||||||
|
|
||||||
Use the [release guide](docs/releasing.md). Main pushes automatically refresh a
|
Use the [release guide](docs/development/releasing.md). Main pushes automatically refresh a
|
||||||
Release Please PR with the next version and changelog. Review its migration
|
Release Please PR with the next version and changelog. Review its migration
|
||||||
notes, wait for the current CI checks to pass, and merge it into main to publish.
|
notes, wait for the current CI checks to pass, and merge it into main to publish.
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
**English** · [简体中文](README_zh.md) · [繁體中文](README_zh-TW.md) · [日本語](README_ja.md) · [한국어](README_ko.md) · [Türkçe](README_tr.md) · [Русский](README_ru.md) · [Tiếng Việt](README_vi.md) · [ไทย](README_th.md) · [Deutsch](README_de.md) · [Español](README_es.md) · [Français](README_fr.md) · [Українська](README_uk.md) · [Polski](README_pl.md) · [Português (Brasil)](README_pt-BR.md) · [العربية](README_ar.md) · [فارسی](README_fa.md) · [Bahasa Indonesia](README_id.md) · [Italiano](README_it.md)
|
**English** · [简体中文](docs/readme/README_zh.md) · [繁體中文](docs/readme/README_zh-TW.md) · [日本語](docs/readme/README_ja.md) · [한국어](docs/readme/README_ko.md) · [Türkçe](docs/readme/README_tr.md) · [Русский](docs/readme/README_ru.md) · [Tiếng Việt](docs/readme/README_vi.md) · [ไทย](docs/readme/README_th.md) · [Deutsch](docs/readme/README_de.md) · [Español](docs/readme/README_es.md) · [Français](docs/readme/README_fr.md) · [Українська](docs/readme/README_uk.md) · [Polski](docs/readme/README_pl.md) · [Português (Brasil)](docs/readme/README_pt-BR.md) · [العربية](docs/readme/README_ar.md) · [فارسی](docs/readme/README_fa.md) · [Bahasa Indonesia](docs/readme/README_id.md) · [Italiano](docs/readme/README_it.md)
|
||||||
|
|
||||||
# REA: Reverse Engineer Anything
|
# REA: Reverse Engineer Anything
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
**See a feature you like. Understand how it works, down to the binary level.**
|
**See a feature you like. Understand how it works, down to the binary level.**
|
||||||
|
|
||||||
[](https://www.npmjs.com/package/rea-agents)
|
[](https://www.npmjs.com/package/rea-agents)
|
||||||
[](docs/mcp-contracts.md#generated-catalog)
|
[](docs/reference/mcp-contracts.md#generated-catalog)
|
||||||
[](#what-you-can-analyze)
|
[](#what-you-can-analyze)
|
||||||
[](https://skills.sh/morluto/rea/reverse-engineer-anything)
|
[](https://skills.sh/morluto/rea/reverse-engineer-anything)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
@@ -70,8 +70,8 @@ REA's MCP server and matching workflow instructions, with backups of existing
|
|||||||
configuration. Restart your agent afterward.
|
configuration. Restart your agent afterward.
|
||||||
|
|
||||||
Setup supports Claude Code, Codex, Cursor, Gemini CLI, Grok Build and
|
Setup supports Claude Code, Codex, Cursor, Gemini CLI, Grok Build and
|
||||||
[other agents](docs/installation.md#supported-agents). See
|
[other agents](docs/getting-started/installation.md#supported-agents). See
|
||||||
[installation and setup](docs/installation.md) for provider configuration and
|
[installation and setup](docs/getting-started/installation.md) for provider configuration and
|
||||||
manual MCP registration.
|
manual MCP registration.
|
||||||
|
|
||||||
### Ask your agent
|
### Ask your agent
|
||||||
@@ -102,7 +102,7 @@ rea --help
|
|||||||
```
|
```
|
||||||
|
|
||||||
For native analysis, configure a provider first. See the
|
For native analysis, configure a provider first. See the
|
||||||
[CLI and Evidence guide](docs/cli.md) for native commands, provider selection,
|
[CLI and Evidence guide](docs/getting-started/cli.md) for native commands, provider selection,
|
||||||
snapshots and scripting.
|
snapshots and scripting.
|
||||||
|
|
||||||
### Update REA
|
### Update REA
|
||||||
@@ -150,26 +150,30 @@ CLI commands use the same workflows.
|
|||||||
REA requires Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+, plus npm.
|
REA requires Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+, plus npm.
|
||||||
Additional tools and host support depend on the target:
|
Additional tools and host support depend on the target:
|
||||||
|
|
||||||
| Target | What REA returns | Requirements and guide |
|
| Target | What REA returns | Requirements and guide |
|
||||||
| ---------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------------------- | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| Native binaries | Pseudocode, assembly, strings, symbols, calls and references | Hopper, Ghidra or IDA; [native analysis](https://rea.tools/guides/native/) |
|
| Native binaries | Pseudocode, assembly, strings, symbols, calls and references | Hopper, Ghidra or IDA; [native analysis](https://rea.tools/guides/native/) |
|
||||||
| Offline ELF layout | Sections, segments, original symbols/relocations and static mitigation candidates | Caller-supplied pwntools on Linux x64; [binary diagnostics](docs/binary-diagnostics.md) |
|
| Offline ELF layout | Sections, segments, original symbols/relocations and static mitigation candidates | Caller-supplied pwntools on Linux x64; [binary diagnostics](docs/guides/native/binary-diagnostics.md) |
|
||||||
| Go binaries | Embedded compiler version, modules, replacements and build settings | Built-in static ELF/PE/thin Mach-O inspection; no Go installation required |
|
| Go binaries | Embedded compiler version, modules, replacements and build settings | Built-in static ELF/PE/thin Mach-O inspection; no Go installation required |
|
||||||
| WASM artifact | Validation, sections, exact import/export WAT forms and decoded WAT | Caller-supplied WABT 1.0.42; `inspect_wasm_artifact` |
|
| WASM artifact | Validation, sections, exact import/export WAT forms and decoded WAT | Caller-supplied WABT 1.0.42; `inspect_wasm_artifact` |
|
||||||
| EVM bytecode | Dispatch selectors, byte offsets, inferred arguments and mutability | Local raw/hex carrier on Linux x64; [offline EVM guide](docs/evm-bytecode.md) |
|
| EVM bytecode | Dispatch selectors, byte offsets, inferred arguments and mutability | Local raw/hex carrier on Linux x64; [offline EVM guide](docs/guides/evm/evm-bytecode.md) |
|
||||||
| Recorded Linux crashes | Raw notes, every recorded thread's registers/signals and optional mapping candidates | Caller-supplied pwntools on Linux x64; optional GDB/pwndbg; [recorded crashes](docs/recorded-crashes.md) |
|
| SQLite databases | Tables, columns, indexes, views, triggers and selected ordinary-table rows | Local database/WAL snapshot; Node.js 24.x >=24.15 or 26+ with native SQLite limits |
|
||||||
| JavaScript / Electron | Modules, imports, source maps, routes, IPC and native add-on relationships | Node.js and npm; [application analysis](https://rea.tools/guides/javascript/) |
|
| Recorded Linux crashes | Raw notes, every recorded thread's registers/signals and optional mapping candidates | Caller-supplied pwntools on Linux x64; optional GDB/pwndbg; [recorded crashes](docs/guides/native/recorded-crashes.md) |
|
||||||
| Websites | Page structure, scripts, network observations and requested screenshots | A Chrome-family browser; [browser analysis](https://rea.tools/guides/browser/) |
|
| JavaScript / Electron | Modules, imports, source maps, routes, IPC and native add-on relationships | Node.js and npm; [application analysis](https://rea.tools/guides/javascript/) |
|
||||||
| Saved network captures | Requests, responses, exposed payloads and source locations | HAR; mitmdump on Linux for native mitmproxy captures; [capture guide](docs/web-network-captures.md) |
|
| Websites | Page structure, scripts, network observations and requested screenshots | A Chrome-family browser; [browser analysis](https://rea.tools/guides/browser/) |
|
||||||
| .NET assemblies | Metadata, CIL instructions, declared native dependencies and build comparisons | None (static only); [managed-code guide](docs/managed-code-analysis.md) |
|
| Saved network captures | Requests, responses, exposed payloads and source locations | HAR or Fiddler Everywhere SAZ; mitmdump on Linux for native mitmproxy; [capture guide](docs/guides/web/web-network-captures.md) |
|
||||||
| Android APKs | Manifest declarations, classes, decompiled methods and references | Headless JADX and a full JDK on Linux/macOS/Windows x64; [Android guide](docs/android-analysis.md) |
|
| .NET assemblies | Metadata, CIL instructions, declared native dependencies and build comparisons | None (static only); [managed-code guide](docs/guides/managed/managed-code-analysis.md) |
|
||||||
| Android devices | Devices, packages, processes, logs, dumps, screen captures, and APK/file transfers | Caller-supplied adb (emulator or hardware); [ADB guide](docs/adb-device-analysis.md) |
|
| Android APKs | Manifest declarations, classes, decompiled methods and references | Headless JADX and a full JDK on Linux/macOS/Windows x64; [Android guide](docs/guides/android/android-analysis.md) |
|
||||||
| JEB projects | Engine-backed project units, artifact digests and type/method pseudo-code | A caller-started JEB client serving MCP, selected with REA_JEB_MCP_URL; [JEB guide](docs/jeb-analysis.md) |
|
| Android devices | Devices, packages, processes, logs, dumps, screen captures, and APK/file transfers | Caller-supplied adb (emulator or hardware); [ADB guide](docs/guides/android/adb-device-analysis.md) |
|
||||||
| Android resources | Decoded manifest, string tables, locales and version facts | Caller-supplied Apktool launcher; [resource guide](docs/apktool-resource-analysis.md) |
|
| JEB projects | Engine-backed project units, artifact digests and type/method pseudo-code | A caller-started JEB client serving MCP, selected with REA_JEB_MCP_URL; [JEB guide](docs/providers/jeb-analysis.md) |
|
||||||
| Flutter apps | Dart snapshot hash, per-ABI library digests and engine build provenance | None (static APK parsing); [Flutter guide](docs/flutter-analysis.md) |
|
| Android resources | Decoded manifest, string tables, locales and version facts | Caller-supplied Apktool launcher; [resource guide](docs/guides/android/apktool-resource-analysis.md) |
|
||||||
| Firmware | Regions, extraction results and native-analysis handoffs | Binwalk / Unblob on Linux; [firmware guide](docs/firmware-analysis.md) |
|
| Flutter apps | Dart snapshot hash, per-ABI library digests and engine build provenance | None (static APK parsing); [Flutter guide](docs/guides/android/flutter-analysis.md) |
|
||||||
| Packages and resources | File inventories, digests, plists, Apple bundle anatomy and extracted resources | [Artifact and JavaScript guide](docs/javascript-artifact-reconstruction.md), [Apple applications](docs/apple-application-analysis.md) |
|
| Firmware | Regions, extraction results and native-analysis handoffs | Binwalk / Unblob on Linux; [firmware guide](docs/guides/firmware/firmware-analysis.md) |
|
||||||
| Process behavior | Terminal output, interactions, exit and filesystem observations, and run comparisons | Linux/macOS with a native PTY; [process capture](docs/process-capture.md) |
|
| Recorded packets | Selected fields, repeated values, filters and decode-as rules | Linux: TShark 4.x + prlimit; [capture guide](docs/guides/data/packet-captures.md) |
|
||||||
|
| Packet summaries | Endpoints, DNS, TLS SNI, protocol distribution and HTTP requests | Caller-supplied tshark and capinfos (Linux-verified); [pcap guide](docs/guides/data/pcap-analysis.md) |
|
||||||
|
| Recorded logic signals | Decoder annotations, sample ranges and diagnostics | Linux: sigrok-cli 0.7.2 + prlimit; [signal recordings](docs/guides/signals/signal-recordings.md) |
|
||||||
|
| Packages and resources | File inventories, digests, plists, Apple bundle anatomy and extracted resources | [Artifact and JavaScript guide](docs/guides/javascript/javascript-artifact-reconstruction.md), [Apple applications](docs/guides/apple/apple-application-analysis.md) |
|
||||||
|
| Process behavior | Terminal output, interactions, exit and filesystem observations, and run comparisons | Linux/macOS with a native PTY; [process capture](docs/guides/runtime/process-capture.md) |
|
||||||
|
|
||||||
Static JavaScript and .NET inspection read the supplied files without running
|
Static JavaScript and .NET inspection read the supplied files without running
|
||||||
the application. Runtime capture runs or interacts with the selected target
|
the application. Runtime capture runs or interacts with the selected target
|
||||||
@@ -178,14 +182,14 @@ using your user permissions; each runtime guide describes its effects.
|
|||||||
<a id="choosing-a-deep-analysis-provider"></a>
|
<a id="choosing-a-deep-analysis-provider"></a>
|
||||||
|
|
||||||
Native formats and host support vary by provider. See
|
Native formats and host support vary by provider. See
|
||||||
[Hopper and Ghidra setup](docs/installation.md#hopper), the
|
[Hopper and Ghidra setup](docs/getting-started/installation.md#hopper), the
|
||||||
[IDA guide](docs/ida-provider.md), and
|
[IDA guide](docs/providers/ida-provider.md) (including an optional native MCP bridge), and
|
||||||
[experimental Windows Ghidra support](docs/windows-ghidra-p0.md).
|
[experimental Windows Ghidra support](docs/providers/windows-ghidra-p0.md).
|
||||||
Ghidra also supports [16-bit DOS analysis](docs/ghidra-dos.md).
|
Ghidra also supports [16-bit DOS analysis](docs/providers/ghidra-dos.md).
|
||||||
For large binaries, raise the provider's startup deadline with
|
For large binaries, raise the provider's startup deadline with
|
||||||
`REA_GHIDRA_STARTUP_TIMEOUT_MS` or `REA_HOPPER_STARTUP_TIMEOUT_MS`.
|
`REA_GHIDRA_STARTUP_TIMEOUT_MS` or `REA_HOPPER_STARTUP_TIMEOUT_MS`.
|
||||||
For provider selection, see the [CLI guide](docs/cli.md#choose-a-provider).
|
For provider selection, see the [CLI guide](docs/getting-started/cli.md#choose-a-provider).
|
||||||
Check [release availability](docs/installation.md#released-package-and-main)
|
Check [release availability](docs/getting-started/installation.md#released-package-and-main)
|
||||||
for features added since the latest npm release.
|
for features added since the latest npm release.
|
||||||
|
|
||||||
## Showcases
|
## Showcases
|
||||||
@@ -228,8 +232,8 @@ your question, how REA helped, and what you found.
|
|||||||
<summary><strong>Which agents can use REA?</strong></summary>
|
<summary><strong>Which agents can use REA?</strong></summary>
|
||||||
|
|
||||||
Any agent that supports local MCP servers. Setup configures the
|
Any agent that supports local MCP servers. Setup configures the
|
||||||
[supported agents](docs/installation.md#supported-agents); other clients can use
|
[supported agents](docs/getting-started/installation.md#supported-agents); other clients can use
|
||||||
[manual MCP registration](docs/installation.md#mcp-registry).
|
[manual MCP registration](docs/getting-started/installation.md#mcp-registry).
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -238,7 +242,7 @@ Any agent that supports local MCP servers. Setup configures the
|
|||||||
|
|
||||||
Deep native analysis uses one of them. Static JavaScript and .NET inspection
|
Deep native analysis uses one of them. Static JavaScript and .NET inspection
|
||||||
work without a native analysis engine. Setup can install Hopper after approval;
|
work without a native analysis engine. Setup can install Hopper after approval;
|
||||||
Ghidra and IDA use your existing installations. See [provider setup](docs/installation.md#hopper).
|
Ghidra and IDA use your existing installations. See [provider setup](docs/getting-started/installation.md#hopper).
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -249,7 +253,7 @@ REA starts Hopper when an operation needs it. On macOS, a first-run dialog may
|
|||||||
ask you to choose demo mode or activate your license. Complete that prompt in the
|
ask you to choose demo mode or activate your license. Complete that prompt in the
|
||||||
same user session before your first CLI/MCP operation or unattended job. Open
|
same user session before your first CLI/MCP operation or unattended job. Open
|
||||||
Hopper manually if needed. See
|
Hopper manually if needed. See
|
||||||
[Hopper startup and troubleshooting](docs/installation.md#launcher-paths-and-troubleshooting).
|
[Hopper startup and troubleshooting](docs/getting-started/installation.md#launcher-paths-and-troubleshooting).
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -258,7 +262,7 @@ Hopper manually if needed. See
|
|||||||
|
|
||||||
The skill supplies investigation instructions for your agent. Use `npx rea-agents setup`
|
The skill supplies investigation instructions for your agent. Use `npx rea-agents setup`
|
||||||
to register REA's MCP server and install the matching instructions, then restart
|
to register REA's MCP server and install the matching instructions, then restart
|
||||||
your agent. See [skill-only installation](docs/installation.md#skill-only-installation).
|
your agent. See [skill-only installation](docs/getting-started/installation.md#skill-only-installation).
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -307,18 +311,18 @@ with your REA version, target type, steps to reproduce and error output.
|
|||||||
Start with the website's [worked guides](https://rea.tools/guides/).
|
Start with the website's [worked guides](https://rea.tools/guides/).
|
||||||
For exact options, prerequisites and result contracts:
|
For exact options, prerequisites and result contracts:
|
||||||
|
|
||||||
- [Installation and setup](docs/installation.md): agent registration, provider configuration, updates and uninstall.
|
- [Installation and setup](docs/getting-started/installation.md): agent registration, provider configuration, updates and uninstall.
|
||||||
- [Readiness and troubleshooting](docs/installation.md#check-readiness-for-your-task): diagnose one agent or analysis engine.
|
- [Readiness and troubleshooting](docs/getting-started/installation.md#check-readiness-for-your-task): diagnose one agent or analysis engine.
|
||||||
- [CLI and Evidence](docs/cli.md): commands, provider selection, snapshots, import/export and exit statuses.
|
- [CLI and Evidence](docs/getting-started/cli.md): commands, provider selection, snapshots, import/export and exit statuses.
|
||||||
- [MCP contracts](docs/mcp-contracts.md) and [agent prompts](docs/mcp-prompts.md): tool results, sessions and guided investigations.
|
- [MCP contracts](docs/reference/mcp-contracts.md) and [agent prompts](docs/getting-started/mcp-prompts.md): tool results, sessions and guided investigations.
|
||||||
- [Tool catalog](docs/mcp-contracts.md#generated-catalog): generated inventory of tools, providers and CLI commands.
|
- [Tool catalog](docs/reference/mcp-contracts.md#generated-catalog): generated inventory of tools, providers and CLI commands.
|
||||||
- [Roadmap](docs/roadmap.md): planned work and capability trackers.
|
- [Roadmap](docs/development/roadmap.md): planned work and capability trackers.
|
||||||
|
|
||||||
Report vulnerabilities through [SECURITY.md](SECURITY.md).
|
Report vulnerabilities through [SECURITY.md](SECURITY.md).
|
||||||
|
|
||||||
## Star history
|
## Star history
|
||||||
|
|
||||||
🎉 **110,000 GitHub stars — thank you!**
|
🎉 **180,000 GitHub stars — thank you!**
|
||||||
|
|
||||||
Thanks to everyone using REA, reporting bugs, requesting features, testing builds, and contributing fixes.
|
Thanks to everyone using REA, reporting bugs, requesting features, testing builds, and contributing fixes.
|
||||||
|
|
||||||
@@ -347,8 +351,8 @@ report a bug or suggest a feature, or [send a pull request](https://github.com/m
|
|||||||
to improve the code or docs.
|
to improve the code or docs.
|
||||||
|
|
||||||
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and checks,
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and checks,
|
||||||
[testing](docs/testing.md) for verification lanes, and the
|
[testing](docs/development/testing.md) for verification lanes, and the
|
||||||
[architecture map](docs/architecture.mermaid) for the project structure.
|
[architecture map](docs/architecture/architecture.mermaid) for the project structure.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
+6
-3
@@ -24,9 +24,12 @@ provider-dependent behavior to be reproduced safely.
|
|||||||
|
|
||||||
## Security boundary
|
## Security boundary
|
||||||
|
|
||||||
REA authenticates each local provider bridge session with a random capability
|
REA authenticates its Hopper and Ghidra bridges with per-session random
|
||||||
token and a current-user Unix socket. Tokens are transferred through private
|
capability tokens. POSIX uses current-user Unix sockets; Windows Ghidra uses
|
||||||
session descriptors rather than process arguments or environment variables.
|
authenticated loopback TCP with a private NTFS runtime whose DACL admits only
|
||||||
|
the current user and SYSTEM. See [Windows Ghidra P0](docs/providers/windows-ghidra-p0.md#private-runtime-transport-and-lifecycle).
|
||||||
|
Tokens are transferred through private session descriptors rather than process
|
||||||
|
arguments or environment variables.
|
||||||
This is not a sandbox and does not protect against malicious processes already
|
This is not a sandbox and does not protect against malicious processes already
|
||||||
running as the same operating-system user. Opening an untrusted binary
|
running as the same operating-system user. Opening an untrusted binary
|
||||||
delegates parsing and analysis to the selected local provider with that user's
|
delegates parsing and analysis to the selected local provider with that user's
|
||||||
|
|||||||
@@ -28,6 +28,13 @@ entries preserve the declared license and author metadata and include a clearly
|
|||||||
labeled standard license text. These are documented upstream notice gaps, not
|
labeled standard license text. These are documented upstream notice gaps, not
|
||||||
recovered copyright notices or a claim that attribution has been fully verified.
|
recovered copyright notices or a claim that attribution has been fully verified.
|
||||||
|
|
||||||
|
The optional `frida@17.23.2` npm archive and tagged Node binding source also
|
||||||
|
omit a standalone license/copyright document. Its declared
|
||||||
|
`LGPL-2.0 WITH WxWindows-exception-3.1` license is recorded with unchanged
|
||||||
|
[Frida licensing text](licenses/frida-17.23.2-COPYING.txt) and the
|
||||||
|
[GNU Library GPL v2](licenses/LGPL-2.0.txt). These are licensing supplements,
|
||||||
|
not recovered Node binding or prebuild-component copyright notices.
|
||||||
|
|
||||||
## Open-source engine credits and licenses
|
## Open-source engine credits and licenses
|
||||||
|
|
||||||
We thank the maintainers and contributors of the projects below. Their
|
We thank the maintainers and contributors of the projects below. Their
|
||||||
|
|||||||
@@ -3,8 +3,14 @@ import com.google.gson.*;
|
|||||||
import io.modelcontextprotocol.kotlin.sdk.server.*;
|
import io.modelcontextprotocol.kotlin.sdk.server.*;
|
||||||
import io.modelcontextprotocol.kotlin.sdk.types.*;
|
import io.modelcontextprotocol.kotlin.sdk.types.*;
|
||||||
import jadx.api.*;
|
import jadx.api.*;
|
||||||
|
import jadx.api.plugins.input.data.ICodeReader;
|
||||||
|
import jadx.api.plugins.input.data.IMethodRef;
|
||||||
|
import jadx.api.plugins.input.insns.InsnIndexType;
|
||||||
|
import jadx.api.plugins.input.insns.Opcode;
|
||||||
|
import jadx.core.dex.info.MethodInfo;
|
||||||
import jadx.core.dex.nodes.*;
|
import jadx.core.dex.nodes.*;
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -79,11 +85,17 @@ class ReaJadxBridge {
|
|||||||
ordered.sort(Comparator.comparing(MethodNode::getAlias));
|
ordered.sort(Comparator.comparing(MethodNode::getAlias));
|
||||||
List<MethodSnapshot> methods = ordered.stream().map(method -> {
|
List<MethodSnapshot> methods = ordered.stream().map(method -> {
|
||||||
String name = method.getAlias();
|
String name = method.getAlias();
|
||||||
|
String shortId = method.getMethodInfo().getShortId();
|
||||||
|
String rawName = method.getMethodInfo().getName();
|
||||||
|
if (!shortId.startsWith(rawName + "("))
|
||||||
|
throw new IllegalStateException("JADX method ID has no raw-name prefix: " + shortId);
|
||||||
|
String descriptor = shortId.substring(rawName.length());
|
||||||
String signature = name + "(" + method.getArgTypes().stream()
|
String signature = name + "(" + method.getArgTypes().stream()
|
||||||
.map(Object::toString).collect(Collectors.joining(", "))
|
.map(Object::toString).collect(Collectors.joining(", "))
|
||||||
+ "): " + method.getReturnType().toString();
|
+ "): " + method.getReturnType().toString();
|
||||||
return new MethodSnapshot(name, method.getMethodInfo().getShortId(), Map.of(
|
return new MethodSnapshot(name, shortId, Map.of(
|
||||||
"name", name, "signature", signature,
|
"name", name, "signature", signature,
|
||||||
|
"dex_descriptor", descriptor,
|
||||||
"is_constructor", method.isConstructor(), "def_pos", 0));
|
"is_constructor", method.isConstructor(), "def_pos", 0));
|
||||||
}).toList();
|
}).toList();
|
||||||
List<Map<String, Object>> fields = node.getFields().stream()
|
List<Map<String, Object>> fields = node.getFields().stream()
|
||||||
@@ -140,6 +152,57 @@ class ReaJadxBridge {
|
|||||||
"smali", true, List.of("static_initializer_disassembly"));
|
"smali", true, List.of("static_initializer_disassembly"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The local transport admits 8 MiB frames. Reserve 1 KiB for the fixed
|
||||||
|
// JSON-RPC/CallToolResult envelope and generated numeric request id, and
|
||||||
|
// account for JSON text being escaped again inside TextContent.
|
||||||
|
private static final int MAX_XREF_TEXT_BYTES = 8 * 1024 * 1024 - 1024;
|
||||||
|
private static int escapedJsonBytes(Object value) {
|
||||||
|
return JSON.toJson(JSON.toJson(value)).getBytes(StandardCharsets.UTF_8).length;
|
||||||
|
}
|
||||||
|
private static final class InvokeBudget {
|
||||||
|
long remaining;
|
||||||
|
InvokeBudget(long remaining) { this.remaining = Math.max(0, remaining); }
|
||||||
|
boolean admit(Map<String, Object> site) {
|
||||||
|
// Check a conservative two-layer escape bound before serialization.
|
||||||
|
long bound = 256;
|
||||||
|
for (Object value : site.values())
|
||||||
|
if (value instanceof String text) bound += 12L * text.length();
|
||||||
|
if (bound > remaining) return false;
|
||||||
|
long bytes = escapedJsonBytes(site) - 2L + 1L;
|
||||||
|
if (bytes > remaining) return false;
|
||||||
|
remaining -= bytes;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private record DirectInvokes(List<Map<String, Object>> sites, boolean exhaustive) {}
|
||||||
|
|
||||||
|
/** Raw DEX invokes within one JADX using method; offsets are code units from its code start. */
|
||||||
|
private static DirectInvokes directInvokes(JavaMethod source, MethodInfo target, InvokeBudget budget) {
|
||||||
|
MethodNode node = source.getMethodNode();
|
||||||
|
ICodeReader code = node.getCodeReader();
|
||||||
|
if (code == null) return null;
|
||||||
|
List<Map<String, Object>> sites = new ArrayList<>();
|
||||||
|
boolean[] exhaustive = {true};
|
||||||
|
code.visitInstructions(insn -> {
|
||||||
|
insn.decode();
|
||||||
|
if (insn.getIndexType() != InsnIndexType.METHOD_REF) return;
|
||||||
|
Opcode opcode = insn.getOpcode();
|
||||||
|
if (!opcode.name().startsWith("INVOKE_")) return;
|
||||||
|
IMethodRef ref = insn.getIndexAsMethod();
|
||||||
|
ref.load();
|
||||||
|
if (!MethodInfo.fromRef(node.root(), ref).getRawFullId().equals(target.getRawFullId())) return;
|
||||||
|
Map<String, Object> site = Map.of(
|
||||||
|
"dex_entry", node.getInputFileName(),
|
||||||
|
"source_raw_method_id", node.getMethodInfo().getRawFullId(),
|
||||||
|
"dex_code_unit_offset", insn.getOffset(),
|
||||||
|
"dex_method_index", insn.getIndex(),
|
||||||
|
"opcode", opcode.name());
|
||||||
|
if (budget.admit(site)) sites.add(site);
|
||||||
|
else exhaustive[0] = false;
|
||||||
|
});
|
||||||
|
return new DirectInvokes(sites, exhaustive[0]);
|
||||||
|
}
|
||||||
|
|
||||||
private CallToolResult handle(String name, JsonObject args) {
|
private CallToolResult handle(String name, JsonObject args) {
|
||||||
if (name.equals("rea_jvm_status")) return json(Map.of(
|
if (name.equals("rea_jvm_status")) return json(Map.of(
|
||||||
"engine_reported_version", BuildInfo.VERSION,
|
"engine_reported_version", BuildInfo.VERSION,
|
||||||
@@ -173,17 +236,52 @@ class ReaJadxBridge {
|
|||||||
}
|
}
|
||||||
List<JavaNode> uses;
|
List<JavaNode> uses;
|
||||||
String target = string(args, "class_name");
|
String target = string(args, "class_name");
|
||||||
|
MethodSnapshot selectedMethod = null;
|
||||||
|
int overloadIndex = 0;
|
||||||
if (name.equals("get_xrefs_to_class")) uses = cls.node().getUseIn();
|
if (name.equals("get_xrefs_to_class")) uses = cls.node().getUseIn();
|
||||||
else {
|
else {
|
||||||
List<MethodSnapshot> overloads = methods(cls, args);
|
List<MethodSnapshot> overloads = methods(cls, args);
|
||||||
if (overloads.size() != 1) throw new InputFailure("method_name", "Method references require a unique overload");
|
if (overloads.size() != 1 && !args.containsKey("overload_index"))
|
||||||
target += "." + overloads.get(0).name();
|
throw new InputFailure("overload_index", "Select one of " + overloads.size() + " method overloads");
|
||||||
uses = method(cls, overloads.get(0)).getUseIn();
|
overloadIndex = integer(args, "overload_index", 0);
|
||||||
|
if (overloadIndex >= overloads.size())
|
||||||
|
throw new InputFailure("overload_index", "overload_index out of range: " + overloadIndex);
|
||||||
|
selectedMethod = overloads.get(overloadIndex);
|
||||||
|
target += "." + selectedMethod.name();
|
||||||
|
uses = method(cls, selectedMethod).getUseIn();
|
||||||
}
|
}
|
||||||
// REA consumes all references without materializing source line information.
|
// REA consumes all references without materializing source line information.
|
||||||
List<Map<String, Object>> items = uses.stream().map(node -> current.describeUsage(node, false)).toList();
|
MethodInfo targetInfo = selectedMethod == null ? null : method(cls, selectedMethod).getMethodNode().getMethodInfo();
|
||||||
return json(Map.of("target", target, "total", uses.size(), "count", items.size(),
|
List<Map<String, Object>> items = uses.stream().map(node -> {
|
||||||
"resolve_line", false, "items", items));
|
Map<String, Object> item = new LinkedHashMap<>(current.describeUsage(node, false));
|
||||||
|
if (targetInfo != null && node instanceof JavaMethod) {
|
||||||
|
item.put("direct_invokes", List.of());
|
||||||
|
item.put("direct_invokes_exhaustive", false);
|
||||||
|
}
|
||||||
|
return item;
|
||||||
|
}).toList();
|
||||||
|
Map<String, Object> result = new LinkedHashMap<>(Map.of("target", target,
|
||||||
|
"total", uses.size(), "count", items.size(), "resolve_line", false, "items", items));
|
||||||
|
if (selectedMethod != null) {
|
||||||
|
result.put("overload_index", overloadIndex);
|
||||||
|
result.put("reported_signature", selectedMethod.summary().get("signature"));
|
||||||
|
}
|
||||||
|
if (targetInfo != null) {
|
||||||
|
InvokeBudget budget = new InvokeBudget(MAX_XREF_TEXT_BYTES - escapedJsonBytes(result));
|
||||||
|
for (int index = 0; index < uses.size(); index++) {
|
||||||
|
if (!(uses.get(index) instanceof JavaMethod source)) continue;
|
||||||
|
DirectInvokes invokes = directInvokes(source, targetInfo, budget);
|
||||||
|
Map<String, Object> item = items.get(index);
|
||||||
|
if (invokes == null) {
|
||||||
|
item.remove("direct_invokes");
|
||||||
|
item.remove("direct_invokes_exhaustive");
|
||||||
|
} else {
|
||||||
|
item.put("direct_invokes", invokes.sites());
|
||||||
|
item.put("direct_invokes_exhaustive", invokes.exhaustive());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return json(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
@@ -217,7 +315,7 @@ class ReaJadxBridge {
|
|||||||
List<String> fields = switch (name) {
|
List<String> fields = switch (name) {
|
||||||
case "list_classes" -> List.of("offset", "limit");
|
case "list_classes" -> List.of("offset", "limit");
|
||||||
case "get_method_body" -> List.of("class_name", "method_name", "overload_index");
|
case "get_method_body" -> List.of("class_name", "method_name", "overload_index");
|
||||||
case "get_xrefs_to_method" -> List.of("class_name", "method_name");
|
case "get_xrefs_to_method" -> List.of("class_name", "method_name", "overload_index");
|
||||||
default -> List.of("class_name");
|
default -> List.of("class_name");
|
||||||
};
|
};
|
||||||
Map<String, kotlinx.serialization.json.JsonElement> properties = new LinkedHashMap<>();
|
Map<String, kotlinx.serialization.json.JsonElement> properties = new LinkedHashMap<>();
|
||||||
@@ -226,7 +324,7 @@ class ReaJadxBridge {
|
|||||||
case "list_classes" -> "Indexed pages of all top-level class names, with offset and limit.";
|
case "list_classes" -> "Indexed pages of all top-level class names, with offset and limit.";
|
||||||
case "get_class_summary" -> "Parsed member metadata for one exact class name; no source generation.";
|
case "get_class_summary" -> "Parsed member metadata for one exact class name; no source generation.";
|
||||||
case "get_method_body" -> "Source for an exact class and stable same-name overload index; static initializers use smali to preserve folded field initialization.";
|
case "get_method_body" -> "Source for an exact class and stable same-name overload index; static initializers use smali to preserve folded field initialization.";
|
||||||
default -> "Complete static references to an exact class or unique method; source lines are unresolved.";
|
default -> "Complete static using-node inventory for an exact class or selected method overload; one node may contain multiple invoke instructions, and source lines are unresolved.";
|
||||||
};
|
};
|
||||||
Tool narrowed = new Tool(name, new ToolSchema(null, new JsonObject(properties),
|
Tool narrowed = new Tool(name, new ToolSchema(null, new JsonObject(properties),
|
||||||
tool.getInputSchema().getRequired(), null), description, null, null, null, null, null, null);
|
tool.getInputSchema().getRequired(), null), description, null, null, null, null, null, null);
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import java.net.UnixDomainSocketAddress;
|
|||||||
import java.nio.channels.Channels;
|
import java.nio.channels.Channels;
|
||||||
import java.nio.channels.ServerSocketChannel;
|
import java.nio.channels.ServerSocketChannel;
|
||||||
import java.nio.channels.SocketChannel;
|
import java.nio.channels.SocketChannel;
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
import java.nio.charset.CharacterCodingException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.AtomicMoveNotSupportedException;
|
import java.nio.file.AtomicMoveNotSupportedException;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
@@ -22,8 +24,11 @@ import java.nio.file.StandardCopyOption;
|
|||||||
import java.nio.file.StandardOpenOption;
|
import java.nio.file.StandardOpenOption;
|
||||||
import java.nio.file.attribute.PosixFilePermissions;
|
import java.nio.file.attribute.PosixFilePermissions;
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
|
import java.util.ArrayDeque;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.IdentityHashMap;
|
import java.util.IdentityHashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@@ -52,6 +57,8 @@ import ghidra.app.decompiler.DecompiledFunction;
|
|||||||
import ghidra.app.decompiler.ClangCaseToken;
|
import ghidra.app.decompiler.ClangCaseToken;
|
||||||
import ghidra.app.decompiler.ClangNode;
|
import ghidra.app.decompiler.ClangNode;
|
||||||
import ghidra.framework.Application;
|
import ghidra.framework.Application;
|
||||||
|
import ghidra.app.util.bin.format.pdb.PdbParserConstants;
|
||||||
|
import ghidra.framework.options.Options;
|
||||||
import ghidra.program.model.address.Address;
|
import ghidra.program.model.address.Address;
|
||||||
import ghidra.program.model.address.AddressIterator;
|
import ghidra.program.model.address.AddressIterator;
|
||||||
import ghidra.program.model.address.AddressSet;
|
import ghidra.program.model.address.AddressSet;
|
||||||
@@ -82,6 +89,7 @@ import ghidra.program.model.address.SegmentedAddress;
|
|||||||
import ghidra.program.model.reloc.Relocation;
|
import ghidra.program.model.reloc.Relocation;
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import ghidra.program.model.symbol.Namespace;
|
import ghidra.program.model.symbol.Namespace;
|
||||||
|
import ghidra.program.model.symbol.FlowType;
|
||||||
import ghidra.program.model.symbol.RefType;
|
import ghidra.program.model.symbol.RefType;
|
||||||
import ghidra.program.model.symbol.Reference;
|
import ghidra.program.model.symbol.Reference;
|
||||||
import ghidra.program.model.symbol.ReferenceIterator;
|
import ghidra.program.model.symbol.ReferenceIterator;
|
||||||
@@ -100,12 +108,19 @@ import ghidra.program.model.pcode.PcodeBlock;
|
|||||||
import ghidra.program.model.pcode.PcodeBlockBasic;
|
import ghidra.program.model.pcode.PcodeBlockBasic;
|
||||||
import ghidra.program.model.pcode.Varnode;
|
import ghidra.program.model.pcode.Varnode;
|
||||||
import ghidra.program.model.pcode.VarnodeAST;
|
import ghidra.program.model.pcode.VarnodeAST;
|
||||||
|
import ghidra.program.util.ContextEvaluatorAdapter;
|
||||||
|
import ghidra.program.util.SymbolicPropogator;
|
||||||
|
import ghidra.program.util.VarnodeContext;
|
||||||
|
|
||||||
public final class ReaGhidraBridge extends HeadlessScript {
|
public final class ReaGhidraBridge extends HeadlessScript {
|
||||||
|
// At most 24 KiB after worst-case JSON escaping (six bytes per UTF-16 unit).
|
||||||
|
private static final int PDB_ATTRIBUTE_UTF16_BUDGET = 4096;
|
||||||
private static final int MAX_HIGH_PCODE_OPS = 3000;
|
private static final int MAX_HIGH_PCODE_OPS = 3000;
|
||||||
private static final int MAX_HIGH_PCODE_INPUTS_PER_OP = 64;
|
private static final int MAX_HIGH_PCODE_INPUTS_PER_OP = 64;
|
||||||
private static final int MAX_HIGH_PCODE_DEF_USE_EDGES = 12000;
|
private static final int MAX_HIGH_PCODE_DEF_USE_EDGES = 12000;
|
||||||
private static final Gson GSON = new GsonBuilder().serializeNulls().create();
|
private static final Gson GSON = new GsonBuilder().serializeNulls().create();
|
||||||
|
private final Map<FileBytes, Boolean> targetSourceIdentity = new IdentityHashMap<>();
|
||||||
|
private String admittedTargetSha256;
|
||||||
private static final Set<String> DESCRIPTOR_KEYS = Set.of(
|
private static final Set<String> DESCRIPTOR_KEYS = Set.of(
|
||||||
"transport",
|
"transport",
|
||||||
"endpoint_path",
|
"endpoint_path",
|
||||||
@@ -127,6 +142,7 @@ public final class ReaGhidraBridge extends HeadlessScript {
|
|||||||
"set_addresses_names",
|
"set_addresses_names",
|
||||||
"inspect_native_load_image",
|
"inspect_native_load_image",
|
||||||
"read_bytes",
|
"read_bytes",
|
||||||
|
"search_bytes",
|
||||||
"address_to_file_offset",
|
"address_to_file_offset",
|
||||||
"ping",
|
"ping",
|
||||||
"shutdown",
|
"shutdown",
|
||||||
@@ -207,6 +223,7 @@ public final class ReaGhidraBridge extends HeadlessScript {
|
|||||||
"Ghidra imported-byte digest does not match the admitted target"
|
"Ghidra imported-byte digest does not match the admitted target"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
admittedTargetSha256 = descriptor.targetSha256;
|
||||||
// GhidraScript wraps run() in a transaction. End it before serving so
|
// GhidraScript wraps run() in a transaction. End it before serving so
|
||||||
// each edit owns a real outer transaction and can roll back immediately.
|
// each edit owns a real outer transaction and can roll back immediately.
|
||||||
end(true);
|
end(true);
|
||||||
@@ -363,6 +380,7 @@ public final class ReaGhidraBridge extends HeadlessScript {
|
|||||||
return switch (request.method) {
|
return switch (request.method) {
|
||||||
case "inspect_native_load_image" -> inspectNativeLoadImage(request.params);
|
case "inspect_native_load_image" -> inspectNativeLoadImage(request.params);
|
||||||
case "read_bytes" -> readMemoryBytes(request.params);
|
case "read_bytes" -> readMemoryBytes(request.params);
|
||||||
|
case "search_bytes" -> searchMemoryBytes(request.params, descriptor);
|
||||||
case "address_to_file_offset" -> addressToFileOffset(request.params);
|
case "address_to_file_offset" -> addressToFileOffset(request.params);
|
||||||
case "address_name" -> addressName(request.params);
|
case "address_name" -> addressName(request.params);
|
||||||
case "list_documents" -> listDocuments(request.params);
|
case "list_documents" -> listDocuments(request.params);
|
||||||
@@ -443,6 +461,7 @@ public final class ReaGhidraBridge extends HeadlessScript {
|
|||||||
.toArray(String[]::new)
|
.toArray(String[]::new)
|
||||||
));
|
));
|
||||||
result.add("target", target);
|
result.add("target", target);
|
||||||
|
result.add("pdb", pdbObservation());
|
||||||
JsonArray extensions = analysisExtensions.reports();
|
JsonArray extensions = analysisExtensions.reports();
|
||||||
if (extensions.size() > 0) result.add("analysis_extensions", extensions);
|
if (extensions.size() > 0) result.add("analysis_extensions", extensions);
|
||||||
// Written by ReaGhidraApplySeeds before auto-analysis; REA checks it
|
// Written by ReaGhidraApplySeeds before auto-analysis; REA checks it
|
||||||
@@ -458,6 +477,41 @@ public final class ReaGhidraBridge extends HeadlessScript {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Read loader/analyzer-owned facts without searching for or applying companions. */
|
||||||
|
private JsonObject pdbObservation() {
|
||||||
|
Options info = currentProgram.getOptions(ghidra.program.model.listing.Program.PROGRAM_INFO);
|
||||||
|
JsonObject pdb = new JsonObject();
|
||||||
|
String[] names = {"file", "guid", "age", "signature", "version"};
|
||||||
|
String[] attributes = {
|
||||||
|
PdbParserConstants.PDB_FILE, PdbParserConstants.PDB_GUID,
|
||||||
|
PdbParserConstants.PDB_AGE, PdbParserConstants.PDB_SIGNATURE,
|
||||||
|
PdbParserConstants.PDB_VERSION
|
||||||
|
};
|
||||||
|
int remaining = PDB_ATTRIBUTE_UTF16_BUDGET;
|
||||||
|
JsonArray omitted = new JsonArray();
|
||||||
|
for (int index = 0; index < names.length; index++) {
|
||||||
|
String value = info.getString(attributes[index], null);
|
||||||
|
if (value != null && value.length() > remaining) {
|
||||||
|
omitted.add(names[index]);
|
||||||
|
pdb.add(names[index], JsonNull.INSTANCE);
|
||||||
|
} else {
|
||||||
|
pdb.addProperty(names[index], value);
|
||||||
|
if (value != null) remaining -= value.length();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (omitted.size() > 0) {
|
||||||
|
JsonObject limit = new JsonObject();
|
||||||
|
limit.addProperty("utf16_budget", PDB_ATTRIBUTE_UTF16_BUDGET);
|
||||||
|
limit.add("omitted_attributes", omitted);
|
||||||
|
pdb.add("resource_limit", limit);
|
||||||
|
}
|
||||||
|
if (info.contains(PdbParserConstants.PDB_LOADED))
|
||||||
|
pdb.addProperty("loaded", info.getBoolean(PdbParserConstants.PDB_LOADED, false));
|
||||||
|
else
|
||||||
|
pdb.add("loaded", JsonNull.INSTANCE);
|
||||||
|
return pdb;
|
||||||
|
}
|
||||||
|
|
||||||
private static String bytesHex(byte[] bytes) {
|
private static String bytesHex(byte[] bytes) {
|
||||||
return java.util.HexFormat.of().formatHex(bytes);
|
return java.util.HexFormat.of().formatHex(bytes);
|
||||||
}
|
}
|
||||||
@@ -633,24 +687,173 @@ public final class ReaGhidraBridge extends HeadlessScript {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private JsonObject addressToFileOffset(JsonObject params) {
|
private JsonObject searchMemoryBytes(JsonObject params, SessionDescriptor descriptor) throws Exception {
|
||||||
|
// mask, start, end, and cursor are omitted when absent; JSON encoding drops those keys.
|
||||||
|
Set<String> keys = params.keySet();
|
||||||
|
if (!keys.containsAll(Set.of("document", "pattern", "limit")) ||
|
||||||
|
!Set.of("document", "pattern", "mask", "start", "end", "limit", "cursor").containsAll(keys))
|
||||||
|
throw new RequestFailure("invalid_request", "Bridge request fields are invalid");
|
||||||
|
requireDocument(params);
|
||||||
|
// Public input validation owns the grammar; validate again at the socket boundary.
|
||||||
|
String pattern = requireString(params, "pattern").replaceAll("[\\s\\p{Z}\\uFEFF]", "");
|
||||||
|
String mask = params.has("mask") ? requireString(params, "mask") : null;
|
||||||
|
if (mask != null) mask = mask.replaceAll("[\\s\\p{Z}\\uFEFF]", "");
|
||||||
|
if (pattern.isEmpty() || pattern.length() % 2 != 0 ||
|
||||||
|
(mask != null && mask.length() != pattern.length()))
|
||||||
|
throw new RequestFailure("invalid_request", "Mask length must equal a nonempty byte pattern length");
|
||||||
|
byte[] bytes = new byte[pattern.length() / 2];
|
||||||
|
byte[] masks = new byte[bytes.length];
|
||||||
|
boolean constrained = false;
|
||||||
|
for (int index = 0; index < bytes.length; index++) {
|
||||||
|
monitor.checkCancelled();
|
||||||
|
String pair = pattern.substring(index * 2, index * 2 + 2);
|
||||||
|
if ((!pair.equals("??") && !isHexadecimal(pair, 0, 2)) ||
|
||||||
|
(mask != null && !isHexadecimal(mask, index * 2, index * 2 + 2)))
|
||||||
|
throw new RequestFailure("invalid_request", "Use hexadecimal byte pairs or ?? wildcards");
|
||||||
|
int selected = mask == null ? 255 : Integer.parseInt(mask.substring(index * 2, index * 2 + 2), 16);
|
||||||
|
bytes[index] = (byte) (pair.equals("??") ? 0 : Integer.parseInt(pair, 16));
|
||||||
|
masks[index] = (byte) (pair.equals("??") ? 0 : selected);
|
||||||
|
constrained |= masks[index] != 0;
|
||||||
|
}
|
||||||
|
if (!constrained) throw new RequestFailure("invalid_request", "Pattern must constrain at least one bit");
|
||||||
|
int limit = requireBoundedInteger(params, "limit", 1, 1000);
|
||||||
|
Address start = params.has("start") ? requireAddress(params, "start") : null;
|
||||||
|
Address end = params.has("end") ? requireAddress(params, "end") : null;
|
||||||
|
if (start != null && end != null &&
|
||||||
|
(!start.getAddressSpace().equals(end.getAddressSpace()) || start.compareTo(end) > 0))
|
||||||
|
throw new RequestFailure("invalid_request", "Search bounds must be ordered in one address space");
|
||||||
|
JsonArray identity = new JsonArray();
|
||||||
|
for (String value : new String[] { descriptor.targetSha256, descriptor.profileDigest,
|
||||||
|
bytesHex(bytes), bytesHex(masks), start == null ? "" : canonicalAddress(start),
|
||||||
|
end == null ? "" : canonicalAddress(end), optionalString(params, "document") }) identity.add(value);
|
||||||
|
String binding = bytesHex(MessageDigest.getInstance("SHA-256").digest(identity.toString().getBytes(StandardCharsets.UTF_8)));
|
||||||
|
String cursor = params.has("cursor") ? requireString(params, "cursor") : null;
|
||||||
|
Address resume = null;
|
||||||
|
if (cursor != null) {
|
||||||
|
if (!cursor.startsWith(binding + ":"))
|
||||||
|
throw new RequestFailure("invalid_request", "Byte search cursor does not match the target and query");
|
||||||
|
resume = parseReaAddress(cursor.substring(binding.length() + 1));
|
||||||
|
MemoryBlock resumedBlock = currentProgram.getMemory().getBlock(resume);
|
||||||
|
Address bound = start == null ? end : start;
|
||||||
|
if (resumedBlock == null || !resumedBlock.isInitialized() ||
|
||||||
|
(bound != null && !bound.getAddressSpace().equals(resume.getAddressSpace())) ||
|
||||||
|
(start != null && resume.compareTo(start) < 0) ||
|
||||||
|
(end != null && resume.compareTo(end) > 0))
|
||||||
|
throw new RequestFailure("invalid_request", "Byte search cursor lies outside initialized query memory");
|
||||||
|
}
|
||||||
|
List<MemoryBlock> ordered = new ArrayList<>(List.of(currentProgram.getMemory().getBlocks()));
|
||||||
|
ordered.sort(Comparator.comparing(MemoryBlock::getStart));
|
||||||
|
JsonArray matches = new JsonArray();
|
||||||
|
JsonArray blocks = new JsonArray();
|
||||||
|
JsonArray skipped = new JsonArray();
|
||||||
|
JsonArray notLoaded = new JsonArray();
|
||||||
|
long covered = 0;
|
||||||
|
String next = null;
|
||||||
|
for (MemoryBlock block : ordered) {
|
||||||
|
monitor.checkCancelled();
|
||||||
|
Address low = block.getStart();
|
||||||
|
Address high = block.getEnd();
|
||||||
|
Address bound = start == null ? end : start;
|
||||||
|
if (bound != null && !bound.getAddressSpace().equals(low.getAddressSpace())) continue;
|
||||||
|
// Without bounds, search loaded memory only. Non-loaded file parts
|
||||||
|
// (such as .symtab) and overlays stay reachable through explicit bounds.
|
||||||
|
if (bound == null && (!block.isLoaded() || block.isOverlay())) {
|
||||||
|
notLoaded.add(byteSearchCoverage(block, low, high));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (start != null && low.compareTo(start) < 0) low = start;
|
||||||
|
if (end != null && high.compareTo(end) > 0) high = end;
|
||||||
|
if (low.compareTo(high) > 0) continue;
|
||||||
|
if (!block.isInitialized()) {
|
||||||
|
skipped.add(byteSearchCoverage(block, low, high));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (next != null) continue;
|
||||||
|
if (resume != null && low.compareTo(resume) < 0) low = resume;
|
||||||
|
if (low.compareTo(high) > 0 || !low.getAddressSpace().equals(high.getAddressSpace())) continue;
|
||||||
|
Address at = low;
|
||||||
|
Address examinedEnd = high;
|
||||||
|
while (at != null && at.compareTo(high) <= 0 && high.subtract(at) >= bytes.length - 1L) {
|
||||||
|
monitor.checkCancelled();
|
||||||
|
// Ghidra's end address bounds candidate starts, not the final matched byte.
|
||||||
|
Address found = currentProgram.getMemory().findBytes(at, high.subtract(bytes.length - 1L), bytes, masks, true, monitor);
|
||||||
|
monitor.checkCancelled();
|
||||||
|
if (found == null || high.subtract(found) < bytes.length - 1L) break;
|
||||||
|
if (matches.size() == limit) {
|
||||||
|
next = binding + ":" + canonicalAddress(found);
|
||||||
|
examinedEnd = found.addNoWrap(bytes.length - 1L);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
JsonObject match = new JsonObject();
|
||||||
|
match.addProperty("address", canonicalAddress(found));
|
||||||
|
match.addProperty("segment", block.getName());
|
||||||
|
Long offset = targetFileOffset(block, found).offset();
|
||||||
|
match.add("file_offset", offset == null ? JsonNull.INSTANCE : GSON.toJsonTree(offset));
|
||||||
|
Function function = currentProgram.getFunctionManager().getFunctionContaining(found);
|
||||||
|
JsonObject procedure = new JsonObject();
|
||||||
|
if (function != null) {
|
||||||
|
procedure.addProperty("address", canonicalAddress(function.getEntryPoint()));
|
||||||
|
procedure.addProperty("name", function.getName(true));
|
||||||
|
}
|
||||||
|
match.add("procedure", function == null ? JsonNull.INSTANCE : procedure);
|
||||||
|
matches.add(match);
|
||||||
|
at = found.next();
|
||||||
|
}
|
||||||
|
JsonObject coverage = byteSearchCoverage(block, low, examinedEnd);
|
||||||
|
covered = Math.addExact(covered, coverage.get("bytes").getAsLong());
|
||||||
|
blocks.add(coverage);
|
||||||
|
}
|
||||||
|
JsonObject searched = new JsonObject();
|
||||||
|
searched.add("blocks", blocks);
|
||||||
|
searched.addProperty("bytes", covered);
|
||||||
|
searched.add("skipped_uninitialized", skipped);
|
||||||
|
searched.add("skipped_not_loaded", notLoaded);
|
||||||
|
JsonObject result = new JsonObject();
|
||||||
|
result.add("matches", matches);
|
||||||
|
result.add("searched", searched);
|
||||||
|
result.addProperty("complete", next == null);
|
||||||
|
result.add("next_cursor", next == null ? JsonNull.INSTANCE : GSON.toJsonTree(next));
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static JsonObject byteSearchCoverage(MemoryBlock block, Address low, Address high) {
|
||||||
|
JsonObject result = new JsonObject();
|
||||||
|
result.addProperty("segment", block.getName());
|
||||||
|
result.addProperty("start", canonicalAddress(low));
|
||||||
|
result.addProperty("end", canonicalAddress(high));
|
||||||
|
result.addProperty("bytes", high.subtract(low) + 1);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private record TargetFileOffset(Long offset, int mappings) {}
|
||||||
|
|
||||||
|
private TargetFileOffset targetFileOffset(MemoryBlock block, Address address) throws Exception {
|
||||||
|
Long offset = null;
|
||||||
|
int mappings = 0;
|
||||||
|
for (MemoryBlockSourceInfo source : block.getSourceInfos()) {
|
||||||
|
if (!source.contains(address) || source.getFileBytes().isEmpty() ||
|
||||||
|
!isTargetSource(source.getFileBytes().get())) continue;
|
||||||
|
long candidate = source.getFileBytesOffset(address);
|
||||||
|
if (candidate < 0) continue;
|
||||||
|
offset = candidate;
|
||||||
|
mappings++;
|
||||||
|
}
|
||||||
|
return new TargetFileOffset(mappings == 1 && offset <= 9007199254740991L ? offset : null, mappings);
|
||||||
|
}
|
||||||
|
|
||||||
|
private JsonObject addressToFileOffset(JsonObject params) throws Exception {
|
||||||
requireKeys(params, Set.of("document", "address"));
|
requireKeys(params, Set.of("document", "address"));
|
||||||
requireDocument(params);
|
requireDocument(params);
|
||||||
Address address = requireAddress(params, "address");
|
Address address = requireAddress(params, "address");
|
||||||
MemoryBlock block = currentProgram.getMemory().getBlock(address);
|
MemoryBlock block = currentProgram.getMemory().getBlock(address);
|
||||||
if (block == null || !block.isInitialized())
|
if (block == null || !block.isInitialized())
|
||||||
throw new RequestFailure("invalid_request", "Address has no initialized file-backed memory: " + canonicalAddress(address));
|
throw new RequestFailure("invalid_request", "Address has no initialized file-backed memory: " + canonicalAddress(address));
|
||||||
Long fileOffset = null;
|
TargetFileOffset mapping = targetFileOffset(block, address);
|
||||||
int mappings = 0;
|
if (mapping.mappings() != 1)
|
||||||
for (MemoryBlockSourceInfo source : block.getSourceInfos()) {
|
throw new RequestFailure("invalid_request", "Address has " + mapping.mappings() + " authoritative target-file mappings: " + canonicalAddress(address));
|
||||||
if (!source.contains(address) || source.getFileBytes().isEmpty()) continue;
|
Long fileOffset = mapping.offset();
|
||||||
long offset = source.getFileBytesOffset(address);
|
if (fileOffset == null)
|
||||||
if (offset < 0) continue;
|
throw new RequestFailure("invalid_request", "Address lacks a safe file offset: " + canonicalAddress(address));
|
||||||
fileOffset = offset;
|
|
||||||
mappings++;
|
|
||||||
}
|
|
||||||
if (mappings != 1)
|
|
||||||
throw new RequestFailure("invalid_request", "Address has " + mappings + " authoritative source mappings: " + canonicalAddress(address));
|
|
||||||
JsonObject result = new JsonObject();
|
JsonObject result = new JsonObject();
|
||||||
result.addProperty("address", canonicalAddress(address));
|
result.addProperty("address", canonicalAddress(address));
|
||||||
result.addProperty("file_offset", fileOffset);
|
result.addProperty("file_offset", fileOffset);
|
||||||
@@ -673,14 +876,96 @@ public final class ReaGhidraBridge extends HeadlessScript {
|
|||||||
private JsonElement procedurePseudocode(JsonObject params) throws Exception {
|
private JsonElement procedurePseudocode(JsonObject params) throws Exception {
|
||||||
requireKeys(params, Set.of("document", "procedure"));
|
requireKeys(params, Set.of("document", "procedure"));
|
||||||
requireDocument(params);
|
requireDocument(params);
|
||||||
Function function = resolveProcedure(requireString(params, "procedure"));
|
String selector = requireString(params, "procedure");
|
||||||
String value = decompiledText(decompile(function));
|
JsonObject selection = new JsonObject();
|
||||||
return functionObservation(
|
Function function = resolveDecompileProcedure(selector, selection);
|
||||||
value == null ? JsonNull.INSTANCE : GSON.toJsonTree(value),
|
try {
|
||||||
noReturnCallLimitations(
|
String value = decompiledText(decompile(function));
|
||||||
currentProgram.getListing().getInstructions(function.getBody(), true)
|
JsonObject result = functionObservation(
|
||||||
)
|
value == null ? JsonNull.INSTANCE : GSON.toJsonTree(value),
|
||||||
);
|
noReturnCallLimitations(
|
||||||
|
currentProgram.getListing().getInstructions(function.getBody(), true)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
if (selection.size() > 0) result.add("selection", selection);
|
||||||
|
return result;
|
||||||
|
} catch (RequestFailure failure) {
|
||||||
|
if (selection.size() == 0) throw failure;
|
||||||
|
// Preserve completed resolution facts without changing the backend's
|
||||||
|
// failure code or suggesting that the successful mapping was invalid.
|
||||||
|
throw new RequestFailure(failure.code, "Selector " + selector +
|
||||||
|
" mapped to analysis address " + selection.get("mapped_address").getAsString() +
|
||||||
|
" and procedure " + canonicalAddress(function.getEntryPoint()) +
|
||||||
|
"; " + failure.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Function resolveDecompileProcedure(String selector, JsonObject selection) throws Exception {
|
||||||
|
String prefix = "file-offset:";
|
||||||
|
boolean explicitOffset = selector.startsWith(prefix);
|
||||||
|
if (!explicitOffset) {
|
||||||
|
try {
|
||||||
|
return resolveProcedure(selector);
|
||||||
|
} catch (RequestFailure failure) {
|
||||||
|
// Existing names/addresses win. Only an unresolved numeric input
|
||||||
|
// can fall back to source coordinates; ambiguity never falls back.
|
||||||
|
if (!failure.code.equals("not_found") || !selector.matches("0x[0-9a-fA-F]+"))
|
||||||
|
throw failure;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String coordinate = explicitOffset ? selector.substring(prefix.length()) : selector;
|
||||||
|
if (!coordinate.matches("0x[0-9a-fA-F]+"))
|
||||||
|
throw new RequestFailure("invalid_request", "File offsets require hexadecimal file-offset:0x... syntax");
|
||||||
|
BigInteger parsed = new BigInteger(coordinate.substring(2), 16);
|
||||||
|
if (parsed.compareTo(BigInteger.valueOf(9007199254740991L)) > 0)
|
||||||
|
throw new RequestFailure("invalid_request", "File offset exceeds the exact JSON integer range");
|
||||||
|
long offset = parsed.longValueExact();
|
||||||
|
monitor.checkCancelled();
|
||||||
|
// Ghidra's convenience lookup spans every FileBytes and uses coordinates
|
||||||
|
// local to each object. Only a complete, digest-matched target source
|
||||||
|
// establishes that the caller's offset belongs to the admitted file.
|
||||||
|
Set<Address> mappedAddresses = new java.util.LinkedHashSet<>();
|
||||||
|
for (MemoryBlock block : currentProgram.getMemory().getBlocks()) {
|
||||||
|
for (MemoryBlockSourceInfo source : block.getSourceInfos()) {
|
||||||
|
monitor.checkCancelled();
|
||||||
|
FileBytes backing = source.getFileBytes().orElse(null);
|
||||||
|
if (backing == null || !isTargetSource(backing)) continue;
|
||||||
|
Address mapped = source.locateAddressForFileOffset(offset);
|
||||||
|
if (mapped != null) mappedAddresses.add(mapped);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<Address> candidates = new ArrayList<>(mappedAddresses);
|
||||||
|
if (candidates.size() > 1)
|
||||||
|
throw new RequestFailure("ambiguous", "File offset " + coordinate +
|
||||||
|
" has multiple loaded mappings: " + candidates.stream().map(ReaGhidraBridge::canonicalAddress).toList() +
|
||||||
|
"; select an explicit analysis address");
|
||||||
|
if (candidates.isEmpty())
|
||||||
|
throw new RequestFailure("not_found", "File offset " + coordinate +
|
||||||
|
" has no loaded source mapping for the admitted target file; Ghidra image base: " + canonicalAddress(currentProgram.getImageBase()) +
|
||||||
|
". Inspect mappings with rea inspect-native-load-image <path> --provider ghidra --json or MCP inspect_native_load_image.");
|
||||||
|
Address mapped = candidates.get(0);
|
||||||
|
Function function = functionAtOrContaining(mapped);
|
||||||
|
if (function == null)
|
||||||
|
throw new RequestFailure("not_found", "File offset " + coordinate +
|
||||||
|
" maps to analysis address " + canonicalAddress(mapped) +
|
||||||
|
", but no procedure starts at or contains that address in the current Ghidra analysis. " +
|
||||||
|
"Choose an observed procedure with CLI rea search <path> . --kind procedures --mode regex --provider ghidra --json or MCP list_procedures.");
|
||||||
|
selection.addProperty("file_offset", offset);
|
||||||
|
selection.addProperty("mapped_address", canonicalAddress(mapped));
|
||||||
|
selection.addProperty("procedure_address", canonicalAddress(function.getEntryPoint()));
|
||||||
|
return function;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isTargetSource(FileBytes source) throws Exception {
|
||||||
|
Boolean observed = targetSourceIdentity.get(source);
|
||||||
|
if (observed != null) return observed;
|
||||||
|
// Original FileBytes are immutable even when analysis memory is edited.
|
||||||
|
// Partial/auxiliary sources remain inspectable but cannot establish an
|
||||||
|
// original-target offset from their object-local coordinates alone.
|
||||||
|
boolean matched = source.getFileOffset() == 0 &&
|
||||||
|
constantTimeEquals(hashFileBytes(source, false), admittedTargetSha256);
|
||||||
|
targetSourceIdentity.put(source, matched);
|
||||||
|
return matched;
|
||||||
}
|
}
|
||||||
|
|
||||||
private JsonElement procedureAssembly(JsonObject params) throws Exception {
|
private JsonElement procedureAssembly(JsonObject params) throws Exception {
|
||||||
@@ -718,7 +1003,7 @@ public final class ReaGhidraBridge extends HeadlessScript {
|
|||||||
return functionObservation(result, boundaryLimitations);
|
return functionObservation(result, boundaryLimitations);
|
||||||
}
|
}
|
||||||
|
|
||||||
private JsonArray procedureCalls(JsonObject params, boolean callers) throws Exception {
|
private JsonObject procedureCalls(JsonObject params, boolean callers) throws Exception {
|
||||||
requireKeys(params, Set.of("document", "procedure"));
|
requireKeys(params, Set.of("document", "procedure"));
|
||||||
requireDocument(params);
|
requireDocument(params);
|
||||||
Function function = resolveProcedure(requireString(params, "procedure"));
|
Function function = resolveProcedure(requireString(params, "procedure"));
|
||||||
@@ -731,7 +1016,12 @@ public final class ReaGhidraBridge extends HeadlessScript {
|
|||||||
for (Function item : ordered) {
|
for (Function item : ordered) {
|
||||||
result.add(canonicalAddress(item.getEntryPoint()));
|
result.add(canonicalAddress(item.getEntryPoint()));
|
||||||
}
|
}
|
||||||
return result;
|
return functionObservation(
|
||||||
|
result,
|
||||||
|
noReturnCallLimitations(
|
||||||
|
currentProgram.getListing().getInstructions(function.getBody(), true)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private JsonObject procedureInfo(JsonObject params) throws Exception {
|
private JsonObject procedureInfo(JsonObject params) throws Exception {
|
||||||
@@ -1233,6 +1523,13 @@ public final class ReaGhidraBridge extends HeadlessScript {
|
|||||||
result.add("outgoing_references", outgoing);
|
result.add("outgoing_references", outgoing);
|
||||||
result.add("referenced_strings", referencedStrings);
|
result.add("referenced_strings", referencedStrings);
|
||||||
result.add("referenced_names", referencedNames);
|
result.add("referenced_names", referencedNames);
|
||||||
|
boolean swift = swiftProgram();
|
||||||
|
boolean aarch64 = currentProgram.getLanguageID().getIdAsString().startsWith("AARCH64:");
|
||||||
|
SwiftStringLiteralDecode swiftLiterals = swift && aarch64 ? swiftStringLiterals(function) : null;
|
||||||
|
if (swiftLiterals != null) {
|
||||||
|
result.add("swift_string_literals", swiftLiterals.literals());
|
||||||
|
result.add("swift_string_literal_omissions", swiftLiterals.omissions());
|
||||||
|
}
|
||||||
result.add("basic_blocks", blocks);
|
result.add("basic_blocks", blocks);
|
||||||
result.add(
|
result.add(
|
||||||
"native_api",
|
"native_api",
|
||||||
@@ -1252,6 +1549,20 @@ public final class ReaGhidraBridge extends HeadlessScript {
|
|||||||
limitations.add(
|
limitations.add(
|
||||||
"Synthetic Ghidra entry-point references without actionable memory sources are omitted."
|
"Synthetic Ghidra entry-point references without actionable memory sources are omitted."
|
||||||
);
|
);
|
||||||
|
if (swift && aarch64) {
|
||||||
|
limitations.add(
|
||||||
|
"Swift String literals are decoded from constant register pairs at calls, returns and paired stores; literals stored one word at a time, chosen by conditional selects, passed through unresolved jumps, or built at runtime are not reported."
|
||||||
|
);
|
||||||
|
if (swiftLiterals.omissions().size() > 0) {
|
||||||
|
limitations.add(
|
||||||
|
"Swift String literal records listed in swift_string_literal_omissions could not be retained or decoded within this dossier's remaining heap budget; later symbolic flows remain unexamined."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else if (swift) {
|
||||||
|
limitations.add(
|
||||||
|
"Swift String literal decoding is implemented for AArch64 register pairs only; no Swift literals were decoded for this architecture."
|
||||||
|
);
|
||||||
|
}
|
||||||
List<String> boundaryLimitations = noReturnCallLimitations(scan.instructions);
|
List<String> boundaryLimitations = noReturnCallLimitations(scan.instructions);
|
||||||
for (String limitation : boundaryLimitations) {
|
for (String limitation : boundaryLimitations) {
|
||||||
limitations.add(limitation);
|
limitations.add(limitation);
|
||||||
@@ -1833,14 +2144,25 @@ public final class ReaGhidraBridge extends HeadlessScript {
|
|||||||
Address address = explicitAddress ? parseReaAddress(value) : tryParseAddress(value);
|
Address address = explicitAddress ? parseReaAddress(value) : tryParseAddress(value);
|
||||||
if (address == null)
|
if (address == null)
|
||||||
throw new RequestFailure("not_found", "Unknown Ghidra procedure name or address: " + value);
|
throw new RequestFailure("not_found", "Unknown Ghidra procedure name or address: " + value);
|
||||||
Function function = currentProgram.getFunctionManager().getFunctionAt(address);
|
Function function = functionAtOrContaining(address);
|
||||||
if (function == null && address.isMemoryAddress())
|
|
||||||
function = currentProgram.getFunctionManager().getFunctionContaining(address);
|
|
||||||
if (function == null)
|
if (function == null)
|
||||||
throw new RequestFailure("not_found", "No procedure exists at the requested address: " + value);
|
// Other procedure operations retain their analysis-address semantics.
|
||||||
|
throw new RequestFailure("not_found", "No procedure exists at the requested address: " + value +
|
||||||
|
"; Ghidra image base: " + canonicalAddress(currentProgram.getImageBase()) +
|
||||||
|
". Choose an observed analysis address. CLI: rea search <path> . --kind procedures --mode regex --provider ghidra --json; " +
|
||||||
|
"MCP: list_procedures. Inspect the loaded base and source mappings with CLI rea analyze <path> --provider ghidra --json " +
|
||||||
|
"and rea inspect-native-load-image <path> --provider ghidra --json, or MCP binary_overview and inspect_native_load_image. " +
|
||||||
|
"Repeat the original target options. For decompile, select source coordinates explicitly with --file-offset=0x... or MCP procedure file-offset:0x....");
|
||||||
return function;
|
return function;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Function functionAtOrContaining(Address address) {
|
||||||
|
Function function = currentProgram.getFunctionManager().getFunctionAt(address);
|
||||||
|
return function == null && address.isMemoryAddress()
|
||||||
|
? currentProgram.getFunctionManager().getFunctionContaining(address)
|
||||||
|
: function;
|
||||||
|
}
|
||||||
|
|
||||||
private JsonObject nativeApiBoundary(
|
private JsonObject nativeApiBoundary(
|
||||||
Function function,
|
Function function,
|
||||||
DecompileResults decompilation
|
DecompileResults decompilation
|
||||||
@@ -3294,6 +3616,349 @@ public final class ReaGhidraBridge extends HeadlessScript {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean swiftProgram() {
|
||||||
|
for (MemoryBlock block : currentProgram.getMemory().getBlocks()) {
|
||||||
|
String name = block.getName();
|
||||||
|
if (name.startsWith("__swift5_") || name.startsWith("swift5_")) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Swift passes a String as two words: small literals carry their bytes in the words and
|
||||||
|
* immortal large literals carry their count and a biased pointer to the bytes. Ghidra keeps
|
||||||
|
* neither as a data reference, so decode constant pairs where Swift consumes them: argument
|
||||||
|
* and return registers at calls, tail calls and returns, and both registers of one STP.
|
||||||
|
* The canonical empty string is a small literal with a zero count.
|
||||||
|
*/
|
||||||
|
private SwiftStringLiteralDecode swiftStringLiterals(Function function) throws Exception {
|
||||||
|
Register[] registers = new Register[31];
|
||||||
|
for (int index = 0; index < registers.length; index++) {
|
||||||
|
registers[index] = currentProgram.getRegister("x" + index);
|
||||||
|
}
|
||||||
|
TreeMap<String, JsonObject> observed = new TreeMap<>();
|
||||||
|
TreeMap<String, JsonObject> omitted = new TreeMap<>();
|
||||||
|
SwiftLiteralBudget budget = new SwiftLiteralBudget();
|
||||||
|
Map<String, Boolean> selectedValues = new HashMap<>();
|
||||||
|
SymbolicPropogator propagator = new SymbolicPropogator(currentProgram, false);
|
||||||
|
propagator.flowConstants(function.getEntryPoint(), function.getBody(), new ContextEvaluatorAdapter() {
|
||||||
|
@Override
|
||||||
|
public boolean evaluateContextBefore(VarnodeContext context, Instruction instruction) {
|
||||||
|
// Returning true ends only the current flow, so every queued flow checks the shared stop.
|
||||||
|
if (budget.stopped()) return true;
|
||||||
|
for (Register[] pair : swiftStringPairs(function, instruction, registers)) {
|
||||||
|
Long word = registerConstant(context, pair[0]);
|
||||||
|
Long object = registerConstant(context, pair[1]);
|
||||||
|
if (word == null || object == null) continue;
|
||||||
|
SwiftLiteralLayout layout = swiftLiteralLayout(word, object);
|
||||||
|
if (layout == null) continue;
|
||||||
|
// A selected word can combine with a path-dependent ordinary move. Cache the
|
||||||
|
// provenance question per site/register, charging retained cache state to the
|
||||||
|
// same dossier budget before allocating it.
|
||||||
|
boolean selected = false;
|
||||||
|
boolean provenanceOverCapacity = false;
|
||||||
|
for (Register register : pair) {
|
||||||
|
String provenanceKey = canonicalAddress(instruction.getAddress()) + "\u0000" +
|
||||||
|
register.getBaseRegister().getName();
|
||||||
|
Boolean value = selectedValues.get(provenanceKey);
|
||||||
|
if (value == null) {
|
||||||
|
if (!budget.takeState()) {
|
||||||
|
provenanceOverCapacity = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
value = selectedValue(function, instruction, register);
|
||||||
|
selectedValues.put(provenanceKey, value);
|
||||||
|
}
|
||||||
|
if (value) {
|
||||||
|
selected = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (selected) continue;
|
||||||
|
// Forks can reach one site with different constants, so the words are part of the key.
|
||||||
|
String key = canonicalAddress(instruction.getAddress()) + "\u0000" + pair[0].getName() +
|
||||||
|
"\u0000" + pair[1].getName() + "\u0000" + Long.toUnsignedString(word, 16) +
|
||||||
|
"\u0000" + Long.toUnsignedString(object, 16);
|
||||||
|
if (observed.containsKey(key) || omitted.containsKey(key)) continue;
|
||||||
|
// Every record draws on the budget; the first one that does not fit is kept as an
|
||||||
|
// omission and decoding stops, so later sites are never examined.
|
||||||
|
String value = layout.smallValue();
|
||||||
|
boolean overCapacity = provenanceOverCapacity || !budget.take(layout.byteLength());
|
||||||
|
if (!overCapacity && value == null) {
|
||||||
|
try {
|
||||||
|
value = swiftLargeLiteralText(layout);
|
||||||
|
} catch (OutOfMemoryError exhausted) {
|
||||||
|
overCapacity = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (value == null && !overCapacity) continue;
|
||||||
|
JsonObject item = overCapacity
|
||||||
|
? swiftStringOmission(layout, word, object)
|
||||||
|
: swiftStringItem(value, layout, word, object);
|
||||||
|
item.addProperty("source_address", canonicalAddress(instruction.getAddress()));
|
||||||
|
JsonArray pairRegisters = new JsonArray();
|
||||||
|
pairRegisters.add(pair[0].getName());
|
||||||
|
pairRegisters.add(pair[1].getName());
|
||||||
|
item.add("registers", pairRegisters);
|
||||||
|
(overCapacity ? omitted : observed).put(key, item);
|
||||||
|
if (overCapacity) {
|
||||||
|
budget.stop();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}, false, monitor);
|
||||||
|
JsonArray literals = new JsonArray();
|
||||||
|
observed.values().forEach(literals::add);
|
||||||
|
JsonArray omissions = new JsonArray();
|
||||||
|
omitted.values().forEach(omissions::add);
|
||||||
|
return new SwiftStringLiteralDecode(literals, omissions);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<Register[]> swiftStringPairs(
|
||||||
|
Function function,
|
||||||
|
Instruction instruction,
|
||||||
|
Register[] registers
|
||||||
|
) {
|
||||||
|
List<Register[]> pairs = new ArrayList<>();
|
||||||
|
if (instruction.getMnemonicString().equals("stp")) {
|
||||||
|
Register first = instruction.getRegister(0);
|
||||||
|
Register second = instruction.getRegister(1);
|
||||||
|
if (first != null && second != null && first.getBitLength() == 64 && second.getBitLength() == 64) {
|
||||||
|
pairs.add(new Register[] {first, second});
|
||||||
|
}
|
||||||
|
return pairs;
|
||||||
|
}
|
||||||
|
FlowType flow = instruction.getFlowType();
|
||||||
|
boolean returns = false;
|
||||||
|
for (PcodeOp operation : instruction.getPcode()) {
|
||||||
|
if (operation.getOpcode() == PcodeOp.RETURN) returns = true;
|
||||||
|
}
|
||||||
|
// A jump is a proven tail call only when it has resolved targets and all leave the
|
||||||
|
// body. A targetless computed jump can still dispatch inside the function.
|
||||||
|
Address[] targets = instruction.getFlows();
|
||||||
|
boolean tailCall = flow.isJump() && !flow.isConditional() && targets.length > 0 &&
|
||||||
|
Arrays.stream(targets).allMatch(target -> !function.getBody().contains(target));
|
||||||
|
if (!flow.isCall() && !returns && !tailCall) return pairs;
|
||||||
|
// A String occupies two consecutive registers among x0-x7, or x0 and x1 when returned.
|
||||||
|
int lastFirstRegister = returns ? 0 : 6;
|
||||||
|
for (int index = 0; index <= lastFirstRegister; index++) {
|
||||||
|
pairs.add(new Register[] {registers[index], registers[index + 1]});
|
||||||
|
}
|
||||||
|
return pairs;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Long registerConstant(VarnodeContext context, Register register) {
|
||||||
|
Varnode value = context.getRegisterVarnodeValue(register);
|
||||||
|
return value != null && context.isConstant(value) ? value.getOffset() : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Search every predecessor path for the reaching definitions, following register copies,
|
||||||
|
// since a select copied into an argument register or defined before a branch forks just as
|
||||||
|
// independently as one written there directly.
|
||||||
|
private boolean selectedValue(Function function, Instruction use, Register register) {
|
||||||
|
ArrayDeque<Instruction> instructions = new ArrayDeque<>();
|
||||||
|
ArrayDeque<Register> targets = new ArrayDeque<>();
|
||||||
|
Set<String> visited = new HashSet<>();
|
||||||
|
for (Instruction predecessor : predecessors(function, use)) {
|
||||||
|
instructions.push(predecessor);
|
||||||
|
targets.push(register.getBaseRegister());
|
||||||
|
}
|
||||||
|
while (!instructions.isEmpty()) {
|
||||||
|
Instruction instruction = instructions.pop();
|
||||||
|
Register target = targets.pop();
|
||||||
|
if (!visited.add(canonicalAddress(instruction.getAddress()) + "\u0000" + target.getName())) continue;
|
||||||
|
boolean defines = false;
|
||||||
|
for (Object result : instruction.getResultObjects()) {
|
||||||
|
if (result instanceof Register written && written.getBaseRegister().equals(target)) defines = true;
|
||||||
|
}
|
||||||
|
Register next = target;
|
||||||
|
if (defines) {
|
||||||
|
PcodeOp[] operations = instruction.getPcode();
|
||||||
|
for (PcodeOp operation : operations) {
|
||||||
|
if (operation.getOpcode() == PcodeOp.CBRANCH && operation.getInput(0).isConstant()) return true;
|
||||||
|
}
|
||||||
|
Register source = copiedRegister(operations);
|
||||||
|
if (source == null) continue;
|
||||||
|
next = source.getBaseRegister();
|
||||||
|
}
|
||||||
|
for (Instruction predecessor : predecessors(function, instruction)) {
|
||||||
|
instructions.push(predecessor);
|
||||||
|
targets.push(next);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Instruction> predecessors(Function function, Instruction instruction) {
|
||||||
|
List<Instruction> result = new ArrayList<>();
|
||||||
|
Address from = instruction.getFallFrom();
|
||||||
|
if (from != null) {
|
||||||
|
Instruction previous = currentProgram.getListing().getInstructionAt(from);
|
||||||
|
if (previous != null) result.add(previous);
|
||||||
|
}
|
||||||
|
for (Reference reference : currentProgram.getReferenceManager().getReferencesTo(instruction.getAddress())) {
|
||||||
|
if (!reference.getReferenceType().isFlow() || reference.getReferenceType().isCall()) continue;
|
||||||
|
if (!function.getBody().contains(reference.getFromAddress())) continue;
|
||||||
|
Instruction source = currentProgram.getListing().getInstructionAt(reference.getFromAddress());
|
||||||
|
if (source != null) result.add(source);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Register copiedRegister(PcodeOp[] operations) {
|
||||||
|
if (operations.length != 1) return null;
|
||||||
|
int opcode = operations[0].getOpcode();
|
||||||
|
Varnode input = operations[0].getInput(0);
|
||||||
|
if ((opcode != PcodeOp.COPY && opcode != PcodeOp.INT_ZEXT) || input == null || !input.isRegister()) return null;
|
||||||
|
return currentProgram.getRegister(input);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Validate the ABI layout of a pair; a small literal is decoded here, a large one only located. */
|
||||||
|
private SwiftLiteralLayout swiftLiteralLayout(long word, long object) {
|
||||||
|
int discriminator = (int) (object >>> 60);
|
||||||
|
if (discriminator == 0xE || discriminator == 0xA) {
|
||||||
|
int count = (int) ((object >>> 56) & 0xF);
|
||||||
|
byte[] bytes = new byte[15];
|
||||||
|
for (int index = 0; index < 8; index++) bytes[index] = (byte) (word >>> (8 * index));
|
||||||
|
for (int index = 0; index < 7; index++) bytes[8 + index] = (byte) (object >>> (8 * index));
|
||||||
|
for (int index = count; index < bytes.length; index++) {
|
||||||
|
if (bytes[index] != 0) return null;
|
||||||
|
}
|
||||||
|
// Count zero is the canonical empty string (object 0xE000000000000000, word 0).
|
||||||
|
String value = swiftStringText(bytes, count, discriminator == 0xE);
|
||||||
|
return value == null ? null : new SwiftLiteralLayout("small", null, count, true, value);
|
||||||
|
}
|
||||||
|
int flags = (int) (word >>> 60);
|
||||||
|
long count = word & 0xFFFFFFFFFFFFL;
|
||||||
|
// Immortal literals: ASCII and NFC or neither, tail allocated, with a pointer biased by 32.
|
||||||
|
if ((object >>> 56) != 0x80 || (flags != 0xD && flags != 0x1) || ((word >>> 48) & 0xFFF) != 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
Address address = currentProgram.getAddressFactory().getDefaultAddressSpace()
|
||||||
|
.getAddress((object & 0x00FFFFFFFFFFFFFFL) + 0x20);
|
||||||
|
MemoryBlock block = currentProgram.getMemory().getBlock(address);
|
||||||
|
// The bytes and their terminator must lie in one initialized, non-executable block,
|
||||||
|
// and Java arrays bound one read.
|
||||||
|
if (block == null || !block.isInitialized() || block.isExecute() ||
|
||||||
|
count >= block.getEnd().subtract(address) + 1 || count >= Integer.MAX_VALUE) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return new SwiftLiteralLayout("large", address, count, flags == 0xD, null);
|
||||||
|
} catch (Exception unaddressable) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String swiftLargeLiteralText(SwiftLiteralLayout layout) {
|
||||||
|
int count = (int) layout.byteLength();
|
||||||
|
byte[] bytes = new byte[count + 1];
|
||||||
|
try {
|
||||||
|
if (currentProgram.getMemory().getBytes(layout.address(), bytes) != bytes.length) return null;
|
||||||
|
} catch (Exception unreadable) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return bytes[count] == 0 ? swiftStringText(bytes, count, layout.ascii()) : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Every literal record of one dossier draws on half of the heap that was free when decoding
|
||||||
|
* began. Text is charged at the worst case per UTF-8 byte: two bytes of UTF-16 text, then up
|
||||||
|
* to six escaped JSON characters ("\\u0000") held as UTF-16 in Gson's growing writer buffer
|
||||||
|
* (up to twice its length), again in the returned String, and once more as UTF-8 on the
|
||||||
|
* socket. Each record also pays a fixed cost for its map key, JSON members, addresses, words
|
||||||
|
* and their serialized form, so many empty or small literals are bounded too. Retained
|
||||||
|
* provenance-cache entries draw on that same fixed-state allowance.
|
||||||
|
*/
|
||||||
|
private static final class SwiftLiteralBudget {
|
||||||
|
private static final long BYTES_PER_LITERAL_BYTE = 2 + 6 * 2 * 2 + 6 * 2 + 6;
|
||||||
|
private static final long BYTES_PER_RECORD = 4096;
|
||||||
|
private long remaining;
|
||||||
|
private boolean stopped;
|
||||||
|
|
||||||
|
SwiftLiteralBudget() {
|
||||||
|
Runtime runtime = Runtime.getRuntime();
|
||||||
|
remaining = Math.max(0, (runtime.maxMemory() - runtime.totalMemory() + runtime.freeMemory()) / 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean takeState() {
|
||||||
|
if (remaining < BYTES_PER_RECORD) return false;
|
||||||
|
remaining -= BYTES_PER_RECORD;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean take(long bytes) {
|
||||||
|
if (remaining < BYTES_PER_RECORD ||
|
||||||
|
bytes > (remaining - BYTES_PER_RECORD) / BYTES_PER_LITERAL_BYTE) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
remaining -= BYTES_PER_RECORD + bytes * BYTES_PER_LITERAL_BYTE;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void stop() {
|
||||||
|
stopped = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean stopped() {
|
||||||
|
return stopped;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Swift String values may contain any scalar, including controls; JSON escapes them.
|
||||||
|
private static String swiftStringText(byte[] bytes, int length, boolean ascii) {
|
||||||
|
if (length < 0 || length > bytes.length) return null;
|
||||||
|
for (int index = 0; index < length; index++) {
|
||||||
|
if (ascii && bytes[index] < 0) return null;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return StandardCharsets.UTF_8.newDecoder().decode(ByteBuffer.wrap(bytes, 0, length)).toString();
|
||||||
|
} catch (CharacterCodingException invalid) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static JsonObject swiftStringOmission(SwiftLiteralLayout layout, long word, long object) {
|
||||||
|
JsonObject item = new JsonObject();
|
||||||
|
item.addProperty("representation", layout.representation());
|
||||||
|
if (layout.address() == null) {
|
||||||
|
item.add("address", JsonNull.INSTANCE);
|
||||||
|
} else {
|
||||||
|
item.addProperty("address", canonicalAddress(layout.address()));
|
||||||
|
}
|
||||||
|
item.addProperty("byte_length", layout.byteLength());
|
||||||
|
item.addProperty("reason", "capacity");
|
||||||
|
item.add("words", swiftStringWords(word, object));
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static JsonObject swiftStringItem(
|
||||||
|
String value,
|
||||||
|
SwiftLiteralLayout layout,
|
||||||
|
long word,
|
||||||
|
long object
|
||||||
|
) {
|
||||||
|
JsonObject item = new JsonObject();
|
||||||
|
item.addProperty("value", value);
|
||||||
|
item.addProperty("representation", layout.representation());
|
||||||
|
if (layout.address() == null) {
|
||||||
|
item.add("address", JsonNull.INSTANCE);
|
||||||
|
} else {
|
||||||
|
item.addProperty("address", canonicalAddress(layout.address()));
|
||||||
|
}
|
||||||
|
item.add("words", swiftStringWords(word, object));
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static JsonArray swiftStringWords(long word, long object) {
|
||||||
|
JsonArray words = new JsonArray();
|
||||||
|
words.add("0x" + Long.toUnsignedString(word, 16));
|
||||||
|
words.add("0x" + Long.toUnsignedString(object, 16));
|
||||||
|
return words;
|
||||||
|
}
|
||||||
|
|
||||||
private static String exclusiveAddress(Address inclusive) {
|
private static String exclusiveAddress(Address inclusive) {
|
||||||
Address next = inclusive.next();
|
Address next = inclusive.next();
|
||||||
if (next != null && next.getAddressSpace().equals(inclusive.getAddressSpace())) {
|
if (next != null && next.getAddressSpace().equals(inclusive.getAddressSpace())) {
|
||||||
@@ -3833,6 +4498,14 @@ public final class ReaGhidraBridge extends HeadlessScript {
|
|||||||
private record AddressNameRequest(String inputAddress, Address address, String name) {}
|
private record AddressNameRequest(String inputAddress, Address address, String name) {}
|
||||||
private record FunctionEntry(Function function, InventoryItem item) {}
|
private record FunctionEntry(Function function, InventoryItem item) {}
|
||||||
private record FunctionAnalysisObservation(JsonObject dossier, List<String> limitations) {}
|
private record FunctionAnalysisObservation(JsonObject dossier, List<String> limitations) {}
|
||||||
|
private record SwiftStringLiteralDecode(JsonArray literals, JsonArray omissions) {}
|
||||||
|
private record SwiftLiteralLayout(
|
||||||
|
String representation,
|
||||||
|
Address address,
|
||||||
|
long byteLength,
|
||||||
|
boolean ascii,
|
||||||
|
String smallValue
|
||||||
|
) {}
|
||||||
private record InstructionScan(List<Instruction> instructions, boolean truncated) {}
|
private record InstructionScan(List<Instruction> instructions, boolean truncated) {}
|
||||||
private record SessionDescriptor(
|
private record SessionDescriptor(
|
||||||
String transport,
|
String transport,
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import ghidra.app.script.GhidraScript;
|
import ghidra.app.script.GhidraScript;
|
||||||
import ghidra.program.model.address.Address;
|
import ghidra.program.model.address.Address;
|
||||||
import ghidra.program.model.listing.Program;
|
import ghidra.program.model.listing.Program;
|
||||||
|
import ghidra.program.model.mem.MemoryBlock;
|
||||||
|
import ghidra.program.model.mem.MemoryBlockSourceInfo;
|
||||||
|
|
||||||
/** Seed the caller-supplied raw-binary entry before default auto-analysis. */
|
/** Seed the caller-supplied raw-binary entry before default auto-analysis. */
|
||||||
public final class ReaGhidraPrepareRaw extends GhidraScript {
|
public final class ReaGhidraPrepareRaw extends GhidraScript {
|
||||||
@@ -21,8 +23,19 @@ public final class ReaGhidraPrepareRaw extends GhidraScript {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
Address entry = currentProgram.getAddressFactory().getDefaultAddressSpace().getAddress(entryHex);
|
Address entry = currentProgram.getAddressFactory().getDefaultAddressSpace().getAddress(entryHex);
|
||||||
Address start = currentProgram.getMinAddress();
|
MemoryBlock block = entry == null ? null : currentProgram.getMemory().getBlock(entry);
|
||||||
if (entry == null || !entry.equals(start)) {
|
boolean fileStart = false;
|
||||||
|
if (block != null) {
|
||||||
|
// Processor-defined zero page/stack blocks can precede the imported file.
|
||||||
|
for (MemoryBlockSourceInfo source : block.getSourceInfos()) {
|
||||||
|
if (source.getFileBytes().isPresent() && source.getFileBytesOffset() == 0 &&
|
||||||
|
entry.equals(source.getMinAddress())) {
|
||||||
|
fileStart = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!fileStart) {
|
||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"Raw binary import must map file offset 0 at the caller-supplied entry"
|
"Raw binary import must map file offset 0 at the caller-supplied entry"
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ def project_record(state, secrets):
|
|||||||
safe_bytes, credential_url = transport_value(value, path, transport_url)
|
safe_bytes, credential_url = transport_value(value, path, transport_url)
|
||||||
content_base64 = base64.b64encode(value).decode("ascii")
|
content_base64 = base64.b64encode(value).decode("ascii")
|
||||||
digest = hashlib.sha256(value).hexdigest()
|
digest = hashlib.sha256(value).hexdigest()
|
||||||
hidden = any(secret in value or secret in safe_bytes for secret in byte_secrets) or any(secret in content_base64 or secret in digest for secret in secrets)
|
hidden = any(secret in value or secret in safe_bytes for secret in byte_secrets) or any(secret in content_base64 or secret in digest or secret in str(len(value)) for secret in secrets)
|
||||||
safe_text = None
|
safe_text = None
|
||||||
try:
|
try:
|
||||||
safe_text = safe_bytes.decode("utf-8", errors="strict")
|
safe_text = safe_bytes.decode("utf-8", errors="strict")
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ import sys
|
|||||||
|
|
||||||
PROFILE = "pwntools@4.15.0;pyelftools@0.33;unicorn@2.1.2"
|
PROFILE = "pwntools@4.15.0;pyelftools@0.33;unicorn@2.1.2"
|
||||||
|
|
||||||
|
# Linux ET_CORE machine identifiers whose PRSTATUS layout is interpreted with
|
||||||
|
# unchanged pwntools 4.15.0 ctypes. Both share pr_cursig@12, pr_pid@32 and
|
||||||
|
# pr_reg@112; only the register window differs: amd64 is 27 x 8 bytes for a
|
||||||
|
# 336-byte descriptor, AArch64 is 34 x 8 bytes for a 392-byte descriptor.
|
||||||
|
CORE_MACHINES = (62, 183)
|
||||||
|
|
||||||
|
|
||||||
class CoreFailure(Exception):
|
class CoreFailure(Exception):
|
||||||
def __init__(self, reason, message):
|
def __init__(self, reason, message):
|
||||||
@@ -51,12 +57,27 @@ def inspect_core(path, cache):
|
|||||||
# Other declared OSABIs must never select Linux note ctypes.
|
# Other declared OSABIs must never select Linux note ctypes.
|
||||||
if content[7] not in (0, 3) or content[8] != 0:
|
if content[7] not in (0, 3) or content[8] != 0:
|
||||||
raise CoreFailure("unsupported-target", "Initial recorded-core profile requires System V or GNU/Linux OSABI with ABI version zero; selected OSABI=" + str(content[7]) + ", ABI version=" + str(content[8]) + ".")
|
raise CoreFailure("unsupported-target", "Initial recorded-core profile requires System V or GNU/Linux OSABI with ABI version zero; selected OSABI=" + str(content[7]) + ", ABI version=" + str(content[8]) + ".")
|
||||||
if int.from_bytes(content[16:18], "little") != 4 or int.from_bytes(content[18:20], "little") != 62:
|
machine = int.from_bytes(content[18:20], "little")
|
||||||
raise CoreFailure("unsupported-target", "Initial recorded-core profile requires x86-64 ET_CORE.")
|
if int.from_bytes(content[16:18], "little") != 4 or machine not in CORE_MACHINES:
|
||||||
|
raise CoreFailure("unsupported-target", "Initial recorded-core profile requires ET_CORE for x86-64 or AArch64; selected ET_TYPE=" + str(int.from_bytes(content[16:18], "little")) + ", e_machine=" + str(machine) + ".")
|
||||||
from elftools.common.exceptions import ELFError
|
from elftools.common.exceptions import ELFError
|
||||||
from elftools.common.utils import struct_parse
|
from elftools.common.utils import struct_parse
|
||||||
from elftools.elf.elffile import ELFFile
|
from elftools.elf.elffile import ELFFile
|
||||||
from pwnlib.elf.datatypes import elf_prstatus_amd64, elf_siginfo_64, user_regs_struct_amd64
|
from pwnlib.elf.datatypes import (
|
||||||
|
elf_prstatus_aarch64,
|
||||||
|
elf_prstatus_amd64,
|
||||||
|
elf_siginfo_64,
|
||||||
|
user_regs_struct_aarch64,
|
||||||
|
user_regs_struct_amd64,
|
||||||
|
)
|
||||||
|
if machine == 62:
|
||||||
|
profile_label = "x86-64"
|
||||||
|
architecture = "x86_64-little-endian"
|
||||||
|
prstatus_type, registers_type = elf_prstatus_amd64, user_regs_struct_amd64
|
||||||
|
else:
|
||||||
|
profile_label = "AArch64"
|
||||||
|
architecture = "aarch64-little-endian"
|
||||||
|
prstatus_type, registers_type = elf_prstatus_aarch64, user_regs_struct_aarch64
|
||||||
try:
|
try:
|
||||||
image = ELFFile(io.BytesIO(content))
|
image = ELFFile(io.BytesIO(content))
|
||||||
header = image.header
|
header = image.header
|
||||||
@@ -107,17 +128,17 @@ def inspect_core(path, cache):
|
|||||||
if owner != b"CORE\0":
|
if owner != b"CORE\0":
|
||||||
continue
|
continue
|
||||||
if note.n_type == "NT_PRSTATUS":
|
if note.n_type == "NT_PRSTATUS":
|
||||||
if len(descriptor) < ctypes.sizeof(elf_prstatus_amd64):
|
if len(descriptor) < ctypes.sizeof(prstatus_type):
|
||||||
raise CoreFailure("format", "Linux amd64 NT_PRSTATUS descriptor is truncated.")
|
raise CoreFailure("format", "Linux " + profile_label + " NT_PRSTATUS descriptor is truncated.")
|
||||||
status = elf_prstatus_amd64.from_buffer_copy(descriptor)
|
status = prstatus_type.from_buffer_copy(descriptor)
|
||||||
registers = []
|
registers = []
|
||||||
for name, kind in user_regs_struct_amd64._fields_:
|
for name, kind in registers_type._fields_:
|
||||||
relative = elf_prstatus_amd64.pr_reg.offset + getattr(user_regs_struct_amd64, name).offset
|
relative = prstatus_type.pr_reg.offset + getattr(registers_type, name).offset
|
||||||
registers.append({"name": name, "value": hex(getattr(status.pr_reg, name)), "location": location(descriptor_start + relative, ctypes.sizeof(kind), end)})
|
registers.append({"name": name, "value": hex(getattr(status.pr_reg, name)), "location": location(descriptor_start + relative, ctypes.sizeof(kind), end)})
|
||||||
threads.append({"note_index": note_index, "historical_pid": ctypes.c_int32(status.pr_pid).value, "recorded_current_signal": status.pr_cursig, "registers": registers})
|
threads.append({"note_index": note_index, "historical_pid": ctypes.c_int32(status.pr_pid).value, "recorded_current_signal": status.pr_cursig, "registers": registers})
|
||||||
elif note.n_type == "NT_SIGINFO":
|
elif note.n_type == "NT_SIGINFO":
|
||||||
if len(descriptor) < ctypes.sizeof(elf_siginfo_64):
|
if len(descriptor) < ctypes.sizeof(elf_siginfo_64):
|
||||||
raise CoreFailure("format", "Linux amd64 NT_SIGINFO descriptor is truncated.")
|
raise CoreFailure("format", "Linux " + profile_label + " NT_SIGINFO descriptor is truncated.")
|
||||||
signal = elf_siginfo_64.from_buffer_copy(descriptor)
|
signal = elf_siginfo_64.from_buffer_copy(descriptor)
|
||||||
number = ctypes.c_int32(signal.si_signo).value
|
number = ctypes.c_int32(signal.si_signo).value
|
||||||
code = ctypes.c_int32(signal.si_code).value
|
code = ctypes.c_int32(signal.si_code).value
|
||||||
@@ -125,7 +146,7 @@ def inspect_core(path, cache):
|
|||||||
signals.append({"note_index": note_index, "number": number, "code": code, "errno": ctypes.c_int32(signal.si_errno).value,
|
signals.append({"note_index": note_index, "number": number, "code": code, "errno": ctypes.c_int32(signal.si_errno).value,
|
||||||
"fault_address": hex(signal.sigfault_addr) if known else None,
|
"fault_address": hex(signal.sigfault_addr) if known else None,
|
||||||
"fault_address_meaning": "recorded-sigsegv-address" if known else "unknown", "thread_association": "unknown"})
|
"fault_address_meaning": "recorded-sigsegv-address" if known else "unknown", "thread_association": "unknown"})
|
||||||
return {"format": "elf-core", "architecture": "x86_64-little-endian", "target_execution": "not-performed", "live_process_identity": "unknown",
|
return {"format": "elf-core", "architecture": architecture, "target_execution": "not-performed", "live_process_identity": "unknown",
|
||||||
"segments": segments, "notes": notes, "note_padding": padding, "threads": threads, "signals": signals,
|
"segments": segments, "notes": notes, "note_padding": padding, "threads": threads, "signals": signals,
|
||||||
"note_interpretation_completeness": "unknown",
|
"note_interpretation_completeness": "unknown",
|
||||||
"limitations": ["The initial Linux note profile accepts System V/unspecified or GNU/Linux OSABI with ABI version zero; an unspecified OSABI alone does not prove operating-system origin.",
|
"limitations": ["The initial Linux note profile accepts System V/unspecified or GNU/Linux OSABI with ABI version zero; an unspecified OSABI alone does not prove operating-system origin.",
|
||||||
|
|||||||
+89
-55
@@ -1,4 +1,18 @@
|
|||||||
import { defineConfig } from "vitepress";
|
import { defineConfig } from "vitepress";
|
||||||
|
import { dirname, relative, resolve, sep } from "node:path";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
|
import {
|
||||||
|
documentationRewrites,
|
||||||
|
documentationSections,
|
||||||
|
} from "./documentation.js";
|
||||||
|
|
||||||
|
const documentationRoot = fileURLToPath(new URL("..", import.meta.url));
|
||||||
|
const rewrites: Record<string, string> = {
|
||||||
|
...documentationRewrites,
|
||||||
|
"README.md": "documentation.md",
|
||||||
|
"specs/README.md": "specs/index.md",
|
||||||
|
"adr/README.md": "adr/index.md",
|
||||||
|
};
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
title: "REA",
|
title: "REA",
|
||||||
@@ -6,72 +20,92 @@ export default defineConfig({
|
|||||||
"Reverse engineer binaries, applications, and runtime behavior with one CLI and MCP server.",
|
"Reverse engineer binaries, applications, and runtime behavior with one CLI and MCP server.",
|
||||||
lang: "en-US",
|
lang: "en-US",
|
||||||
base: "/rea/",
|
base: "/rea/",
|
||||||
|
rewrites,
|
||||||
|
markdown: {
|
||||||
|
config(md) {
|
||||||
|
// Repository links resolve from their physical source. Render them from
|
||||||
|
// the stable public route instead, including links across categories.
|
||||||
|
md.core.ruler.after("inline", "documentation-source-links", (state) => {
|
||||||
|
const physicalPath =
|
||||||
|
state.env.realPath ??
|
||||||
|
(state.env.relativePath
|
||||||
|
? resolve(documentationRoot, state.env.relativePath)
|
||||||
|
: null);
|
||||||
|
if (physicalPath === null) return;
|
||||||
|
const renderedPath =
|
||||||
|
state.env.path ??
|
||||||
|
resolve(
|
||||||
|
documentationRoot,
|
||||||
|
rewrites[state.env.relativePath] ?? state.env.relativePath,
|
||||||
|
);
|
||||||
|
for (const block of state.tokens) {
|
||||||
|
for (const token of block.children ?? []) {
|
||||||
|
const attribute =
|
||||||
|
token.type === "link_open"
|
||||||
|
? "href"
|
||||||
|
: token.type === "image"
|
||||||
|
? "src"
|
||||||
|
: null;
|
||||||
|
if (attribute === null) continue;
|
||||||
|
const destination = token.attrGet(attribute);
|
||||||
|
if (
|
||||||
|
!destination ||
|
||||||
|
/^(?:[a-z][a-z\d+.-]*:|[/#])/iu.test(destination)
|
||||||
|
)
|
||||||
|
continue;
|
||||||
|
const separator = destination.search(/[?#]/u);
|
||||||
|
const path =
|
||||||
|
separator === -1 ? destination : destination.slice(0, separator);
|
||||||
|
const suffix = separator === -1 ? "" : destination.slice(separator);
|
||||||
|
const source = relative(
|
||||||
|
documentationRoot,
|
||||||
|
resolve(dirname(physicalPath), path),
|
||||||
|
)
|
||||||
|
.split(sep)
|
||||||
|
.join("/");
|
||||||
|
const rendered = relative(
|
||||||
|
dirname(renderedPath),
|
||||||
|
resolve(
|
||||||
|
documentationRoot,
|
||||||
|
source.startsWith("public/")
|
||||||
|
? source.slice("public/".length)
|
||||||
|
: (rewrites[source] ?? source),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.split(sep)
|
||||||
|
.join("/");
|
||||||
|
token.attrSet(attribute, rendered + suffix);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
srcExclude: ["readme/**"],
|
||||||
themeConfig: {
|
themeConfig: {
|
||||||
nav: [
|
nav: [
|
||||||
{ text: "Get started", link: "/installation" },
|
{ text: "Get started", link: "/installation" },
|
||||||
|
{ text: "Documentation", link: "/documentation" },
|
||||||
{ text: "Reference", link: "/mcp-contracts" },
|
{ text: "Reference", link: "/mcp-contracts" },
|
||||||
{ text: "Roadmap", link: "/roadmap" },
|
{ text: "Roadmap", link: "/roadmap" },
|
||||||
],
|
],
|
||||||
sidebar: [
|
sidebar: [
|
||||||
{
|
{
|
||||||
text: "Getting started",
|
text: "Documentation directory",
|
||||||
items: [
|
items: [
|
||||||
{ text: "Installation and setup", link: "/installation" },
|
{ text: "All guides", link: "/documentation" },
|
||||||
{ text: "Client configuration", link: "/client-configuration" },
|
{ text: "Authoring conventions", link: "/development/documentation" },
|
||||||
{ text: "CLI and Evidence", link: "/cli" },
|
{ text: "Feature specifications", link: "/specs/" },
|
||||||
{ text: "Agent prompts", link: "/mcp-prompts" },
|
{ text: "Architecture decisions", link: "/adr/" },
|
||||||
{ text: "Roadmap", link: "/roadmap" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "Investigation guides",
|
|
||||||
items: [
|
|
||||||
{ text: "Native binaries", link: "/native-investigation" },
|
|
||||||
{ text: "Go build metadata", link: "/go-binaries" },
|
|
||||||
{
|
|
||||||
text: "JavaScript and Electron",
|
|
||||||
link: "/javascript-artifact-reconstruction",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "JavaScript workflows",
|
|
||||||
link: "/javascript-application-workflows",
|
|
||||||
},
|
|
||||||
{ text: "Browser observation", link: "/browser-observation" },
|
|
||||||
{ text: "Electron observation", link: "/electron-observation" },
|
|
||||||
{ text: "Process capture", link: "/process-capture" },
|
|
||||||
{ text: ".NET assemblies", link: "/managed-code-analysis" },
|
|
||||||
{ text: "Android applications", link: "/android-analysis" },
|
|
||||||
{ text: "Apple applications", link: "/apple-application-analysis" },
|
|
||||||
{ text: "Firmware", link: "/firmware-analysis" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "Provider guides",
|
|
||||||
collapsed: true,
|
|
||||||
items: [
|
|
||||||
{ text: "IDA", link: "/ida-provider" },
|
|
||||||
{ text: "Ghidra on Windows", link: "/windows-ghidra-p0" },
|
|
||||||
{ text: "Ghidra DOS analysis", link: "/ghidra-dos" },
|
|
||||||
{ text: "Ghidra raw binary", link: "/raw-binary" },
|
|
||||||
{ text: "Ghidra NativeAOT", link: "/ghidra-nativeaot" },
|
|
||||||
{ text: "Ghidra semantics", link: "/ghidra-provider" },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: "Reference and development",
|
|
||||||
collapsed: true,
|
|
||||||
items: [
|
|
||||||
{ text: "MCP contracts", link: "/mcp-contracts" },
|
|
||||||
{ text: "Tool design", link: "/tool-design" },
|
|
||||||
{ text: "Testing", link: "/testing" },
|
|
||||||
{ text: "Client verification", link: "/client-verification" },
|
|
||||||
{
|
|
||||||
text: "Reconstruction readiness",
|
|
||||||
link: "/reconstruction-readiness",
|
|
||||||
},
|
|
||||||
{ text: "Releasing", link: "/releasing" },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
...documentationSections.map((section) => ({
|
||||||
|
text: section.text,
|
||||||
|
collapsed: section.text !== "Getting started",
|
||||||
|
items: section.items.map((item) => ({
|
||||||
|
text: item.text,
|
||||||
|
link: item.route,
|
||||||
|
})),
|
||||||
|
})),
|
||||||
],
|
],
|
||||||
search: { provider: "local" },
|
search: { provider: "local" },
|
||||||
socialLinks: [
|
socialLinks: [
|
||||||
|
|||||||
@@ -0,0 +1,384 @@
|
|||||||
|
// Authored guide ownership: physical sources and stable public routes.
|
||||||
|
export const documentationSections = [
|
||||||
|
{
|
||||||
|
text: "Getting started",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "Installation and setup",
|
||||||
|
source: "getting-started/installation.md",
|
||||||
|
route: "/installation",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Client configuration and troubleshooting",
|
||||||
|
source: "getting-started/client-configuration.md",
|
||||||
|
route: "/client-configuration",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "CLI and Evidence",
|
||||||
|
source: "getting-started/cli.md",
|
||||||
|
route: "/cli",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Guided MCP prompts and completion",
|
||||||
|
source: "getting-started/mcp-prompts.md",
|
||||||
|
route: "/mcp-prompts",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Native binaries",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "Native binary investigation",
|
||||||
|
source: "guides/native/native-investigation.md",
|
||||||
|
route: "/native-investigation",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Go binary build metadata",
|
||||||
|
source: "guides/native/go-binaries.md",
|
||||||
|
route: "/go-binaries",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Offline binary diagnostics",
|
||||||
|
source: "guides/native/binary-diagnostics.md",
|
||||||
|
route: "/binary-diagnostics",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Recorded crash evidence",
|
||||||
|
source: "guides/native/recorded-crashes.md",
|
||||||
|
route: "/recorded-crashes",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "JavaScript and Electron",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "JavaScript Application Graph",
|
||||||
|
source: "guides/javascript/javascript-application-graph.md",
|
||||||
|
route: "/javascript-application-graph",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Cross-layer JavaScript application workflows",
|
||||||
|
source: "guides/javascript/javascript-application-workflows.md",
|
||||||
|
route: "/javascript-application-workflows",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "JavaScript artifact reconstruction",
|
||||||
|
source: "guides/javascript/javascript-artifact-reconstruction.md",
|
||||||
|
route: "/javascript-artifact-reconstruction",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "JavaScript source recovery",
|
||||||
|
source: "guides/javascript/javascript-recovery.md",
|
||||||
|
route: "/javascript-recovery",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Passive Node and Electron runtime observation",
|
||||||
|
source: "guides/javascript/javascript-runtime-observation.md",
|
||||||
|
route: "/javascript-runtime-observation",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "JavaScript static/runtime reconciliation",
|
||||||
|
source: "guides/javascript/javascript-runtime-reconciliation.md",
|
||||||
|
route: "/javascript-runtime-reconciliation",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Electron file-page observation",
|
||||||
|
source: "guides/javascript/electron-observation.md",
|
||||||
|
route: "/electron-observation",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Browser and captured websites",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "Website observation with CDP",
|
||||||
|
source: "guides/web/browser-observation.md",
|
||||||
|
route: "/browser-observation",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Browser scenario contract",
|
||||||
|
source: "guides/web/browser-scenario-contract.md",
|
||||||
|
route: "/browser-scenario-contract",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Website runtime source attribution",
|
||||||
|
source: "guides/web/web-runtime.md",
|
||||||
|
route: "/web-runtime",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Historical web network captures",
|
||||||
|
source: "guides/web/web-network-captures.md",
|
||||||
|
route: "/web-network-captures",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Captured website source locations",
|
||||||
|
source: "guides/web/web-source-location.md",
|
||||||
|
route: "/web-source-location",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Captured website module relationships",
|
||||||
|
source: "guides/web/website-module-trace.md",
|
||||||
|
route: "/website-module-trace",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Captured website scripts and static JavaScript analysis",
|
||||||
|
source: "guides/web/website-script-export.md",
|
||||||
|
route: "/website-script-export",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Android applications",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "Static Android APK analysis",
|
||||||
|
source: "guides/android/android-analysis.md",
|
||||||
|
route: "/android-analysis",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Apktool resource decoding",
|
||||||
|
source: "guides/android/apktool-resource-analysis.md",
|
||||||
|
route: "/apktool-resource-analysis",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "ADB device inspection and acquisition",
|
||||||
|
source: "guides/android/adb-device-analysis.md",
|
||||||
|
route: "/adb-device-analysis",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Flutter build identification",
|
||||||
|
source: "guides/android/flutter-analysis.md",
|
||||||
|
route: "/flutter-analysis",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Apple applications",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "Apple Application Inventory Projection",
|
||||||
|
source: "guides/apple/apple-application-analysis.md",
|
||||||
|
route: "/apple-application-analysis",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: ".NET assemblies",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "Managed-code analysis",
|
||||||
|
source: "guides/managed/managed-code-analysis.md",
|
||||||
|
route: "/managed-code-analysis",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Firmware",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "Firmware analysis",
|
||||||
|
source: "guides/firmware/firmware-analysis.md",
|
||||||
|
route: "/firmware-analysis",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "HarmonyOS packages",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "Static HarmonyOS package inventory",
|
||||||
|
source: "guides/harmony/harmony-analysis.md",
|
||||||
|
route: "/harmony-analysis",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "WebAssembly",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "Offline WebAssembly artifacts",
|
||||||
|
source: "guides/wasm/wasm-artifacts.md",
|
||||||
|
route: "/wasm-artifacts",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "EVM contracts",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "Offline EVM bytecode",
|
||||||
|
source: "guides/evm/evm-bytecode.md",
|
||||||
|
route: "/evm-bytecode",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Databases and recorded packets",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "SQLite database snapshots",
|
||||||
|
source: "guides/data/sqlite-databases.md",
|
||||||
|
route: "/sqlite-databases",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Recorded packet capture inspection",
|
||||||
|
source: "guides/data/packet-captures.md",
|
||||||
|
route: "/packet-captures",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Packet capture summaries",
|
||||||
|
source: "guides/data/pcap-analysis.md",
|
||||||
|
route: "/pcap-analysis",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Process capture and instrumentation",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "Process capture",
|
||||||
|
source: "guides/runtime/process-capture.md",
|
||||||
|
route: "/process-capture",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Frida instrumentation",
|
||||||
|
source: "guides/runtime/frida-instrumentation.md",
|
||||||
|
route: "/frida-instrumentation",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Provider setup and formats",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "Ghidra provider semantics",
|
||||||
|
source: "providers/ghidra-provider.md",
|
||||||
|
route: "/ghidra-provider",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "DOS MZ and COM analysis with Ghidra",
|
||||||
|
source: "providers/ghidra-dos.md",
|
||||||
|
route: "/ghidra-dos",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Optional NativeAOT metadata recovery",
|
||||||
|
source: "providers/ghidra-nativeaot.md",
|
||||||
|
route: "/ghidra-nativeaot",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "MIPS ELF analysis through Ghidra",
|
||||||
|
source: "providers/ghidra-mips.md",
|
||||||
|
route: "/ghidra-mips",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "PSP static ELF analysis through Ghidra",
|
||||||
|
source: "providers/ghidra-psp.md",
|
||||||
|
route: "/ghidra-psp",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "RISC-V ELF analysis through Ghidra",
|
||||||
|
source: "providers/ghidra-riscv.md",
|
||||||
|
route: "/ghidra-riscv",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Windows Ghidra P0",
|
||||||
|
source: "providers/windows-ghidra-p0.md",
|
||||||
|
route: "/windows-ghidra-p0",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Headerless raw-binary analysis with Ghidra",
|
||||||
|
source: "providers/raw-binary.md",
|
||||||
|
route: "/raw-binary",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "IDA provider",
|
||||||
|
source: "providers/ida-provider.md",
|
||||||
|
route: "/ida-provider",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "JEB instrumentation and analysis",
|
||||||
|
source: "providers/jeb-analysis.md",
|
||||||
|
route: "/jeb-analysis",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Contracts and evidence",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "MCP runtime contracts",
|
||||||
|
source: "reference/mcp-contracts.md",
|
||||||
|
route: "/mcp-contracts",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Reconstruction obligation ledgers",
|
||||||
|
source: "reference/reconstruction-obligation-ledgers.md",
|
||||||
|
route: "/reconstruction-obligation-ledgers",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Development and verification",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "MCP tool design",
|
||||||
|
source: "development/tool-design.md",
|
||||||
|
route: "/tool-design",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Testing REA",
|
||||||
|
source: "development/testing.md",
|
||||||
|
route: "/testing",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Client and agent verification",
|
||||||
|
source: "development/client-verification.md",
|
||||||
|
route: "/client-verification",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Reconstruction readiness conformance",
|
||||||
|
source: "development/reconstruction-readiness.md",
|
||||||
|
route: "/reconstruction-readiness",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Releasing REA",
|
||||||
|
source: "development/releasing.md",
|
||||||
|
route: "/releasing",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "REA roadmap",
|
||||||
|
source: "development/roadmap.md",
|
||||||
|
route: "/roadmap",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Release migrations",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "Upgrading from REA 6.1 to 6.2",
|
||||||
|
source: "migrations/migration-6.2.md",
|
||||||
|
route: "/migration-6.2",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Signal recordings",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
text: "Recorded signal inspection",
|
||||||
|
source: "guides/signals/signal-recordings.md",
|
||||||
|
route: "/signal-recordings",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export const documentationRewrites = Object.fromEntries(
|
||||||
|
documentationSections.flatMap((section) =>
|
||||||
|
section.items.map((item) => [item.source, `${item.route.slice(1)}.md`]),
|
||||||
|
),
|
||||||
|
);
|
||||||
+138
@@ -0,0 +1,138 @@
|
|||||||
|
# Documentation directory
|
||||||
|
|
||||||
|
REA documentation is organized by reader task and document owner. This directory
|
||||||
|
links every authored guide; the [site](https://rea.tools/) also serves separate
|
||||||
|
product pages. The VitePress documentation source is this `docs/` tree.
|
||||||
|
|
||||||
|
## Getting started
|
||||||
|
|
||||||
|
- [Installation and setup](getting-started/installation.md)
|
||||||
|
- [Client configuration and troubleshooting](getting-started/client-configuration.md)
|
||||||
|
- [CLI and Evidence](getting-started/cli.md)
|
||||||
|
- [Guided MCP prompts and completion](getting-started/mcp-prompts.md)
|
||||||
|
|
||||||
|
## Native binaries
|
||||||
|
|
||||||
|
- [Native binary investigation](guides/native/native-investigation.md)
|
||||||
|
- [Go binary build metadata](guides/native/go-binaries.md)
|
||||||
|
- [Offline binary diagnostics](guides/native/binary-diagnostics.md)
|
||||||
|
- [Recorded crash evidence](guides/native/recorded-crashes.md)
|
||||||
|
|
||||||
|
## JavaScript and Electron
|
||||||
|
|
||||||
|
- [JavaScript Application Graph](guides/javascript/javascript-application-graph.md)
|
||||||
|
- [Cross-layer JavaScript application workflows](guides/javascript/javascript-application-workflows.md)
|
||||||
|
- [JavaScript artifact reconstruction](guides/javascript/javascript-artifact-reconstruction.md)
|
||||||
|
- [JavaScript source recovery](guides/javascript/javascript-recovery.md)
|
||||||
|
- [Passive Node and Electron runtime observation](guides/javascript/javascript-runtime-observation.md)
|
||||||
|
- [JavaScript static/runtime reconciliation](guides/javascript/javascript-runtime-reconciliation.md)
|
||||||
|
- [Electron file-page observation](guides/javascript/electron-observation.md)
|
||||||
|
|
||||||
|
## Browser and captured websites
|
||||||
|
|
||||||
|
- [Website observation with CDP](guides/web/browser-observation.md)
|
||||||
|
- [Browser scenario contract](guides/web/browser-scenario-contract.md)
|
||||||
|
- [Website runtime source attribution](guides/web/web-runtime.md)
|
||||||
|
- [Historical web network captures](guides/web/web-network-captures.md)
|
||||||
|
- [Captured website source locations](guides/web/web-source-location.md)
|
||||||
|
- [Captured website module relationships](guides/web/website-module-trace.md)
|
||||||
|
- [Captured website scripts and static JavaScript analysis](guides/web/website-script-export.md)
|
||||||
|
|
||||||
|
## Android applications
|
||||||
|
|
||||||
|
- [Static Android APK analysis](guides/android/android-analysis.md)
|
||||||
|
- [Apktool resource decoding](guides/android/apktool-resource-analysis.md)
|
||||||
|
- [ADB device inspection and acquisition](guides/android/adb-device-analysis.md)
|
||||||
|
- [Flutter build identification](guides/android/flutter-analysis.md)
|
||||||
|
|
||||||
|
## Apple applications
|
||||||
|
|
||||||
|
- [Apple Application Inventory Projection](guides/apple/apple-application-analysis.md)
|
||||||
|
|
||||||
|
## .NET assemblies
|
||||||
|
|
||||||
|
- [Managed-code analysis](guides/managed/managed-code-analysis.md)
|
||||||
|
|
||||||
|
## Firmware
|
||||||
|
|
||||||
|
- [Firmware analysis](guides/firmware/firmware-analysis.md)
|
||||||
|
|
||||||
|
## HarmonyOS packages
|
||||||
|
|
||||||
|
- [Static HarmonyOS package inventory](guides/harmony/harmony-analysis.md)
|
||||||
|
|
||||||
|
## WebAssembly
|
||||||
|
|
||||||
|
- [Offline WebAssembly artifacts](guides/wasm/wasm-artifacts.md)
|
||||||
|
|
||||||
|
## EVM contracts
|
||||||
|
|
||||||
|
- [Offline EVM bytecode](guides/evm/evm-bytecode.md)
|
||||||
|
|
||||||
|
## Databases and recorded packets
|
||||||
|
|
||||||
|
- [SQLite database snapshots](guides/data/sqlite-databases.md)
|
||||||
|
- [Recorded packet capture inspection](guides/data/packet-captures.md)
|
||||||
|
- [Packet capture summaries](guides/data/pcap-analysis.md)
|
||||||
|
|
||||||
|
## Process capture and instrumentation
|
||||||
|
|
||||||
|
- [Process capture](guides/runtime/process-capture.md)
|
||||||
|
- [Frida instrumentation](guides/runtime/frida-instrumentation.md)
|
||||||
|
|
||||||
|
## Signal recordings
|
||||||
|
|
||||||
|
- [Recorded signal inspection](guides/signals/signal-recordings.md)
|
||||||
|
|
||||||
|
## Provider setup and formats
|
||||||
|
|
||||||
|
- [Ghidra provider semantics](providers/ghidra-provider.md)
|
||||||
|
- [DOS MZ and COM analysis with Ghidra](providers/ghidra-dos.md)
|
||||||
|
- [Optional NativeAOT metadata recovery](providers/ghidra-nativeaot.md)
|
||||||
|
- [MIPS ELF analysis through Ghidra](providers/ghidra-mips.md)
|
||||||
|
- [PSP static ELF analysis through Ghidra](providers/ghidra-psp.md)
|
||||||
|
- [RISC-V ELF analysis through Ghidra](providers/ghidra-riscv.md)
|
||||||
|
- [Windows Ghidra P0](providers/windows-ghidra-p0.md)
|
||||||
|
- [Headerless raw-binary analysis with Ghidra](providers/raw-binary.md)
|
||||||
|
- [IDA provider](providers/ida-provider.md)
|
||||||
|
- [JEB instrumentation and analysis](providers/jeb-analysis.md)
|
||||||
|
|
||||||
|
## Contracts and evidence
|
||||||
|
|
||||||
|
- [MCP runtime contracts](reference/mcp-contracts.md)
|
||||||
|
- [Reconstruction obligation ledgers](reference/reconstruction-obligation-ledgers.md)
|
||||||
|
|
||||||
|
## Development and verification
|
||||||
|
|
||||||
|
- [MCP tool design](development/tool-design.md)
|
||||||
|
- [Testing REA](development/testing.md)
|
||||||
|
- [Client and agent verification](development/client-verification.md)
|
||||||
|
- [Reconstruction readiness conformance](development/reconstruction-readiness.md)
|
||||||
|
- [Releasing REA](development/releasing.md)
|
||||||
|
- [REA roadmap](development/roadmap.md)
|
||||||
|
|
||||||
|
## Release migrations
|
||||||
|
|
||||||
|
- [Upgrading from REA 6.1 to 6.2](migrations/migration-6.2.md)
|
||||||
|
|
||||||
|
## Architecture and authoring
|
||||||
|
|
||||||
|
- [Architecture map](https://github.com/morluto/rea/blob/main/docs/architecture/architecture.mermaid)
|
||||||
|
- [Documentation ownership and contribution model](development/documentation.md)
|
||||||
|
- [Feature specifications](specs/README.md)
|
||||||
|
- [Architectural decision records](adr/README.md)
|
||||||
|
|
||||||
|
## Machine-owned documentation
|
||||||
|
|
||||||
|
| Path | Owner and update command |
|
||||||
|
| ----------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||||
|
| `public/product-catalog.json` | Ignored contract projection; `npm run docs:generate` |
|
||||||
|
| `verification/managed-conformance-*.json` | Ignored managed conformance projections; `npm run evidence:generate` |
|
||||||
|
| `error-contract.schema.json` | Tracked schema from contracts; `npm run docs:error-schema` |
|
||||||
|
| `user-visible-errors.csv` | Authored error classification inventory; preserve its schema |
|
||||||
|
| `releases/<version>.contributions.json` | Durable release contribution record; follow the [release guide](development/releasing.md) |
|
||||||
|
| `assets/` | Shared authored images referenced by guides |
|
||||||
|
|
||||||
|
Do not edit generated catalogs or evidence to change product facts. Change their
|
||||||
|
canonical contracts or producer and regenerate. Historical release records retain
|
||||||
|
the exact commit messages and references from the release they describe.
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Architectural decision records
|
||||||
|
|
||||||
|
Store one actual decision per `docs/adr/<domain>/<decision-slug>.md`, without a
|
||||||
|
global sequence number. Use meaningful names and the Michael Nygard sections:
|
||||||
|
Status, Context, Decision and Consequences. Link each decision from its owning
|
||||||
|
feature specification.
|
||||||
|
|
||||||
|
See [the authoring guide](../development/documentation.md#feature-lifecycle) for
|
||||||
|
the distinction between specifications, roadmaps and isolated decisions.
|
||||||
@@ -6,7 +6,7 @@ graph TD
|
|||||||
end
|
end
|
||||||
|
|
||||||
subgraph "Production Composition"
|
subgraph "Production Composition"
|
||||||
COMPOSITION["src/composition/<br/>fresh typed provider and session factories<br/>one-shot binding and independent optional loading<br/>static WASM descriptor: named contract, factory, retryable lifetime"]
|
COMPOSITION["src/composition/<br/>fresh typed provider and session factories<br/>one-shot binding and independent optional loading<br/>static WASM/EVM descriptors: named contracts, factories, retryable lifetimes"]
|
||||||
end
|
end
|
||||||
|
|
||||||
subgraph "Adapters"
|
subgraph "Adapters"
|
||||||
@@ -18,14 +18,26 @@ pass `-- chat` to check plain chat with REA enabled. Qwen also reads the full
|
|||||||
result that its client offloads, and Pi exercises default codemode execution.
|
result that its client offloads, and Pi exercises default codemode execution.
|
||||||
Use `REA_VERIFY_RUNTIME_ROOT` to select a production-only installed REA package.
|
Use `REA_VERIFY_RUNTIME_ROOT` to select a production-only installed REA package.
|
||||||
Receipts retain client versions, result digests, host coverage and owned-process
|
Receipts retain client versions, result digests, host coverage and owned-process
|
||||||
cleanup. These POSIX lanes use a deterministic loopback model, so they do not
|
cleanup. These lanes use a deterministic loopback model and do not prove live
|
||||||
prove live model-provider or native Windows compatibility. Qwen, Pi and Hermes
|
model-provider compatibility. Pi and Hermes remain POSIX-only. Qwen, Pi and Hermes
|
||||||
bind both `HOME` and `USERPROFILE` to the disposable account. Qwen and Pi discover
|
bind both `HOME` and `USERPROFILE` to the disposable account. Qwen and Pi discover
|
||||||
the shared personal skill through their default search paths without an explicit
|
the shared personal skill through their default search paths without an explicit
|
||||||
skill setting; Hermes discovers it through the selected `HERMES_HOME`.
|
skill setting; Hermes discovers it through the selected `HERMES_HOME`.
|
||||||
Set `REA_VERIFY_HERMES_STICKY_PROFILE=1` to exercise native Hermes selection of
|
Set `REA_VERIFY_HERMES_STICKY_PROFILE=1` to exercise native Hermes selection of
|
||||||
a named sticky profile with `HERMES_HOME` still pointing to its root.
|
a named sticky profile with `HERMES_HOME` still pointing to its root.
|
||||||
|
|
||||||
|
The Qwen lane also supports native Windows (verified with Qwen Code 0.25.1 and
|
||||||
|
Node 24.19.0 for both `chat` and `call`). With Node 24.18.0, the same `call`
|
||||||
|
journey reached full Evidence readback but the client aborted during exit with
|
||||||
|
`UV_HANDLE_CLOSING`; that run remains a failure, not a compatibility claim.
|
||||||
|
Select the npm install's
|
||||||
|
`node_modules/@qwen-code/qwen-code/cli-entry.js` with `REA_VERIFY_QWEN_COMMAND`,
|
||||||
|
because `execFile` cannot launch the `qwen.cmd` shim directly. A selected `.js`,
|
||||||
|
`.mjs` or `.cjs` entry point runs under the verifier's Node. Windows path checks
|
||||||
|
use native separators; persisted output is read through Qwen's real shell tool
|
||||||
|
with a shell-independent encoded Node payload. Windows receipts report process
|
||||||
|
lineage as unavailable when the verifier has no retained native Job Object lease.
|
||||||
|
|
||||||
`verify:gemini-client` requires an installed Gemini CLI (verified with
|
`verify:gemini-client` requires an installed Gemini CLI (verified with
|
||||||
`@google/gemini-cli@0.63.0` on POSIX and native Windows); select it with
|
`@google/gemini-cli@0.63.0` on POSIX and native Windows); select it with
|
||||||
`REA_VERIFY_GEMINI_COMMAND`. A selected `.js`, `.mjs` or `.cjs` entry point runs
|
`REA_VERIFY_GEMINI_COMMAND`. A selected `.js`, `.mjs` or `.cjs` entry point runs
|
||||||
@@ -298,13 +310,42 @@ subsequent wire recovery and clean shutdown. Caller timeout does not interrupt
|
|||||||
Hopper's synchronous native operation. Socket boundary tests deterministically
|
Hopper's synchronous native operation. Socket boundary tests deterministically
|
||||||
cover active and queued expiry, late replies and timer cleanup.
|
cover active and queued expiry, late replies and timer cleanup.
|
||||||
|
|
||||||
The Linux demo lane remains a separate `verify:hopper:linux` command. Its
|
The Linux demo lane remains a separate `verify:hopper:linux` command. Hopper
|
||||||
lifecycle checks attempt competing CLI launches for the active target and a
|
6.4.2's ELF loader did not recognize the original 4,119-byte literal or three
|
||||||
|
non-ASCII byte strings in the measured fixtures. The lane retains complete raw
|
||||||
|
byte checks for those literals through source-owned symbols. Recognition of the
|
||||||
|
original full-length literal is bound to its exact source address; its decoded
|
||||||
|
object coverage remains explicitly unverified on Linux even when recognized.
|
||||||
|
Absent non-ASCII recognition also reports decoded-object coverage as unverified.
|
||||||
|
Recognized non-ASCII and control-text objects must still match their source
|
||||||
|
bytes, encoding, filters and searches.
|
||||||
|
A separate 548-byte ASCII literal requires native fragmentation, shortened
|
||||||
|
provider display, complete decoded fragments and dossier provenance on Linux;
|
||||||
|
the macOS lane retains the original full-length recognition requirement. These
|
||||||
|
are observed fixture/build capabilities, not universal Hopper length limits.
|
||||||
|
Its lifecycle checks attempt competing CLI launches for the active target and a
|
||||||
different target, requiring rejection before either can change the owning
|
different target, requiring rejection before either can change the owning
|
||||||
MCP session's documents or procedures. Lease boundary tests also preserve
|
MCP session's documents or procedures. Lease boundary tests also preserve
|
||||||
unresponsive or malformed live endpoints while allowing confirmed stale
|
unresponsive or malformed live endpoints while allowing confirmed stale
|
||||||
sockets to recover.
|
sockets to recover.
|
||||||
|
|
||||||
|
`verify:setup:linux` exercises installation on a clean supported Linux runner as
|
||||||
|
root. Use a disposable VM: this lane installs Hopper and its Linux runtime
|
||||||
|
dependencies through the system package manager. Set `REA_VERIFY_SERVER_COMMAND`
|
||||||
|
to the CLI entrypoint being verified. The command builds and checks source-owned
|
||||||
|
ELF fixtures before testing the read-only Hopper setup plan, approved
|
||||||
|
installation, scoped doctor, real CLI/MCP analysis, rejection of a modified
|
||||||
|
launcher, idempotent setup without requesting a reinstall, and owned child
|
||||||
|
cleanup. Before installation and after teardown, a clean-runner process scan
|
||||||
|
also rejects surviving Hopper demo helpers or Xvfb groups, including orphans
|
||||||
|
whose launcher exited. This scan observes processes without signaling them.
|
||||||
|
Hopper detection compares executable file identity through `/proc`, covering
|
||||||
|
alternate or configured launcher paths even after an invoked symlink is removed.
|
||||||
|
The dedicated runner must have no unrelated Hopper/Xvfb sessions. It requires
|
||||||
|
the repository's pinned development toolchain and an
|
||||||
|
existing host C compiler, `file`, `nm`, and `strings`. Use `verify:hopper:linux`
|
||||||
|
instead when Hopper is already installed.
|
||||||
|
|
||||||
`verify:hopper:fat` is a separate macOS lane requiring installed Hopper and the
|
`verify:hopper:fat` is a separate macOS lane requiring installed Hopper and the
|
||||||
existing Xcode clang/lipo toolchain. It compiles arm64/x86-64 thin executables and
|
existing Xcode clang/lipo toolchain. It compiles arm64/x86-64 thin executables and
|
||||||
one- and two-slice FAT32 containers, verifies exact/interior address mappings
|
one- and two-slice FAT32 containers, verifies exact/interior address mappings
|
||||||
@@ -365,7 +406,7 @@ existing static JavaScript analysis through CLI and stdio MCP, including
|
|||||||
manifest readback, competing query variants, and resolved relative imports.
|
manifest readback, competing query variants, and resolved relative imports.
|
||||||
It uses an installed browser and accepts an optional installed REA entrypoint.
|
It uses an installed browser and accepts an optional installed REA entrypoint.
|
||||||
The complete `verify:browser` lane also exercises passive script export through
|
The complete `verify:browser` lane also exercises passive script export through
|
||||||
both public adapters. See [website script export](website-script-export.md).
|
both public adapters. See [website script export](../guides/web/website-script-export.md).
|
||||||
|
|
||||||
`verify:browser:modules` compares CLI and stdio MCP traces against an independent
|
`verify:browser:modules` compares CLI and stdio MCP traces against an independent
|
||||||
real Chromium module-loading fixture: import-map scopes, package prefixes,
|
real Chromium module-loading fixture: import-map scopes, package prefixes,
|
||||||
@@ -373,7 +414,7 @@ null/backtracking rejection, query/fragment identities, repeated module instance
|
|||||||
lazy and computed unknowns, exact source/map identities and no implicit refetch.
|
lazy and computed unknowns, exact source/map identities and no implicit refetch.
|
||||||
Set `REA_BROWSER_EXECUTABLE`; the optional script argument selects an installed
|
Set `REA_BROWSER_EXECUTABLE`; the optional script argument selects an installed
|
||||||
package entrypoint. The complete `verify:browser` lane and existing conditional
|
package entrypoint. The complete `verify:browser` lane and existing conditional
|
||||||
Chrome CI include this verifier. See [module relationships](website-module-trace.md).
|
Chrome CI include this verifier. See [module relationships](../guides/web/website-module-trace.md).
|
||||||
|
|
||||||
## Agent evaluation and conformance records
|
## Agent evaluation and conformance records
|
||||||
|
|
||||||
@@ -417,7 +458,7 @@ artifact path. Its `expectedFirstTool` is `null`, and
|
|||||||
`targetClarificationPassed` grades that limited routing outcome independently
|
`targetClarificationPassed` grades that limited routing outcome independently
|
||||||
of analysis prose heuristics. Analyzing a nearby example cannot pass this case.
|
of analysis prose heuristics. Analyzing a nearby example cannot pass this case.
|
||||||
|
|
||||||
The packaged desktop and parser-comparison scenarios now assess a closed set of
|
The packaged desktop, parser-comparison, and managed scenarios assess a closed set of
|
||||||
known fixture claims. Each final answer must be a strict JSON manifest containing
|
known fixture claims. Each final answer must be a strict JSON manifest containing
|
||||||
exactly the requested claim IDs, values, Evidence IDs, and Evidence authority and
|
exactly the requested claim IDs, values, Evidence IDs, and Evidence authority and
|
||||||
confidence. Golden values are not included in the prompt. The evaluator checks
|
confidence. Golden values are not included in the prompt. The evaluator checks
|
||||||
@@ -434,15 +475,24 @@ analyses and use the requested module and export selectors. Boundary tests packa
|
|||||||
the same source-owned desktop fixture and compare the same source-owned parser
|
the same source-owned desktop fixture and compare the same source-owned parser
|
||||||
files through actual MCP tool results, then verify that fabricated answers fail.
|
files through actual MCP tool results, then verify that fabricated answers fail.
|
||||||
|
|
||||||
|
The managed rubric checks the exact public top-level type set and the CLI entry
|
||||||
|
point's declaring type and method name. The exact type-set claim requires an
|
||||||
|
unfiltered member inventory: `selection` must be null and the Evidence parameters
|
||||||
|
must omit `type_names`. A selected inventory can still ground the entry-point
|
||||||
|
claim. Both inspections must describe the freshly built DLL's SHA-256. Entry-point
|
||||||
|
resolution additionally requires complete artifact and member metadata, matching
|
||||||
|
non-null module MVIDs, and a unique method at the header's metadata token. These are
|
||||||
|
static metadata claims, not runtime behavior;
|
||||||
|
compiler-generated member counts, token values, and MVIDs are not golden answers.
|
||||||
|
|
||||||
Per-scenario `factualCorrectness` is `passed`, `failed`, or `not_assessed` within
|
Per-scenario `factualCorrectness` is `passed`, `failed`, or `not_assessed` within
|
||||||
the `configured_fixture_claims` scope. A pass establishes only the configured
|
the `configured_fixture_claims` scope. A pass establishes only the configured
|
||||||
claims, not unrestricted factual correctness. Native, managed, browser,
|
claims, not unrestricted factual correctness. Native, browser,
|
||||||
navigation-context, and address-context scenarios have no factual rubric and
|
navigation-context, and address-context scenarios have no factual rubric and
|
||||||
remain `not_assessed`; the managed workflow requires both artifact and member
|
remain `not_assessed`.
|
||||||
inspection to answer its type and entry-point question.
|
|
||||||
|
|
||||||
The closed factual scenarios request complete producer Evidence on the initial
|
The closed factual scenarios request complete producer Evidence on the initial
|
||||||
analysis so their source selectors can authenticate all configured facts.
|
inspection or analysis so their source selectors can authenticate all configured facts.
|
||||||
Summary/page/item workflows are exercised separately by `javascript-module-view`;
|
Summary/page/item workflows are exercised separately by `javascript-module-view`;
|
||||||
its heuristic gate does not establish full-producer factual correctness.
|
its heuristic gate does not establish full-producer factual correctness.
|
||||||
|
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
# Documentation ownership and authoring
|
||||||
|
|
||||||
|
Use the [documentation directory](../README.md) to find existing material before
|
||||||
|
adding another guide. Preserve one canonical owner for each contract or workflow;
|
||||||
|
link to that owner instead of copying its claims into several guides.
|
||||||
|
|
||||||
|
## Choose a destination
|
||||||
|
|
||||||
|
| Document | Destination |
|
||||||
|
| -------------------------------------------------------- | -------------------------------------- |
|
||||||
|
| Installation, client setup and first CLI/MCP steps | `docs/getting-started/` |
|
||||||
|
| Analyst workflows and evidence interpretation | `docs/guides/<domain>/` |
|
||||||
|
| Analysis-engine configuration and format prerequisites | `docs/providers/` |
|
||||||
|
| Shared runtime contracts and evidence semantics | `docs/reference/` |
|
||||||
|
| Development, testing, release and authoring instructions | `docs/development/` |
|
||||||
|
| Composition diagrams | `docs/architecture/` |
|
||||||
|
| Compatibility changes for a released version | `docs/migrations/` |
|
||||||
|
| One feature specification, plan and tasks | `docs/specs/<domain>/<feature-slug>/` |
|
||||||
|
| One architectural decision | `docs/adr/<domain>/<decision-slug>.md` |
|
||||||
|
|
||||||
|
Use meaningful, lowercase domain and feature slugs. Global numeric prefixes are
|
||||||
|
unnecessary: different domains can add features independently, and branches do
|
||||||
|
not compete for the next sequence number. Check the existing domain directory
|
||||||
|
and linked issues before creating a feature with the same slug.
|
||||||
|
|
||||||
|
Guides describe existing behavior and limitations. Specs define one proposed
|
||||||
|
feature or domain change; an existing guide does not become a specification by
|
||||||
|
moving it into `specs/`.
|
||||||
|
|
||||||
|
## Feature lifecycle
|
||||||
|
|
||||||
|
Create the specification before implementation. Each feature directory contains:
|
||||||
|
|
||||||
|
- `spec.md`: problem, desired behavior, requirements, acceptance and non-goals.
|
||||||
|
- `plan.md`: the single implementation plan, contracts and architectural choices.
|
||||||
|
- `tasks.md`: incremental, testable steps linked to requirements and verification.
|
||||||
|
|
||||||
|
Split independent domains or separately reviewable features before writing their
|
||||||
|
specs. A broad `ROADMAP.md`, when useful, only lists child specifications, order
|
||||||
|
and dependencies; requirements and implementation tasks belong to each child.
|
||||||
|
Cross-repository contracts have one producer-owned specification. Consumers link
|
||||||
|
to that contract instead of maintaining competing copies.
|
||||||
|
|
||||||
|
Record an isolated architectural decision separately in
|
||||||
|
`docs/adr/<domain>/<decision-slug>.md`, with **Status**, **Context**,
|
||||||
|
**Decision** and **Consequences**. Link the ADR from affected specifications.
|
||||||
|
Do not create decision records for routine file moves or invent past decisions.
|
||||||
|
|
||||||
|
Specs do not replace the contribution-scope decision required for a new provider
|
||||||
|
or expanded execution authority. Follow
|
||||||
|
[contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope).
|
||||||
|
|
||||||
|
## Links and public routes
|
||||||
|
|
||||||
|
Use relative links to physical Markdown files so GitHub readers can follow them.
|
||||||
|
Link repository files outside `docs/` with their full GitHub URLs. Preserve
|
||||||
|
existing heading anchors when moving a guide.
|
||||||
|
|
||||||
|
[`documentation.ts`](https://github.com/morluto/rea/blob/main/docs/.vitepress/documentation.ts)
|
||||||
|
owns categorized site navigation and the existing guides' stable public routes.
|
||||||
|
Update it when adding or moving a guide. VitePress rewrites categorized sources
|
||||||
|
to the existing public paths; its Markdown hook resolves repository links from
|
||||||
|
the physical source and renders them against those public routes. Keep basenames
|
||||||
|
and route assignments unique. Edit links use the physical source file.
|
||||||
|
|
||||||
|
For a move, search for both the basename and its old full path. Update README
|
||||||
|
translations, authored skills, verification instructions, documentation-fact
|
||||||
|
readers and release configuration when they consume that path. Preserve
|
||||||
|
historical release records and references bound to earlier commits or tags.
|
||||||
|
|
||||||
|
## Generated ownership and checks
|
||||||
|
|
||||||
|
The [documentation directory](../README.md#machine-owned-documentation) identifies
|
||||||
|
the machine-owned outputs and their producers. Their existing paths are retained
|
||||||
|
because scripts, package consumers and release history depend on them. Change
|
||||||
|
canonical sources and regenerate; do not fix a generated projection by hand.
|
||||||
|
|
||||||
|
Run `npm run docs:check` for documentation facts and generated consistency, and
|
||||||
|
`npm run verify:docs:routes` to build the complete production site and check local
|
||||||
|
links, anchors and physical edit targets.
|
||||||
|
When a physical path moves, also run the tests that read it. Follow
|
||||||
|
[development checks](testing.md#developer-commands) before requesting review.
|
||||||
@@ -36,7 +36,7 @@ check project-owned conformance fixtures and fail-closed report behavior.
|
|||||||
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `discover-classify` | target-free startup, artifact inventory, compatible workflow selection, and exact visible limits |
|
| `discover-classify` | target-free startup, artifact inventory, compatible workflow selection, and exact visible limits |
|
||||||
| `diagnose-environment` | broken runtime separated from analysis failure, version skew detected, and revision changed after recovery |
|
| `diagnose-environment` | broken runtime separated from analysis failure, version skew detected, and revision changed after recovery |
|
||||||
| `declare-request` | exact target, operation, and lifecycle are carried by the request before launch |
|
| `acquire-authority` | missing scope reported, narrow grant resumed, expansion reprompted, and denial launched nothing |
|
||||||
| `static-analysis` | native and JavaScript routing plus preserved ambiguity, truncation, unsupported syntax, and residual unknowns |
|
| `static-analysis` | native and JavaScript routing plus preserved ambiguity, truncation, unsupported syntax, and residual unknowns |
|
||||||
| `reactive-scenarios` | predicate-driven interaction, descendant settlement, Electron correlation, and cancellation cleanup Evidence |
|
| `reactive-scenarios` | predicate-driven interaction, descendant settlement, Electron correlation, and cancellation cleanup Evidence |
|
||||||
| `compare-authority-candidate` | explicit partial-order/finite-trace semantics, primary divergence localization, and unknown for incomplete comparison |
|
| `compare-authority-candidate` | explicit partial-order/finite-trace semantics, primary divergence localization, and unknown for incomplete comparison |
|
||||||
@@ -6,7 +6,10 @@ checks to pass. Merging that PR into main starts publication automatically.
|
|||||||
|
|
||||||
The Release workflow validates the merged release metadata and ancestry before
|
The Release workflow validates the merged release metadata and ancestry before
|
||||||
creating a tag. npm and MCP Registry publication use the exact reviewed merge
|
creating a tag. npm and MCP Registry publication use the exact reviewed merge
|
||||||
SHA returned by Release Please. Later main commits cannot change that source.
|
SHA returned by Release Please. Before either registry is published, the release
|
||||||
|
run calls full CI qualification at that exact revision, including coverage,
|
||||||
|
portable providers, and every native package host. Later main commits cannot
|
||||||
|
change or cancel that proof.
|
||||||
Ordinary main pushes and closed, unmerged PRs cannot publish packages. Check
|
Ordinary main pushes and closed, unmerged PRs cannot publish packages. Check
|
||||||
both publication jobs and the published-package canary; a merged PR or GitHub
|
both publication jobs and the published-package canary; a merged PR or GitHub
|
||||||
tag alone does not establish that publication finished. Retry failed jobs in
|
tag alone does not establish that publication finished. Retry failed jobs in
|
||||||
@@ -81,7 +84,7 @@ registry metadata or changelog disagrees with that version before creating a tag
|
|||||||
|
|
||||||
### Compatibility and version selection
|
### Compatibility and version selection
|
||||||
|
|
||||||
For the 6.2 candidate, review the [6.1 to 6.2 migration guide](migration-6.2.md)
|
For the 6.2 candidate, review the [6.1 to 6.2 migration guide](../migrations/migration-6.2.md)
|
||||||
alongside the changelog before publication.
|
alongside the changelog before publication.
|
||||||
|
|
||||||
REA uses Release Please's `always-bump-minor` strategy: every release increments
|
REA uses Release Please's `always-bump-minor` strategy: every release increments
|
||||||
@@ -196,8 +199,14 @@ both registry publishes.
|
|||||||
See [npm's provenance implementation](https://github.com/npm/cli/blob/v11.16.0/workspaces/libnpmpublish/lib/provenance.js)
|
See [npm's provenance implementation](https://github.com/npm/cli/blob/v11.16.0/workspaces/libnpmpublish/lib/provenance.js)
|
||||||
for the use of GitHub's workflow ref and commit SHA.
|
for the use of GitHub's workflow ref and commit SHA.
|
||||||
|
|
||||||
The workflow builds the bundled Windows controls and verifies the packaged
|
Full qualification builds the bundled Windows controls and verifies the packaged
|
||||||
artifact before npm publication. It then verifies the published CLI, the
|
artifact on its native hosts. The Linux x64 verifier retains the exact tarball
|
||||||
|
it installed and tested, after its workspace cleanup completes. The npm job
|
||||||
|
downloads that archive from the same workflow run and checks its source SHA,
|
||||||
|
run identity/attempt, package and Node versions, host identity, and SHA-256.
|
||||||
|
It publishes that archive without rebuilding or repacking it. Re-running failed
|
||||||
|
publisher jobs can reuse a prior successful attempt from the same run.
|
||||||
|
The workflow then verifies the published CLI, the
|
||||||
capability-scoped MCP catalog, and the isolated package update path before
|
capability-scoped MCP catalog, and the isolated package update path before
|
||||||
publishing MCP Registry metadata.
|
publishing MCP Registry metadata.
|
||||||
|
|
||||||
@@ -218,6 +227,15 @@ release baseline and can propose an already-published version again.
|
|||||||
After publication, open a PR from the release branch back to main. Preserve
|
After publication, open a PR from the release branch back to main. Preserve
|
||||||
main's later implementation changes and regenerate ignored build outputs from
|
main's later implementation changes and regenerate ignored build outputs from
|
||||||
the combined contracts with the released package version.
|
the combined contracts with the released package version.
|
||||||
|
Before merging, check whether GitHub permits merge commits:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
gh api repos/morluto/rea --jq .allow_merge_commit
|
||||||
|
```
|
||||||
|
|
||||||
|
If disabled, a maintainer must arrange an approved ancestry-preserving merge
|
||||||
|
path before synchronization can finish. Squash and rebase merges do not put the
|
||||||
|
released tag in main's ancestry. Do not substitute them for this step.
|
||||||
Review and test this synchronization PR, then use a merge commit so the release
|
Review and test this synchronization PR, then use a merge commit so the release
|
||||||
tag remains in main's ancestry. Keep the released tag unchanged.
|
tag remains in main's ancestry. Keep the released tag unchanged.
|
||||||
|
|
||||||
@@ -5,8 +5,8 @@ The [platform tracker](https://github.com/morluto/rea/issues/32),
|
|||||||
[browser tracker](https://github.com/morluto/rea/issues/39) track capability and
|
[browser tracker](https://github.com/morluto/rea/issues/39) track capability and
|
||||||
verification work. Available tools and setup are documented in the
|
verification work. Available tools and setup are documented in the
|
||||||
[investigation guides](https://rea.tools/guides/),
|
[investigation guides](https://rea.tools/guides/),
|
||||||
[installation guide](installation.md), and
|
[installation guide](../getting-started/installation.md), and
|
||||||
[generated catalog](mcp-contracts.md#generated-catalog).
|
[generated catalog](../reference/mcp-contracts.md#generated-catalog).
|
||||||
|
|
||||||
## Priorities
|
## Priorities
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ fixture servers; custom orchestration needs a demonstrated requirement.
|
|||||||
Provider and platform claims require their corresponding
|
Provider and platform claims require their corresponding
|
||||||
[real verification lanes](testing.md#real-toolchain-verification-lanes).
|
[real verification lanes](testing.md#real-toolchain-verification-lanes).
|
||||||
See [tool design](tool-design.md) for choosing a tool boundary and
|
See [tool design](tool-design.md) for choosing a tool boundary and
|
||||||
[Ghidra semantics](ghidra-provider.md) for the existing deep-provider contract.
|
[Ghidra semantics](../providers/ghidra-provider.md) for the existing deep-provider contract.
|
||||||
|
|
||||||
Setup remains additive, reuses existing tools, and requires approval for disclosed
|
Setup remains additive, reuses existing tools, and requires approval for disclosed
|
||||||
configuration and Hopper installation changes. Additional installer choices need
|
configuration and Hopper installation changes. Additional installer choices need
|
||||||
@@ -19,11 +19,12 @@ behavior, and complete CI evidence before merging.
|
|||||||
| `npm run test:boundary` | Boundary, CLI boundary, MCP boundary, process boundary, and process-global projects |
|
| `npm run test:boundary` | Boundary, CLI boundary, MCP boundary, process boundary, and process-global projects |
|
||||||
| `npm run test:mcp` | MCP boundary project |
|
| `npm run test:mcp` | MCP boundary project |
|
||||||
| `npm run test:acceptance` | Complete compiled CLI and MCP acceptance workflows |
|
| `npm run test:acceptance` | Complete compiled CLI and MCP acceptance workflows |
|
||||||
|
| `npm run test:python` | LLDB producer retention and launch contracts with a fake LLDB API; no native debugger required |
|
||||||
| `npm run test:watch` | Dirty source tests in watch mode, without build |
|
| `npm run test:watch` | Dirty source tests in watch mode, without build |
|
||||||
| `npm run test:watch:all` | Changed tests from every project; builds at startup, so rebuild after production edits before relying on compiled tests |
|
| `npm run test:watch:all` | Changed tests from every project; builds at startup, so rebuild after production edits before relying on compiled tests |
|
||||||
| `npm run check:changed` | Cached typecheck/lint and branch-related source feedback |
|
| `npm run check:changed` | Cached typecheck/lint and branch-related source feedback |
|
||||||
| `npm run check:pr` | Opt-in complete local deterministic gate and generated-file checks |
|
| `npm run check:pr` | Opt-in complete local deterministic gate and generated-file checks |
|
||||||
| `npm run docs:check` | Generated-document validation from current source and build outputs |
|
| `npm run docs:check` | Generated-document validation and fresh onboarding example consistency checks |
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
@@ -67,6 +68,16 @@ correctness. Select relevant boundary files and real-provider lanes explicitly.
|
|||||||
Source projects also contain large capacity regressions; `test:fast` promises
|
Source projects also contain large capacity regressions; `test:fast` promises
|
||||||
no compiled-runtime prerequisite, not a fixed time budget.
|
no compiled-runtime prerequisite, not a fixed time budget.
|
||||||
|
|
||||||
|
`npm run lint` prints errors and a warning summary; `npm run jscpd` prints
|
||||||
|
duplication statistics. Complete reports remain in `.cache/static-checks/` and
|
||||||
|
CI uploads them as `static-check-reports`, including after a failed static gate.
|
||||||
|
Use `npm run lint:details` or `npm run jscpd:details` for all console diagnostics.
|
||||||
|
Both duplicate commands scan production and test code with the same 3% limit;
|
||||||
|
the summary commands preserve checker failures and restore reports from cached
|
||||||
|
static tasks. Both lint caches include the website, documentation configuration,
|
||||||
|
and experiment code scanned by the checker; a regression compares the actual
|
||||||
|
lint inventory with Turbo's resolved inputs.
|
||||||
|
|
||||||
Routine iterations and rebases need focused regressions and relevant checks.
|
Routine iterations and rebases need focused regressions and relevant checks.
|
||||||
Before handing off a PR, run `npm run check` and generated-document checks when
|
Before handing off a PR, run `npm run check` and generated-document checks when
|
||||||
applicable; CI owns the full suite and coverage. Use the full local gate for
|
applicable; CI owns the full suite and coverage. Use the full local gate for
|
||||||
@@ -97,6 +108,12 @@ runner. Preserve simultaneous launches where concurrency is itself under test.
|
|||||||
|
|
||||||
Build/documentation writers hold checkout-local output locks. Tests do not
|
Build/documentation writers hold checkout-local output locks. Tests do not
|
||||||
hold a broad command lock; `check:pr` finishes tests before document validation.
|
hold a broad command lock; `check:pr` finishes tests before document validation.
|
||||||
|
Turbo caches deterministic preparation and static checks, but `test:run` always
|
||||||
|
executes. Repository files do not fully describe installed tool contents or host
|
||||||
|
state. A previous test pass therefore cannot replace current validation, even
|
||||||
|
when the source tree is unchanged. `check:pr` also runs the fast Python producer
|
||||||
|
suite; CI runs it in the static job for code changes. These producer tests do not
|
||||||
|
establish real LLDB engine coverage.
|
||||||
|
|
||||||
Vitest's persistent compile cache remains disabled. The `cliTest` fixture shares
|
Vitest's persistent compile cache remains disabled. The `cliTest` fixture shares
|
||||||
a temporary Node compile cache among its fresh CLI subprocesses. The worker
|
a temporary Node compile cache among its fresh CLI subprocesses. The worker
|
||||||
@@ -220,7 +237,7 @@ logic.
|
|||||||
reconstruction, native-boundary relationships and application graphs without
|
reconstruction, native-boundary relationships and application graphs without
|
||||||
executing fixture PE files. Operator-local manifests and actual ILSpy oracles
|
executing fixture PE files. Operator-local manifests and actual ILSpy oracles
|
||||||
remain optional, separately reported checks; the real Ghidra NativeAOT lane has
|
remain optional, separately reported checks; the real Ghidra NativeAOT lane has
|
||||||
its own toolchain prerequisites. See [the managed guide](managed-code-analysis.md)
|
its own toolchain prerequisites. See [the managed guide](../guides/managed/managed-code-analysis.md)
|
||||||
for those configurations. Generated completion-ledger checks use the same owning
|
for those configurations. Generated completion-ledger checks use the same owning
|
||||||
entrypoint and include its verifier/fixture files in their cache inputs.
|
entrypoint and include its verifier/fixture files in their cache inputs.
|
||||||
|
|
||||||
@@ -246,18 +263,71 @@ CI owns coverage; aggregate and domain/contract thresholds are maintained in
|
|||||||
Coverage does not replace named boundary or real-provider scenarios.
|
Coverage does not replace named boundary or real-provider scenarios.
|
||||||
|
|
||||||
CI runs six native Vitest shards without retries. Each shard emits a blob
|
CI runs six native Vitest shards without retries. Each shard emits a blob
|
||||||
report; the merge job produces aggregate coverage plus JUnit and JSON timing
|
report; the merge job produces JUnit and JSON diagnostics, a module timing
|
||||||
reports, uploads them together, and writes the slowest files to the workflow
|
report, plus aggregate coverage during full qualification. It retains available
|
||||||
summary. Static checks, documentation, build, package verification, and
|
reports even when a shard fails, uploads available diagnostics, and writes the
|
||||||
|
slowest files to the workflow summary. Partial reports are marked diagnostic
|
||||||
|
only. Failed, cancelled, or missing selected shards still fail the required gate,
|
||||||
|
and aggregate coverage thresholds remain enforced in full qualification.
|
||||||
|
Only successful complete full-tier merges publish the small `test-timings` artifact, with
|
||||||
|
checkout-relative paths; the build job downloads that artifact for the sequencer
|
||||||
|
instead of the coverage/JUnit bundle. Timing weights come from Vitest module
|
||||||
|
diagnostics and include tests and hooks, worker preparation, environment,
|
||||||
|
imports, and setup. Import timings already include transform waits, which are
|
||||||
|
not added again. The weights describe file costs under the measured worker and
|
||||||
|
coverage settings; their sum is not workflow elapsed time. The diagnostic
|
||||||
|
artifact retains the phase breakdown, while shard history keeps only each
|
||||||
|
file's total. Legacy test-body-only history and missing history fall back to native
|
||||||
|
sharding. Static checks, documentation, build, package verification, and
|
||||||
real-system lanes remain separate jobs so one kind of evidence cannot stand in
|
real-system lanes remain separate jobs so one kind of evidence cannot stand in
|
||||||
for another.
|
for another. Workflow syntax and expression validation runs inside the required
|
||||||
|
static-check job when workflow changes select it, avoiding a separate runner.
|
||||||
|
Native, provider, fixture, SQLite compatibility, and website lanes wait for
|
||||||
|
static checks to succeed before allocating their runners. This avoids spending
|
||||||
|
those runner slots on revisions that already fail static validation. Portable
|
||||||
|
test shards and documentation checks remain independent of static results, so
|
||||||
|
they can still provide diagnostic feedback. The required gate rejects skipped
|
||||||
|
selected lanes when static checks fail; passing revisions retain all selected
|
||||||
|
coverage. This ordering reduces peak demand on invalid revisions but can add
|
||||||
|
static-check waiting to otherwise passing runs; it is not a measured reduction
|
||||||
|
in end-to-end latency.
|
||||||
|
|
||||||
|
Core jobs have execution limits of five minutes for classification, ten minutes
|
||||||
|
for static checks, builds, docs, and report merging, and thirty minutes per
|
||||||
|
portable test shard. These limits leave headroom for cold setup and full coverage
|
||||||
|
while preventing a hung job from holding the active main run for hours. They do
|
||||||
|
not bound runner queue waiting. Timeouts still fail the required gate.
|
||||||
|
|
||||||
|
The separate `CI timings` workflow batches recent completed CI and Release runs
|
||||||
|
hourly or on manual dispatch. It uploads `ci-job-timings-batch` with raw API pages and
|
||||||
|
a normalized point-in-time report for each collected workflow attempt, plus a
|
||||||
|
batch manifest describing examined coverage, failures, and limits. Overlapping
|
||||||
|
lookback windows may collect an attempt again; identify records by run ID and
|
||||||
|
attempt. Each batch examines at most 100 completed runs per workflow created in
|
||||||
|
the preceding 24 hours, with a four-minute API collection budget. It collects the
|
||||||
|
latest attempt of each selected run and does not claim an exhaustive archive.
|
||||||
|
It runs the reporter from the trusted default branch with read-only permissions,
|
||||||
|
treating workflow runs as API data. It does not allocate a new reporter job for
|
||||||
|
every completed, cancelled, or skipped workflow. Reports separate queue
|
||||||
|
waiting (`created_at` to `started_at`) from completed execution and report
|
||||||
|
percentiles plus matched `npm ci` and artifact-step durations.
|
||||||
|
Queue excludes dependency waiting before job creation and does not establish
|
||||||
|
whether account concurrency or runner availability caused the wait. Queued jobs with
|
||||||
|
placeholder start times, skipped jobs, and missing or invalid timestamps remain
|
||||||
|
unknown. The reporter targets each selected run and attempt explicitly.
|
||||||
|
Summed job elapsed time is parallel work, not workflow wall time, CPU time,
|
||||||
|
memory usage, or billing. Step names identify samples, not complete transfer
|
||||||
|
costs. Its queue, execution, and failures are independent of the required gate
|
||||||
|
and publication. CPU time and peak process-family memory are not measured by this API.
|
||||||
|
|
||||||
The build job saves portable Turbo outputs across runs. Eight Linux real-system
|
The build job saves portable Turbo outputs across runs. Eight Linux real-system
|
||||||
lanes restore this cache without waiting for the build job. The shared action
|
lanes restore this cache without waiting for the build job. The shared action
|
||||||
derives its key from `test:prepare --dry=json` task hashes, runner OS and
|
derives its key from `test:prepare --dry=json` task hashes, runner OS and
|
||||||
architecture, and `.npmrc`; test-only changes can reuse compiled outputs. Every
|
architecture, `.npmrc`, `.nvmrc`, and the lockfile; test-only changes can reuse compiled outputs. Every
|
||||||
build and verification command still runs, so Turbo checks task inputs and
|
build and verification command still runs, so Turbo checks task inputs and
|
||||||
rebuilds misses. There is no prefix fallback to accumulate older build outputs.
|
rebuilds misses. A restore prefix with the same platform and toolchain permits
|
||||||
|
partial task reuse when one generator's inputs change; Turbo still invalidates
|
||||||
|
that generator's entry. Native outputs are not stored in this cache.
|
||||||
|
|
||||||
Native package jobs, the Windows curated lane, and the Apple artifact lane reuse
|
Native package jobs, the Windows curated lane, and the Apple artifact lane reuse
|
||||||
the same workflow's Turbo cache for portable compiled JavaScript, skills, and
|
the same workflow's Turbo cache for portable compiled JavaScript, skills, and
|
||||||
@@ -266,9 +336,10 @@ commands, which restore matching outputs or rebuild on a cache miss. Native
|
|||||||
artifacts, dependency installs, package archives, and runtime verification remain
|
artifacts, dependency installs, package archives, and runtime verification remain
|
||||||
host-local. Keep platform-dependent outputs out of this shared cache.
|
host-local. Keep platform-dependent outputs out of this shared cache.
|
||||||
|
|
||||||
The PR acceptance target is a median `npm run check:pr` wall time below three
|
Record cold and warm preparation separately from fresh test execution when
|
||||||
minutes across three warm-build runs on the benchmark host. Keep Vitest caches
|
benchmarking the optional `npm run check:pr` gate. Compare multiple runs on the
|
||||||
cold unless separately identified. A PR that touches packaging or real-system
|
same host, including subprocess and queue costs; a cached pass is not a test
|
||||||
|
runtime measurement. A PR that touches packaging or real-system
|
||||||
behavior requires the applicable `verify:*` lanes; packaging and installation
|
behavior requires the applicable `verify:*` lanes; packaging and installation
|
||||||
changes also require `npm run verify:package`. The full-gate benchmark measures
|
changes also require `npm run verify:package`. The full-gate benchmark measures
|
||||||
that explicit lane, not the routine iteration requirement.
|
that explicit lane, not the routine iteration requirement.
|
||||||
@@ -292,6 +363,7 @@ prove behavior on the verified Ghidra 12.1.4 and JDK 21 build.
|
|||||||
| `npm run verify:ghidra` | Linux x64/arm64 ELF or macOS x64/arm64 Mach-O | Host C compiler, Ghidra 12.1.4, and full JDK 21 |
|
| `npm run verify:ghidra` | Linux x64/arm64 ELF or macOS x64/arm64 Mach-O | Host C compiler, Ghidra 12.1.4, and full JDK 21 |
|
||||||
| `npm run verify:ghidra:seeds` | POSIX; raw x86 fixture; seed ordering, BSS labels, analyzer readback and unknown-name rejection | Ghidra 12.1.4 and full JDK 21 |
|
| `npm run verify:ghidra:seeds` | POSIX; raw x86 fixture; seed ordering, BSS labels, analyzer readback and unknown-name rejection | Ghidra 12.1.4 and full JDK 21 |
|
||||||
| `npm run verify:ghidra:swift` | macOS x64/arm64 Mach-O | Host Swift compiler, Ghidra 12.1.4, and full JDK 21 |
|
| `npm run verify:ghidra:swift` | macOS x64/arm64 Mach-O | Host Swift compiler, Ghidra 12.1.4, and full JDK 21 |
|
||||||
|
| `npm run verify:ghidra:riscv` | Linux/macOS x64/arm64 host; source-owned RV32/RV64 ELF through CLI and MCP | RISC-V Clang, LLD, LLVM readelf, Ghidra 12.1.4, and full JDK 21 |
|
||||||
| `npm run verify:ghidra:switch` | Linux x64 ELF; GCC/Clang optimized and stripped switch fixtures | GCC, Clang, GNU nm/objdump/strip, Ghidra 12.1.4, and full JDK 21 |
|
| `npm run verify:ghidra:switch` | Linux x64 ELF; GCC/Clang optimized and stripped switch fixtures | GCC, Clang, GNU nm/objdump/strip, Ghidra 12.1.4, and full JDK 21 |
|
||||||
| `npm run verify:ghidra:aarch64-jump-table` | Any supported Ghidra host; AArch64 ELF; signed/unsigned byte/halfword tables; host ARM64 Mach-O | Clang with AArch64 target support, Ghidra 12.1.4, and full JDK 21 |
|
| `npm run verify:ghidra:aarch64-jump-table` | Any supported Ghidra host; AArch64 ELF; signed/unsigned byte/halfword tables; host ARM64 Mach-O | Clang with AArch64 target support, Ghidra 12.1.4, and full JDK 21 |
|
||||||
| `npm run verify:ghidra:cross-format` | Any supported Ghidra host; also analyzes AArch64 ELF, x86-64 PE, and x86-64 Mach-O | `clang`, LLD, and `lld-link` in addition to host-lane prerequisites |
|
| `npm run verify:ghidra:cross-format` | Any supported Ghidra host; also analyzes AArch64 ELF, x86-64 PE, and x86-64 Mach-O | `clang`, LLD, and `lld-link` in addition to host-lane prerequisites |
|
||||||
@@ -442,14 +514,14 @@ fixed public ApiDemos v6.0.18 fixture. Obtain both with the explicit
|
|||||||
kept under ignored `_reference/`. No Gradle build, Android SDK, emulator or
|
kept under ignored `_reference/`. No Gradle build, Android SDK, emulator or
|
||||||
application execution is required. The lane compares real CLI/MCP package,
|
application execution is required. The lane compares real CLI/MCP package,
|
||||||
class search, class inventory, method decompilation and incoming references.
|
class search, class inventory, method decompilation and incoming references.
|
||||||
See [Android analysis](android-analysis.md) for boundaries and resource budgets.
|
See [Android analysis](../guides/android/android-analysis.md) for boundaries and resource budgets.
|
||||||
|
|
||||||
`verify:jeb` requires a caller-started JEB client serving MCP at
|
`verify:jeb` requires a caller-started JEB client serving MCP at
|
||||||
`REA_JEB_MCP_URL` (default `http://127.0.0.1:8425/mcp`) with a project
|
`REA_JEB_MCP_URL` (default `http://127.0.0.1:8425/mcp`) with a project
|
||||||
already open, and verifies real CLI client inspection, unit listing coverage,
|
already open, and verifies real CLI client inspection, unit listing coverage,
|
||||||
and method decompilation. The script records the engine's exact response to
|
and method decompilation. The script records the engine's exact response to
|
||||||
`open_jeb_project`; JEB 5.48.0 headless instances do not advertise that tool.
|
`open_jeb_project`; JEB 5.48.0 headless instances do not advertise that tool.
|
||||||
REA does not install or launch JEB; see [JEB analysis](jeb-analysis.md) for
|
REA does not install or launch JEB; see [JEB analysis](../providers/jeb-analysis.md) for
|
||||||
the bring-your-own boundary. Verified against JEB 5.48.0 serving
|
the bring-your-own boundary. Verified against JEB 5.48.0 serving
|
||||||
`jeb-mcp-server` 1.3.0 at four scales: a compiled Java class fixture, a
|
`jeb-mcp-server` 1.3.0 at four scales: a compiled Java class fixture, a
|
||||||
locally built signed probe APK with a launcher activity (manifest, v1/v2/v3
|
locally built signed probe APK with a launcher activity (manifest, v1/v2/v3
|
||||||
@@ -463,7 +535,7 @@ CLI and MCP with explicit unit selection, plus the thin Java wrapper and
|
|||||||
decoded manifest. The dedicated Dart snapshot processor and `run_script`
|
decoded manifest. The dedicated Dart snapshot processor and `run_script`
|
||||||
remain GUI-only surfaces in JEB 5.48.0 headless.
|
remain GUI-only surfaces in JEB 5.48.0 headless.
|
||||||
Authenticated IPA and macOS application inventory projection is documented in
|
Authenticated IPA and macOS application inventory projection is documented in
|
||||||
[Apple application analysis](apple-application-analysis.md).
|
[Apple application analysis](../guides/apple/apple-application-analysis.md).
|
||||||
|
|
||||||
`npm run verify:harmony` requires no SDK or engine. It projects the pinned
|
`npm run verify:harmony` requires no SDK or engine. It projects the pinned
|
||||||
harmony-next-pipeline 1.0.1 release HAP from an MIT-licensed source repository,
|
harmony-next-pipeline 1.0.1 release HAP from an MIT-licensed source repository,
|
||||||
@@ -473,7 +545,7 @@ The lane exercises `inspect_artifact`, projection determinism, Stage-model
|
|||||||
path hints, exact component sets, signing-entry limitations, and CLI/MCP parity.
|
path hints, exact component sets, signing-entry limitations, and CLI/MCP parity.
|
||||||
The release artifact has no independently established compiler/SDK or
|
The release artifact has no independently established compiler/SDK or
|
||||||
reproducible source build; the default lane does not verify an installed package.
|
reproducible source build; the default lane does not verify an installed package.
|
||||||
See [HarmonyOS package inventory](harmony-analysis.md) for those proof boundaries.
|
See [HarmonyOS package inventory](../guides/harmony/harmony-analysis.md) for those proof boundaries.
|
||||||
HarmonyOS `.har` libraries are deliberately not suffix-classified because
|
HarmonyOS `.har` libraries are deliberately not suffix-classified because
|
||||||
`.har` also names HTTP Archive JSON.
|
`.har` also names HTTP Archive JSON.
|
||||||
|
|
||||||
@@ -494,7 +566,7 @@ with the reported target identity, apktool.yml metadata projection
|
|||||||
(1.2.3, SDK 24–34), manifest package agreement, and both the default and
|
(1.2.3, SDK 24–34), manifest package agreement, and both the default and
|
||||||
`de` string tables projected through the locale option. Parser goldens in
|
`de` string tables projected through the locale option. Parser goldens in
|
||||||
`src/apktool/ApktoolDecodeOutput.test.ts` come from the same decode. See
|
`src/apktool/ApktoolDecodeOutput.test.ts` come from the same decode. See
|
||||||
[Apktool resource analysis](apktool-resource-analysis.md) for boundaries and
|
[Apktool resource analysis](../guides/android/apktool-resource-analysis.md) for boundaries and
|
||||||
budgets.
|
budgets.
|
||||||
|
|
||||||
## Flutter build identification
|
## Flutter build identification
|
||||||
@@ -524,7 +596,7 @@ documented Gallery APK to assert its pinned digest, hash, exact engine labels
|
|||||||
and per-ABI URI counts. The verifier requires complete structural snapshot
|
and per-ABI URI counts. The verifier requires complete structural snapshot
|
||||||
coverage, reports bounded pool coverage as partial/unverified, and reports
|
coverage, reports bounded pool coverage as partial/unverified, and reports
|
||||||
exact labels/counts on other APKs unverified without an expectations file.
|
exact labels/counts on other APKs unverified without an expectations file.
|
||||||
See [Flutter build identification](flutter-analysis.md) for boundaries and
|
See [Flutter build identification](../guides/android/flutter-analysis.md) for boundaries and
|
||||||
budgets.
|
budgets.
|
||||||
|
|
||||||
## ADB device acquisition
|
## ADB device acquisition
|
||||||
@@ -555,7 +627,7 @@ removal. System-package pulls whose APKs keep non-`base.apk` names report
|
|||||||
the `unknown` role with the file-name basis, verified with
|
the `unknown` role with the file-name basis, verified with
|
||||||
`com.android.settings` (single 73.9 MB APK). Parser goldens for
|
`com.android.settings` (single 73.9 MB APK). Parser goldens for
|
||||||
`adb devices -l`, `getprop`, `pm list packages -f`, and `pm path` come from
|
`adb devices -l`, `getprop`, `pm list packages -f`, and `pm path` come from
|
||||||
the same device. See [ADB device analysis](adb-device-analysis.md) for
|
the same device. See [ADB device analysis](../guides/android/adb-device-analysis.md) for
|
||||||
boundaries and budgets.
|
boundaries and budgets.
|
||||||
|
|
||||||
## Optional NativeAOT Ghidra analysis
|
## Optional NativeAOT Ghidra analysis
|
||||||
@@ -574,6 +646,12 @@ records independent symbol/directory/SHA oracles; it never executes the target.
|
|||||||
Linux also builds stripped, ordinary-native and small malformed/ambiguous/layout
|
Linux also builds stripped, ordinary-native and small malformed/ambiguous/layout
|
||||||
negative inputs. The optional Windows fixture workflow builds a PE on a Windows
|
negative inputs. The optional Windows fixture workflow builds a PE on a Windows
|
||||||
runner; analyzing that PE on Linux does not verify a Windows Ghidra host.
|
runner; analyzing that PE on Linux does not verify a Windows Ghidra host.
|
||||||
|
On a local Windows host, the .NET 8 ILCompiler finds the linker only through
|
||||||
|
Visual Studio 2019 or 2022 (`vswhere -version [16,18)`). With only Visual
|
||||||
|
Studio Build Tools 2026 installed, open its x64 Developer Command Prompt.
|
||||||
|
In that same `cmd.exe` session, run `set IlcUseEnvironmentalTools=true` and
|
||||||
|
then `npm run build:fixtures:nativeaot`. Running `vcvars64.bat` as a child of
|
||||||
|
PowerShell does not preserve its environment in the parent PowerShell session.
|
||||||
|
|
||||||
Build the clean pinned upstream adapter with `build:ghidra:nativeaot`, then set
|
Build the clean pinned upstream adapter with `build:ghidra:nativeaot`, then set
|
||||||
`REA_GHIDRA_NATIVEAOT_JAR`. Run `verify:ghidra:nativeaot -- symbols`, `-- stripped`,
|
`REA_GHIDRA_NATIVEAOT_JAR`. Run `verify:ghidra:nativeaot -- symbols`, `-- stripped`,
|
||||||
@@ -593,23 +671,26 @@ with `REA_NATIVEAOT_PROOF_CAPTURE_DIR` (absolute paths).
|
|||||||
Keep builds/imports sequential on small hosts; scope `GHIDRA_HEADLESS_MAXMEM`
|
Keep builds/imports sequential on small hosts; scope `GHIDRA_HEADLESS_MAXMEM`
|
||||||
(e.g. `768M`) to this command and use CPU affinity if needed. REA does not install
|
(e.g. `768M`) to this command and use CPU affinity if needed. REA does not install
|
||||||
or upgrade Java, Ghidra, .NET or native toolchains. See
|
or upgrade Java, Ghidra, .NET or native toolchains. See
|
||||||
[the supported layout and provenance](ghidra-nativeaot.md).
|
[the supported layout and provenance](../providers/ghidra-nativeaot.md).
|
||||||
|
|
||||||
## IDA MCP adapter
|
## IDA MCP adapter
|
||||||
|
|
||||||
`npm run verify:ida -- --target /absolute/path/to/program --procedure main`
|
`npm run verify:ida -- --target /absolute/path/to/program --procedure main`
|
||||||
uses the existing `REA_IDA_MCP_CONFIG` registration. It installs no engine,
|
uses the existing `REA_IDA_MCP_CONFIG` registration. It installs no engine,
|
||||||
Python package, or compiler. The target must already be open in the GUI for
|
Python package, or compiler. The target must already be open in the GUI for
|
||||||
the legacy attached profile; the database-supervisor headless profile opens
|
the legacy or native attached profile; the database-supervisor headless profile opens
|
||||||
a digest-verified private copy. A caller-supplied fixture keeps prerequisites
|
a digest-verified private copy. A caller-supplied fixture keeps prerequisites
|
||||||
limited to the selected engine and host. `tests/conformance/ida/inventory.c`
|
limited to the selected engine and host. `tests/conformance/ida/inventory.c`
|
||||||
provides an optional small native fixture source with an exported
|
provides an optional small native fixture source with exported
|
||||||
`rea_fixture_add` function.
|
`rea_fixture_add` and `rea_fixture_subtract` functions. For their switching check,
|
||||||
|
use `--second-procedure rea_fixture_subtract --second-marker='- 13'`.
|
||||||
|
|
||||||
The lane invokes the production CLI dispatcher and connects the pinned MCP
|
The lane invokes the production CLI dispatcher and connects the pinned MCP
|
||||||
client SDK to the production REA server. It verifies function Evidence and
|
client SDK to the production REA server. It verifies function Evidence and
|
||||||
CLI/MCP parity, inventory/search, pseudocode, instructions, xrefs, malformed
|
CLI/MCP parity, inventory/search, pseudocode, instructions, xrefs, malformed
|
||||||
input, original-input preservation, and lifecycle cleanup. For headless
|
input, original-input preservation, and lifecycle cleanup. The headless
|
||||||
|
profile also checks containing procedures, the admitted program as the
|
||||||
|
document, address context, and feature tracing. For headless
|
||||||
analysis it confirms that the owned database IDs disappear from upstream
|
analysis it confirms that the owned database IDs disappear from upstream
|
||||||
discovery and private workspaces are removed. For attached analysis it confirms
|
discovery and private workspaces are removed. For attached analysis it confirms
|
||||||
the existing GUI target remains reachable with the same input identity.
|
the existing GUI target remains reachable with the same input identity.
|
||||||
@@ -630,7 +711,11 @@ symbols carry a leading underscore). Before the headless session waited out
|
|||||||
the transient `busy` health a worker can report right after opening, that lane
|
the transient `busy` health a worker can report right after opening, that lane
|
||||||
failed intermittently on that host. Linux headless, modern attached GUI tools,
|
failed intermittently on that host. Linux headless, modern attached GUI tools,
|
||||||
other engine versions and architectures remain unverified; see the
|
other engine versions and architectures remain unverified; see the
|
||||||
[provider guide](ida-provider.md).
|
[provider guide](../providers/ida-provider.md).
|
||||||
|
|
||||||
|
Native IDA MCP verification uses `"protocol": "native"` with an already-running native plugin and requires `--second-procedure other_function --second-marker unique_second_body_text` to exercise GUI function switching and a return to the first function. These options remain optional for other profiles. The literal marker must appear in the second function's pseudocode and be absent from the first. Native cloud/widget failures are reported without hidden retries.
|
||||||
|
|
||||||
|
The initial Linux x64 IDA Free 9.4 run used native MCP 1.1.2 with a local navigation correction. Windows x64 verification uses **IDA Pro 9.3**, the two-function public fixture, and the shipped Windows `whoami.exe` application. The native plugin was built from upstream `c9d15d98e8a143fc74f6e14037c48f63889b6d6c`, including the merged navigation fix, with a local loopback-listener change. Production CLI/MCP parity, switching, identity and cleanup passed. Correctness and performance measurements are recorded in the [Windows native verification notes](https://github.com/morluto/rea/blob/main/experiments/analysis-efficiency/ida-native-windows.md). Stock 1.1.2 switching, native macOS, and Windows IDA Free remain unverified. See the [native bridge prerequisites](../providers/ida-provider.md#optional-native-ida-mcp-bridge).
|
||||||
|
|
||||||
## DOS Ghidra analysis
|
## DOS Ghidra analysis
|
||||||
|
|
||||||
@@ -642,7 +727,7 @@ stable CLI/MCP observations, unchanged source bytes, and owned process/project
|
|||||||
cleanup. Raw p-code address-space selector tokens are reported separately from
|
cleanup. Raw p-code address-space selector tokens are reported separately from
|
||||||
the stable observation comparison. Linux x64 and macOS arm64 are verified;
|
the stable observation comparison. Linux x64 and macOS arm64 are verified;
|
||||||
macOS x64 remains unverified. This lane is separate from host-native and optional cross-format
|
macOS x64 remains unverified. This lane is separate from host-native and optional cross-format
|
||||||
verification. See [DOS analysis](ghidra-dos.md).
|
verification. See [DOS analysis](../providers/ghidra-dos.md).
|
||||||
|
|
||||||
`npm run verify:ghidra:com` uses a generated headerless fixture with no compiler,
|
`npm run verify:ghidra:com` uses a generated headerless fixture with no compiler,
|
||||||
DOS emulator or game data. It exercises explicit admission, BinaryLoader entry
|
DOS emulator or game data. It exercises explicit admission, BinaryLoader entry
|
||||||
@@ -655,6 +740,16 @@ truncation constraint, while leading-zero coordinates still resolve correctly.
|
|||||||
It has the same Ghidra/JDK prerequisites as the MZ lane. Neither lane claims DOS
|
It has the same Ghidra/JDK prerequisites as the MZ lane. Neither lane claims DOS
|
||||||
runtime or PC-98 device execution.
|
runtime or PC-98 device execution.
|
||||||
|
|
||||||
|
`npm run verify:ghidra:6502` uses `ca65` and `ld65` to build the source-owned
|
||||||
|
NMOS 6502 fixture from `tests/conformance/ghidra/6502.s` and `6502.cfg`. Set
|
||||||
|
`REA_CA65` and `REA_LD65` for non-PATH installations (tested with cc65 `V2.19`).
|
||||||
|
With an installed Ghidra 12.1.4 and full JDK, it verifies real CLI/stdio MCP
|
||||||
|
mapping parity, exact source bytes, functions, a direct call reference,
|
||||||
|
decompilation, 16-bit overflow rejection without replacing the active session,
|
||||||
|
and runtime cleanup. Windows additionally requires the matching native addon;
|
||||||
|
its verifier lineage remains explicitly unavailable outside the provider's
|
||||||
|
retained Job Object, as in the other Windows lanes.
|
||||||
|
|
||||||
`npm run verify:ghidra:raw` uses a generated ARM little-endian headerless image
|
`npm run verify:ghidra:raw` uses a generated ARM little-endian headerless image
|
||||||
through the compiled CLI and stdio MCP server. With the same Ghidra/JDK
|
through the compiled CLI and stdio MCP server. With the same Ghidra/JDK
|
||||||
prerequisites, it checks preparation and bridge startup, verified load mappings,
|
prerequisites, it checks preparation and bridge startup, verified load mappings,
|
||||||
@@ -663,7 +758,45 @@ the entry changes without `provider_id`, unchanged source bytes, and owned
|
|||||||
cleanup. Six-byte x86 and x86_64 controls also verify supported compiler
|
cleanup. Six-byte x86 and x86_64 controls also verify supported compiler
|
||||||
specifications, independent mappings, unchanged bytes, and decompilation of a
|
specifications, independent mappings, unchanged bytes, and decompilation of a
|
||||||
known return value. AArch64 remains covered by deterministic tests rather than
|
known return value. AArch64 remains covered by deterministic tests rather than
|
||||||
this real-provider lane. See [raw binary analysis](raw-binary.md).
|
this real-provider lane. See [raw binary analysis](../providers/raw-binary.md).
|
||||||
|
|
||||||
|
`npm run verify:ghidra:address-context` runs on Linux with a caller-installed
|
||||||
|
Ghidra, full JDK, and an x86-64 ELF GCC toolchain (`CC` selects another compatible
|
||||||
|
compiler). It builds
|
||||||
|
`tests/conformance/c/pie-address-context.c` as a PIE ELF without executing it.
|
||||||
|
The compiled CLI and real stdio MCP workflow must expose the measured image
|
||||||
|
base, retain segment address spaces, agree on the overview, resolve explicit and
|
||||||
|
numeric file offsets, and reject unmapped analysis addresses with actionable
|
||||||
|
guidance. It checks the reverse `address-to-file-offset` mapping, file-coordinate
|
||||||
|
Evidence locations, and the suggested CLI search and load-image commands.
|
||||||
|
The verifier compares mapped bytes with the source file and checks source
|
||||||
|
identity, session preservation after failed lookup, owned runtime cleanup, and
|
||||||
|
verified empty process lineage. This lane does not establish Windows or macOS
|
||||||
|
real-provider coverage.
|
||||||
|
|
||||||
|
For source-identity boundaries that a normal single-file import cannot create,
|
||||||
|
`tests/conformance/ghidra/ReaFileOffsetSourceProbe.java` exercises the production
|
||||||
|
bridge against real Ghidra `FileBytes`. It rejects auxiliary and partial sources,
|
||||||
|
checks the original target's round trip, and retains ambiguity when duplicate
|
||||||
|
target bytes have distinct loaded mappings. Injected decompiler failures and
|
||||||
|
cancellation verify that completed source/function resolution facts and backend
|
||||||
|
failure codes survive; these injections do not establish natural engine failures.
|
||||||
|
On Windows, after creating the
|
||||||
|
source-owned PE fixture, run from the repository root:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
node scripts/create-ghidra-windows-fixture.mjs
|
||||||
|
$proofRoot = Join-Path $env:TEMP 'rea-file-offset-source-proof'
|
||||||
|
New-Item -ItemType Directory -Path $proofRoot -Force | Out-Null
|
||||||
|
Copy-Item bridge/ghidra/ReaGhidraBridge.java, bridge/ghidra/ReaGhidraExtensions.java, tests/conformance/ghidra/ReaFileOffsetSourceProbe.java -Destination $proofRoot
|
||||||
|
& "$env:GHIDRA_INSTALL_DIR/support/analyzeHeadless.bat" $proofRoot source-proof -import "$PWD/build/fixtures/rea-ghidra-windows.exe" -scriptPath $proofRoot -postScript ReaFileOffsetSourceProbe.java -deleteProject
|
||||||
|
```
|
||||||
|
|
||||||
|
Require the `REA_FILE_OFFSET_SOURCE_OK` marker and no script errors; Ghidra may
|
||||||
|
exit successfully even when a post-script fails. The probe edits only its
|
||||||
|
temporary analysis database and does not execute the fixture. This producer
|
||||||
|
regression supplements public CLI/MCP coverage and does not establish Linux
|
||||||
|
host behavior or native process-supervision controls.
|
||||||
|
|
||||||
## Apple Interface Builder archives
|
## Apple Interface Builder archives
|
||||||
|
|
||||||
@@ -682,13 +815,35 @@ not make native host acceptance unavailable.
|
|||||||
Pull requests that change only root `README*.md` files, `docs/`, `AGENTS.md`,
|
Pull requests that change only root `README*.md` files, `docs/`, `AGENTS.md`,
|
||||||
`CONTRIBUTING.md`, `CHANGELOG.md`, `SECURITY.md`, `native/windows/README.md`,
|
`CONTRIBUTING.md`, `CHANGELOG.md`, `SECURITY.md`, `native/windows/README.md`,
|
||||||
or the GitHub issue and pull-request templates run formatting and
|
or the GitHub issue and pull-request templates run formatting and
|
||||||
generated-document validation without the source-test shards or native package
|
generated-document validation, including the small onboarding example consistency
|
||||||
|
suite, without the source-test shards or native package
|
||||||
lanes. Classification compares the PR head with its merge base, so later
|
lanes. Classification compares the PR head with its merge base, so later
|
||||||
base-branch changes do not expand that scope. Static and coverage aggregate jobs
|
base-branch changes do not expand that scope. Static and portable-test aggregate jobs
|
||||||
remain present and fail if classification fails. Every code change retains the
|
remain present and fail if classification fails. Every code change retains the
|
||||||
complete six-shard Linux suite; individual test files are not selected by
|
complete six-shard Linux suite; individual test files are not selected by
|
||||||
imports or filenames.
|
imports or filenames.
|
||||||
|
|
||||||
|
Ordinary PRs also produce an **observational** test-selection plan. The candidate
|
||||||
|
leaf-adapter ownership table lives in `scripts/ci/test-selection.mjs`, separately
|
||||||
|
from provider-job scopes. It proposes keeping affected owners plus every unowned
|
||||||
|
test, including all CLI/MCP, acceptance, composition, conformance, and process
|
||||||
|
tests. Shared inputs, unknown paths, missing owner tests, and removed tests fall
|
||||||
|
back to the complete inventory. Renames account for both paths. Main, scheduled,
|
||||||
|
manual, and `ci:full` runs always propose the full suite.
|
||||||
|
|
||||||
|
All six shards still execute the complete suite. The existing report merge
|
||||||
|
compares the proposal with actual module outcomes and retains
|
||||||
|
`.cache/ci-test-selection/report.json` in `test-results`, including selected and
|
||||||
|
omitted paths, changed input paths, missed failures, unobserved files, scheduling weights, PR head and
|
||||||
|
executed merge SHA. This adds no test reruns or runner jobs. Missing, duplicate,
|
||||||
|
skipped, interrupted, or unhandled results cannot establish a complete comparison;
|
||||||
|
even a complete passing comparison is not proof of ownership completeness.
|
||||||
|
Before enabling omissions, review representative full-run comparisons and
|
||||||
|
cross-owner consumers, including failures, and measure completed CI feedback and
|
||||||
|
runner demand. There is no automatic promotion or switch to skip tests. The
|
||||||
|
initial proposal measures only leaf producer-test omissions; it does not promise
|
||||||
|
the savings of a broader affected-test planner.
|
||||||
|
|
||||||
`scripts/ci/plan.mjs` selects lanes using the ownership table in
|
`scripts/ci/plan.mjs` selects lanes using the ownership table in
|
||||||
`scripts/ci/scopes.mjs`. Provider implementation changes run their real-provider
|
`scripts/ci/scopes.mjs`. Provider implementation changes run their real-provider
|
||||||
verifiers and the Linux x64 installed-package/Inspector baseline. The `apple`
|
verifiers and the Linux x64 installed-package/Inspector baseline. The `apple`
|
||||||
@@ -703,9 +858,19 @@ lane. Edits to verifier entrypoints run only by manual, licensed or self-hosted
|
|||||||
workflows run static checks and the Linux suite. Website changes run website
|
workflows run static checks and the Linux suite. Website changes run website
|
||||||
checks. Provider workflow changes validate the workflow and run that provider's
|
checks. Provider workflow changes validate the workflow and run that provider's
|
||||||
verifier. Manual-provider/Android workflow changes run workflow validation only.
|
verifier. Manual-provider/Android workflow changes run workflow validation only.
|
||||||
|
The four-version SQLite compatibility matrix has its own `sqlite` scope for
|
||||||
|
SQLite implementation, contracts, CLI/MCP registration, fixtures, and shared
|
||||||
|
runtime boundaries. SQLite and server-lifecycle test edits and the SQLite npm
|
||||||
|
scripts also select it. Unrelated code edits retain the complete portable suite
|
||||||
|
on the pinned Node version without starting four additional compatibility jobs.
|
||||||
|
Full qualification retains every SQLite version.
|
||||||
Shared process/contract/CLI boundaries, dependencies, other packaging inputs,
|
Shared process/contract/CLI boundaries, dependencies, other packaging inputs,
|
||||||
unknown paths, and changes to the planner select the full baseline. Package
|
unknown paths, and changes to the planner select the full baseline.
|
||||||
script-only edits select their owning verifier when its entrypoint is
|
CI timing collection, timing history, and test-report helper edits retain static
|
||||||
|
checks and the complete portable suite without selecting unrelated host/provider
|
||||||
|
lanes. Classification, qualification, gate, release receipt, and unknown CI
|
||||||
|
scripts keep the broad fallback.
|
||||||
|
Package script-only edits select their owning verifier when its entrypoint is
|
||||||
identifiable; unknown or shared script changes select everything. Android
|
identifiable; unknown or shared script changes select everything. Android
|
||||||
build-script edits retain the Linux suite and workflow validation; real Android
|
build-script edits retain the Linux suite and workflow validation; real Android
|
||||||
verification stays manual. Renames account for both paths.
|
verification stays manual. Renames account for both paths.
|
||||||
@@ -713,38 +878,84 @@ verification stays manual. Renames account for both paths.
|
|||||||
This narrower selection trades PR-time coverage for runner capacity. A change to
|
This narrower selection trades PR-time coverage for runner capacity. A change to
|
||||||
unowned shared runtime code that fails only on arm64, macOS, Windows, the Apple
|
unowned shared runtime code that fails only on arm64, macOS, Windows, the Apple
|
||||||
artifact lane, or a provider lane that does not own the file is not caught on
|
artifact lane, or a provider lane that does not own the file is not caught on
|
||||||
the PR; the main-push full baseline reports it after merge. Ownership globs do
|
the PR; scheduled full qualification reports it after merge. Ownership globs do
|
||||||
not follow imports. Use the `ci:full` label when a change may have native-host
|
not follow imports. Use the `ci:full` label when a change may have native-host
|
||||||
or provider effects outside its owners.
|
or provider effects outside its owners.
|
||||||
|
|
||||||
Main pushes and manual dispatch retain the full baseline, including all portable
|
Ordinary main pushes use the same owner scopes as PRs. Their diff starts at a
|
||||||
provider lanes and the native matrix below. A `ci:full` PR label selects the full
|
successful ancestor push run of this CI workflow, rather than the preceding
|
||||||
baseline on the next PR run; manual dispatch can request it immediately. Each
|
push: changes from failed or cancelled intermediate runs remain in scope.
|
||||||
|
Missing, untrusted, or non-ancestor history selects every lane. The lookup is
|
||||||
|
bounded to the last 100 successful push runs; lookup failures broaden selection.
|
||||||
|
Every code change still runs all six portable shards, without coverage
|
||||||
|
instrumentation in this fast tier. This deliberately avoids relying on an
|
||||||
|
import graph for generated files, filesystem inputs, subprocesses, or bridges.
|
||||||
|
|
||||||
|
Scheduled qualification is admitted hourly at minute 23. A forced full run at
|
||||||
|
03:23 UTC refreshes runner and dependency drift every day. Other hourly runs
|
||||||
|
can reuse a successful full-qualification receipt for the exact source SHA
|
||||||
|
from the same repository's trusted CI workflow on its default branch. Both the
|
||||||
|
receipt and original workflow run must be less than 24 hours old, so retrying an
|
||||||
|
old gate cannot renew stale proof. Missing, expired, failed, foreign, or uncertain proof runs full
|
||||||
|
validation; API lookup failure also runs full. Lookups examine at most 100 named
|
||||||
|
receipts and three candidate runs within a 20-second budget. Reused runs select
|
||||||
|
no validation lanes, identify the original run, and produce no new receipt, so
|
||||||
|
reuse cannot indefinitely extend proof freshness. They make no fresh provider
|
||||||
|
observation. Manual dispatch, `ci:full`, and exact release qualification always
|
||||||
|
run full validation.
|
||||||
|
|
||||||
|
Full qualification includes aggregate coverage,
|
||||||
|
every portable provider lane, and all native hosts below. Adding `ci:full`
|
||||||
|
immediately starts the separate `Full PR qualification` workflow against the
|
||||||
|
label event's merge revision; subsequent PR revisions also select the full tier
|
||||||
|
in normal CI while that label remains. Unrelated labels do not start validation
|
||||||
|
jobs or replace the main CI checks. Manual dispatch also requests full validation.
|
||||||
|
Fast-tier broad fallbacks retain all owner lanes and the three-host
|
||||||
|
package matrix; Intel macOS and coverage remain full-tier obligations. Each
|
||||||
classification job records its selection and broad-fallback reasons in the run
|
classification job records its selection and broad-fallback reasons in the run
|
||||||
summary. Representative Git-diff cases live in
|
summary. Representative Git-diff cases live in
|
||||||
`tests/boundary/filesystem/ciChangeScope.test.ts`.
|
`tests/boundary/filesystem/ciChangeScope.test.ts`.
|
||||||
|
|
||||||
`CI required` checks classification and every selected lane, rejecting failed,
|
`CI required` always runs and checks classification and every selected lane,
|
||||||
cancelled, or unexpectedly skipped work. Existing required check names are
|
rejecting failed, cancelled, or unexpectedly skipped work. It rejects missing or
|
||||||
preserved; changing branch protection to require the new aggregate is a separate
|
unknown tiers and requires every canonical scope to be explicitly `true` or
|
||||||
repository-settings operation. Newer commits cancel superseded CI for the same
|
`false`; incomplete classification cannot silently omit verification lanes.
|
||||||
PR or main branch. Release publication has its own concurrency group and retains
|
Branch protection
|
||||||
its package verification and public-registry canary. Licensed/self-hosted
|
should require this aggregate, `Static checks`, `Portable tests`, and
|
||||||
|
`Conventional PR title`. Title validation runs separately on PR opening,
|
||||||
|
reopening, commits, and edits; correcting a title refreshes only this lightweight
|
||||||
|
check. It reads title text through an environment variable, executes no PR code,
|
||||||
|
and has no token permissions. Its separate concurrency group cannot cancel
|
||||||
|
test runs. Fast PR runs cancel superseded feedback for the same PR. Main push
|
||||||
|
runs keep one active run and the latest pending run for that branch.
|
||||||
|
Scheduled/manual qualification has a separate concurrency group: active work
|
||||||
|
finishes and only the latest pending run is retained. Release qualification uses
|
||||||
|
its exact source SHA and cannot be cancelled by newer main pushes. Provider and
|
||||||
|
website lanes inherit their caller's scheduling; reusable
|
||||||
|
workflows have no independent cancellation group. Direct manual lane dispatches
|
||||||
|
run independently on disposable hosted runners. Publication
|
||||||
|
requires that qualification to succeed and consumes its exact verified tarball,
|
||||||
|
checking source SHA, workflow run, run attempt, package/Node version and SHA-256
|
||||||
|
before npm publication. Earlier attempts from the same workflow run are accepted
|
||||||
|
when rerunning failed publisher jobs; future attempts and other runs are rejected.
|
||||||
|
The public-registry canary still verifies the published package. Licensed/self-hosted
|
||||||
provider workflows and the Android smoke test retain their explicit triggers.
|
provider workflows and the Android smoke test retain their explicit triggers.
|
||||||
|
|
||||||
CI exercises the pinned Node.js runtime on native hosted runners:
|
CI exercises the pinned Node.js runtime on native hosted runners:
|
||||||
|
|
||||||
| Host | Runner | Baseline checks |
|
| Host | Runner | Baseline checks |
|
||||||
| --------------------- | ------------------ | ---------------------------------------------------------------------------------------- |
|
| --------------------- | ------------------ | ------------------------------------------------------------------------------------------- |
|
||||||
| Linux x64 | `ubuntu-latest` | Installed package and real Node Inspector CLI/MCP |
|
| Linux x64 | `ubuntu-latest` | Installed package and real Node Inspector CLI/MCP |
|
||||||
| Linux arm64 (aarch64) | `ubuntu-24.04-arm` | Installed package and real Node Inspector CLI/MCP |
|
| Linux arm64 (aarch64) | `ubuntu-24.04-arm` | Installed package and real Node Inspector CLI/MCP |
|
||||||
| macOS 15 arm64 | `macos-15` | Installed package and real Node Inspector CLI/MCP |
|
| macOS 15 arm64 | `macos-15` | Installed package and real Node Inspector CLI/MCP |
|
||||||
| macOS 15 x64 | `macos-15-intel` | Installed package and real Node Inspector CLI/MCP (main, dispatch and `ci:full` only) |
|
| macOS 15 x64 | `macos-15-intel` | Installed package and real Node Inspector CLI/MCP (hourly, dispatch, release and `ci:full`) |
|
||||||
| Windows x64 | `windows-latest` | Curated capabilities, native controls, installed package and real Node Inspector CLI/MCP |
|
| Windows x64 | `windows-latest` | Curated capabilities, native controls, installed package and real Node Inspector CLI/MCP |
|
||||||
|
|
||||||
macOS x64 is the slowest package host. Pull requests without the `ci:full` label
|
macOS x64 is the slowest package host. Ordinary PRs and main pushes omit it,
|
||||||
omit it, so darwin x64 installed-package and Inspector regressions surface on
|
so darwin x64 installed-package and Inspector regressions surface in full
|
||||||
the main-push full baseline rather than on the PR.
|
qualification. Schedule admission can be delayed by GitHub; the hourly trigger
|
||||||
|
does not guarantee an hourly completed result. Release publication waits for
|
||||||
|
its own complete result at the exact released revision.
|
||||||
|
|
||||||
Package lanes assert the actual Node platform/architecture before verification
|
Package lanes assert the actual Node platform/architecture before verification
|
||||||
and record those values with the Node version. The package matrix runs up to
|
and record those values with the Node version. The package matrix runs up to
|
||||||
@@ -770,17 +981,34 @@ The Linux source-test shards download a shared runtime and generated test
|
|||||||
metadata snapshot produced by the build job with `npm run test:prepare`. The
|
metadata snapshot produced by the build job with `npm run test:prepare`. The
|
||||||
snapshot includes `dist/`, generated skills, the MCP tool catalog, product
|
snapshot includes `dist/`, generated skills, the MCP tool catalog, product
|
||||||
catalog, and managed-conformance metadata. Each shard still installs the locked
|
catalog, and managed-conformance metadata. Each shard still installs the locked
|
||||||
dependencies and runs its assigned coverage-enabled tests; it no longer
|
dependencies and runs its assigned tests; full qualification enables coverage. It no longer
|
||||||
regenerates the same metadata independently.
|
regenerates the same metadata independently.
|
||||||
|
|
||||||
The build job also retrieves the merged timing report from the last successful
|
The build job also finds an available `test-timings` artifact from a successful
|
||||||
default-branch push and includes that same report in each shard's snapshot.
|
trusted default-branch scheduled or manual qualification and includes that same
|
||||||
|
report in each shard's snapshot. The bounded lookup verifies the artifact's
|
||||||
|
producer; newer schedules that reuse qualification without producing timings do
|
||||||
|
not hide the last full run's artifact.
|
||||||
CI assigns discovered files by historical duration, with a deterministic
|
CI assigns discovered files by historical duration, with a deterministic
|
||||||
fallback weight for new files, rather than dividing only by file count. Every
|
fallback weight for new files, rather than dividing only by file count. Every
|
||||||
discovered file still belongs to exactly one shard; worker limits, project
|
discovered file still belongs to exactly one shard; worker limits and project
|
||||||
ordering, coverage instrumentation, and aggregate thresholds remain unchanged.
|
ordering remain unchanged. The merge job rejects successful reports with missing,
|
||||||
|
unexpected, or duplicate portable files. Coverage instrumentation and aggregate
|
||||||
|
thresholds remain enforced in full qualification.
|
||||||
Missing or unusable history falls back to Vitest's default assignment. Only
|
Missing or unusable history falls back to Vitest's default assignment. Only
|
||||||
timing data is reused; persistent compile caches remain disabled.
|
timing data is reused; live provider results are never cached. Turbo outputs are
|
||||||
|
restored by task hash, with trusted default-branch runs as cache writers and PRs
|
||||||
|
as restore-only consumers. npm caches hold downloads, not `node_modules`.
|
||||||
|
|
||||||
|
The eight automatic browser, binary-layout, EVM, JavaScript-recovery,
|
||||||
|
recorded-crash, and web provider lanes download `rea-build-cache` from their own
|
||||||
|
run after the build and static jobs succeed. Their existing build commands still
|
||||||
|
validate task hashes and rebuild mismatched inputs; provider observations always
|
||||||
|
run. Provider-workflow-only edits also admit the build without enabling source
|
||||||
|
test shards. Direct provider dispatches retain the cross-run restore-only cache.
|
||||||
|
This removes repeated compilation on fresh source revisions, but adds the build
|
||||||
|
as a prerequisite: a delayed build can delay provider admission. Compare queue
|
||||||
|
and execution times before claiming an end-to-end speedup.
|
||||||
|
|
||||||
These native baseline checks complement the Linux source-test shards and the
|
These native baseline checks complement the Linux source-test shards and the
|
||||||
separate Apple-artifact and real-provider lanes. Actual Hopper, Ghidra, IDA,
|
separate Apple-artifact and real-provider lanes. Actual Hopper, Ghidra, IDA,
|
||||||
@@ -816,6 +1044,14 @@ establish passing Android coverage; inspect its execution receipt.
|
|||||||
The `termux-browser-diagnostics` artifact retains the Termux command log, exit
|
The `termux-browser-diagnostics` artifact retains the Termux command log, exit
|
||||||
status, and Android logcat on success or failure. The emulator is disposable.
|
status, and Android logcat on success or failure. The emulator is disposable.
|
||||||
|
|
||||||
|
## Packet capture analysis
|
||||||
|
|
||||||
|
`npm run verify:pcap -- --pcap PATH` exercises caller-supplied tshark and
|
||||||
|
capinfos against a saved capture. Linux verification uses Wireshark 4.6.6
|
||||||
|
and captures containing DNS, TLS and HTTP traffic. Native Windows and macOS
|
||||||
|
engine behavior remains unverified; process fixtures do not establish it.
|
||||||
|
See [Packet capture analysis](../guides/data/pcap-analysis.md) for contracts and budgets.
|
||||||
|
|
||||||
## Apple native metadata and UI
|
## Apple native metadata and UI
|
||||||
|
|
||||||
`npm run verify:apple-dispatch` compiles the Objective-C fixture (classes,
|
`npm run verify:apple-dispatch` compiles the Objective-C fixture (classes,
|
||||||
@@ -834,7 +1070,7 @@ conformance/vtable fixture.
|
|||||||
allows a host-permission-boundary-only result and explicitly reports
|
allows a host-permission-boundary-only result and explicitly reports
|
||||||
`positive_e2e: false`; it must not be reported as capture/action proof.
|
`positive_e2e: false`; it must not be reported as capture/action proof.
|
||||||
Both commands reject a changed executable digest and clean up the fixture
|
Both commands reject a changed executable digest and clean up the fixture
|
||||||
process and helper. These lanes require an interactive macOS desktop. See [native investigation](native-investigation.md)
|
process and helper. These lanes require an interactive macOS desktop. See [native investigation](../guides/native/native-investigation.md)
|
||||||
|
|
||||||
`npm run verify:native-calls` needs macOS with Command Line Tools (`clang`,
|
`npm run verify:native-calls` needs macOS with Command Line Tools (`clang`,
|
||||||
`lldb`, `codesign`, `nm`) and actual debugger access to the owned fixtures.
|
`lldb`, `codesign`, `nm`) and actual debugger access to the owned fixtures.
|
||||||
@@ -872,7 +1108,7 @@ unknown chunks, depth limits and extracted child digests. The optional
|
|||||||
`REA_FIRMWARE_VERIFY_EXT4=1` lane requires existing mke2fs/debugfs; the separate
|
`REA_FIRMWARE_VERIFY_EXT4=1` lane requires existing mke2fs/debugfs; the separate
|
||||||
`REA_FIRMWARE_VERIFY_GHIDRA=1` lane checks a selected host ELF through real Ghidra.
|
`REA_FIRMWARE_VERIFY_GHIDRA=1` lane checks a selected host ELF through real Ghidra.
|
||||||
Neither optional toolchain is a base-lane prerequisite. See
|
Neither optional toolchain is a base-lane prerequisite. See
|
||||||
[firmware analysis](firmware-analysis.md) for limits and unverified formats.
|
[firmware analysis](../guides/firmware/firmware-analysis.md) for limits and unverified formats.
|
||||||
|
|
||||||
### JavaScript source recovery
|
### JavaScript source recovery
|
||||||
|
|
||||||
@@ -913,7 +1149,7 @@ npm run verify:browser:source-maps
|
|||||||
checks an installed package after building the verifier dependencies. The separate
|
checks an installed package after building the verifier dependencies. The separate
|
||||||
conditional `real-web-source-map` CI job supplies Chrome and an isolated pinned
|
conditional `real-web-source-map` CI job supplies Chrome and an isolated pinned
|
||||||
fixture compiler; static/unit checks do not acquire a browser. See
|
fixture compiler; static/unit checks do not acquire a browser. See
|
||||||
[the source location guide](web-source-location.md) for the verified decoder profile.
|
[the source location guide](../guides/web/web-source-location.md) for the verified decoder profile.
|
||||||
|
|
||||||
### JavaScript large-output lane
|
### JavaScript large-output lane
|
||||||
|
|
||||||
@@ -940,7 +1176,7 @@ An optional entrypoint argument to `scripts/verify-browser-runtime.mjs` runs the
|
|||||||
same checks through an isolated installed package. The conditional
|
same checks through an isolated installed package. The conditional
|
||||||
`real-web-runtime` CI job runs only for relevant changes and needs no fixture
|
`real-web-runtime` CI job runs only for relevant changes and needs no fixture
|
||||||
compiler. Ordinary unit/static gates acquire no browser. See
|
compiler. Ordinary unit/static gates acquire no browser. See
|
||||||
[website runtime attribution](web-runtime.md) for effects, resource bounds and
|
[website runtime attribution](../guides/web/web-runtime.md) for effects, resource bounds and
|
||||||
coverage limits.
|
coverage limits.
|
||||||
|
|
||||||
### Offline binary layout
|
### Offline binary layout
|
||||||
@@ -48,10 +48,12 @@ satisfy. A plan without execution does not establish runtime behavior.
|
|||||||
- Use strict inputs with explicit target identity and required fields. Preserve
|
- Use strict inputs with explicit target identity and required fields. Preserve
|
||||||
meaningful target, action, capture, and output choices; remove ignored options
|
meaningful target, action, capture, and output choices; remove ignored options
|
||||||
and repeated permission declarations.
|
and repeated permission declarations.
|
||||||
- Return complete evidence inline, with artifact/provider identity, source
|
- Return the requested facts inline with artifact/provider identity, source
|
||||||
locations, Evidence references, and relevant confidence and limitations.
|
locations, Evidence references, coverage, and relevant confidence and
|
||||||
Missing coverage is unknown, not absence. Avoid extra lookups solely to
|
limitations. Use supported selection, summaries or views when they answer
|
||||||
understand the answer or its provenance.
|
the question; preserve access to complete source Evidence and honor existing
|
||||||
|
contracts and requested detail. Missing coverage is unknown, not absence.
|
||||||
|
Avoid extra lookups solely to understand the answer or its provenance.
|
||||||
- Keep observed, derived, and inferred relationships distinct. Preserve
|
- Keep observed, derived, and inferred relationships distinct. Preserve
|
||||||
unresolved edges and partial provider facts instead of requiring every
|
unresolved edges and partial provider facts instead of requiring every
|
||||||
provider to supply the same metadata.
|
provider to supply the same metadata.
|
||||||
@@ -88,5 +90,5 @@ consumers. Real-engine claims require the matching provider lane; see
|
|||||||
When discoverability changes, evaluate representative broad, direct, and negative
|
When discoverability changes, evaluate representative broad, direct, and negative
|
||||||
tasks on the intended host. Record host/model/catalog, selected tools, arguments,
|
tasks on the intended host. Record host/model/catalog, selected tools, arguments,
|
||||||
errors, retries, and task outcomes. Schema validity and keyword heuristics do not
|
errors, retries, and task outcomes. Schema validity and keyword heuristics do not
|
||||||
establish successful tool selection. See [mcp-contracts.md](mcp-contracts.md) for
|
establish successful tool selection. See [mcp-contracts.md](../reference/mcp-contracts.md) for
|
||||||
shipped runtime behavior.
|
shipped runtime behavior.
|
||||||
@@ -17,7 +17,7 @@ Use an extracted application directory or an ASAR as the target. Static
|
|||||||
JavaScript analysis returns the application graph and Evidence directly.
|
JavaScript analysis returns the application graph and Evidence directly.
|
||||||
Generic `rea analyze PATH` selects this workflow for directories and `.asar`
|
Generic `rea analyze PATH` selects this workflow for directories and `.asar`
|
||||||
files when neither `--provider` nor `--snapshot` is supplied. See
|
files when neither `--provider` nor `--snapshot` is supplied. See
|
||||||
[JavaScript artifact reconstruction](javascript-artifact-reconstruction.md)
|
[JavaScript artifact reconstruction](../guides/javascript/javascript-artifact-reconstruction.md)
|
||||||
for results, integrity checks and coverage.
|
for results, integrity checks and coverage.
|
||||||
|
|
||||||
The complete application Evidence can be hundreds of megabytes for a real
|
The complete application Evidence can be hundreds of megabytes for a real
|
||||||
@@ -34,7 +34,7 @@ For example, a 334 MB Obsidian application Evidence file yields a summary view
|
|||||||
of about 10 KB. Replace the view with
|
of about 10 KB. Replace the view with
|
||||||
`{"kind": "page", "collection": "modules", "offset": 0, "limit": 32}` for a
|
`{"kind": "page", "collection": "modules", "offset": 0, "limit": 32}` for a
|
||||||
module page. See
|
module page. See
|
||||||
[JavaScript application workflows](javascript-application-workflows.md) for
|
[JavaScript application workflows](../guides/javascript/javascript-application-workflows.md) for
|
||||||
views, feature traces and comparisons that take the same saved Evidence.
|
views, feature traces and comparisons that take the same saved Evidence.
|
||||||
|
|
||||||
## Managed assemblies (.NET)
|
## Managed assemblies (.NET)
|
||||||
@@ -59,9 +59,17 @@ assembly-wide inventory, so the output can still be large.
|
|||||||
Choose the workflow from the artifact's contents rather than its `.exe` or
|
Choose the workflow from the artifact's contents rather than its `.exe` or
|
||||||
`.dll` extension. The managed parser requires PE/CLI metadata; it does not
|
`.dll` extension. The managed parser requires PE/CLI metadata; it does not
|
||||||
unpack .NET single-file hosts or decode IL2CPP metadata. NativeAOT method bodies
|
unpack .NET single-file hosts or decode IL2CPP metadata. NativeAOT method bodies
|
||||||
require native analysis. See the [managed-code guide](managed-code-analysis.md)
|
require native analysis. See the [managed-code guide](../guides/managed/managed-code-analysis.md)
|
||||||
for supported deployment forms, selection semantics, and coverage limits.
|
for supported deployment forms, selection semantics, and coverage limits.
|
||||||
|
|
||||||
|
## SQLite snapshots
|
||||||
|
|
||||||
|
For a local database snapshot, use `rea inspect-sqlite-database PATH --json`.
|
||||||
|
Add `--table NAME --row-limit 20` to read a bounded sample from an ordinary
|
||||||
|
table. This command does not require a native analysis provider. See
|
||||||
|
[SQLite database snapshots](../guides/data/sqlite-databases.md) for database/WAL identity,
|
||||||
|
source-file handling and row-value semantics.
|
||||||
|
|
||||||
## Native analysis
|
## Native analysis
|
||||||
|
|
||||||
Inspect embedded Go build metadata without installing Go or configuring a
|
Inspect embedded Go build metadata without installing Go or configuring a
|
||||||
@@ -72,11 +80,11 @@ rea inspect-go-binary /absolute/path/to/program --json
|
|||||||
```
|
```
|
||||||
|
|
||||||
The shared CLI/MCP workflow reports compiler version, modules, replacements,
|
The shared CLI/MCP workflow reports compiler version, modules, replacements,
|
||||||
build settings, original bytes and SHA-256. See [Go binaries](go-binaries.md)
|
build settings, original bytes and SHA-256. See [Go binaries](../guides/native/go-binaries.md)
|
||||||
for supported containers and absent or malformed metadata.
|
for supported containers and absent or malformed metadata.
|
||||||
|
|
||||||
Configure [Hopper or Ghidra](installation.md#hopper), or the
|
Configure [Hopper or Ghidra](installation.md#hopper), or the
|
||||||
[IDA adapter](ida-provider.md), before analyzing a native target. Substitute
|
[IDA adapter](../providers/ida-provider.md), before analyzing a native target. Substitute
|
||||||
your target, search text and function name or address in these examples:
|
your target, search text and function name or address in these examples:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -93,11 +101,11 @@ a function dossier; `decompile` returns pseudocode. For assembly instructions
|
|||||||
alone, use `rea instructions`. A macOS `.app` bundle can be supplied directly.
|
alone, use `rea instructions`. A macOS `.app` bundle can be supplied directly.
|
||||||
|
|
||||||
Run `rea --help` or a command's `--help` for arguments and output options.
|
Run `rea --help` or a command's `--help` for arguments and output options.
|
||||||
The [generated catalog](mcp-contracts.md#generated-catalog) lists all CLI commands and MCP
|
The [generated catalog](../reference/mcp-contracts.md#generated-catalog) lists all CLI commands and MCP
|
||||||
tools. Provider-specific target support is described in the
|
tools. Provider-specific target support is described in the
|
||||||
[native guide](native-investigation.md), [DOS guide](ghidra-dos.md),
|
[native guide](../guides/native/native-investigation.md), [DOS guide](../providers/ghidra-dos.md),
|
||||||
[raw binary guide](raw-binary.md), and
|
[raw binary guide](../providers/raw-binary.md), and
|
||||||
[Windows Ghidra guide](windows-ghidra-p0.md).
|
[Windows Ghidra guide](../providers/windows-ghidra-p0.md).
|
||||||
|
|
||||||
## Choose a provider
|
## Choose a provider
|
||||||
|
|
||||||
@@ -134,13 +142,13 @@ or close. Provider failures are returned with their original reason. For an
|
|||||||
`ambiguous` selection error, choose from `details.candidate_ids`; for
|
`ambiguous` selection error, choose from `details.candidate_ids`; for
|
||||||
`provider_unavailable`, run `rea doctor --provider ID --json` to diagnose the
|
`provider_unavailable`, run `rea doctor --provider ID --json` to diagnose the
|
||||||
selected engine. See [task readiness](installation.md#check-readiness-for-your-task)
|
selected engine. See [task readiness](installation.md#check-readiness-for-your-task)
|
||||||
and [provider selection](mcp-contracts.md#identity-and-discovery).
|
and [provider selection](../reference/mcp-contracts.md#identity-and-discovery).
|
||||||
|
|
||||||
The session reports work still in progress through `analysis_activity`.
|
The session reports work still in progress through `analysis_activity`.
|
||||||
A client timeout can end its wait while the provider continues analyzing.
|
A client timeout can end its wait while the provider continues analyzing.
|
||||||
`cleanup_incomplete` identifies resources whose shutdown or removal could not
|
`cleanup_incomplete` identifies resources whose shutdown or removal could not
|
||||||
be verified. See [MCP contracts](mcp-contracts.md) for session lifecycle and
|
be verified. See [MCP contracts](../reference/mcp-contracts.md) for session lifecycle and
|
||||||
[Ghidra first-query deadlines](mcp-contracts.md#ghidra-first-query-deadlines-and-recovery)
|
[Ghidra first-query deadlines](../reference/mcp-contracts.md#ghidra-first-query-deadlines-and-recovery)
|
||||||
for import, client timeouts and recovery.
|
for import, client timeouts and recovery.
|
||||||
|
|
||||||
## Save and reuse analysis snapshots
|
## Save and reuse analysis snapshots
|
||||||
@@ -166,7 +174,9 @@ rea analyze /absolute/path/to/program --provider ghidra --snapshot /absolute/pat
|
|||||||
rea analyze /absolute/path/to/program --provider ghidra --snapshot /absolute/path/to/analysis/program.json
|
rea analyze /absolute/path/to/program --provider ghidra --snapshot /absolute/path/to/analysis/program.json
|
||||||
```
|
```
|
||||||
|
|
||||||
An exact CLI cache hit is read before starting a provider process.
|
An exact CLI cache hit is normally read before starting a provider process.
|
||||||
|
On Windows, Ghidra first admits the selected source through its native snapshot
|
||||||
|
owner, so replay can start that provider.
|
||||||
In MCP, `open_binary` accepts `snapshot_path` to import a snapshot atomically
|
In MCP, `open_binary` accepts `snapshot_path` to import a snapshot atomically
|
||||||
for its matching target; an MCP provider may still start before returning a
|
for its matching target; an MCP provider may still start before returning a
|
||||||
cached result. `close_binary` accepts `snapshot_path` and optional
|
cached result. `close_binary` accepts `snapshot_path` and optional
|
||||||
@@ -194,8 +204,8 @@ rea compare /absolute/path/to/evidence/left.json /absolute/path/to/evidence/righ
|
|||||||
|
|
||||||
Exports preserve an existing destination unless `--overwrite` is explicit.
|
Exports preserve an existing destination unless `--overwrite` is explicit.
|
||||||
For application traces and version comparisons, see
|
For application traces and version comparisons, see
|
||||||
[JavaScript application workflows](javascript-application-workflows.md).
|
[JavaScript application workflows](../guides/javascript/javascript-application-workflows.md).
|
||||||
MCP [retained Evidence references](mcp-contracts.md#retained-application-evidence-inputs)
|
MCP [retained Evidence references](../reference/mcp-contracts.md#retained-application-evidence-inputs)
|
||||||
belong to one connection. Separate CLI calls consume full saved records.
|
belong to one connection. Separate CLI calls consume full saved records.
|
||||||
|
|
||||||
## Import historical source
|
## Import historical source
|
||||||
@@ -204,10 +214,40 @@ Import an older source tree to compare with the current artifact:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
rea import-reference-source /absolute/path/to/source
|
rea import-reference-source /absolute/path/to/source
|
||||||
|
rea import-reference-source /absolute/path/to/source --detail summary --outline-depth 2 --json
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The default (`--detail full`) returns the complete `HistoricalSourceGraph`.
|
||||||
|
Choose `--detail summary` for a `HistoricalSourceSummary` of that same committed
|
||||||
|
inventory: its `HistoricalSourceManifest` contains the full graph and root
|
||||||
|
digests, with provenance, VCS facts, languages, manifest paths, entry and
|
||||||
|
relationship counts, parse-failure counts, file/directory states, exclusions
|
||||||
|
and limitations. The summary is a presentation view, not a graph accepted by
|
||||||
|
source-to-bundle comparison; keep the full output for that workflow.
|
||||||
|
|
||||||
|
`--outline-depth` requires `--detail summary` and accepts a nonnegative safe
|
||||||
|
integer. Depth 1 shows root children, depth 2 (the default) also shows their
|
||||||
|
children, and depth 0 omits all outline entries. Paths retain canonical Unicode
|
||||||
|
code-point order. `outline.omitted_entry_count` counts only inventoried entries
|
||||||
|
hidden by the chosen depth; it does not count unexamined children of excluded or
|
||||||
|
unreadable directories, or change `inventory_state`. Exclusions and source
|
||||||
|
limitations remain separate from this presentation omission.
|
||||||
|
|
||||||
|
`file_sizes.known_bytes` is the exact sum of known inventoried file sizes as
|
||||||
|
decimal text, so large sums cannot lose integer precision. Unknown sizes count
|
||||||
|
in `file_sizes.unknown_file_count`; excluded or unexamined paths are not included
|
||||||
|
in that total. A zero known-byte sum therefore does not establish an empty source
|
||||||
|
tree. Full output retains individual file hashes, relationships and parse-failure
|
||||||
|
diagnostics. Summary mode performs the same import and cleanup, then projects
|
||||||
|
the committed result without rereading source files. It reduces the selected
|
||||||
|
output, not the amount of source examined. A shallow tree or many exclusions can
|
||||||
|
still produce a large summary; depth 0 removes the outline but preserves the
|
||||||
|
other facts. No fixed output-size or runtime improvement is promised.
|
||||||
|
|
||||||
The import records hashes and metadata for the supplied files, separately
|
The import records hashes and metadata for the supplied files, separately
|
||||||
from observations of the current app. It honors the source tree's `.gitignore`
|
from observations of the current app. For a directory inside a Git checkout,
|
||||||
|
it records the HEAD of the nearest enclosing repository; whether the working
|
||||||
|
tree matches that commit remains unknown. It honors the source tree's `.gitignore`
|
||||||
and applies default exclusions for common generated and dependency paths such
|
and applies default exclusions for common generated and dependency paths such
|
||||||
as `node_modules/`, `dist/`, and `*.log`. Pattern-based exclusions record the
|
as `node_modules/`, `dist/`, and `*.log`. Pattern-based exclusions record the
|
||||||
matched pattern and whether it came from project, default, caller, or sensitive
|
matched pattern and whether it came from project, default, caller, or sensitive
|
||||||
@@ -225,18 +265,18 @@ does not infer module targets from replacement characters.
|
|||||||
Historical-source import requires safe no-follow file opens on Linux or
|
Historical-source import requires safe no-follow file opens on Linux or
|
||||||
macOS. Native Windows returns `unsupported_host`; use Linux REA inside WSL
|
macOS. Native Windows returns `unsupported_host`; use Linux REA inside WSL
|
||||||
or another supported host. See
|
or another supported host. See
|
||||||
[source-to-bundle comparison](javascript-application-workflows.md#historical-source-to-bundle-comparison)
|
[source-to-bundle comparison](../guides/javascript/javascript-application-workflows.md#historical-source-to-bundle-comparison)
|
||||||
for mapping identities, inferences and unknowns.
|
for mapping identities, inferences and unknowns.
|
||||||
|
|
||||||
## Capture runtime behavior
|
## Capture runtime behavior
|
||||||
|
|
||||||
Choose the guide for the target and intended interaction:
|
Choose the guide for the target and intended interaction:
|
||||||
|
|
||||||
- [Browser observation](browser-observation.md): inspect a selected page through CDP.
|
- [Browser observation](../guides/web/browser-observation.md): inspect a selected page through CDP.
|
||||||
- [Browser scenarios](browser-scenario-contract.md): run declared interactions and capture their results.
|
- [Browser scenarios](../guides/web/browser-scenario-contract.md): run declared interactions and capture their results.
|
||||||
- [Electron observation](electron-observation.md): inspect an Electron renderer or capture an application scenario.
|
- [Electron observation](../guides/javascript/electron-observation.md): inspect an Electron renderer or capture an application scenario.
|
||||||
- [Node/Electron Inspector](javascript-runtime-observation.md): record script locations and execution contexts.
|
- [Node/Electron Inspector](../guides/javascript/javascript-runtime-observation.md): record script locations and execution contexts.
|
||||||
- [Process capture](process-capture.md): run an executable and compare terminal, exit and filesystem observations.
|
- [Process capture](../guides/runtime/process-capture.md): run an executable and compare terminal, exit and filesystem observations.
|
||||||
|
|
||||||
Runtime requests name the target and actions. Launched targets run with your
|
Runtime requests name the target and actions. Launched targets run with your
|
||||||
user permissions; consult the chosen guide for host requirements and effects.
|
user permissions; consult the chosen guide for host requirements and effects.
|
||||||
@@ -6,6 +6,12 @@ for the reviewed setup transaction and [client IDs](installation.md#supported-ag
|
|||||||
The versioned verification notes below describe their stated runs; live service
|
The versioned verification notes below describe their stated runs; live service
|
||||||
acceptance is verified only where explicitly recorded.
|
acceptance is verified only where explicitly recorded.
|
||||||
|
|
||||||
|
## Fiddler Everywhere alongside REA
|
||||||
|
|
||||||
|
Connect Fiddler Everywhere's MCP server separately for HTTP traffic debugging,
|
||||||
|
preserving your REA client entry. See the
|
||||||
|
[setup instructions and public skills](../guides/web/web-network-captures.md#fiddler-everywhere-mcp-and-public-skills).
|
||||||
|
|
||||||
## GitHub Copilot CLI
|
## GitHub Copilot CLI
|
||||||
|
|
||||||
For GitHub Copilot CLI 1.0.95, `gpt-4.1` model metadata can block ordinary
|
For GitHub Copilot CLI 1.0.95, `gpt-4.1` model metadata can block ordinary
|
||||||
@@ -25,7 +31,72 @@ tool inventory on Linux using a loopback model fixture. After setup, add
|
|||||||
settings, then restart the client. Compact advertisements can reduce nested
|
settings, then restart the client. Compact advertisements can reduce nested
|
||||||
schema constraints; REA still validates complete canonical inputs. Full-profile
|
schema constraints; REA still validates complete canonical inputs. Full-profile
|
||||||
`gpt-5.4` metadata is also verified locally. Live model API acceptance and
|
`gpt-5.4` metadata is also verified locally. Live model API acceptance and
|
||||||
Windows remain unverified; see [native client verification](testing.md).
|
Windows remain unverified; see [native client verification](../development/testing.md).
|
||||||
|
|
||||||
|
## Claude Desktop
|
||||||
|
|
||||||
|
Setup registers `mcpServers.rea` in `claude_desktop_config.json`: under
|
||||||
|
`~/Library/Application Support/Claude` on macOS, under
|
||||||
|
`$XDG_CONFIG_HOME/Claude` (default `~/.config/Claude`) on Linux, and on Windows
|
||||||
|
in the file the installed app reads:
|
||||||
|
|
||||||
|
- Without Claude Desktop's MSIX package storage, setup uses
|
||||||
|
`%APPDATA%\Claude\claude_desktop_config.json`.
|
||||||
|
- The MSIX build (package family `Claude_pzs8sxrjxfjjc`, installed under
|
||||||
|
`C:\Program Files\WindowsApps\Claude_<version>_x64__pzs8sxrjxfjjc`)
|
||||||
|
virtualizes AppData writes. Once it has saved its configuration, it reads
|
||||||
|
the package-private copy
|
||||||
|
`%LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json`
|
||||||
|
and ignores the `%APPDATA%` file. Setup, doctor and uninstall use that
|
||||||
|
private copy when it exists. Before the package has saved one, they use the
|
||||||
|
`%APPDATA%` file it still reads; with neither file, setup creates the
|
||||||
|
private copy.
|
||||||
|
- If `%LOCALAPPDATA%\Packages` holds a `Claude_<publisher ID>` package from
|
||||||
|
another publisher, or cannot be read, REA cannot establish which file Claude
|
||||||
|
Desktop reads. Setup, doctor and uninstall report that instead of falling
|
||||||
|
back to `%APPDATA%`. Doctor then reports `claude_desktop` as invalid, and
|
||||||
|
uninstall stops before removing anything for any client.
|
||||||
|
|
||||||
|
Quit Claude Desktop fully before approving setup; closing its window is not
|
||||||
|
enough. A running Claude Desktop can rewrite its configuration from memory and
|
||||||
|
drop the registration. This was observed with the Windows MSIX build. Start
|
||||||
|
Claude Desktop again after setup. If the package saves its private copy after
|
||||||
|
setup planned to write the `%APPDATA%` file, setup makes no change and asks you
|
||||||
|
to rerun it.
|
||||||
|
|
||||||
|
A process that the MSIX app started, such as a terminal in Claude Desktop's
|
||||||
|
Code tab, sees the package's private files at their `%APPDATA%` paths even
|
||||||
|
though it reports no package identity. Setup compares one of those files at
|
||||||
|
both paths. When it finds that redirected view, the app is running, so setup
|
||||||
|
and uninstall refuse to change Claude Desktop's configuration; rerun them from
|
||||||
|
a terminal that Claude Desktop did not start. If the package has no private
|
||||||
|
file to compare, setup and uninstall cannot rule that out and also refuse; open
|
||||||
|
Claude Desktop once if it has never run, quit it fully, then rerun. Doctor
|
||||||
|
reads the same file from either kind of process.
|
||||||
|
|
||||||
|
The same process also writes everything under `%APPDATA%` and
|
||||||
|
`%LOCALAPPDATA%` into the package's private storage, where other apps never
|
||||||
|
read it. From that redirected view, setup and uninstall refuse to change other
|
||||||
|
clients' files there (VS Code, Trae, Devin and Hermes) and skill directories
|
||||||
|
there. `npm install -g` run from such a process installs into the package's
|
||||||
|
`LocalCache\Roaming\npm`, which other processes cannot see at the `%APPDATA%`
|
||||||
|
path. Setup refuses to register a launcher stored in any MSIX package's
|
||||||
|
private storage. Install REA from an ordinary terminal and rerun setup there.
|
||||||
|
|
||||||
|
Uninstall removes REA's entry from both the private copy and the `%APPDATA%`
|
||||||
|
file, including registrations that earlier releases wrote to `%APPDATA%`.
|
||||||
|
|
||||||
|
REA recognizes only the MSIX package. A non-MSIX Claude Desktop installed
|
||||||
|
beside it, which would read the `%APPDATA%` file, is not detected.
|
||||||
|
|
||||||
|
The package identity, both file locations, the redirected view, and these
|
||||||
|
setup and doctor results were observed on Windows 11 with the MSIX build
|
||||||
|
2.31226.1.0, using read-only `doctor` and `setup --dry-run` runs both inside
|
||||||
|
and outside the app. On that host, setup run from an ordinary terminal with
|
||||||
|
the app quit wrote the package-private copy; after the app restarted, the
|
||||||
|
entry was still present, doctor reported it aligned, and Claude Desktop's MCP
|
||||||
|
log showed REA starting and answering `tools/list`. Uninstall against the real
|
||||||
|
app is unverified.
|
||||||
|
|
||||||
## Claude Code
|
## Claude Code
|
||||||
|
|
||||||
@@ -58,6 +129,18 @@ and Claude Code reports that autocompact is thrashing. To avoid this:
|
|||||||
The sizes above come from REA's own `tools/list`. A live Claude Code session
|
The sizes above come from REA's own `tools/list`. A live Claude Code session
|
||||||
against DeepSeek's API is unverified.
|
against DeepSeek's API is unverified.
|
||||||
|
|
||||||
|
## Kimi Code
|
||||||
|
|
||||||
|
Setup registers `rea` in `~/.kimi-code/mcp.json`, or
|
||||||
|
`$KIMI_CODE_HOME/mcp.json` when set, while preserving unrelated settings and
|
||||||
|
creating a `.rea.backup` before updating an existing file. Kimi Code infers
|
||||||
|
stdio from the `command` entry, so setup does not add a `type` field. The
|
||||||
|
registration includes `startupTimeoutMs = 30000` and `toolTimeoutMs = 120000`.
|
||||||
|
Kimi Code also discovers personal skills in `~/.agents/skills` and project-local
|
||||||
|
`.agents/skills`, so no separate skill root is required; setup still installs
|
||||||
|
and verifies the matching skill files through the normal shared-skill flow.
|
||||||
|
Start a new Kimi Code session to pick up MCP and skill changes.
|
||||||
|
|
||||||
## Pi
|
## Pi
|
||||||
|
|
||||||
For [Pi](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/mcp.md),
|
For [Pi](https://github.com/earendil-works/pi/blob/main/packages/coding-agent/docs/mcp.md),
|
||||||
@@ -95,6 +178,11 @@ Setup and doctor follow Qwen Code's tilde and working-directory-relative home
|
|||||||
overrides. Qwen Code also discovers personal skills in `~/.agents/skills`,
|
overrides. Qwen Code also discovers personal skills in `~/.agents/skills`,
|
||||||
where setup installs the bundled workflow.
|
where setup installs the bundled workflow.
|
||||||
|
|
||||||
|
## Antigravity
|
||||||
|
|
||||||
|
Antigravity 2.0 discovers personal skills in `~/.gemini/config/skills`.
|
||||||
|
Setup installs its selected skill copy there.
|
||||||
|
|
||||||
## Gemini CLI
|
## Gemini CLI
|
||||||
|
|
||||||
Gemini CLI uses `$GEMINI_CLI_HOME/.gemini/settings.json` when that home override
|
Gemini CLI uses `$GEMINI_CLI_HOME/.gemini/settings.json` when that home override
|
||||||
@@ -145,6 +233,23 @@ REA follows `HERMES_HOME` whitespace trimming, environment-variable expansion,
|
|||||||
and home expansion before resolving that profile. Setup previews the resolved
|
and home expansion before resolving that profile. Setup previews the resolved
|
||||||
configuration and skill destinations; doctor and uninstall use those same paths.
|
configuration and skill destinations; doctor and uninstall use those same paths.
|
||||||
|
|
||||||
|
## Qoder CLI
|
||||||
|
|
||||||
|
For [Qoder](https://docs.qoder.com/cli/mcp-reference), setup writes
|
||||||
|
`mcpServers.rea` into the user-level `~/.qoder/settings.json` (the
|
||||||
|
`QODER_CONFIG_DIR` override is honored). Entries carry `command`, `args`, and
|
||||||
|
`env`; stdio is the default transport. Qoder CLI discovers personal skills
|
||||||
|
from `~/.qoder/skills` (following `QODER_CONFIG_DIR` when set), so setup
|
||||||
|
installs its skill copy there.
|
||||||
|
|
||||||
|
## Factory Droid
|
||||||
|
|
||||||
|
For [Factory Droid](https://docs.factory.com/harness/mcp), setup writes
|
||||||
|
`mcpServers.rea` into the user-level `~/.factory/mcp.json`. Entries carry
|
||||||
|
`command`, `args`, and `env`. Droid discovers personal skills from
|
||||||
|
`~/.factory/skills` ([skills](https://docs.factory.com/harness/skills)), so
|
||||||
|
setup installs its skill copy there.
|
||||||
|
|
||||||
## Trae
|
## Trae
|
||||||
|
|
||||||
For [Trae](https://docs.trae.ai/ide/add-mcp-servers), setup writes
|
For [Trae](https://docs.trae.ai/ide/add-mcp-servers), setup writes
|
||||||
@@ -189,8 +294,15 @@ replaces) the REA entry in the home patch `$DSH_HOME/cordis.patch.yml`
|
|||||||
patches and comments. `rea doctor --client dsh` checks that same entry id.
|
patches and comments. `rea doctor --client dsh` checks that same entry id.
|
||||||
`rea uninstall` removes it by scanning supported clients; uninstall takes no
|
`rea uninstall` removes it by scanning supported clients; uninstall takes no
|
||||||
`--client` flag. The home patch applies to every Harness profile, so the
|
`--client` flag. The home patch applies to every Harness profile, so the
|
||||||
registration is written once and no per-profile edit is needed. The written
|
registration is written once and no per-profile edit is needed.
|
||||||
entry is:
|
|
||||||
|
Setup, doctor and uninstall resolve `DSH_HOME` and `DSH_AGENTS_HOME` as Harness
|
||||||
|
does: unset, empty or whitespace-only values use `~/.dsh` and `~/.agents`,
|
||||||
|
respectively. Bare `~`, `~/` and `~\` expand to the user home; other relative
|
||||||
|
values resolve against the command's working directory. Nonblank values retain
|
||||||
|
their original spaces, and the agents root is independent of the Harness home.
|
||||||
|
Run REA and Harness from the same working directory when using relative overrides.
|
||||||
|
The written entry is:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- insert:
|
- insert:
|
||||||
@@ -216,7 +328,7 @@ in `~/.agents/skills` (`$DSH_AGENTS_HOME/skills` when configured); Harness
|
|||||||
discovers that directory, and its native `skill` tool can load
|
discovers that directory, and its native `skill` tool can load
|
||||||
`reverse-engineer-anything`.
|
`reverse-engineer-anything`.
|
||||||
|
|
||||||
REA's optional [native client verification](testing.md#end-to-end-integration-and-golden-evidence)
|
REA's optional [native client verification](../development/testing.md#end-to-end-integration-and-golden-evidence)
|
||||||
checks headless chat, skill loading, all tool input schemas and actual analysis
|
checks headless chat, skill loading, all tool input schemas and actual analysis
|
||||||
using the installed Harness and a local model fixture. This establishes the
|
using the installed Harness and a local model fixture. This establishes the
|
||||||
Harness integration, with live DeepSeek API compatibility remaining unverified.
|
Harness integration, with live DeepSeek API compatibility remaining unverified.
|
||||||
@@ -3,13 +3,13 @@
|
|||||||
Run REA, connect your selected agents, and check the tools needed for your task.
|
Run REA, connect your selected agents, and check the tools needed for your task.
|
||||||
Setup previews configuration changes and asks for approval before applying them.
|
Setup previews configuration changes and asks for approval before applying them.
|
||||||
|
|
||||||
| Task | Section |
|
| Task | Section |
|
||||||
| --------------------------------- | ------------------------------------------------------------------------- |
|
| --------------------------------- | -------------------------------------------------------------------------------------- |
|
||||||
| Connect an agent | [Start setup](#start-setup), then [review changes](#review-setup-changes) |
|
| Connect an agent | [Start setup](#start-setup), then [review changes](#review-setup-changes) |
|
||||||
| Diagnose one task | [Scoped readiness checks](#check-readiness-for-your-task) |
|
| Diagnose one task | [Scoped readiness checks](#check-readiness-for-your-task) |
|
||||||
| Configure an analysis engine | [Hopper](#hopper), [Ghidra](#ghidra), or the [IDA guide](ida-provider.md) |
|
| Configure an analysis engine | [Hopper](#hopper), [Ghidra](#ghidra), or the [IDA guide](../providers/ida-provider.md) |
|
||||||
| Update or remove REA | [Maintenance](#diagnose-update-and-remove) |
|
| Update or remove REA | [Maintenance](#diagnose-update-and-remove) |
|
||||||
| Resolve a client-specific problem | [Client configuration](client-configuration.md) |
|
| Resolve a client-specific problem | [Client configuration](client-configuration.md) |
|
||||||
|
|
||||||
## Start setup
|
## Start setup
|
||||||
|
|
||||||
@@ -20,7 +20,9 @@ npx rea-agents setup
|
|||||||
Choose the agents to configure, review the proposed paths and changes, and
|
Choose the agents to configure, review the proposed paths and changes, and
|
||||||
approve the plan. npm's package-download approval and REA's setup approval are
|
approve the plan. npm's package-download approval and REA's setup approval are
|
||||||
separate. Setup asks before changing agent configuration or installing Hopper.
|
separate. Setup asks before changing agent configuration or installing Hopper.
|
||||||
Restart the agents named in the completion message.
|
Restart the agents named in the completion message. Quit Claude Desktop fully
|
||||||
|
before approving, because a running app can overwrite the registration; on
|
||||||
|
Windows, see [where Claude Desktop reads its configuration](client-configuration.md#claude-desktop).
|
||||||
|
|
||||||
For the latest published release, use `npx rea-agents@latest setup`.
|
For the latest published release, use `npx rea-agents@latest setup`.
|
||||||
[Package-runner and global-installation options](#package-runners-and-global-installation)
|
[Package-runner and global-installation options](#package-runners-and-global-installation)
|
||||||
@@ -57,6 +59,10 @@ Hopper installation or any file write. Declining or pressing Ctrl-C makes no
|
|||||||
changes. Agent configuration writes preserve unrelated entries and comments,
|
changes. Agent configuration writes preserve unrelated entries and comments,
|
||||||
create backups, use atomic replacement, and verify their result. Setup and
|
create backups, use atomic replacement, and verify their result. Setup and
|
||||||
uninstall retain an existing `.rea.backup` rather than replacing the first snapshot.
|
uninstall retain an existing `.rea.backup` rather than replacing the first snapshot.
|
||||||
|
If that snapshot differs from the current configuration, setup previews and
|
||||||
|
preserves a verified `.rea.backup.<sha256>.recovery` copy of the current bytes.
|
||||||
|
Both snapshots remain available; a failed rollback reports the current recovery
|
||||||
|
copy's path and the restore failure.
|
||||||
Setup also retains valid environment overrides in REA's existing server entry,
|
Setup also retains valid environment overrides in REA's existing server entry,
|
||||||
such as `REA_MCP_INPUT_SCHEMA_PROFILE` and `REA_MCP_MAX_RESPONSE_BYTES`.
|
such as `REA_MCP_INPUT_SCHEMA_PROFILE` and `REA_MCP_MAX_RESPONSE_BYTES`.
|
||||||
Detected provider settings replace only matching environment keys.
|
Detected provider settings replace only matching environment keys.
|
||||||
@@ -101,13 +107,11 @@ rea setup --yes --all-detected --install-hopper --json
|
|||||||
|
|
||||||
### Skill destinations
|
### Skill destinations
|
||||||
|
|
||||||
The bundled skill is installed where each selected client discovers personal
|
The bundled skill is installed in each selected client's personal skill directory.
|
||||||
skills: Claude Code uses `~/.claude/skills` (or
|
See [client configuration](client-configuration.md) for client-specific roots,
|
||||||
`$CLAUDE_CONFIG_DIR/skills` when configured). Gemini CLI uses `.agents/skills`
|
profiles, and environment overrides. A mixed selection plans each distinct
|
||||||
under its selected home; Antigravity 2.0 uses `~/.gemini/config/skills`.
|
destination. Selecting the skill without a client uses `~/.agents/skills`.
|
||||||
Other integrations, including Qwen Code, use `~/.agents/skills`.
|
Setup leaves existing skill copies in other locations untouched.
|
||||||
A mixed selection plans each distinct destination. Selecting the skill without a client uses the shared
|
|
||||||
directory. Setup leaves existing skill copies in other locations untouched.
|
|
||||||
|
|
||||||
`rea setup --skill-client claude_code --yes --json` refreshes and verifies the
|
`rea setup --skill-client claude_code --yes --json` refreshes and verifies the
|
||||||
selected skill destination independently of MCP registration selection. The
|
selected skill destination independently of MCP registration selection. The
|
||||||
@@ -275,17 +279,20 @@ hosted connector; see [its configuration](client-configuration.md#other-client-s
|
|||||||
| GitHub Copilot CLI | `copilot_cli` |
|
| GitHub Copilot CLI | `copilot_cli` |
|
||||||
| Command Code | `commandcode` |
|
| Command Code | `commandcode` |
|
||||||
| Qwen Code | `qwen_code` |
|
| Qwen Code | `qwen_code` |
|
||||||
|
| Kimi Code | `kimi` |
|
||||||
| VS Code | `vscode` |
|
| VS Code | `vscode` |
|
||||||
| Grok Build | `grok_build` |
|
| Grok Build | `grok_build` |
|
||||||
| OMP | `omp` |
|
| OMP | `omp` |
|
||||||
| Pi | `pi` |
|
| Pi | `pi` |
|
||||||
| Hermes | `hermes` |
|
| Hermes | `hermes` |
|
||||||
|
| Qoder | `qoder` |
|
||||||
|
| Factory Droid | `droid` |
|
||||||
| Trae | `trae` |
|
| Trae | `trae` |
|
||||||
| ZCode | `zcode` |
|
| ZCode | `zcode` |
|
||||||
| DeepSeek Harness | `dsh` |
|
| DeepSeek Harness | `dsh` |
|
||||||
|
|
||||||
`dsh` is main-only until a release after 6.4.0. The registry check above does
|
`dsh` and `kimi` require a release containing them. The registry check above does
|
||||||
not cover it.
|
not cover them.
|
||||||
|
|
||||||
See [client configuration and troubleshooting](client-configuration.md) for
|
See [client configuration and troubleshooting](client-configuration.md) for
|
||||||
configuration paths, profiles, trust policies, and schema-limit workarounds.
|
configuration paths, profiles, trust policies, and schema-limit workarounds.
|
||||||
@@ -304,9 +311,12 @@ Hopper is separate commercial software with its own license. Its free demo has
|
|||||||
vendor-defined limits, and a paid license is optional. REA reuses any detected
|
vendor-defined limits, and a paid license is optional. REA reuses any detected
|
||||||
installation and preserves Hopper during uninstall.
|
installation and preserves Hopper during uninstall.
|
||||||
|
|
||||||
The supported native host baseline is macOS 12+, Ubuntu 24.04+, Fedora 41+,
|
The automated Hopper installer supports macOS 12+, Ubuntu 24.04+, Fedora 41+,
|
||||||
Nobara 44+, 64-bit Arch Linux, CachyOS, or Omarchy. Ghidra and IDA have their own provider-specific
|
Nobara 44+, 64-bit Arch Linux, CachyOS, or Omarchy. REA itself runs on any
|
||||||
host requirements; Windows Ghidra uses the [experimental P0 boundary](windows-ghidra-p0.md).
|
Linux distribution with a recognized apt, dnf, or pacman package family, where
|
||||||
|
an existing Hopper launcher is selected through `HOPPER_LAUNCHER_PATH`. Ghidra
|
||||||
|
and IDA have their own provider-specific host requirements; Windows Ghidra uses
|
||||||
|
the [experimental P0 boundary](../providers/windows-ghidra-p0.md).
|
||||||
|
|
||||||
On macOS, approved setup downloads the official DMG, checks its published size
|
On macOS, approved setup downloads the official DMG, checks its published size
|
||||||
and digest, validates the application bundle, and atomically installs it to
|
and digest, validates the application bundle, and atomically installs it to
|
||||||
@@ -318,8 +328,8 @@ The Hopper launcher action used by REA creates a document from an executable;
|
|||||||
its supported command-line interface does not attach to an already-open
|
its supported command-line interface does not attach to an already-open
|
||||||
document. While another live REA session owns the same target and loader
|
document. While another live REA session owns the same target and loader
|
||||||
profile, a second session reports the owning run ID instead of opening a
|
profile, a second session reports the owning run ID instead of opening a
|
||||||
duplicate document. Closing the owning REA session releases this guard; Hopper
|
duplicate document. On macOS, closing the owning REA session releases this guard;
|
||||||
keeps its document open. A later REA session can therefore open another
|
Hopper keeps its document open. A later REA session can therefore open another
|
||||||
document for the same target. REA does not currently identify, focus, or reuse
|
document for the same target. REA does not currently identify, focus, or reuse
|
||||||
that existing GUI document, and the supported launcher exposes no attach or
|
that existing GUI document, and the supported launcher exposes no attach or
|
||||||
reuse action for it.
|
reuse action for it.
|
||||||
@@ -342,8 +352,14 @@ Hopper application per user across cooperating REA processes. A competing
|
|||||||
CLI or MCP session receives the owning session ID before Hopper is launched,
|
CLI or MCP session receives the owning session ID before Hopper is launched,
|
||||||
for both the same target and a different target. Switch targets through that
|
for both the same target and a different target. Switch targets through that
|
||||||
MCP session, or close it before starting another session. Closing the owner
|
MCP session, or close it before starting another session. Closing the owner
|
||||||
releases the reservation. This does not attach to or claim ownership of
|
releases the reservation and stops REA's owned demo application and private
|
||||||
manually opened Hopper applications.
|
display; the headless Linux demo does not retain documents after MCP shutdown.
|
||||||
|
Its helper watches a private lifetime pipe, so an owner crash or SIGKILL also
|
||||||
|
stops those children, without relying on a reusable PID or a process-name scan.
|
||||||
|
A later session recovers the dead owner's stale lease after child cleanup;
|
||||||
|
private runtime files can remain when REA itself was killed. This does not attach to
|
||||||
|
or claim ownership of manually opened Hopper applications. An application left
|
||||||
|
running by an older REA version must still be closed before starting a new session.
|
||||||
|
|
||||||
Stale lease recovery is serialized. If an interrupted recovery leaves its
|
Stale lease recovery is serialized. If an interrupted recovery leaves its
|
||||||
reservation directory, the diagnostic identifies that exact path. Stop REA
|
reservation directory, the diagnostic identifies that exact path. Stop REA
|
||||||
@@ -433,11 +449,12 @@ output-stream closure; `output_closed: false` keeps that uncertainty explicit.
|
|||||||
Later requests retain the known exit instead of reducing it to socket loss.
|
Later requests retain the known exit instead of reducing it to socket loss.
|
||||||
An external GUI's helper exit does not establish that the GUI itself exited.
|
An external GUI's helper exit does not establish that the GUI itself exited.
|
||||||
For cursor navigation, string decoding, symbol-name limits, and regex matching,
|
For cursor navigation, string decoding, symbol-name limits, and regex matching,
|
||||||
see [Hopper analysis behavior](native-investigation.md#hopper-analysis-behavior).
|
see [Hopper analysis behavior](../guides/native/native-investigation.md#hopper-analysis-behavior).
|
||||||
|
|
||||||
Closing or switching a target closes its bound Hopper document, shuts down REA's
|
Closing or switching a target closes its bound Hopper document, shuts down REA's
|
||||||
bridge and removes its temporary socket directory while preserving the Hopper
|
bridge and removes its temporary socket directory. The macOS Hopper application
|
||||||
application and unrelated documents. A `cleanup_incomplete`
|
and unrelated documents remain open; the owned Linux demo application stops.
|
||||||
|
A `cleanup_incomplete`
|
||||||
result identifies resources whose cleanup could not be verified.
|
result identifies resources whose cleanup could not be verified.
|
||||||
REA retains unresolved cleanup ownership and any confirmed shutdown phases.
|
REA retains unresolved cleanup ownership and any confirmed shutdown phases.
|
||||||
After addressing the reported failure, retry `close_binary` on the same
|
After addressing the reported failure, retry `close_binary` on the same
|
||||||
@@ -502,10 +519,13 @@ and `set_addresses_names` name a function entry or any other mapped address
|
|||||||
session metadata edits leave executable bytes unchanged and are discarded on close. GUI controls
|
session metadata edits leave executable bytes unchanged and are discarded on close. GUI controls
|
||||||
require Hopper; Windows P0 remains read-only.
|
require Hopper; Windows P0 remains read-only.
|
||||||
|
|
||||||
Windows P0 admits native x86 and x86-64 PE applications and DLLs on fixed local NTFS volumes.
|
Windows P0 admits native x86 and x86-64 PE applications and DLLs, plus explicitly
|
||||||
|
selected [raw NMOS 6502 images](../providers/raw-binary.md#nmos-6502) with a caller-supplied
|
||||||
|
entry at file offset 0, on fixed local NTFS volumes. Other raw CPU families remain
|
||||||
|
unsupported on Windows.
|
||||||
The npm package bundles native Job Object ownership, protected private runtime
|
The npm package bundles native Job Object ownership, protected private runtime
|
||||||
DACLs, and handle-based path admission; no separate addon installation is needed.
|
DACLs, and handle-based path admission; no separate addon installation is needed.
|
||||||
See the [Windows Ghidra P0 guide](windows-ghidra-p0.md) for verified scope and
|
See the [Windows Ghidra P0 guide](../providers/windows-ghidra-p0.md) for verified scope and
|
||||||
limitations.
|
limitations.
|
||||||
|
|
||||||
Extract Ghidra and install the JDK outside REA, then export absolute paths:
|
Extract Ghidra and install the JDK outside REA, then export absolute paths:
|
||||||
@@ -531,7 +551,7 @@ REA skill after approval. Direct registrations use Node to launch REA's entry
|
|||||||
script; package-runner registrations use the pinned `npx` or `bunx` command. Hopper
|
script; package-runner registrations use the pinned `npx` or `bunx` command. Hopper
|
||||||
installation remains unavailable on Windows. Setup never installs Ghidra,
|
installation remains unavailable on Windows. Setup never installs Ghidra,
|
||||||
Java, or Python. It preserves valid detected Ghidra/JDK settings in agent
|
Java, or Python. It preserves valid detected Ghidra/JDK settings in agent
|
||||||
registrations. See [Windows Ghidra P0](windows-ghidra-p0.md) for provider diagnostics.
|
registrations. See [Windows Ghidra P0](../providers/windows-ghidra-p0.md) for provider diagnostics.
|
||||||
|
|
||||||
Doctor validates the platform, architecture, Ghidra 12.1.x application version,
|
Doctor validates the platform, architecture, Ghidra 12.1.x application version,
|
||||||
`support/analyzeHeadless` or `support/analyzeHeadless.bat`, the installation's
|
`support/analyzeHeadless` or `support/analyzeHeadless.bat`, the installation's
|
||||||
@@ -572,7 +592,7 @@ passes the deadline to each provider client; a startup failure is returned by th
|
|||||||
without exposing partial analysis. This deadline is separate from MCP transport
|
without exposing partial analysis. This deadline is separate from MCP transport
|
||||||
initialization and the client's deadline for that individual tool call. A client
|
initialization and the client's deadline for that individual tool call. A client
|
||||||
can time out earlier even when Ghidra would complete within its startup deadline.
|
can time out earlier even when Ghidra would complete within its startup deadline.
|
||||||
See [Ghidra first-query deadlines and recovery](mcp-contracts.md#ghidra-first-query-deadlines-and-recovery)
|
See [Ghidra first-query deadlines and recovery](../reference/mcp-contracts.md#ghidra-first-query-deadlines-and-recovery)
|
||||||
for client options and the close/reopen recovery flow.
|
for client options and the close/reopen recovery flow.
|
||||||
|
|
||||||
One session contains exactly one imported Program; use `provider_id: "ghidra"`, `--provider ghidra`, or
|
One session contains exactly one imported Program; use `provider_id: "ghidra"`, `--provider ghidra`, or
|
||||||
@@ -604,12 +624,39 @@ rea doctor --json
|
|||||||
The copy step requires the destination to be absent and preserves an existing
|
The copy step requires the destination to be absent and preserves an existing
|
||||||
decompiler. This recipe is specific to macOS x64: the
|
decompiler. This recipe is specific to macOS x64: the
|
||||||
[Ghidra 12.1.4 Makefile](https://github.com/NationalSecurityAgency/ghidra/blob/Ghidra_12.1.4_build/Ghidra/Features/Decompiler/src/decompile/cpp/Makefile)
|
[Ghidra 12.1.4 Makefile](https://github.com/NationalSecurityAgency/ghidra/blob/Ghidra_12.1.4_build/Ghidra/Features/Decompiler/src/decompile/cpp/Makefile)
|
||||||
explicitly selects `-arch x86_64` on Darwin. For other architectures or a Gradle
|
explicitly selects `-arch x86_64` on Darwin. For a Gradle
|
||||||
build, follow the matching release's
|
build, follow the matching release's
|
||||||
[native component instructions](https://github.com/NationalSecurityAgency/ghidra/blob/Ghidra_12.1.4_build/GhidraDocs/GettingStarted.md#building-native-components).
|
[native component instructions](https://github.com/NationalSecurityAgency/ghidra/blob/Ghidra_12.1.4_build/GhidraDocs/GettingStarted.md#building-native-components).
|
||||||
REA accepts the matching executable under either `os/<platform>/` or
|
REA accepts the matching executable under either `os/<platform>/` or
|
||||||
`build/os/<platform>/`; it does not build the component during setup or diagnosis.
|
`build/os/<platform>/`; it does not build the component during setup or diagnosis.
|
||||||
|
|
||||||
|
### macOS arm64 native decompiler
|
||||||
|
|
||||||
|
On Apple Silicon the same source build works with explicit overrides; no
|
||||||
|
Makefile edits and no Rosetta are needed. The Darwin block in the
|
||||||
|
[Ghidra 12.1.4 Makefile](https://github.com/NationalSecurityAgency/ghidra/blob/Ghidra_12.1.4_build/Ghidra/Features/Decompiler/src/decompile/cpp/Makefile)
|
||||||
|
pins `-arch x86_64`, but `ARCH_TYPE` and `OSDIR` are ordinary make variables,
|
||||||
|
and command-line assignments replace them for every compile and link rule:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd "$GHIDRA_INSTALL_DIR/Ghidra/Features/Decompiler/src/decompile/cpp"
|
||||||
|
make ghidra_opt ARCH_TYPE="-arch arm64" OSDIR=mac_arm_64
|
||||||
|
decompiler_dir="$GHIDRA_INSTALL_DIR/Ghidra/Features/Decompiler/os/mac_arm_64"
|
||||||
|
mkdir -p "$decompiler_dir"
|
||||||
|
test ! -e "$decompiler_dir/decompile" && test ! -L "$decompiler_dir/decompile" &&
|
||||||
|
install -m 755 ghidra_opt "$decompiler_dir/decompile"
|
||||||
|
rea doctor --json
|
||||||
|
```
|
||||||
|
|
||||||
|
Verified end to end on macOS 15.6 arm64 with Apple clang 17 and the stock
|
||||||
|
bison 2.3, against Ghidra 12.1.4: the build produces a Mach-O arm64
|
||||||
|
`ghidra_opt`, the doctor check `ghidra-native_decompiler` turns healthy with
|
||||||
|
"reports mach-o arm64, which matches darwin/arm64", and `rea decompile` on an
|
||||||
|
arm64 Mach-O returns decompiled C through the headless provider. The JDK is
|
||||||
|
not needed for the make step, only for the Ghidra provider. If your toolchain
|
||||||
|
rejects the inherited `-mmacosx-version-min=10.6` flag, retry the make with
|
||||||
|
`ADDITIONAL_FLAGS="-w"`.
|
||||||
|
|
||||||
### Ghidra import language and analysis seeds
|
### Ghidra import language and analysis seeds
|
||||||
|
|
||||||
Ghidra detects the language from the executable header. To set it (for example, Borland C++ PE images):
|
Ghidra detects the language from the executable header. To set it (for example, Borland C++ PE images):
|
||||||
@@ -706,7 +753,7 @@ contains the launch arguments and `/proc/<jvm-pid>/status` reports
|
|||||||
session and retain the resource flags needed for the measurement rather than
|
session and retain the resource flags needed for the measurement rather than
|
||||||
copying full command lines or environments into reports. Heap and affinity
|
copying full command lines or environments into reports. Heap and affinity
|
||||||
settings affect cost and latency; they are not part of REA's semantic analysis
|
settings affect cost and latency; they are not part of REA's semantic analysis
|
||||||
profile identity. See [real-provider testing](testing.md) for bounded
|
profile identity. See [real-provider testing](../development/testing.md) for bounded
|
||||||
verification workflows.
|
verification workflows.
|
||||||
|
|
||||||
### Ghidra diagnostics and verification
|
### Ghidra diagnostics and verification
|
||||||
@@ -136,8 +136,8 @@ existing analysis families directly, for example
|
|||||||
## Resource and lifecycle limits
|
## Resource and lifecycle limits
|
||||||
|
|
||||||
- Caller values reach adb only as positional arguments in fixed vectors;
|
- Caller values reach adb only as positional arguments in fixed vectors;
|
||||||
no tool accepts an arbitrary shell command line, and UI interaction
|
no tool accepts an arbitrary shell command line, `input`, or `monkey`.
|
||||||
(`input`, `am`, `monkey`) is deliberately not exposed.
|
The app/activity lifecycle tools use `am start -W` and `am force-stop`.
|
||||||
- Per-invocation budgets: client/devices 10-20 s, shell reads 20-60 s with
|
- Per-invocation budgets: client/devices 10-20 s, shell reads 20-60 s with
|
||||||
64 KiB-8 MiB capture caps (logcat 4 MiB, screen 32 MiB), transfers and
|
64 KiB-8 MiB capture caps (logcat 4 MiB, screen 32 MiB), transfers and
|
||||||
bugreports 600 s. Exceeded budgets report `resource_constraint`; stopped
|
bugreports 600 s. Exceeded budgets report `resource_constraint`; stopped
|
||||||
@@ -148,6 +148,11 @@ existing analysis families directly, for example
|
|||||||
- Cancellation during a package pull preserves caller-selected output. The
|
- Cancellation during a package pull preserves caller-selected output. The
|
||||||
error includes partial observations identifying completed artifacts and the
|
error includes partial observations identifying completed artifacts and the
|
||||||
interrupted local path; remaining APKs were not attempted.
|
interrupted local path; remaining APKs were not attempted.
|
||||||
|
- Bugreports collect into isolated staging and publish with exclusive creation;
|
||||||
|
filename collisions select the next numeric suffix. If publication fails, the
|
||||||
|
completed archive remains in staging. The error's partial observation gives
|
||||||
|
its recoverable `local_path`, the original `adb_reported_path`, and an unknown
|
||||||
|
digest status. Later operations and shutdown preserve this retained evidence.
|
||||||
- Failed package acquisition rollback retains its directory identity and retries
|
- Failed package acquisition rollback retains its directory identity and retries
|
||||||
cleanup before later work and during shutdown. Cleanup refuses a replacement
|
cleanup before later work and during shutdown. Cleanup refuses a replacement
|
||||||
directory. Terminal shutdown stops admission and drains active operations.
|
directory. Terminal shutdown stops admission and drains active operations.
|
||||||
@@ -176,4 +181,4 @@ Record: verified against adb 34.0.5 on Linux against an Android 14
|
|||||||
(API 34) x86_64 emulator — all operations above, a 224-package inventory,
|
(API 34) x86_64 emulator — all operations above, a 224-package inventory,
|
||||||
287 services, 92 features, a real two-APK split set pulled with byte-exact
|
287 services, 92 features, a real two-APK split set pulled with byte-exact
|
||||||
digests, a verified push/pull roundtrip, a 1.3 MB screen capture, and the
|
digests, a verified push/pull roundtrip, a 1.3 MB screen capture, and the
|
||||||
complete package lifecycle; see `docs/testing.md` for the lane summary.
|
complete package lifecycle; see `docs/development/testing.md` for the lane summary.
|
||||||
@@ -6,9 +6,30 @@ kept as an unmodified, commit-pinned Git submodule; see
|
|||||||
application workflow and return artifact-bound Evidence inline.
|
application workflow and return artifact-bound Evidence inline.
|
||||||
|
|
||||||
This family is present on repository main and in npm 4.1.0. Check the
|
This family is present on repository main and in npm 4.1.0. Check the
|
||||||
[released package boundary](installation.md#released-package-and-main) and the
|
[released package boundary](../../getting-started/installation.md#released-package-and-main) and the
|
||||||
connected server's tool list before selecting it.
|
connected server's tool list before selecting it.
|
||||||
|
|
||||||
|
## Optional package delivery
|
||||||
|
|
||||||
|
The MCP `inspect_android_package` request keeps complete output when `detail` is
|
||||||
|
omitted or `"complete"`. Select `detail: "summary"` explicitly to receive all
|
||||||
|
package, SDK and permission declarations, engine identity and class/resource
|
||||||
|
counts without decoded manifest text or duplicate raw provider replies. A
|
||||||
|
retaining session keeps the complete original Evidence and returns a distinct
|
||||||
|
linked `inspect_analysis_view` summary. This changes delivery, not JADX analysis.
|
||||||
|
|
||||||
|
Use the returned `normalized_result.parent_evidence_id` with
|
||||||
|
`inspect_analysis_view`, source kind `retained-evidence`, and
|
||||||
|
`view: {kind: "android", facet: "manifest", offset: 0, limit: 4096}` to read the
|
||||||
|
exact decoded manifest without reopening the APK. Offsets and limits count UTF-16
|
||||||
|
code units; follow `coverage.next_offset`. The page preserves `source_status` and
|
||||||
|
`reported_total_bytes`: exhausting retained text does not make a partial decoded
|
||||||
|
manifest complete. Complete source Evidence remains exportable under the existing
|
||||||
|
session lifetime. Servers without retention reject summary before starting JADX.
|
||||||
|
One-shot CLI output remains complete. Older servers require the existing complete
|
||||||
|
request after schema discovery. APK authenticity and runtime behavior remain
|
||||||
|
unverified.
|
||||||
|
|
||||||
## Supply tools
|
## Supply tools
|
||||||
|
|
||||||
Use a **full JDK 17 or newer** (including its compiler module) and
|
Use a **full JDK 17 or newer** (including its compiler module) and
|
||||||
@@ -65,6 +86,7 @@ rea inspect-android-method /path/Example.apk example.MainActivity onCreate
|
|||||||
rea inspect-android-method /path/Example.apk example.MainActivity select --overload-index 1
|
rea inspect-android-method /path/Example.apk example.MainActivity select --overload-index 1
|
||||||
rea trace-android-references /path/Example.apk example.MainActivity
|
rea trace-android-references /path/Example.apk example.MainActivity
|
||||||
rea trace-android-references /path/Example.apk example.MainActivity --method-name onCreate
|
rea trace-android-references /path/Example.apk example.MainActivity --method-name onCreate
|
||||||
|
rea trace-android-references /path/Example.apk example.MainActivity --method-name select --overload-index 1
|
||||||
```
|
```
|
||||||
|
|
||||||
Equivalent MCP methods are `inspect_android_package`, `search_android_classes`,
|
Equivalent MCP methods are `inspect_android_package`, `search_android_classes`,
|
||||||
@@ -85,9 +107,10 @@ Every request includes `path`. Class/method operations use `class_name`,
|
|||||||
```
|
```
|
||||||
|
|
||||||
Use `inspect_android_class` to choose an overload. REA rejects an ambiguous
|
Use `inspect_android_class` to choose an overload. REA rejects an ambiguous
|
||||||
method request rather than silently selecting the first match. The engine's
|
method request rather than silently selecting the first match. Method reference
|
||||||
method reference operation cannot select overloads, so REA reports that boundary
|
queries accept the same `overload_index`; the bridge resolves the selected
|
||||||
as unsupported when multiple same-name methods exist.
|
method node and the result reports its index and displayed signature. These
|
||||||
|
indices are tied to the current artifact and engine, not stable across builds.
|
||||||
|
|
||||||
The engine's smali fallback also joins same-name overloads; REA rejects that
|
The engine's smali fallback also joins same-name overloads; REA rejects that
|
||||||
fallback for an overloaded method instead of attributing all bodies to one
|
fallback for an overloaded method instead of attributing all bodies to one
|
||||||
@@ -116,14 +139,28 @@ the same source byte limit and explicit truncation reporting.
|
|||||||
full reported display types, fields and inner class names. Synthetic members
|
full reported display types, fields and inner class names. Synthetic members
|
||||||
that code generation hides can appear in the inventory; it stays consistent
|
that code generation hides can appear in the inventory; it stays consistent
|
||||||
after method decompilation within the retained session.
|
after method decompilation within the retained session.
|
||||||
Exact DEX descriptors are unknown. Overload indices are tied to this artifact
|
Exact DEX prototypes are reported from frozen JADX method metadata as
|
||||||
and engine, not stable identities across different builds.
|
`dex_descriptor`, for example `(I)V`. Display names can be JADX aliases;
|
||||||
|
the descriptor alone is not a complete raw DEX method ID. Overload indices
|
||||||
|
are tied to this artifact and engine, not stable identities across builds.
|
||||||
- Method inspection reports Java or smali, fallback markers and complete/partial
|
- Method inspection reports Java or smali, fallback markers and complete/partial
|
||||||
returned text. Decompiled source is a derived representation. A complete text
|
returned text. Decompiled source is a derived representation. A complete text
|
||||||
result does not establish complete semantics or a byte-identical reconstruction.
|
result does not establish complete semantics or a byte-identical reconstruction.
|
||||||
- Reference results are incoming static relationships between provider nodes.
|
- Reference results are incoming static relationships between provider nodes.
|
||||||
Source lines and DEX instruction offsets remain unknown. They are not observed
|
`reference_unit=using_node` means `total` counts containing JADX nodes, not
|
||||||
runtime calls.
|
individual invoke instructions; two calls from one method can appear as one
|
||||||
|
entry. `coverage=complete` covers this node inventory only. For a method
|
||||||
|
reference whose using node has raw code, `direct_invokes` lists matching DEX
|
||||||
|
invoke instructions with their DEX entry, raw source method ID, code-unit
|
||||||
|
offset, method index and opcode. An empty array means no direct invoke was
|
||||||
|
matched in that node; `null` means raw code was unavailable or the using node
|
||||||
|
was not a method. This list does not establish complete call-site coverage
|
||||||
|
outside JADX's using-node inventory or through reflection and dynamic loading.
|
||||||
|
A virtual or interface invoke also does not establish its runtime implementation.
|
||||||
|
Source lines and the containing node's own `dex_offset` remain unknown.
|
||||||
|
Method-reference results also carry the selected `dex_descriptor`;
|
||||||
|
class-reference results report `null`.
|
||||||
|
These relationships are not observed runtime calls.
|
||||||
- Original requests, APK SHA-256, actual engine JAR SHA-256 and raw producer
|
- Original requests, APK SHA-256, actual engine JAR SHA-256 and raw producer
|
||||||
responses remain in Evidence. Source revision is populated only for bytes
|
responses remain in Evidence. Source revision is populated only for bytes
|
||||||
matching the audited release JAR.
|
matching the audited release JAR.
|
||||||
@@ -189,9 +226,11 @@ REA never writes to the original APK or launches target code.
|
|||||||
|
|
||||||
On Windows, stdin writes preserve stream backpressure and run outside the Node
|
On Windows, stdin writes preserve stream backpressure and run outside the Node
|
||||||
event loop. Cancellation terminates the retained job, including descendants,
|
event loop. Cancellation terminates the retained job, including descendants,
|
||||||
before workspace cleanup. An abrupt CLI/server process termination closes the
|
before workspace cleanup. On Windows, a detached REA helper owns the private
|
||||||
job and stops Java, but cannot run JavaScript workspace cleanup; temporary
|
workspace's native directory handle. An abrupt CLI/server owner termination
|
||||||
workspace files can remain after that forced exit.
|
closes the Java job and the helper's input pipe; the helper then removes the
|
||||||
|
workspace by handle. The real Windows lane checks both effects. If the helper
|
||||||
|
also dies or the host loses power before it finishes, private files can remain.
|
||||||
|
|
||||||
If Java cannot start the bridge, REA reports the selected executable and retained
|
If Java cannot start the bridge, REA reports the selected executable and retained
|
||||||
startup diagnostics. Select a full JDK through `JAVA_HOME` or `PATH`, and use
|
startup diagnostics. Select a full JDK through `JAVA_HOME` or `PATH`, and use
|
||||||
@@ -254,12 +293,20 @@ The original APK and host Java configuration remain unchanged.
|
|||||||
|
|
||||||
The same lane runs on Windows x64 with the bundled native controls and a full
|
The same lane runs on Windows x64 with the bundled native controls and a full
|
||||||
JDK. It checks CLI/MCP results, real MCP cancellation and disconnect, and Java
|
JDK. It checks CLI/MCP results, real MCP cancellation and disconnect, and Java
|
||||||
exit after abrupt CLI owner termination. Windows forced termination is checked
|
exit and workspace removal after abrupt CLI owner termination. Windows forced
|
||||||
separately from the POSIX CLI SIGTERM handler; it does not claim a structured
|
termination is checked separately from the POSIX CLI SIGTERM handler. A
|
||||||
cancellation result or workspace removal after the owner is forcibly killed.
|
synthetic two-owner test confirms that one owner's exit does not remove the
|
||||||
|
other owner's workspace. The lane does not claim a structured cancellation
|
||||||
|
result or power-loss recovery.
|
||||||
|
|
||||||
The download script verifies fixed SHA-256 values, reuses matching files and
|
The download script verifies fixed SHA-256 values, reuses matching files and
|
||||||
refuses to overwrite a different existing file. APK/JAR files live under ignored
|
refuses to overwrite a different existing file. APK/JAR files live under ignored
|
||||||
`_reference/` and are excluded from package contents. The lane exercises actual
|
`_reference/` and are excluded from package contents. The lane exercises actual
|
||||||
REA CLI and MCP results with the real engine, separately from synthetic protocol
|
REA CLI and MCP results with the real engine, separately from synthetic protocol
|
||||||
regressions. It needs no Gradle build, emulator, Android SDK or Ghidra.
|
regressions. It needs no Gradle build, emulator, Android SDK or Ghidra.
|
||||||
|
|
||||||
|
Direct invoke sites retain exact DEX code-unit offsets separately from each
|
||||||
|
containing node's unknown `dex_offset`. `direct_invokes_exhaustive: false`
|
||||||
|
means instruction rows were bounded by the local bridge frame budget; `null`
|
||||||
|
means the producer did not establish instruction coverage. Using-node totals
|
||||||
|
and coverage do not imply complete instruction evidence.
|
||||||
+1
-1
@@ -91,4 +91,4 @@ OpenJDK 25 against a signed aapt2-built probe APK carrying two resource
|
|||||||
locales — launcher version, on-disk digest agreement, apktool.yml metadata
|
locales — launcher version, on-disk digest agreement, apktool.yml metadata
|
||||||
(1.2.3, SDK 24–34), manifest package agreement, default and `de` string
|
(1.2.3, SDK 24–34), manifest package agreement, default and `de` string
|
||||||
tables projected. Parser goldens in the test suite come from the same
|
tables projected. Parser goldens in the test suite come from the same
|
||||||
decode. See `docs/testing.md` for the lane summary.
|
decode. See `docs/development/testing.md` for the lane summary.
|
||||||
@@ -25,6 +25,26 @@ The equivalent MCP methods are `identify_flutter_build` (with `path`) and
|
|||||||
arm64-v8a, then x86_64, then x86, then armeabi-v7a, then the remaining
|
arm64-v8a, then x86_64, then x86, then armeabi-v7a, then the remaining
|
||||||
ABIs alphabetically).
|
ABIs alphabetically).
|
||||||
|
|
||||||
|
## Optional retained AOT delivery
|
||||||
|
|
||||||
|
MCP `inspect_dart_aot` keeps complete output when `detail` is omitted or
|
||||||
|
`"complete"`. Explicit `detail: "summary"` returns the selected target/ABI/library
|
||||||
|
identity, all snapshot headers, structural coverage, string-pool coverage and
|
||||||
|
original lower-bound counts without the string lists. It retains complete source
|
||||||
|
Evidence and returns a distinct linked `inspect_analysis_view` summary. Analysis
|
||||||
|
and the caller's ABI choice are unchanged; one-shot CLI output stays complete.
|
||||||
|
|
||||||
|
Use `normalized_result.parent_evidence_id` as the retained source for
|
||||||
|
`inspect_analysis_view`, with `view: {kind: "dart-aot", collection: "package_uris",
|
||||||
|
offset: 0, limit: 64}`. Collections are `package_uris`, `dart_uris` and
|
||||||
|
`class_like_tokens`. Pages preserve the original strings and order, selected ABI,
|
||||||
|
library identity and source coverage. `returned_counts` describe producer-returned
|
||||||
|
rows; counts ending in `_at_least` remain lower bounds. Exhausting a page sequence
|
||||||
|
does not make a partial pool complete or turn byte-pattern tokens into typed
|
||||||
|
classes/functions. Views do not reopen the APK. Original Evidence remains
|
||||||
|
exportable under its existing session lifetime. Summary requires a retaining
|
||||||
|
server; older servers keep the complete request after schema discovery.
|
||||||
|
|
||||||
## What the AOT inspection returns
|
## What the AOT inspection returns
|
||||||
|
|
||||||
`inspect_dart_aot` reads one ABI's `libapp.so` in full and reports:
|
`inspect_dart_aot` reads one ABI's `libapp.so` in full and reports:
|
||||||
@@ -40,6 +60,10 @@ ABIs alphabetically).
|
|||||||
[Dart 2.14 layout](https://github.com/dart-lang/sdk/blob/2.14.0/runtime/vm/snapshot.h).
|
[Dart 2.14 layout](https://github.com/dart-lang/sdk/blob/2.14.0/runtime/vm/snapshot.h).
|
||||||
Kind numbers vary across Dart releases; other values are preserved with
|
Kind numbers vary across Dart releases; other values are preserved with
|
||||||
partial coverage, without guessing their interpretation.
|
partial coverage, without guessing their interpretation.
|
||||||
|
Address resolution examines every overlapping `PT_LOAD` interpretation,
|
||||||
|
including partial overlaps. Equivalent mappings are coalesced; conflicting
|
||||||
|
mappings leave affected symbols unresolved and qualify coverage. Dynamic
|
||||||
|
hash, symbol and string tables use the same mapping checks.
|
||||||
A payload without exported snapshot symbols is refused rather
|
A payload without exported snapshot symbols is refused rather
|
||||||
than guessed at.
|
than guessed at.
|
||||||
- **The snapshot hash** from the header at the start of each exported data
|
- **The snapshot hash** from the header at the start of each exported data
|
||||||
@@ -113,8 +137,11 @@ ABIs alphabetically).
|
|||||||
`resource_constraint`.
|
`resource_constraint`.
|
||||||
- **Engine notes.** Engine libraries are spooled into the owned root. ELF
|
- **Engine notes.** Engine libraries are spooled into the owned root. ELF
|
||||||
headers, note tables and note payloads share an 8 MiB metadata budget;
|
headers, note tables and note payloads share an 8 MiB metadata budget;
|
||||||
up to 64 distinct build IDs are retained. Exceeding either bound preserves
|
up to 64 distinct build IDs and 1024 distinct nonempty note ranges are retained.
|
||||||
the candidates already examined and reports partial coverage.
|
The range cap bounds bookkeeping and separate positional reads even for tiny
|
||||||
|
overlapping declarations. Exact duplicates share one read and empty ranges
|
||||||
|
consume no inventory slots. Exceeding a bound preserves the candidates examined
|
||||||
|
from retained ranges and reports partial coverage with `build_id: null`.
|
||||||
- **Metadata and candidate capacity.** Both operations refuse duplicate
|
- **Metadata and candidate capacity.** Both operations refuse duplicate
|
||||||
relevant library paths. Inventory is limited to 32 ABIs and 1024 bytes per
|
relevant library paths. Inventory is limited to 32 ABIs and 1024 bytes per
|
||||||
relevant library path, independently of compressed size. Identification
|
relevant library path, independently of compressed size. Identification
|
||||||
@@ -154,3 +181,9 @@ engine build-ids, no labeled Dart version (as expected for a release
|
|||||||
engine), and the Android clang toolchain line; a plain aapt2-built APK
|
engine), and the Android clang toolchain line; a plain aapt2-built APK
|
||||||
reports not-detected with complete coverage. The suite uses self-contained
|
reports not-detected with complete coverage. The suite uses self-contained
|
||||||
synthetic ELF images and scanner payloads; it does not read private local files.
|
synthetic ELF images and scanner payloads; it does not read private local files.
|
||||||
|
|
||||||
|
The Gallery workflow and all 147 focused Flutter tests also pass on macOS Sonoma
|
||||||
|
14.8.9 x86-64 and Windows 11 x64 build 26300.9457 guests with Node 24.18.0,
|
||||||
|
including the conflicting-load and note-range-limit CLI/MCP regressions. Windows
|
||||||
|
verification runs under a non-administrator account. Verifiers use a shared
|
||||||
|
temporary parent so each CLI/MCP process can own and release its own snapshots.
|
||||||
+1
-1
@@ -174,7 +174,7 @@ Resolution follows dyld:
|
|||||||
- `@rpath` tries each `LC_RPATH` of the loading image first, then those of the
|
- `@rpath` tries each `LC_RPATH` of the loading image first, then those of the
|
||||||
image that loaded it, up to the process root.
|
image that loaded it, up to the process root.
|
||||||
- Dependencies load dependents-first in load-command order, and each image
|
- Dependencies load dependents-first in load-command order, and each image
|
||||||
loads once per process. A later request whose install name matches an
|
loads once per process. A later @rpath request whose install name matches an
|
||||||
already loaded image reuses it.
|
already loaded image reuses it.
|
||||||
- Symlinks such as `Versions/Current` are followed inside the analyzed root.
|
- Symlinks such as `Versions/Current` are followed inside the analyzed root.
|
||||||
An escape through `..` or an absolute link is `escapes-target`.
|
An escape through `..` or an absolute link is `escapes-target`.
|
||||||
@@ -0,0 +1,176 @@
|
|||||||
|
# Recorded packet capture inspection
|
||||||
|
|
||||||
|
`inspect_packet_capture` answers which selected protocol fields TShark observes
|
||||||
|
in an existing capture. Network, USB or Bluetooth recordings can use the same
|
||||||
|
field/filter interface when the installed TShark supports their encapsulation
|
||||||
|
and dissectors. This tool does not acquire traffic, open an interface or control
|
||||||
|
a device. HAR/SAZ/mitmproxy web-capture workflows remain separate.
|
||||||
|
|
||||||
|
Supply an existing TShark 4.x installation **on Linux**, with util-linux
|
||||||
|
`prlimit` available at `/usr/bin/prlimit`. Override its absolute path with
|
||||||
|
`REA_TSHARK_PRLIMIT_COMMAND` if required. Unsupported hosts, including macOS
|
||||||
|
and Windows, are refused before inspection because this integration requires
|
||||||
|
an enforced address-space limit:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
export REA_TSHARK_COMMAND=/absolute/path/to/tshark
|
||||||
|
rea inspect-packet-capture /artifacts/device.pcapng \
|
||||||
|
--fields ip.addr --fields udp.port --fields data.data \
|
||||||
|
--display_filter 'udp' --format json
|
||||||
|
```
|
||||||
|
|
||||||
|
The corresponding MCP call is:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "inspect_packet_capture",
|
||||||
|
"arguments": {
|
||||||
|
"path": "/artifacts/device.pcapng",
|
||||||
|
"fields": ["ip.addr", "udp.port", "data.data"],
|
||||||
|
"display_filter": "udp"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
`frame.number` is always included. Repeated values are ordered string arrays,
|
||||||
|
for example `"ip.addr": ["192.0.2.1", "192.0.2.2"]`. Missing fields remain
|
||||||
|
absent; they are not converted to zero or empty arrays. Export-only index/score
|
||||||
|
metadata is discarded. No payload bytes are automatically added; select a
|
||||||
|
supported byte field such as `data.data` or `@data` when needed.
|
||||||
|
|
||||||
|
Selectors are limited before argv expansion: at most 1,024 fields and 1,024
|
||||||
|
`decode_as` rules, 8,192 UTF-16 code units per selector, and 32 KiB total encoded
|
||||||
|
selector arguments (UTF-8 text, terminators, option names and argv pointers).
|
||||||
|
This leaves headroom below Linux's [execve argument/environment limits](https://man7.org/linux/man-pages/man2/execve.2.html);
|
||||||
|
an unusually large inherited environment can still prevent launching.
|
||||||
|
|
||||||
|
Output is paged after filtering: `match_limit` defaults to 50 and `match_offset`
|
||||||
|
to 0. The result retains original frame numbers and reports `output_window`
|
||||||
|
with the matching count within the input read scope, returned count and
|
||||||
|
`has_more`. Request later pages with the offset, or explicit `match_limit: null`
|
||||||
|
(CLI `--all_matches`) for all remaining matches. Paging does not shorten
|
||||||
|
input reading or change two-pass reassembly. Producer output must still fit its
|
||||||
|
resource limit; use selected fields, a display filter or an input-packet limit
|
||||||
|
when dissection output is too large. Each call checks the recording's current
|
||||||
|
digest, so pages from different source digests must not be combined.
|
||||||
|
|
||||||
|
Additional selections:
|
||||||
|
|
||||||
|
- `display_filter`: Wireshark display-filter syntax; omitted means no filter.
|
||||||
|
- `decode_as`: explicit dissector overrides, such as `["udp.port==5555,dns"]`.
|
||||||
|
Repeat `--decode_as` in the CLI for multiple overrides.
|
||||||
|
- `packet_limit`: optional maximum **input packets read before filtering**.
|
||||||
|
A limit of 1 can therefore yield zero matching packets even when later frames
|
||||||
|
match. Omitted means read to EOF within resource limits. The report records
|
||||||
|
`to-eof` or `up-to-input-packet-limit`, never inferring total capture size from
|
||||||
|
the returned packet count.
|
||||||
|
- `two_pass`: defaults to true for fields that need later packets and reassembly
|
||||||
|
dependencies. MCP may set false; CLI uses `--no-two_pass` for a single pass.
|
||||||
|
|
||||||
|
See the [TShark manual](https://www.wireshark.org/docs/man-pages/tshark.html)
|
||||||
|
for field names, display filters, decode-as syntax and pass semantics. Invalid
|
||||||
|
fields or filters return producer diagnostics. An empty result does not prove
|
||||||
|
absence of traffic outside the selected recording, filter or read range.
|
||||||
|
Dissector results are observations, not independently verified device behavior.
|
||||||
|
|
||||||
|
Evidence includes source path/digest/size, exact selections, typed packet fields,
|
||||||
|
configured and resolved executable paths/digests/full version banner, arguments and stderr. Warnings remain
|
||||||
|
visible even on exit zero. `tool.version_diagnostics` also retains warnings from
|
||||||
|
the separate version probe. Post-run identity failures identify the affected
|
||||||
|
private copy, executable or limiter; resource-signal errors retain the signal
|
||||||
|
and effective ceilings. Two-pass mode cannot recover missing capture bytes.
|
||||||
|
|
||||||
|
Each call uses a private read-only capture copy and an empty personal
|
||||||
|
configuration directory (`WIRESHARK_CONFIG_DIR`), with name resolution disabled.
|
||||||
|
The executable, resource limiter and private input copy are rechecked after execution. Owned
|
||||||
|
processes, file descriptors and private files are cleaned up; failed cleanup retains ownership and
|
||||||
|
completed observations for retry. The one-shot CLI awaits a cleanup retry while
|
||||||
|
preserving the original failure and completed Evidence. Completed observations
|
||||||
|
remain in the MCP session after cancellation or cleanup failure; bounded
|
||||||
|
post-run integrity checks finish before honoring a late abort. Source files
|
||||||
|
are never passed to TShark.
|
||||||
|
Installed libraries, global configuration and plugins remain trusted, are not
|
||||||
|
fully fingerprinted, and can influence dissection. This is not an OS sandbox.
|
||||||
|
|
||||||
|
Input is limited to 32 MiB before reading, each command to 30 seconds, and
|
||||||
|
combined stdout/stderr to 4 MiB during collection. Output overflow fails instead
|
||||||
|
of returning truncated success. Before execution, `prlimit` enforces **1 GiB
|
||||||
|
address space per process**, **64 MiB per file**, **30 CPU seconds** and no core
|
||||||
|
dumps. Stricter inherited soft/hard limits are preserved; Evidence records the effective
|
||||||
|
ceilings. Both limits are set before execution, so dissector allocations and
|
||||||
|
compressed-capture expansion cannot exceed the per-process address-space cap.
|
||||||
|
These are not aggregate process-memory or filesystem quotas. The selected
|
||||||
|
limiter is trusted; its path, digest and arguments are retained in Evidence.
|
||||||
|
No arbitrary process flags are accepted.
|
||||||
|
|
||||||
|
## Verification
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run build:cached
|
||||||
|
REA_TSHARK_COMMAND=/absolute/path/to/tshark node scripts/verify-packet-capture.mjs
|
||||||
|
```
|
||||||
|
|
||||||
|
The verifier generates its own Ethernet/IPv4/UDP/DNS and Bluetooth HCI PCAPs.
|
||||||
|
It exercises real compiled CLI/MCP parity, advertised schemas, repeated/missing
|
||||||
|
fields, filtering, decode-as, both pass modes, a packet limit before matching
|
||||||
|
frames, Evidence persistence, failure diagnostics, source identity and cleanup.
|
||||||
|
An optional positional REA entrypoint verifies an installed package.
|
||||||
|
|
||||||
|
The real-tool lane requires Linux and TShark 4.x. A separate kernel-limit
|
||||||
|
regression checks the inherited soft/hard limits and verifies an oversized
|
||||||
|
allocation is refused before it can consume memory. The Ubuntu workflow uses
|
||||||
|
its distribution package; check its outcome before claiming that build verified.
|
||||||
|
The earlier macOS check does not establish the current bounded integration,
|
||||||
|
which deliberately refuses unsupported hosts. Other formats (including PCAPNG),
|
||||||
|
USB, BLE ATT and actual physical capture are not established by these fixtures.
|
||||||
|
|
||||||
|
Each provider admits one inspection at a time, including acquisition and cleanup.
|
||||||
|
An occupied provider returns a retryable capacity error before acquiring another
|
||||||
|
file or worker. Closing the provider stops new admission and drains accepted work;
|
||||||
|
failed cleanup remains owned and can be retried.
|
||||||
|
|
||||||
|
## Discover protocols and field names
|
||||||
|
|
||||||
|
`inspect_packet_fields` / `inspect-packet-fields` queries the installed TShark
|
||||||
|
registration glossary before selecting fields for capture inspection:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
rea inspect-packet-fields --query usb
|
||||||
|
rea inspect-packet-fields --kind fields --protocol usb --query idVendor
|
||||||
|
rea inspect-packet-fields --kind fields --protocol udp --all
|
||||||
|
```
|
||||||
|
|
||||||
|
`kind` defaults to `protocols`; `fields` selects field definitions. `protocol`
|
||||||
|
selects an exact protocol abbreviation (the protocol itself or its child fields).
|
||||||
|
`query` is a case-insensitive literal substring in name, abbreviation or field
|
||||||
|
description. `offset` skips matching records; `limit` defaults to 50. MCP
|
||||||
|
`limit: null` or CLI `--all` requests all remaining matches within the resource
|
||||||
|
budget. `--all` and `--limit` conflict. The window reports examined records of
|
||||||
|
the selected kind before filters, matching records, returned records and
|
||||||
|
`has_more`; it never counts capture packets.
|
||||||
|
|
||||||
|
Returned records preserve field type, parent protocol, display base, bitmask,
|
||||||
|
description and original glossary line number. Empty producer strings remain
|
||||||
|
empty; protocol records have null field-only properties. Repeated abbreviations
|
||||||
|
remain separate registrations. A listed field is an installation capability, not
|
||||||
|
proof that the field appears in a selected recording.
|
||||||
|
|
||||||
|
The adapter uses the documented `tshark -G fields` grammar under its existing
|
||||||
|
private empty profile and Linux process limits. TShark 4.6.9's full glossary was
|
||||||
|
measured at 22,303,197 bytes; discovery admits at most **32 MiB** combined command
|
||||||
|
output (capture inspection remains at **4 MiB**). Parsing walks lines once and
|
||||||
|
constructs objects only for the selected page. Returned strings are copied so
|
||||||
|
retained pages do not retain the complete glossary string. Before constructing a selected
|
||||||
|
record it charges six times the source UTF-8 bytes plus 512 bytes against an
|
||||||
|
**8 MiB** representation budget, covering JSON escaping and record bookkeeping.
|
||||||
|
If that budget would be exceeded, narrow the query or page size; results are not
|
||||||
|
silently truncated. This is a conservative admission budget, not measured heap
|
||||||
|
usage. Parent pipe buffers and producer per-process limits remain distinct.
|
||||||
|
|
||||||
|
Tool/limiter identity, version, stderr and selected arguments are retained in
|
||||||
|
Evidence. No capture, interface or device is opened. Discovery shares capture
|
||||||
|
analysis's admission slot and cleanup owner. Each call rereads the glossary;
|
||||||
|
installed plugins, libraries and global configuration remain trusted and are not
|
||||||
|
fully fingerprinted. There is no cache or snapshot-consistent pagination claim.
|
||||||
|
The real Linux lane checks public CLI/MCP queries against the direct glossary,
|
||||||
|
including USB vendor-ID typing, negative queries and paging.
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
# Packet capture summaries
|
||||||
|
|
||||||
|
REA summarizes already saved pcap/pcapng files through caller-selected Wireshark
|
||||||
|
4.x `tshark` and `capinfos`. Use `inspect_packet_capture` for selected fields,
|
||||||
|
filters and decode-as rules; use this family for address, DNS, SNI, protocol-stack
|
||||||
|
and URI inventories. It does not acquire traffic or fetch recorded targets.
|
||||||
|
|
||||||
|
## Supply tools
|
||||||
|
|
||||||
|
```sh
|
||||||
|
export REA_TSHARK_COMMAND=/absolute/path/tshark
|
||||||
|
export REA_CAPINFOS_COMMAND=/absolute/path/capinfos
|
||||||
|
# Linux only; default /usr/bin/prlimit
|
||||||
|
export REA_TSHARK_PRLIMIT_COMMAND=/absolute/path/prlimit
|
||||||
|
rea inspect-pcap-client
|
||||||
|
rea inspect-pcap-capture /captures/session.pcapng --json
|
||||||
|
```
|
||||||
|
|
||||||
|
Without explicit tool commands, this family resolves them through PATH and
|
||||||
|
records that selection source. Client inspection reads no capture file. Capture
|
||||||
|
inspection requires Linux with util-linux prlimit or Windows with owned Job
|
||||||
|
Objects. macOS capture inspection returns a capability gap because the new
|
||||||
|
native memory boundary is unverified; its version probes remain available.
|
||||||
|
Tools and installed libraries/plugins are caller-trusted. An empty private
|
||||||
|
personal Wireshark configuration is used; this is not an OS sandbox.
|
||||||
|
|
||||||
|
## Inspect only the needed facts
|
||||||
|
|
||||||
|
MCP `inspect_pcap_capture` accepts `path` and optional `detail: "summary"`.
|
||||||
|
Complete delivery remains the default. Summary commits and retains the same
|
||||||
|
complete Evidence, returning identity, capture metadata, observed counts,
|
||||||
|
retained counts, source coverage and diagnostic lengths without large lists.
|
||||||
|
Then use its `normalized_result.parent_evidence_id` with
|
||||||
|
`inspect_analysis_view` source kind `retained-evidence`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{"kind":"pcap","facet":"endpoints","offset":0,"limit":20}
|
||||||
|
{"kind":"pcap","facet":"dns-queries","offset":0,"limit":20}
|
||||||
|
{"kind":"pcap","facet":"dns-addresses","query":"example.com","offset":0,"limit":20}
|
||||||
|
{"kind":"pcap","facet":"tls-sni","offset":0,"limit":20}
|
||||||
|
{"kind":"pcap","facet":"diagnostics","stream":"tshark","offset":0,"limit":4096}
|
||||||
|
```
|
||||||
|
|
||||||
|
Other row facets are `protocols`, `http-uris` and `unattributed-addresses`.
|
||||||
|
Defaults are offset 0 and limit 64. DNS question pages give address counts;
|
||||||
|
select one exact retained question to page its addresses. Diagnostic windows
|
||||||
|
count UTF-16 code units; other windows count rows. Missing/ambiguous selectors
|
||||||
|
fail. Unknown legacy diagnostics remain unknown, not an observed empty stream.
|
||||||
|
Portable CLI views use the existing `inspect-analysis-view` workflow with inline
|
||||||
|
complete Evidence. Views never reread the source or launch Wireshark and work
|
||||||
|
after the original file is deleted. Page exhaustion covers the retained facet;
|
||||||
|
it does not establish network completeness or recover missing traffic.
|
||||||
|
|
||||||
|
## Interpret provenance and coverage
|
||||||
|
|
||||||
|
`target.sha256` binds observations to an admitted stable capture snapshot. Both
|
||||||
|
tools read that copy, which is hashed again after analysis. Capture metadata and
|
||||||
|
literal field values are producer observations; address/protocol counts and DNS
|
||||||
|
associations are derivations. Capture Evidence has historical-reference authority.
|
||||||
|
|
||||||
|
Addresses count once per packet, including loopback and nested IP occurrences.
|
||||||
|
DNS addresses are associated only with one question in the same response packet;
|
||||||
|
additional records may be included, so this does not prove final resolution.
|
||||||
|
Ambiguous addresses remain in a separate inventory. Protocol distribution counts
|
||||||
|
exact `frame.protocols` stack strings. TLS SNI is recorded handshake metadata,
|
||||||
|
not process identity or proof of the destination's authenticity.
|
||||||
|
|
||||||
|
All examined inventories are retained within the resource budget; no fixed
|
||||||
|
200/100/50-item truncation is applied. HTTP transport credentials are excluded
|
||||||
|
without rewriting other URI bytes; ambiguous credential spans cause omission.
|
||||||
|
Counts preserve distinct observed source URIs before omission or coalescing.
|
||||||
|
`coverage: "partial"` records unresolved DNS attribution or URI item loss;
|
||||||
|
component credential exclusion is also counted explicitly. Diagnostics retain
|
||||||
|
both tool stderr streams. Recorded fields do not establish decrypted payloads,
|
||||||
|
causality, process identity, absence of unrecorded traffic or current deployments.
|
||||||
|
|
||||||
|
## Resources and lifecycle
|
||||||
|
|
||||||
|
One inspection is admitted at a time per provider. Concurrent calls return a
|
||||||
|
capacity error; close drains active work before releasing resources. Captures
|
||||||
|
are streamed into a read-only owned snapshot with a 2 GiB disk budget. Native
|
||||||
|
capture commands enforce Linux address-space ceilings of at most 1 GiB,
|
||||||
|
300 CPU seconds, 64 MiB per file and no core dumps, preserving stricter inherited
|
||||||
|
limits. Windows uses a 1 GiB committed-memory limit for each owned tool tree.
|
||||||
|
These are not aggregate machine or filesystem quotas.
|
||||||
|
|
||||||
|
TShark output is bounded at 8 MiB; its known five-level selected-field shape and
|
||||||
|
128 MiB graph-expansion estimate are checked before allocation. Retained facts
|
||||||
|
have a separate 16 MiB estimate. Capinfos output is limited to 64 KiB. Command
|
||||||
|
wall deadlines are 300 s for dissection, 60 s for metadata and 20 s for probes.
|
||||||
|
Native ownership preparation has its own bounded lifecycle.
|
||||||
|
|
||||||
|
Malformed/oversized output returns no partial success. Unvalidated partial JSON
|
||||||
|
is not returned as facts. Cancellation reaches probes, acquisition, commands and
|
||||||
|
projection. Cleanup failure returns a typed error, retains completed Evidence
|
||||||
|
when available, and retains owned resources for retry on close.
|
||||||
|
|
||||||
|
## Verification scope
|
||||||
|
|
||||||
|
Current follow-up verification uses Linux/Node 24.18.0 and Wireshark 4.0.17.
|
||||||
|
Private real recorded corpora are checked against independent raw-frame/IP
|
||||||
|
parsing and Python aggregation, public CLI/stdio MCP parity, SDK schemas, source
|
||||||
|
hashes and retained views. Synthetic native tools separately test malformed
|
||||||
|
output, cancellation, source/snapshot mutation, capacity and cleanup; they do
|
||||||
|
not establish real Wireshark or other-platform behavior.
|
||||||
|
|
||||||
|
The original proposal reported Linux 4.6.6, macOS/Windows 4.6.9 verification on
|
||||||
|
its earlier implementation. Those reports do not verify the new final memory
|
||||||
|
boundary. Actual Windows/Bun Wireshark execution is unverified here; macOS
|
||||||
|
capture support needs a separate enforceable-bound decision.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run verify:pcap -- --pcap /absolute/saved-capture.pcapng
|
||||||
|
```
|
||||||
|
|
||||||
|
This verifier exercises built CLI/stdio MCP, schemas, artifact identity and
|
||||||
|
cleanup. Without `--pcap`, capture inspection is reported as unverified. Private
|
||||||
|
captures, keys and provider runtime files are not committed.
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
# SQLite database snapshots
|
||||||
|
|
||||||
|
`inspect_sqlite_database` / `inspect-sqlite-database` inspects one explicitly
|
||||||
|
selected local SQLite database snapshot without an active native analysis
|
||||||
|
target. Use it to understand application storage, configuration or retained
|
||||||
|
database evidence. No separate SQLite installation is required.
|
||||||
|
|
||||||
|
This operation requires Node.js 24.x >=24.15 or 26+ with the native
|
||||||
|
`DatabaseSync.limits` API. The worker verifies that capability before querying
|
||||||
|
the copied database. Other REA features retain their published Node.js 22.x,
|
||||||
|
24.x or 26+ requirements.
|
||||||
|
|
||||||
|
`rea capabilities` reports `inspect_sqlite_database` availability and the
|
||||||
|
runtime requirement without opening a database. Unsupported runtimes show
|
||||||
|
`available: false`, `availability_code: "unsupported_version"`, and an upgrade
|
||||||
|
note while the inventory command still succeeds.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
rea capabilities --json
|
||||||
|
rea inspect-sqlite-database ./application.sqlite --json
|
||||||
|
rea inspect-sqlite-database ./application.sqlite --table settings --column key --column value --row-limit 20 --json
|
||||||
|
```
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "inspect_sqlite_database",
|
||||||
|
"arguments": {
|
||||||
|
"path": "/artifacts/application.sqlite",
|
||||||
|
"table": "settings",
|
||||||
|
"columns": ["key", "value"],
|
||||||
|
"row_limit": 20
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
MCP paths must be absolute filesystem paths on the current host. CLI paths
|
||||||
|
resolve against the operator's working directory. Select a quiescent snapshot:
|
||||||
|
stop the writer or obtain a consistent database/WAL pair using the application's
|
||||||
|
backup workflow before inspection. A file copy of a live pair does not establish
|
||||||
|
an atomic SQLite snapshot, even if no change is detected during inspection.
|
||||||
|
|
||||||
|
## Returned evidence
|
||||||
|
|
||||||
|
Without a table selection, the default `schema_scope` is `inventory`: compact
|
||||||
|
table metadata and index, view and trigger names, without SQL declarations or
|
||||||
|
column details. Selecting a table defaults to `selected_table`, which expands
|
||||||
|
that table and its indexes and triggers. Explicit `schema_scope: "database"`
|
||||||
|
(or CLI `--schema-scope database`) expands all stored declarations and supported
|
||||||
|
columns. `schema.completeness` refers to the reported scope; omitted column
|
||||||
|
details are marked `not_requested`. SQL declarations retain the original text. Virtual and
|
||||||
|
shadow tables are identified as such; their supported metadata coverage is
|
||||||
|
reported. If a virtual table cannot be resolved, possible backing tables have
|
||||||
|
`kind: "unknown"` and an explicit limitation; their rows are refused. Unrelated
|
||||||
|
ordinary tables remain selectable. Schema inventory does not execute views,
|
||||||
|
triggers or arbitrary SQL.
|
||||||
|
|
||||||
|
Rows are optional. `table` selects one exact ordinary-table name. `columns`
|
||||||
|
(CLI repeated `--column`) selects exact visible column names in the requested
|
||||||
|
order; omission selects all visible columns, including generated columns.
|
||||||
|
Unselected cells are not evaluated or projected. Column selection requires a
|
||||||
|
table and at least one name; empty-string identifiers are valid. `row_limit`
|
||||||
|
requires `table`, defaults to 20 and accepts positive safe integers. Samples
|
||||||
|
remain subject to the byte and worker resource limits below, regardless of row count. The result reports
|
||||||
|
the selected limit, returned count and whether more rows were observed. Row
|
||||||
|
order is unspecified; a truncated sample does not prove anything about omitted
|
||||||
|
records. View, virtual-table and shadow-table row reads are unsupported.
|
||||||
|
|
||||||
|
SQLite integers are decimal strings so every signed 64-bit value survives JSON
|
||||||
|
serialization. Real values retain their numbers; `"Infinity"`, `"-Infinity"`
|
||||||
|
and `"-0"` explicitly preserve infinities and negative zero through JSON.
|
||||||
|
Text returns the decoded string together with its bytes as hex and the database
|
||||||
|
encoding, preserving malformed text that the SQLite binding may replace for
|
||||||
|
display. Blobs are hex, and SQL NULL is a distinct tagged value.
|
||||||
|
|
||||||
|
Database and existing sibling `-wal` files have separate original SHA-256 and
|
||||||
|
byte counts. The Evidence subject identifies the original database file;
|
||||||
|
the WAL identity is also necessary to interpret pending committed data. The
|
||||||
|
SQLite engine version is reported with the observed result. Neither digest is
|
||||||
|
a claim that the database is healthy, complete or trusted.
|
||||||
|
|
||||||
|
## Source files and failures
|
||||||
|
|
||||||
|
REA copies the selected database and existing sibling WAL to an owned private
|
||||||
|
temporary directory before SQLite opens them. Source files are not opened by
|
||||||
|
SQLite, so its locks or shared-memory sidecars cannot modify the original
|
||||||
|
snapshot. Temporary copies and the owned worker are cleaned up on success,
|
||||||
|
failure and cancellation. Extension loading and schema trust are disabled.
|
||||||
|
Empty rollback journals and fully zeroed journal headers left by successful
|
||||||
|
`TRUNCATE` and `PERSIST` commits are accepted after stable identity checks.
|
||||||
|
Journal headers are checked both before and after acquisition; unchanged file
|
||||||
|
metadata alone does not establish that a journal remains inactive.
|
||||||
|
Other retained rollback journals are refused because recovery is outside this
|
||||||
|
profile. Journal files are never modified or copied into the worker snapshot.
|
||||||
|
|
||||||
|
A provider admits at most two inspections through acquisition, worker execution
|
||||||
|
and cleanup. Additional requests receive a typed capacity error before reading
|
||||||
|
files or creating workers; retry after an active inspection finishes. This
|
||||||
|
bounds simultaneous input buffering and private snapshot/worker counts.
|
||||||
|
|
||||||
|
The database and WAL together are limited to 256 MiB. SQLite values/records,
|
||||||
|
SQL statements and the complete worker JSON reply each have a 16 MiB limit.
|
||||||
|
The owned worker has a 256 MiB JavaScript heap limit and a 30-second inspection
|
||||||
|
deadline. SQLite native allocations are separate from the JavaScript heap;
|
||||||
|
overall native heap and total resident memory are not capped. Row limits do not
|
||||||
|
override these byte and resource limits. Resource-limit failures do not return
|
||||||
|
an incomplete schema as successful complete evidence.
|
||||||
|
|
||||||
|
MCP also applies its configured response budget to the complete Evidence
|
||||||
|
envelope. If delivery exceeds that budget, it reports a transport constraint
|
||||||
|
with guidance for exporting retained Evidence, requesting a matching larger
|
||||||
|
client/server response budget or using complete CLI JSON output.
|
||||||
|
|
||||||
|
A cancellation received after the worker has completed does not erase the
|
||||||
|
completed observation. If subsequent private-root cleanup fails, the error
|
||||||
|
retains the completed Evidence and the resource owner for cleanup retry. MCP
|
||||||
|
records that Evidence before delivering the error, which carries its retained
|
||||||
|
evidence ID for later retrieval or export.
|
||||||
|
|
||||||
|
Changed input identities, special files, malformed databases, unsupported
|
||||||
|
formats and resource failures are reported as errors with the selected path and
|
||||||
|
meaningful reason. Encrypted databases, database repair, arbitrary SQL,
|
||||||
|
cross-database queries and live capture are outside this inspection's coverage.
|
||||||
|
|
||||||
|
## Compatibility verification
|
||||||
|
|
||||||
|
Run `npm run test:sqlite` after changing the SQLite adapter or its shared
|
||||||
|
process, filesystem, CLI or MCP boundaries. It prepares the compiled runtime
|
||||||
|
and runs SQLite service, snapshot, inspection, cleanup and public CLI/MCP
|
||||||
|
tests. Directory-based selection includes new SQLite service and boundary
|
||||||
|
tests automatically. `npm run test:sqlite:run` runs the same cases when the
|
||||||
|
compiled runtime and generated test artifacts are already current.
|
||||||
|
|
||||||
|
The reusable SQLite CI workflow consumes the shared build artifact and tests
|
||||||
|
the latest Node 22.x unavailable-runtime diagnostics, the minimum supported
|
||||||
|
24.15.0 release, and the latest 24.x and 26.x releases. The repository-pinned
|
||||||
|
runtime also runs the full suite. CI's required gate waits for every selected
|
||||||
|
SQLite matrix job; a failed, cancelled, skipped or missing selected lane blocks
|
||||||
|
the gate. Workflow changes themselves select the build and compatibility lane.
|
||||||
|
|
||||||
|
PR checks run against GitHub's merge with the current base branch. A later
|
||||||
|
change to `main` can introduce failures outside SQLite; inspect the failing
|
||||||
|
job and recheck the updated merge before treating an earlier green run as
|
||||||
|
current verification. Compatibility checks detect regressions, but cannot
|
||||||
|
guarantee that an arbitrary future upstream change remains compatible.
|
||||||
@@ -35,10 +35,22 @@ license](https://github.com/morluto/rea/blob/main/third_party/evmole/README.md)
|
|||||||
and whitespace. Decoded-byte SHA-256 identifies actual selected EVM bytes.
|
and whitespace. Decoded-byte SHA-256 identifies actual selected EVM bytes.
|
||||||
Neither digest is the Ethereum Keccak code hash.
|
Neither digest is the Ethereum Keccak code hash.
|
||||||
- Full bytecode, upstream function offsets and original producer representation
|
- Full bytecode, upstream function offsets and original producer representation
|
||||||
are returned inline. Offsets are byte positions in decoded bytecode.
|
are returned inline by default. Offsets are byte positions in decoded bytecode.
|
||||||
- Upstream also returns terminal metadata during selector recovery. Its reported
|
- Upstream also returns terminal metadata during selector recovery. Its reported
|
||||||
values remain in `raw_result`; integer precision and non-text-key coverage are
|
values remain in `raw_result`; integer precision and non-text-key coverage are
|
||||||
unknown in the JS binding. Full bytecode retains the original encoded metadata.
|
unknown in the JS binding. Full bytecode retains the original encoded metadata.
|
||||||
|
- `bytecode.metadata` independently interprets a plausible terminal CBOR root
|
||||||
|
map from the selected bytes. Integers use decimal strings; byte strings use hex,
|
||||||
|
and scalar keys retain their types. The recorded offset/length addresses the
|
||||||
|
original bytecode, so summary delivery does not copy an opaque CBOR payload.
|
||||||
|
Nested containers have partial scalar coverage; unsupported or malformed
|
||||||
|
candidates report `not-decoded` with a diagnostic. Decoding is bounded to 64
|
||||||
|
container levels and the terminal payload's encoded size.
|
||||||
|
- An unavailable trailer does not prove metadata absence or Solidity origin.
|
||||||
|
Compiler-version bytes/text are metadata declarations, not verified compiler,
|
||||||
|
source-file or deployed-contract identity. Historical omission parses as a null
|
||||||
|
unknown facet without changing the original Evidence record. Metadata/source
|
||||||
|
URLs are not fetched.
|
||||||
- Selectors, argument strings and state mutability are **inferences**. Function
|
- Selectors, argument strings and state mutability are **inferences**. Function
|
||||||
names/signatures are not looked up. Optimized code may produce different
|
names/signatures are not looked up. Optimized code may produce different
|
||||||
mutability candidates; recovered types are not a verified source ABI.
|
mutability candidates; recovered types are not a verified source ABI.
|
||||||
@@ -47,6 +59,49 @@ license](https://github.com/morluto/rea/blob/main/third_party/evmole/README.md)
|
|||||||
- Analysis is offline: no target runtime execution, implicit chain/RPC/explorer
|
- Analysis is offline: no target runtime execution, implicit chain/RPC/explorer
|
||||||
lookup, wallet action, transaction broadcast or network request.
|
lookup, wallet action, transaction broadcast or network request.
|
||||||
|
|
||||||
|
## Selected interface delivery and retained views
|
||||||
|
|
||||||
|
Existing CLI calls and MCP calls with omitted or `complete` detail keep the
|
||||||
|
complete inline result. On a retaining MCP server, select `detail: "summary"`
|
||||||
|
when the question needs every inferred function and its identity/uncertainty,
|
||||||
|
without bytecode text or duplicated raw stdout:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "inspect_evm_interface",
|
||||||
|
"arguments": {
|
||||||
|
"path": "/artifacts/runtime.hex",
|
||||||
|
"encoding": "hex",
|
||||||
|
"detail": "summary"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The result is distinct derived Evidence linked to its complete parent. Its
|
||||||
|
`normalized_result.summary` preserves every producer-returned selector, decoded
|
||||||
|
byte offset, dispatch, argument/mutability string including null, carrier/decoded
|
||||||
|
identities, original limitations and explicit unknowns. Payload `evidence_kind`
|
||||||
|
remains `inferred`. It preserves stderr/truncation and records stdout text length.
|
||||||
|
Complete-within-view coverage covers returned candidates; discovery completeness
|
||||||
|
remains unknown even for an empty or exhausted collection. Analysis still runs;
|
||||||
|
delivery selection does not save interpreter work or change source parameters.
|
||||||
|
|
||||||
|
Use `normalized_result.parent_evidence_id` with `inspect_analysis_view` source
|
||||||
|
kind `retained-evidence`. EVM view kind `evm` pages `functions` by original row
|
||||||
|
order, or `bytecode_hex`, `stdout`, `stderr` by UTF-16 code units. Hex pages preserve
|
||||||
|
the original lowercase text without a prefix; two characters represent one decoded
|
||||||
|
byte. A text-page offset differs from a function's decoded-byte offset. Complete
|
||||||
|
parent Evidence remains accessible through the normal ledger/export workflow;
|
||||||
|
reading views does not rerun analysis or change its identity. Existing record
|
||||||
|
retention and close semantics are unchanged.
|
||||||
|
|
||||||
|
Portable historical complete EVM Evidence can use source kind `inline` without
|
||||||
|
a provider. A fixed server without Evidence retention rejects selected summary
|
||||||
|
delivery before starting analysis and continues to support complete delivery.
|
||||||
|
Discover the actual advertised schema before sending `detail` to an older server;
|
||||||
|
use its complete operation when an equivalent workflow is required. The one-shot
|
||||||
|
CLI keeps its existing complete result.
|
||||||
|
|
||||||
## Resource and lifecycle limits
|
## Resource and lifecycle limits
|
||||||
|
|
||||||
Inputs are limited to 4 MiB, complete replies to 16 MiB and combined diagnostic
|
Inputs are limited to 4 MiB, complete replies to 16 MiB and combined diagnostic
|
||||||
@@ -82,3 +137,15 @@ The real verification lane traces representative raw/hex CLI workflows and check
|
|||||||
that only declared Node/prlimit launchers and process ownership inspection run.
|
that only declared Node/prlimit launchers and process ownership inspection run.
|
||||||
Socket traces permit local stdio socket pairs and reject attempted network requests.
|
Socket traces permit local stdio socket pairs and reject attempted network requests.
|
||||||
These observations verify those fixtures; they are not a general network sandbox.
|
These observations verify those fixtures; they are not a general network sandbox.
|
||||||
|
|
||||||
|
For the independent metadata parser, `npm run verify:solidity:metadata` uses an
|
||||||
|
existing caller-selected solc 0.8.30 module:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
REA_VERIFY_SOLC_MODULE=/absolute/path/to/solc/index.js npm run verify:solidity:metadata
|
||||||
|
```
|
||||||
|
|
||||||
|
It compiles the owned fixture with unoptimized, viaIR, content-hash-free and
|
||||||
|
CBOR-free settings, verifies the observed trailer facts and reports local decode
|
||||||
|
timings. No contract is executed. This lane does not establish the complete
|
||||||
|
Linux EVM provider's CLI/MCP, resource-limit or cleanup behavior.
|
||||||
@@ -123,8 +123,10 @@ Select a verified native child for the existing tools:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Then use `analyze_function`, `inspect_native_api` or the other native primitives.
|
Then use `analyze_function`, `inspect_native_api` or the other native primitives.
|
||||||
Native architecture and executable validation still apply. This milestone does
|
Native architecture and executable validation still apply. Generic
|
||||||
not add MIPS/PPC/RISC-V decompilation, raw flash load profiles, bootloader/device
|
[MIPS ELF](../../providers/ghidra-mips.md) and [RISC-V ELF](../../providers/ghidra-riscv.md) lanes are separate
|
||||||
|
documents with their own admission boundaries. This milestone does
|
||||||
|
not add PPC decompilation, raw flash load profiles, bootloader/device
|
||||||
tree semantics, vulnerability scanning, emulation or hardware runtime capture.
|
tree semantics, vulnerability scanning, emulation or hardware runtime capture.
|
||||||
|
|
||||||
## Resource and lifecycle policy
|
## Resource and lifecycle policy
|
||||||
+9
@@ -104,6 +104,15 @@ static inferences. Dynamic or ambiguous IPC is retained without a pairing edge.
|
|||||||
Runtime entities retain passive-CDP authority, while a successful static/runtime
|
Runtime entities retain passive-CDP authority, while a successful static/runtime
|
||||||
correspondence is a separately identified cross-layer inference.
|
correspondence is a separately identified cross-layer inference.
|
||||||
|
|
||||||
|
Source module links retain their resolution mode. Static imports in `.ts` and
|
||||||
|
`.tsx` are `compiler-dependent` when compiler options have not been retained.
|
||||||
|
REA compares Node import and require resolution: a shared outcome remains
|
||||||
|
available with a limitation; divergent outcomes remain unavailable with both
|
||||||
|
conditional branches and their limitations. This models source relationships,
|
||||||
|
not verified emitted code or execution. A declaration file found only through
|
||||||
|
an emitted-extension fallback is retained as a candidate, not a runtime target;
|
||||||
|
an explicitly selected path keeps its original identity.
|
||||||
|
|
||||||
## Evidence and authority
|
## Evidence and authority
|
||||||
|
|
||||||
Every observation and edge carries all of the following:
|
Every observation and edge carries all of the following:
|
||||||
+34
-4
@@ -23,6 +23,14 @@ artifact digest and structural graph ID. Semantic tracing requires the semantic
|
|||||||
relation graph and reports when it is unavailable rather than treating missing
|
relation graph and reports when it is unavailable rather than treating missing
|
||||||
data as an empty graph.
|
data as an empty graph.
|
||||||
|
|
||||||
|
Explicit TypeScript `import type` and `export type` declarations remain source
|
||||||
|
facts and do not create runtime import or export relationships. Type export names
|
||||||
|
are reported separately from value export names. Inline `type` specifiers can
|
||||||
|
leave an empty import or re-export with side effects under
|
||||||
|
[`verbatimModuleSyntax`](https://www.typescriptlang.org/tsconfig/verbatimModuleSyntax.html);
|
||||||
|
REA retains those dependency candidates and reports the unavailable compiler
|
||||||
|
options rather than assuming the dependency is erased.
|
||||||
|
|
||||||
The semantic graph wire format stores shared non-location provenance once in
|
The semantic graph wire format stores shared non-location provenance once in
|
||||||
its required `evidence_contexts` table. Each node, relation, fingerprint, and
|
its required `evidence_contexts` table. Each node, relation, fingerprint, and
|
||||||
unknown retains its exact `evidence.location` and names the owning context with
|
unknown retains its exact `evidence.location` and names the owning context with
|
||||||
@@ -156,9 +164,12 @@ to the comparison Evidence in a live session.
|
|||||||
`compare_source_to_bundle` compares one cryptographically committed
|
`compare_source_to_bundle` compares one cryptographically committed
|
||||||
`HistoricalSourceGraph` with authenticated application-graph Evidence. The
|
`HistoricalSourceGraph` with authenticated application-graph Evidence. The
|
||||||
stable scoring model reports every admitted signal and weight: exact source
|
stable scoring model reports every admitted signal and weight: exact source
|
||||||
digest, source-map original path, exact current path, path suffix, basename, and
|
digest, source-map original path, exact current path, path suffix, Unicode-
|
||||||
language extension. Exact digest wins over location inference; weak basename
|
equivalent path, basename, and language extension. Exact digest wins over
|
||||||
or extension evidence never forces a mapping.
|
location inference; weak basename, extension, and Unicode-equivalence evidence
|
||||||
|
never forces a mapping. Unicode-equivalent spellings are candidate evidence
|
||||||
|
only because distinct filesystem paths can preserve those spellings as separate
|
||||||
|
files; multiple canonical-equivalent candidates remain unknown.
|
||||||
|
|
||||||
Each historical source file is classified as `unchanged`, `modified`,
|
Each historical source file is classified as `unchanged`, `modified`,
|
||||||
`removed`, `split`, `merged`, `duplicated`, or `unknown`. Multiple equally
|
`removed`, `split`, `merged`, `duplicated`, or `unknown`. Multiple equally
|
||||||
@@ -197,6 +208,25 @@ arrays, and later explicit data properties and methods replace earlier object
|
|||||||
spread references. A known array prefix does not expose values from a following
|
spread references. A known array prefix does not expose values from a following
|
||||||
spread. Accessors, custom or uncertain iteration, unknown computed keys, and
|
spread. Accessors, custom or uncertain iteration, unknown computed keys, and
|
||||||
unknown spread lengths retain conservative uncertainty.
|
unknown spread lengths retain conservative uncertainty.
|
||||||
|
Getter-local aliases of `this`, including direct destructuring and assignments,
|
||||||
|
retain their receiver when a returned shared reference is written. These writes
|
||||||
|
invalidate the earlier literal instead of claiming the getter executed or the
|
||||||
|
new value is known. Straight-line alias reads retain their capture order;
|
||||||
|
uncertain control flow remains conservative. A binding outside the getter or
|
||||||
|
`this` in a nested ordinary function is not attributed to the getter's receiver.
|
||||||
|
Private reads keep receiver projections separate from the private value's path.
|
||||||
|
Receiver projections follow known data fields initialized from `this` or earlier
|
||||||
|
self-referencing fields; static fields retain their declaring class identity.
|
||||||
|
An alias cycle that repeatedly selects deeper children retains escape uncertainty
|
||||||
|
at its recovered roots rather than claiming a fixed number of loop iterations.
|
||||||
|
|
||||||
|
Writes through an object getter's returned receiver retain that uncertainty
|
||||||
|
when the object is an array element, nested inside mixed object/array
|
||||||
|
containers, or assigned to a previously declared identifier. Saving the getter
|
||||||
|
result in an alias does not make its old field values immutable. Known array
|
||||||
|
indices include holes; an element after a spread has only a minimum possible
|
||||||
|
index. Unrelated properties and known array prefixes remain precise, and a
|
||||||
|
getter read without a write does not invalidate the receiver's fields.
|
||||||
Nested callable returns are not assigned to their parent callable. Projected
|
Nested callable returns are not assigned to their parent callable. Projected
|
||||||
graph observations carry source ranges but never source text.
|
graph observations carry source ranges but never source text.
|
||||||
|
|
||||||
@@ -264,7 +294,7 @@ References are scoped to one connection; `close_binary` clears them. Export a
|
|||||||
bundle before closing and import it on another connection, or supply the full
|
bundle before closing and import it on another connection, or supply the full
|
||||||
inline Evidence there. Versions before 4.1.0 accept full inline Evidence only; installing
|
inline Evidence there. Versions before 4.1.0 accept full inline Evidence only; installing
|
||||||
newer skill instructions does not change that schema. See
|
newer skill instructions does not change that schema. See
|
||||||
[MCP Evidence inputs](mcp-contracts.md#retained-application-evidence-inputs).
|
[MCP Evidence inputs](../../reference/mcp-contracts.md#retained-application-evidence-inputs).
|
||||||
|
|
||||||
For two operator-provided directories or ASARs, run:
|
For two operator-provided directories or ASARs, run:
|
||||||
|
|
||||||
+3
-3
@@ -159,7 +159,7 @@ An unpacked entry whose companion bytes were not supplied remains
|
|||||||
`unavailable`. REA continues analyzing embedded JavaScript and records the
|
`unavailable`. REA continues analyzing embedded JavaScript and records the
|
||||||
missing native/resource bytes as unknown. The occurrence keeps
|
missing native/resource bytes as unknown. The occurrence keeps
|
||||||
`hash_status: unavailable`; no content-addressed child artifact is created for
|
`hash_status: unavailable`; no content-addressed child artifact is created for
|
||||||
those missing bytes. See [MCP integrity handling](mcp-contracts.md#integrity-record-and-continue)
|
those missing bytes. See [MCP integrity handling](../../reference/mcp-contracts.md#integrity-record-and-continue)
|
||||||
for the tool-result contract.
|
for the tool-result contract.
|
||||||
|
|
||||||
## Large results
|
## Large results
|
||||||
@@ -170,7 +170,7 @@ select exact [source paths](#select-sources-before-analysis).
|
|||||||
|
|
||||||
If a complete response exceeds the transport budget, use its retained Evidence
|
If a complete response exceeds the transport budget, use its retained Evidence
|
||||||
ID for a summary, module page, or item, or export the bundle. See
|
ID for a summary, module page, or item, or export the bundle. See
|
||||||
[MCP tool results](mcp-contracts.md#tool-results) for delivery limits, export, and
|
[MCP tool results](../../reference/mcp-contracts.md#tool-results) for delivery limits, export, and
|
||||||
matching server/client buffer settings. Follow-up results also need to fit that
|
matching server/client buffer settings. Follow-up results also need to fit that
|
||||||
budget. [Analyzer limits](#analyzer-and-result-admission) control analysis memory,
|
budget. [Analyzer limits](#analyzer-and-result-admission) control analysis memory,
|
||||||
source deadlines, and semantic capacity separately.
|
source deadlines, and semantic capacity separately.
|
||||||
@@ -184,7 +184,7 @@ or Evidence sealing. Unexamined relationships remain unknown.
|
|||||||
|
|
||||||
MCP returns a `partial_observation` retained reference after recording succeeds;
|
MCP returns a `partial_observation` retained reference after recording succeeds;
|
||||||
open it with `inspect_analysis_view` on the same connection. If the SDK stopped
|
open it with `inspect_analysis_view` on the same connection. If the SDK stopped
|
||||||
waiting before receiving the reply, follow [MCP cancellation recovery](mcp-contracts.md#progress-and-cancellation)
|
waiting before receiving the reply, follow [MCP cancellation recovery](../../reference/mcp-contracts.md#progress-and-cancellation)
|
||||||
to find the record. CLI failure output contains the complete partial Evidence.
|
to find the record. CLI failure output contains the complete partial Evidence.
|
||||||
Owned analyzer cleanup is verified before private files are released; uncertain
|
Owned analyzer cleanup is verified before private files are released; uncertain
|
||||||
cleanup retains ownership for retry and is reported separately.
|
cleanup retains ownership for retry and is reported separately.
|
||||||
@@ -136,6 +136,6 @@ output, with 8 MiB per diagnostic/report stream. Exceeding a limit is an explici
|
|||||||
failure with rollback. These limits apply per operation and do not claim aggregate
|
failure with rollback. These limits apply per operation and do not claim aggregate
|
||||||
host containment across concurrent callers.
|
host containment across concurrent callers.
|
||||||
|
|
||||||
See [testing.md](testing.md#javascript-source-recovery) for the focused real
|
See [testing.md](../../development/testing.md#javascript-source-recovery) for the focused real
|
||||||
Wakaru CLI/MCP lane and its source-owned compiler fixtures. Other host platforms
|
Wakaru CLI/MCP lane and its source-owned compiler fixtures. Other host platforms
|
||||||
and Bun/Vue recovery are not claimed by this adapter.
|
and Bun/Vue recovery are not claimed by this adapter.
|
||||||
+11
-8
@@ -1,28 +1,31 @@
|
|||||||
# JavaScript static/runtime reconciliation
|
# JavaScript static/runtime reconciliation
|
||||||
|
|
||||||
REA can combine an existing static JavaScript Application Graph with one or
|
REA can combine an existing static JavaScript Application Graph with one or
|
||||||
more passive browser, Electron page, or Node/Electron V8 Inspector captures without collapsing their different
|
more browser, Electron, or Node/Electron V8 Inspector observations while
|
||||||
authorities. The `reconcile_javascript_runtime` MCP tool and
|
preserving their different authorities. The `reconcile_javascript_runtime` MCP tool and
|
||||||
`rea reconcile-javascript-runtime` CLI command accept Evidence records and
|
`rea reconcile-javascript-runtime` CLI command accept Evidence records and
|
||||||
return derived Evidence containing a combined JavaScript Application Graph
|
return derived Evidence containing a combined JavaScript Application Graph
|
||||||
and explicit match, ambiguity, mismatch, and unknown classifications.
|
and explicit match, ambiguity, mismatch, and unknown classifications.
|
||||||
|
|
||||||
The operation performs no filesystem, browser, or Electron I/O. It accepts only
|
The operation performs no filesystem, browser, or Electron I/O. It accepts only
|
||||||
semantically verified Evidence produced by `analyze_javascript_application`,
|
semantically verified Evidence produced by `analyze_javascript_application`,
|
||||||
`inspect_web_page`, `inspect_electron_page`, or
|
`inspect_web_page`, `inspect_electron_page`, `observe_javascript_runtime`, or
|
||||||
`observe_javascript_runtime`; matching operation names alone
|
`capture_electron_scenario`; matching operation names alone
|
||||||
is insufficient. Provider identity, predicate type, subject digest, target
|
is insufficient. Provider identity, predicate type, subject digest, target
|
||||||
parameters, and normalized-result schemas are checked before reconciliation.
|
parameters, and normalized-result schemas are checked before reconciliation.
|
||||||
|
|
||||||
|
`capture_electron_scenario` supplies target-only partial observations. It does
|
||||||
|
not establish loaded-script coverage; see [Electron observation](electron-observation.md).
|
||||||
|
|
||||||
## Workflow
|
## Workflow
|
||||||
|
|
||||||
1. Run `analyze_javascript_application` against exactly one application layer.
|
1. Run `analyze_javascript_application` against exactly one application layer.
|
||||||
Optional cache or assets directories can be analyzed independently and
|
Optional cache or assets directories can be analyzed independently and
|
||||||
supplied as additional layers.
|
supplied as additional layers.
|
||||||
2. Run `inspect_web_page`, `inspect_electron_page`, or the attach-only
|
2. Run `inspect_web_page`, `inspect_electron_page`, or the attach-only
|
||||||
`observe_javascript_runtime`. Capturing script sources
|
`observe_javascript_runtime`, or supply existing `capture_electron_scenario`
|
||||||
is optional, but a source capture provides the strongest byte
|
Evidence with the partial scope above. Capturing script sources is optional,
|
||||||
identity.
|
but a source capture provides the strongest byte identity.
|
||||||
3. Pass the resulting Evidence records to `reconcile_javascript_runtime`.
|
3. Pass the resulting Evidence records to `reconcile_javascript_runtime`.
|
||||||
Browser URLs normally need an explicit URL-prefix mapping. Extracted
|
Browser URLs normally need an explicit URL-prefix mapping. Extracted
|
||||||
Electron and V8 Inspector file locations are mapped automatically when runtime files remain
|
Electron and V8 Inspector file locations are mapped automatically when runtime files remain
|
||||||
@@ -104,7 +107,7 @@ nodes. REA evaluates compatible static candidates conservatively:
|
|||||||
|
|
||||||
Every successful cross-layer `observed_as` edge has
|
Every successful cross-layer `observed_as` edge has
|
||||||
`authority: cross-layer-reconciliation` and `state: inferred`. The underlying
|
`authority: cross-layer-reconciliation` and `state: inferred`. The underlying
|
||||||
artifact/AST observations and passive-CDP observations remain unchanged and
|
artifact/AST observations and runtime observations remain unchanged and
|
||||||
retain their own Evidence links.
|
retain their own Evidence links.
|
||||||
|
|
||||||
## Loaded, resident, and not observed
|
## Loaded, resident, and not observed
|
||||||
@@ -24,7 +24,7 @@ Native-body bridge mapping and managed runtime execution are outside the
|
|||||||
current tool set.
|
current tool set.
|
||||||
|
|
||||||
The canonical tool inventory is the
|
The canonical tool inventory is the
|
||||||
[build-generated catalog](mcp-contracts.md#generated-catalog).
|
[build-generated catalog](../../reference/mcp-contracts.md#generated-catalog).
|
||||||
|
|
||||||
## Inspect an assembly
|
## Inspect an assembly
|
||||||
|
|
||||||
@@ -40,6 +40,47 @@ inspection is needed; see [selected member inspection](#selected-member-inspecti
|
|||||||
Compare separate builds with [member comparison](#member-comparison), preserving
|
Compare separate builds with [member comparison](#member-comparison), preserving
|
||||||
their paths, digests, and selection scope.
|
their paths, digests, and selection scope.
|
||||||
|
|
||||||
|
### Metadata overview and retained rows
|
||||||
|
|
||||||
|
The existing CLI and omitted/complete MCP detail return complete metadata
|
||||||
|
inventories. For identity and classification questions, select
|
||||||
|
`inspect_managed_artifact` with
|
||||||
|
`{"path":"/absolute/path/Assembly.dll","detail":"summary"}` on the first call.
|
||||||
|
This keeps the complete source in the session and returns a distinct linked
|
||||||
|
`inspect_analysis_view` overview with complete PE/CLI, classification and its
|
||||||
|
evidence, metadata status, module/MVID, assembly, frameworks, returned-row counts,
|
||||||
|
coverage/issues and limitations. No assembly is loaded or executed.
|
||||||
|
|
||||||
|
Use `normalized_result.parent_evidence_id` to page original rows:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"source": {
|
||||||
|
"kind": "retained-evidence",
|
||||||
|
"evidence_id": "<parent_evidence_id>"
|
||||||
|
},
|
||||||
|
"view": {
|
||||||
|
"kind": "managed",
|
||||||
|
"collection": "attributes",
|
||||||
|
"offset": 0,
|
||||||
|
"limit": 16
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Collections are `references`, `resources` and `attributes`; rows retain their
|
||||||
|
original values, nulls, order, metadata tokens and offsets. Pages retain source
|
||||||
|
metadata status and coverage. Exhaustion covers the returned parent collection,
|
||||||
|
not all possible metadata, and empty rows under partial/unavailable metadata do
|
||||||
|
not establish absence. Tokens are build-local and require the recorded artifact
|
||||||
|
SHA-256 and known module MVID for cross-observation matching.
|
||||||
|
|
||||||
|
Retained views do not repeat the parser or require the source file to remain
|
||||||
|
available. Portable views use the authenticated original Evidence inline,
|
||||||
|
including the existing `inspect-analysis-view` CLI. Session record lifetime and
|
||||||
|
export/import semantics remain unchanged. A server without Evidence retention
|
||||||
|
rejects selected summary before analysis; complete delivery remains available.
|
||||||
|
|
||||||
## Shipped scope
|
## Shipped scope
|
||||||
|
|
||||||
The canonical parser admits PE/CLI bytes and their metadata/CIL without loading
|
The canonical parser admits PE/CLI bytes and their metadata/CIL without loading
|
||||||
@@ -106,11 +147,33 @@ opposite observation's selection unknown, and application graphs report their
|
|||||||
selected scope as partial. Neither makes an absence claim about the whole
|
selected scope as partial. Neither makes an absence claim about the whole
|
||||||
assembly. Older member Evidence without `selection` remains readable.
|
assembly. Older member Evidence without `selection` remains readable.
|
||||||
|
|
||||||
|
### Edge target declaring types
|
||||||
|
|
||||||
|
`member_refs[].parent_name`, `call_edges[].target_declaring_type`, and
|
||||||
|
`field_accesses[].field_declaring_type` name the type that declares each
|
||||||
|
target. Referenced spec signatures validate encoded type coordinates against
|
||||||
|
the metadata tables, including nested type arguments and custom modifiers.
|
||||||
|
TypeRef resolution scopes are checked transitively with cycle detection;
|
||||||
|
readable names survive malformed scopes as partial evidence.
|
||||||
|
TypeDef and TypeRef names use the namespace-qualified `full_name`
|
||||||
|
form, and nested types keep bare names. A generic-instantiation TypeSpec
|
||||||
|
parent names its generic type, such as ``System.Collections.Generic.List`1``.
|
||||||
|
Other well-formed TypeSpec forms and ModuleRef or MethodDef parents stay
|
||||||
|
`null`. A `method-spec` call edge reports the name and declaring type of the
|
||||||
|
generic method it instantiates. A field access is named only by a field or a
|
||||||
|
field-signature MemberRef. TypeSpec and MethodSpec blobs are decoded with the
|
||||||
|
member-signature grammar, and a MethodSpec must instantiate a generic method
|
||||||
|
with as many type arguments as it declares. Malformed or unsupported rows and
|
||||||
|
blobs, and arity mismatches, make coverage partial. A readable MethodSpec
|
||||||
|
method column that names a method, or a TypeRef whose resolution scope is
|
||||||
|
invalid, keeps its name.
|
||||||
|
Older member Evidence without these fields reads them as `null`: unknown.
|
||||||
|
|
||||||
## Analysis objective
|
## Analysis objective
|
||||||
|
|
||||||
Start by identifying the artifact with `inspect_managed_artifact`, then inspect
|
Start by identifying the artifact with `inspect_managed_artifact`, then inspect
|
||||||
its types and CIL with `inspect_managed_members`. Use [member comparison](#member-comparison)
|
its types and CIL with `inspect_managed_members`. Use [member comparison](#member-comparison)
|
||||||
for another build, and [managed/native boundary rules](#managednative-boundary-rules)
|
for another build, and [managed/native boundary rules](#managed-native-boundaries)
|
||||||
when matching declared native calls to supplied native Evidence. Static inspection
|
when matching declared native calls to supplied native Evidence. Static inspection
|
||||||
does not load or execute the assembly. Reconstructed structure and unresolved
|
does not load or execute the assembly. Reconstructed structure and unresolved
|
||||||
native/runtime questions retain their own authority and coverage.
|
native/runtime questions retain their own authority and coverage.
|
||||||
@@ -165,13 +228,14 @@ describes exported shared-library entry points.
|
|||||||
REA offers a built-in read-only snapshot parser for x64 PE/RTR 9.1 metadata and
|
REA offers a built-in read-only snapshot parser for x64 PE/RTR 9.1 metadata and
|
||||||
an optional Linux headless Ghidra adapter for annotations and broader recovery.
|
an optional Linux headless Ghidra adapter for annotations and broader recovery.
|
||||||
The adapter requires a locally built `REA_GHIDRA_NATIVEAOT_JAR`; REA does not
|
The adapter requires a locally built `REA_GHIDRA_NATIVEAOT_JAR`; REA does not
|
||||||
install it or its toolchain. The [NativeAOT guide](ghidra-nativeaot.md) defines
|
install it or its toolchain. The [NativeAOT guide](../../providers/ghidra-nativeaot.md) defines
|
||||||
these routes, their layout/host restrictions, derived-memory provenance, and
|
these routes, their layout/host restrictions, derived-memory provenance, and
|
||||||
verification coverage.
|
verification coverage.
|
||||||
|
|
||||||
REA's experimental Windows Ghidra boundary admits native x86 and x86-64 PE
|
REA's experimental Windows Ghidra boundary admits native x86 and x86-64 PE
|
||||||
applications and DLLs for static analysis. This does not establish Windows
|
applications and DLLs for static analysis. For x64 PE NativeAOT, the read-only
|
||||||
NativeAOT metadata-recovery coverage.
|
parser also runs there; the [NativeAOT guide](../../providers/ghidra-nativeaot.md) lists what a
|
||||||
|
Windows host covers.
|
||||||
|
|
||||||
For NativeAOT analysis, preserve the selected native artifact's path and digest
|
For NativeAOT analysis, preserve the selected native artifact's path and digest
|
||||||
and report recovered type data with its returned provenance. Linking those types
|
and report recovered type data with its returned provenance. Linking those types
|
||||||
@@ -179,6 +243,9 @@ to native function addresses requires verified
|
|||||||
provider evidence; names or vtable similarity alone do not prove that a native
|
provider evidence; names or vtable similarity alone do not prove that a native
|
||||||
function implements a specific managed method.
|
function implements a specific managed method.
|
||||||
|
|
||||||
|
<div id="managednative-boundary-rules"></div>
|
||||||
|
<div id="managed-native-boundaries"></div>
|
||||||
|
|
||||||
## Managed/native boundary rules
|
## Managed/native boundary rules
|
||||||
|
|
||||||
`verify_managed_native_boundaries` compares declared P/Invoke module and entry
|
`verify_managed_native_boundaries` compares declared P/Invoke module and entry
|
||||||
@@ -188,7 +255,7 @@ matches establish declaration links; they do not establish that a call executed.
|
|||||||
Metadata tokens are not native addresses. Native body mapping for C++/CLI,
|
Metadata tokens are not native addresses. Native body mapping for C++/CLI,
|
||||||
ReadyToRun, NativeAOT, and IL2CPP requires separately verified format and provider
|
ReadyToRun, NativeAOT, and IL2CPP requires separately verified format and provider
|
||||||
support. The managed static tools do not recover those mappings. The optional
|
support. The managed static tools do not recover those mappings. The optional
|
||||||
[Ghidra NativeAOT extension](ghidra-nativeaot.md) has its own supported boundary.
|
[Ghidra NativeAOT extension](../../providers/ghidra-nativeaot.md) has its own supported boundary.
|
||||||
|
|
||||||
Declared import inventory supports a bounded positive claim. Its absence does
|
Declared import inventory supports a bounded positive claim. Its absence does
|
||||||
not exclude dynamic resolution, generated code, protected code, native helpers,
|
not exclude dynamic resolution, generated code, protected code, native helpers,
|
||||||
@@ -314,7 +381,7 @@ The current lane uses source-owned byte-built fixtures and malformed-input
|
|||||||
regressions, with optional operator-supplied applications and ILSpy verification.
|
regressions, with optional operator-supplied applications and ILSpy verification.
|
||||||
|
|
||||||
Run the deterministic lane with `npm run verify:managed`. See
|
Run the deterministic lane with `npm run verify:managed`. See
|
||||||
[testing](testing.md#real-toolchain-verification-lanes) for prerequisites and
|
[testing](../../development/testing.md#real-toolchain-verification-lanes) for prerequisites and
|
||||||
coverage. Generated outputs belong outside tracked fixture directories and must
|
coverage. Generated outputs belong outside tracked fixture directories and must
|
||||||
not remain after verification or packaging.
|
not remain after verification or packaging.
|
||||||
|
|
||||||
@@ -98,11 +98,13 @@ section, symbol, mitigation or linkage views. The default `complete` detail and
|
|||||||
CLI output are unchanged.
|
CLI output are unchanged.
|
||||||
|
|
||||||
Complete results have a 32 MiB input, 64 MiB reply, 1 MiB combined diagnostics
|
Complete results have a 32 MiB input, 64 MiB reply, 1 MiB combined diagnostics
|
||||||
and 30-second owned command deadline. The reply budget applies to the decoder
|
and 30-second owned command deadline. `REA_PWNTOOLS_MAX_INPUT_BYTES` raises the
|
||||||
record; the CLI/MCP Evidence envelope adds copies and encoding overhead. The
|
input bound alone, up to 1 GiB; the reply and deadline bounds are unchanged. The
|
||||||
|
reply budget applies to the decoder record; the CLI/MCP Evidence envelope adds
|
||||||
|
copies and encoding overhead. The
|
||||||
pinned MCP SDK defaults to a 10 MiB receive buffer. Large complete results need
|
pinned MCP SDK defaults to a 10 MiB receive buffer. Large complete results need
|
||||||
a caller-configured `StdioClientTransport({ maxBufferSize: ... })` and a matching
|
a caller-configured `StdioClientTransport({ maxBufferSize: ... })` and a matching
|
||||||
server `REA_MCP_MAX_RESPONSE_BYTES`. See [MCP delivery budgets](mcp-contracts.md#tool-results).
|
server `REA_MCP_MAX_RESPONSE_BYTES`. See [MCP delivery budgets](../../reference/mcp-contracts.md#tool-results).
|
||||||
These settings affect delivery, not decoder coverage or limits. The large
|
These settings affect delivery, not decoder coverage or limits. The large
|
||||||
extended-index verification uses 256 MiB and an explicit five-minute request
|
extended-index verification uses 256 MiB and an explicit five-minute request
|
||||||
timeout in its separate opt-in MCP lane. REA does not silently truncate the result. Python lowers resource soft limits to at most 3 GiB virtual address space,
|
timeout in its separate opt-in MCP lane. REA does not silently truncate the result. Python lowers resource soft limits to at most 3 GiB virtual address space,
|
||||||
@@ -81,7 +81,7 @@ temporary files, starts no subprocesses and accesses no network endpoint.
|
|||||||
Resource guards bound the selected file to 256 MiB, aggregate embedded strings
|
Resource guards bound the selected file to 256 MiB, aggregate embedded strings
|
||||||
to 1 MiB, structural table decoding to 16 MiB and the complete normalized metadata
|
to 1 MiB, structural table decoding to 16 MiB and the complete normalized metadata
|
||||||
report to 8 MiB. Oversized results fail without partial success. MCP also applies
|
report to 8 MiB. Oversized results fail without partial success. MCP also applies
|
||||||
its [response transport budget](mcp-contracts.md), which counts both text and
|
its [response transport budget](../../reference/mcp-contracts.md), which counts both text and
|
||||||
structured content; a report within the metadata limit can still require export
|
structured content; a report within the metadata limit can still require export
|
||||||
from retained Evidence. These limits are not operating-system memory or CPU
|
from retained Evidence. These limits are not operating-system memory or CPU
|
||||||
isolation.
|
isolation.
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
<div id="native-ui-and-dispatch-investigation"></div>
|
||||||
|
|
||||||
# Native binary investigation
|
# Native binary investigation
|
||||||
|
|
||||||
Use a native provider to discover functions, inspect instructions and pseudocode,
|
Use a native provider to discover functions, inspect instructions and pseudocode,
|
||||||
@@ -6,7 +8,7 @@ observation complement that analysis when they answer a specific question.
|
|||||||
|
|
||||||
## Start with a function
|
## Start with a function
|
||||||
|
|
||||||
Choose an installed provider from [setup](installation.md#hopper). For Ghidra:
|
Choose an installed provider from [setup](../../getting-started/installation.md#hopper). For Ghidra:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
rea inspect /absolute/path/to/program --provider ghidra --json
|
rea inspect /absolute/path/to/program --provider ghidra --json
|
||||||
@@ -297,7 +299,7 @@ complete observation.
|
|||||||
It reports each `@rpath`, `@loader_path` and `@executable_path` candidate with
|
It reports each `@rpath`, `@loader_path` and `@executable_path` candidate with
|
||||||
its outcome. Paths outside the analyzed root, including shared-cache system
|
its outcome. Paths outside the analyzed root, including shared-cache system
|
||||||
libraries, stay undetermined. See
|
libraries, stay undetermined. See
|
||||||
[Apple application analysis](apple-application-analysis.md#dylib-load-resolution).
|
[Apple application analysis](../apple/apple-application-analysis.md#dylib-load-resolution).
|
||||||
- `inspect_asset_catalog` / `rea inspect-asset-catalog <app>` reads compiled
|
- `inspect_asset_catalog` / `rea inspect-asset-catalog <app>` reads compiled
|
||||||
`Assets.car` metadata through macOS `assetutil --info`. Catalog digests, raw
|
`Assets.car` metadata through macOS `assetutil --info`. Catalog digests, raw
|
||||||
rendition fields, pagination and exact UI resource-name matches are returned.
|
rendition fields, pagination and exact UI resource-name matches are returned.
|
||||||
@@ -474,8 +476,11 @@ the tool fails with a `debugger-attach-denied` reason.
|
|||||||
Install a Ghidra 12.1.x release and the 64-bit full JDK it declares, then configure REA to
|
Install a Ghidra 12.1.x release and the 64-bit full JDK it declares, then configure REA to
|
||||||
use them. Ghidra analysis supports Linux x64/arm64 and macOS x64/arm64; each installation requires
|
use them. Ghidra analysis supports Linux x64/arm64 and macOS x64/arm64; each installation requires
|
||||||
the matching native decompiler. Experimental Windows x64 P0 admits native
|
the matching native decompiler. Experimental Windows x64 P0 admits native
|
||||||
x86 and x86-64 PE applications and DLLs on local NTFS using bundled Job Object ownership,
|
x86 and x86-64 PE applications and DLLs, plus explicitly selected
|
||||||
protected runtime DACLs, and handle-based path admission. See [Windows Ghidra P0](windows-ghidra-p0.md) and
|
[raw NMOS 6502 images](../../providers/raw-binary.md#nmos-6502) with a caller-supplied load address,
|
||||||
|
on fixed local NTFS volumes. Other raw CPU families remain unsupported on Windows.
|
||||||
|
The boundary uses bundled Job Object ownership, protected runtime DACLs, and
|
||||||
|
handle-based path admission. See [Windows Ghidra P0](../../providers/windows-ghidra-p0.md) and
|
||||||
[issue #527](https://github.com/morluto/rea/issues/527).
|
[issue #527](https://github.com/morluto/rea/issues/527).
|
||||||
On Linux and macOS, `annotate_native_function` atomically edits a function name
|
On Linux and macOS, `annotate_native_function` atomically edits a function name
|
||||||
and entry comments in the ephemeral database, returning refreshed analysis
|
and entry comments in the ephemeral database, returning refreshed analysis
|
||||||
@@ -544,3 +549,17 @@ Value projection preserves serialized node kinds, IDs, references and pagination
|
|||||||
Exact and ambiguous value counts describe emitted root/object value instances;
|
Exact and ambiguous value counts describe emitted root/object value instances;
|
||||||
a root and an object may contain the same value. Archive digests identify the
|
a root and an object may contain the same value. Archive digests identify the
|
||||||
original bytes.
|
original bytes.
|
||||||
|
|
||||||
|
## Locate a byte signature
|
||||||
|
|
||||||
|
Use `search_bytes` after opening a target with Ghidra to locate a known constant
|
||||||
|
or instruction sequence. For example, `{"pattern":"48 8B ?? ?? 89","limit":100}`
|
||||||
|
returns ordered addresses with segments, source file offsets and containing
|
||||||
|
procedures. The CLI equivalent is
|
||||||
|
`rea search-bytes ./program '48 8B ?? ?? 89' --provider ghidra`.
|
||||||
|
Use `start`/`end` to constrain the inclusive address window, and continue with
|
||||||
|
`next_cursor` until `complete` is true. Inspect `searched` for page coverage and
|
||||||
|
skipped uninitialized blocks. A missing match does not establish absence from
|
||||||
|
uninitialized memory or across block boundaries. See
|
||||||
|
[Ghidra byte search](../../providers/ghidra-provider.md#masked-byte-search) for mask and coverage
|
||||||
|
semantics. This query never executes or modifies target bytes.
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
# Recorded crash evidence
|
# Recorded crash evidence
|
||||||
|
|
||||||
`inspect_recorded_crash` / `rea inspect-recorded-crash` inspect a caller-selected
|
`inspect_recorded_crash` / `rea inspect-recorded-crash` inspect a caller-selected
|
||||||
Linux ELF64 x86-64 little-endian core independently of an active binary target.
|
Linux ELF64 little-endian core independently of an active binary target. Two
|
||||||
|
architecture profiles are interpreted, x86-64 and AArch64; each binds registers
|
||||||
|
to its own `NT_PRSTATUS` layout, and any other `e_machine` is refused as
|
||||||
|
`unsupported_target` before note interpretation.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
export REA_PWNTOOLS_PYTHON=/absolute/existing/venv/bin/python
|
export REA_PWNTOOLS_PYTHON=/absolute/existing/venv/bin/python
|
||||||
@@ -10,8 +13,8 @@ rea inspect-recorded-crash ./crash.core --json
|
|||||||
|
|
||||||
The selected Python needs unchanged pwntools 4.15.0, pyelftools 0.33 and Unicorn 2.1.2.
|
The selected Python needs unchanged pwntools 4.15.0, pyelftools 0.33 and Unicorn 2.1.2.
|
||||||
REA does not install these dependencies. ELFFile/its original ELF structures and
|
REA does not install these dependencies. ELFFile/its original ELF structures and
|
||||||
pwntools' original Linux amd64 ctypes provide parsing and ABI layout. The adapter
|
pwntools' original Linux amd64 and aarch64 ctypes provide parsing and ABI layout.
|
||||||
adds bounds, representation preservation and lifecycle ownership.
|
The adapter adds bounds, representation preservation and lifecycle ownership.
|
||||||
The initial Linux note profile accepts System V/unspecified and GNU/Linux OSABI
|
The initial Linux note profile accepts System V/unspecified and GNU/Linux OSABI
|
||||||
with ABI version zero. Other declared ABIs return `unsupported_target` before
|
with ABI version zero. Other declared ABIs return `unsupported_target` before
|
||||||
note interpretation; an unspecified OSABI alone does not prove OS origin.
|
note interpretation; an unspecified OSABI alone does not prove OS origin.
|
||||||
@@ -27,7 +30,8 @@ note interpretation; an unspecified OSABI alone does not prove OS origin.
|
|||||||
- Every exact Linux CORE PRSTATUS note as a separate recorded thread, with
|
- Every exact Linux CORE PRSTATUS note as a separate recorded thread, with
|
||||||
historical PID, signal and lossless uint64 registers bound to source bytes.
|
historical PID, signal and lossless uint64 registers bound to source bytes.
|
||||||
Each supported note has exactly one interpretation; each thread contains the
|
Each supported note has exactly one interpretation; each thread contains the
|
||||||
complete 27-register ABI set, with names bound to their original ABI offsets.
|
complete ABI register set for its architecture (27 registers for amd64,
|
||||||
|
34 for AArch64), with names bound to their original ABI offsets.
|
||||||
Physical note ranges cannot overlap or leave segment gaps. ELF and note headers
|
Physical note ranges cannot overlap or leave segment gaps. ELF and note headers
|
||||||
are independently bound to the snapshot, including extended program counts.
|
are independently bound to the snapshot, including extended program counts.
|
||||||
- Signed SIGINFO number/code/errno. Initially only SIGSEGV codes 1/2 establish the
|
- Signed SIGINFO number/code/errno. Initially only SIGSEGV codes 1/2 establish the
|
||||||
@@ -72,9 +76,13 @@ debugger context is `observed`.
|
|||||||
|
|
||||||
Initial Linux x64 limits: 32 MiB input, 64 MiB decoder reply, 1 MiB diagnostics per
|
Initial Linux x64 limits: 32 MiB input, 64 MiB decoder reply, 1 MiB diagnostics per
|
||||||
stage, 30 seconds owned wall deadline per stage, 3 GiB address-space soft ceiling
|
stage, 30 seconds owned wall deadline per stage, 3 GiB address-space soft ceiling
|
||||||
and 30 seconds CPU soft ceiling. Tighter inherited soft/hard limits are retained;
|
and 30 seconds CPU soft ceiling. `REA_PWNTOOLS_MAX_INPUT_BYTES` raises the input
|
||||||
hard limits are not raised. Complete oversized results fail explicitly. These
|
bound alone, up to 1 GiB, and returns `provider_unavailable` when it is not a
|
||||||
process limits do not constitute a sandbox for caller-supplied engine code.
|
decimal integer in range; the reply, diagnostic and deadline bounds stay fixed, so a
|
||||||
|
large core that outruns them still fails explicitly instead of partially. Tighter
|
||||||
|
inherited soft/hard limits are retained; hard limits are not raised. Complete
|
||||||
|
oversized results fail explicitly. These process limits do not constitute a sandbox
|
||||||
|
for caller-supplied engine code.
|
||||||
|
|
||||||
Resource exit statuses need matching private failure-branch markers. Unmarked
|
Resource exit statuses need matching private failure-branch markers. Unmarked
|
||||||
launcher failures retain their actual status/output and unknown resource cause.
|
launcher failures retain their actual status/output and unknown resource cause.
|
||||||
@@ -416,3 +416,52 @@ while its token became unavailable after this change; npm changes its title
|
|||||||
as well. A newly started unreadable process can prevent verified cleanup even
|
as well. A newly started unreadable process can prevent verified cleanup even
|
||||||
after the selected command exits. REA preserves this uncertainty and leaves
|
after the selected command exits. REA preserves this uncertainty and leaves
|
||||||
that process untouched.
|
that process untouched.
|
||||||
|
|
||||||
|
Reading those tokens requires compiling a small Swift helper with `xcrun swiftc`.
|
||||||
|
By default that compilation reuses Swift's shared module cache, while the
|
||||||
|
compiler's intermediate objects stay inside the per-run temporary root that REA
|
||||||
|
removes afterwards. Set `REA_DARWIN_MODULE_CACHE_PATH` to a writable directory
|
||||||
|
when a shared cache is unavailable, for example under an enforced write
|
||||||
|
boundary. REA creates the directory, passes it to the compiler as
|
||||||
|
`-module-cache-path`, and exports it as `CLANG_MODULE_CACHE_PATH` so the
|
||||||
|
Objective-C header modules the helper builds land there too. REA never removes
|
||||||
|
that directory: it outlives each run, so the first compilation into a new
|
||||||
|
directory pays a cold-cache build and later runs reuse it. An absent or empty
|
||||||
|
value keeps the shared default.
|
||||||
|
|
||||||
|
`xcrun` also maintains a separate tool-lookup cache. Its `--no-cache` option
|
||||||
|
refreshes entries and does not guarantee a write-free lookup. To avoid that
|
||||||
|
lookup while compiling REA's helper, set `REA_DARWIN_SWIFTC_PATH` to the absolute
|
||||||
|
path of an installed `swiftc` and `SDKROOT` to the absolute path of a compatible
|
||||||
|
macOS SDK. REA invokes that compiler directly with `-sdk` and the selected SDK;
|
||||||
|
an unset or empty compiler setting keeps the normal `xcrun swiftc` path. A
|
||||||
|
missing or relative SDK/compiler path fails with an actionable prerequisite
|
||||||
|
error before compilation. An incompatible installation reports the compiler's
|
||||||
|
bounded diagnostics; REA does not repair or replace the toolchain.
|
||||||
|
|
||||||
|
For example, select paths from your existing Xcode or Command Line Tools
|
||||||
|
installation **before** entering an enforced write boundary:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
export REA_DARWIN_SWIFTC_PATH="$(xcrun --find swiftc)"
|
||||||
|
export SDKROOT="$(xcrun --show-sdk-path)"
|
||||||
|
export REA_DARWIN_MODULE_CACHE_PATH="$PWD/rea-cache/modules"
|
||||||
|
export TMPDIR="$PWD/rea-cache/tmp"
|
||||||
|
mkdir -p "$TMPDIR"
|
||||||
|
rea analyze-javascript-application ./fixture --artifact-format directory
|
||||||
|
```
|
||||||
|
|
||||||
|
Keep the selected compiler and SDK paired. Permit REA's evidence/output paths
|
||||||
|
and its temporary directory as well as the caller-owned module cache. REA does
|
||||||
|
not create a sandbox or claim that these settings contain every write made by
|
||||||
|
arbitrary toolchains or analysis providers. They bypass REA's `xcrun` lookup
|
||||||
|
and select the helper's Swift/Clang cache without disabling ownership checks.
|
||||||
|
The caller-owned cache survives cancellation and cleanup; per-run compiler
|
||||||
|
intermediates and the compiled helper remain REA-owned temporary files.
|
||||||
|
|
||||||
|
The boundary must also permit process-table inspection. On macOS, `/bin/ps`
|
||||||
|
is setuid and a blanket sandbox may reject its launch with `spawn EPERM`.
|
||||||
|
REA then preserves ownership uncertainty and can report `cleanup_incomplete`;
|
||||||
|
it does not disable verification to continue. A sandbox that explicitly allows
|
||||||
|
this read-only process inspector is a separate prerequisite from the compiler
|
||||||
|
and cache settings.
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
# Recorded signal decoding
|
||||||
|
|
||||||
|
`decode_signal_recording` answers what a selected protocol decoder observes in
|
||||||
|
an existing recording. It uses caller-supplied **sigrok-cli 0.7.2** with
|
||||||
|
libsigrokdecode on **Linux**. util-linux `prlimit` is required (default
|
||||||
|
`/usr/bin/prlimit`, overridable with absolute `REA_SIGROK_PRLIMIT_COMMAND`).
|
||||||
|
The limiter sets soft and hard address-space limits before the decoder starts.
|
||||||
|
macOS and Windows are refused because this adapter cannot enforce that limit on
|
||||||
|
those hosts. It does not acquire samples or communicate with hardware.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
export REA_SIGROK_COMMAND=/absolute/path/to/sigrok-cli
|
||||||
|
rea decode-signal-recording /artifacts/uart.vcd \
|
||||||
|
--decoders uart:rx=RX:baudrate=9600 --input_format vcd \
|
||||||
|
--annotations uart=rx-data --format json
|
||||||
|
```
|
||||||
|
|
||||||
|
The corresponding MCP request is:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"name": "decode_signal_recording",
|
||||||
|
"arguments": {
|
||||||
|
"path": "/artifacts/uart.vcd",
|
||||||
|
"decoders": "uart:rx=RX:baudrate=9600",
|
||||||
|
"input_format": "vcd",
|
||||||
|
"annotations": "uart=rx-data"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
`decoders` uses sigrok's decoder stack and option/channel syntax. Channel names
|
||||||
|
must match the recording; REA does not guess wiring, baud rate or protocol.
|
||||||
|
Omitting `input_format` requests sigrok's autodetection. Omitting `annotations`
|
||||||
|
retains every annotation class. Both omitted selections are recorded as null.
|
||||||
|
See the [upstream manual](https://sigrok.org/wiki/Sigrok-cli) for formats,
|
||||||
|
decoder stacking and annotation selectors. No arbitrary command flags are accepted.
|
||||||
|
|
||||||
|
Output defaults to 50 literal LF-separated lines. Use `line_offset` and
|
||||||
|
`line_limit` for later pages, or MCP `line_limit: null` / CLI `--all_lines`
|
||||||
|
for all remaining output. `output_window` reports `total_lines`, `returned_lines`
|
||||||
|
and `has_more`; these count display lines, **not annotations or samples**.
|
||||||
|
Line endings, blank lines and text within the selected window stay unchanged.
|
||||||
|
REA does not parse display text into protocol facts, as explained by
|
||||||
|
[upstream's annotation output guidance](https://sigrok.org/wiki/Protocol_decoder_output).
|
||||||
|
Paging does not shorten decoding and producer output must still fit its limit.
|
||||||
|
Use annotation-class selection to reduce producer output. Calls independently
|
||||||
|
check the source digest; do not combine pages from different digests.
|
||||||
|
|
||||||
|
Each selector is limited to 8,192 UTF-16 code units, and total encoded selector
|
||||||
|
arguments (UTF-8, option prefixes, terminators and 64-bit argv pointers) to
|
||||||
|
32 KiB before launching. This reserves headroom below Linux execve's minimum
|
||||||
|
argument/environment budget; a large inherited environment may still exhaust it.
|
||||||
|
|
||||||
|
The returned Evidence includes the input path/digest, exact selections, tool
|
||||||
|
configured and resolved paths/digests, full version banner (including library versions), annotation text
|
||||||
|
with sample-number ranges, and stderr. For example, `1104-1938 uart-1: 52`
|
||||||
|
is producer display text over a sample range, not a timestamp or an independently
|
||||||
|
verified protocol fact. Text is retained verbatim; it is not parsed as a lossless
|
||||||
|
binary payload. Empty output does not establish absence of traffic. Warnings
|
||||||
|
remain visible even when sigrok exits zero, including `tool.version_diagnostics`
|
||||||
|
from the separate version probe. Post-run identity failures name the tool, limiter
|
||||||
|
or private copy involved, rather than blaming the admitted source. Resource-signal
|
||||||
|
failures retain the signal and effective limits without inferring its exact cause.
|
||||||
|
|
||||||
|
REA decodes a private, read-only copy of the recording, verifies that copy and
|
||||||
|
the selected executable and resource limiter after decoding, and removes the workspace after owned
|
||||||
|
process cleanup. Failed descriptor, process or workspace cleanup retains ownership for retry, and the one-shot
|
||||||
|
CLI awaits a retry without replacing the original failure or completed Evidence.
|
||||||
|
Completed observations remain in the MCP session after cancellation or cleanup
|
||||||
|
failure; bounded post-run integrity checks finish before honoring a late abort. The source file is
|
||||||
|
never passed to sigrok. Caller-supplied tools and their libraries/decoder modules
|
||||||
|
are trusted, and hashes identify bytes rather than publisher authenticity.
|
||||||
|
|
||||||
|
The input copy is bounded at 32 MiB before reading, each command has a 30-second
|
||||||
|
deadline, and combined stdout/stderr is bounded at 4 MiB during collection.
|
||||||
|
Oversized output fails rather than becoming truncated success. These limits do
|
||||||
|
not form an OS sandbox. Before execution, `prlimit` enforces **1 GiB address
|
||||||
|
space per process**, **64 MiB per file**, **30 CPU seconds** and no core dumps.
|
||||||
|
Stricter inherited soft/hard limits are preserved; Evidence records the effective
|
||||||
|
ceilings. Both limits are set before execution, so decoder allocations and compressed
|
||||||
|
recording expansion cannot exceed the per-process address-space cap. These are
|
||||||
|
not aggregate process-memory or filesystem quotas. The selected limiter is
|
||||||
|
trusted and its path, digest and arguments are retained in Evidence.
|
||||||
|
|
||||||
|
## Verification
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run build:cached
|
||||||
|
REA_SIGROK_COMMAND=/absolute/path/to/sigrok-cli node scripts/verify-signal-recording.mjs
|
||||||
|
```
|
||||||
|
|
||||||
|
The verifier synthesizes a 9600-baud 8N1 UART VCD carrying `REA`, then checks
|
||||||
|
actual CLI/MCP parity, advertised schemas, stored Evidence, source hashes,
|
||||||
|
annotation filtering/autodetection, invalid decoder/input failures and cleanup.
|
||||||
|
An optional positional REA entrypoint verifies an installed package.
|
||||||
|
The real-tool lane requires Linux, sigrok-cli 0.7.2 and libsigrokdecode. A separate
|
||||||
|
kernel-limit regression checks the inherited soft/hard limits and verifies an
|
||||||
|
oversized allocation is refused before it can consume memory. Other formats,
|
||||||
|
decoders and physical acquisition are not established by the UART fixture.
|
||||||
|
The workflow result must be checked before claiming a specific Linux build
|
||||||
|
verified. The earlier macOS tool check does not establish the current bounded
|
||||||
|
integration, which deliberately refuses unsupported hosts.
|
||||||
|
|
||||||
|
One decode is admitted at a time, including acquisition and cleanup. Excess
|
||||||
|
requests receive a retryable capacity error before acquiring another file or
|
||||||
|
worker. Shutdown closes admission and drains accepted work; failed cleanup
|
||||||
|
remains owned and retryable.
|
||||||
|
|
||||||
|
## Discover decoders before choosing settings
|
||||||
|
|
||||||
|
`inspect_signal_decoders` / `inspect-signal-decoders` queries the **installed**
|
||||||
|
sigrok catalog without opening a recording or scanning devices:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
rea inspect-signal-decoders --query uart
|
||||||
|
rea inspect-signal-decoders --decoder uart --query baud
|
||||||
|
rea inspect-signal-decoders --decoder i2c --offset 0 --limit 50
|
||||||
|
```
|
||||||
|
|
||||||
|
Omit `decoder` to search decoder IDs and names. Supply one exact decoder ID to
|
||||||
|
read its literal help, including required/optional channels, options, annotation
|
||||||
|
classes and documentation. `query` is a case-insensitive literal substring;
|
||||||
|
matching help retains original one-based line numbers. Empty query selects all.
|
||||||
|
`offset` skips matches; `limit` defaults to 50. MCP `limit: null` or CLI `--all`
|
||||||
|
returns all remaining matches; CLI `--all` and `--limit` conflict.
|
||||||
|
The window reports examined, matching and returned records and `has_more`.
|
||||||
|
A filtered empty page is not evidence that the installation has no decoders.
|
||||||
|
|
||||||
|
Discovery refuses more than 65,535 line separators before constructing record
|
||||||
|
objects (65,536-line representation budget), in addition to the 4 MiB output cap.
|
||||||
|
Exceeding that budget is a resource failure with captured output. Returned text
|
||||||
|
is copied so a retained page does not keep the complete producer output alive.
|
||||||
|
|
||||||
|
Discovery shares decoding's owned process, admission slot, resource limits,
|
||||||
|
cleanup retries and Evidence delivery. It records the executable and limiter
|
||||||
|
identities, version banner and warnings. Failed version checks and malformed
|
||||||
|
producer output preserve diagnostics. Help is producer text, not an independently
|
||||||
|
validated parameter schema. Each request probes again; it does not cache or claim
|
||||||
|
stable pages across installation changes. Libraries/decoder modules remain
|
||||||
|
trusted and are not fully fingerprinted. Catalog output includes a SHA-256 of
|
||||||
|
its executable, not a digest of the complete installation.
|
||||||
@@ -13,6 +13,11 @@ Check `binary_session` for configured capability availability. A recognized
|
|||||||
header is not validation of the complete module; missing WABT is reported
|
header is not validation of the complete module; missing WABT is reported
|
||||||
separately as an unavailable capability, not as missing native engine support.
|
separately as an unavailable capability, not as missing native engine support.
|
||||||
|
|
||||||
|
The recognized WASM header is checked before automatic database routing from a
|
||||||
|
.hop filename. Renaming a module to .hop therefore keeps the static-inspection
|
||||||
|
diagnostic. An explicit database selection or raw/COM format selection retains
|
||||||
|
the caller's requested interpretation; ordinary .hop database routing is unchanged.
|
||||||
|
|
||||||
Set `REA_WABT_BIN_DIRECTORY` to an absolute directory containing executable
|
Set `REA_WABT_BIN_DIRECTORY` to an absolute directory containing executable
|
||||||
`wasm-validate`, `wasm-objdump` and `wasm2wat` (with `.exe` on Windows). Missing
|
`wasm-validate`, `wasm-objdump` and `wasm2wat` (with `.exe` on Windows). Missing
|
||||||
executables, unsupported banners and inaccessible tools produce actionable
|
executables, unsupported banners and inaccessible tools produce actionable
|
||||||
@@ -78,4 +83,47 @@ Candidates are caller-selected files; their identity does not imply validation.
|
|||||||
Both CLI and MCP use the same typed port and application service. MCP publishes
|
Both CLI and MCP use the same typed port and application service. MCP publishes
|
||||||
SDK-compatible schemas and records Evidence for `get_evidence_bundle` readback.
|
SDK-compatible schemas and records Evidence for `get_evidence_bundle` readback.
|
||||||
See [WABT provenance](https://github.com/morluto/rea/blob/main/third_party/wabt/README.md) and
|
See [WABT provenance](https://github.com/morluto/rea/blob/main/third_party/wabt/README.md) and
|
||||||
[testing](testing.md#offline-wasm-artifacts) for real-tool verification.
|
[testing](../../development/testing.md#offline-wasm-artifacts) for real-tool verification.
|
||||||
|
|
||||||
|
## Compare core-module interfaces
|
||||||
|
|
||||||
|
Inspection adds producer-owned typed `interface` facts while keeping exact WAT
|
||||||
|
import/export forms. Function/tag signatures resolve type indices; table/memory
|
||||||
|
limits, memory page size and global value type/mutability remain explicit.
|
||||||
|
Unadmitted types (including GC reference signatures) retain null signatures and
|
||||||
|
issues. Exact decoded names retain escapes, empty names, BOM and punctuation.
|
||||||
|
This facet is absent in historical Evidence that did not examine typed interfaces.
|
||||||
|
|
||||||
|
`compare_wasm_interfaces` accepts two complete `inspect_wasm_artifact` Evidence
|
||||||
|
records, or exact retained references in the current MCP session, and required
|
||||||
|
`scope: "imports" | "exports" | "both"`. It reads no files and needs no active
|
||||||
|
WABT toolchain. CLI uses portable inline Evidence in one JSON document:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rea compare-wasm-interfaces comparison-input.json --json
|
||||||
|
```
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"left": { "kind": "retained-evidence", "evidence_id": "ev_<left-digest>" },
|
||||||
|
"right": { "kind": "retained-evidence", "evidence_id": "ev_<right-digest>" },
|
||||||
|
"scope": "both"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
The references above are MCP-only; put complete Evidence objects in the CLI
|
||||||
|
input. Resolve summary delivery to its retained complete parent before comparing.
|
||||||
|
Results retain both input Evidence IDs, artifact paths/digests/lengths and every
|
||||||
|
selected occurrence. Unique names are added, removed, changed or unchanged;
|
||||||
|
duplicate names and unsupported signatures are unknown. Incomplete or historical
|
||||||
|
inventories never establish absence. Imports group by module/name, exports by
|
||||||
|
name, so a change of kind is visible. Output ordering is deterministic.
|
||||||
|
|
||||||
|
Static type equality does not establish runtime compatibility, ABI compatibility
|
||||||
|
or linking success. Comparison covers core modules; WebAssembly components and
|
||||||
|
canonical ABI relationships belong to their separate inspection workflow.
|
||||||
|
|
||||||
|
After building, run `REA_WABT_BIN_DIRECTORY=/absolute/wabt/bin node
|
||||||
|
scripts/verify-wasm-interface-comparison.mjs` for original-module comparison
|
||||||
|
through the compiled CLI and stdio MCP. It uses owned fixtures and WABT 1.0.42;
|
||||||
|
no WASM module is instantiated or executed.
|
||||||
@@ -8,6 +8,10 @@ exported script's native imports under an explicit URL/import-map context.
|
|||||||
|
|
||||||
REA can attach to a user-owned Chrome-family browser through the Chrome DevTools Protocol (CDP) and produce bounded Evidence about an existing page. This is a passive reverse-engineering capability, not a general browser automation or remote-control surface.
|
REA can attach to a user-owned Chrome-family browser through the Chrome DevTools Protocol (CDP) and produce bounded Evidence about an existing page. This is a passive reverse-engineering capability, not a general browser automation or remote-control surface.
|
||||||
|
|
||||||
|
For request/response bodies and traffic debugging, see
|
||||||
|
[Fiddler Everywhere captures and MCP](web-network-captures.md#reading-fiddler-captures-saz).
|
||||||
|
Inspect native SAZ or HAR 1.2 offline with REA, or connect Everywhere's separate MCP server.
|
||||||
|
|
||||||
## Shipped surfaces
|
## Shipped surfaces
|
||||||
|
|
||||||
- `list_browser_targets` / `rea list-browser-targets` discovers all eligible page targets at the endpoint by default, with an optional exact-origin filter.
|
- `list_browser_targets` / `rea list-browser-targets` discovers all eligible page targets at the endpoint by default, with an optional exact-origin filter.
|
||||||
@@ -47,7 +51,7 @@ Caller-owned JSON/base64 strings, input parsing and validation, transport
|
|||||||
buffers, garbage-collector behavior, and other runtime memory are outside this
|
buffers, garbage-collector behavior, and other runtime memory are outside this
|
||||||
estimate; the budget does not promise a bound on total process memory.
|
estimate; the budget does not promise a bound on total process memory.
|
||||||
|
|
||||||
Electron `file://` pages use a separate provider and target boundary; see [electron-observation.md](electron-observation.md).
|
Electron `file://` pages use a separate provider and target boundary; see [electron-observation.md](../javascript/electron-observation.md).
|
||||||
|
|
||||||
## Provider authorities
|
## Provider authorities
|
||||||
|
|
||||||
@@ -61,7 +65,7 @@ vocabulary (`BrowserExclusionReason`): every denial reason in every stack maps
|
|||||||
onto it, even where a wire schema keeps a narrower historical bucket.
|
onto it, even where a wire schema keeps a narrower historical bucket.
|
||||||
Existing static application Evidence and passive web/Electron captures can be
|
Existing static application Evidence and passive web/Electron captures can be
|
||||||
combined later through
|
combined later through
|
||||||
[JavaScript static/runtime reconciliation](javascript-runtime-reconciliation.md).
|
[JavaScript static/runtime reconciliation](../javascript/javascript-runtime-reconciliation.md).
|
||||||
|
|
||||||
## Start a browser
|
## Start a browser
|
||||||
|
|
||||||
@@ -76,12 +80,74 @@ google-chrome \
|
|||||||
|
|
||||||
REA does not launch, own, or terminate this browser. Use a dedicated profile and stop it yourself when the investigation is complete. Do not expose the debugging port on a non-loopback interface.
|
REA does not launch, own, or terminate this browser. Use a dedicated profile and stop it yourself when the investigation is complete. Do not expose the debugging port on a non-loopback interface.
|
||||||
|
|
||||||
|
Other Chromium-family browsers, such as Chromium or Brave, work the same way
|
||||||
|
with the same two flags. On macOS, run the executable inside the application
|
||||||
|
bundle, for example
|
||||||
|
`"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"` or
|
||||||
|
`"/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"`. Fedora installs
|
||||||
|
Chromium as `chromium-browser`.
|
||||||
|
|
||||||
|
REA needs the browser's HTTP discovery endpoint on a loopback port. A browser
|
||||||
|
driven over `--remote-debugging-pipe` or a private channel, for example by an
|
||||||
|
automation SDK, exposes no such endpoint, so `list_browser_targets` has nothing
|
||||||
|
to attach to. Connection failures report `endpoint_unreachable`; a reachable
|
||||||
|
HTTP service that returns a non-200 or non-JSON discovery response reports
|
||||||
|
`invalid_endpoint_response`.
|
||||||
|
Reproduce that flow in a Chromium-family browser started with
|
||||||
|
`--remote-debugging-port`.
|
||||||
|
|
||||||
|
In a minimal Linux container, headed Chromium under Xvfb can keep running while
|
||||||
|
its DevTools port never opens. Install the GLES, EGL, and Mesa DRI libraries
|
||||||
|
(on Fedora: `libglvnd-gles`, `mesa-libEGL`, and `mesa-dri-drivers`), then
|
||||||
|
restart the browser.
|
||||||
|
|
||||||
On Linux, a reachable but locked desktop keyring can stall Chrome before its
|
On Linux, a reachable but locked desktop keyring can stall Chrome before its
|
||||||
first navigation. For a dedicated investigation profile, add
|
first navigation. For a dedicated investigation profile, add
|
||||||
`--password-store=basic` to bypass that keyring. Empty or placeholder frame URLs
|
`--password-store=basic` to bypass that keyring. Empty or placeholder frame URLs
|
||||||
then describe an unloaded page; REA continues to require an allowed, committed
|
then describe an unloaded page; REA continues to require an allowed, committed
|
||||||
URL. See [the startup investigation](https://github.com/morluto/rea/issues/1384#issuecomment-6093781686).
|
URL. See [the startup investigation](https://github.com/morluto/rea/issues/1384#issuecomment-6093781686).
|
||||||
|
|
||||||
|
### Browsers without HTTP discovery
|
||||||
|
|
||||||
|
Some browsers expose a loopback browser WebSocket but no `/json/version` or
|
||||||
|
`/json/list`. Chrome 144 and later can enable remote debugging on a running
|
||||||
|
browser from `chrome://inspect/#remote-debugging`; this mode is reported to
|
||||||
|
serve only the browser socket. Since Chrome 136, `--remote-debugging-port` is
|
||||||
|
ignored for the default profile, so this is the remaining way to inspect a page
|
||||||
|
in an existing profile.
|
||||||
|
|
||||||
|
For such a browser, pass the browser socket instead of the HTTP endpoint:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rea list-browser-targets ws://127.0.0.1:9222/devtools/browser/<id>
|
||||||
|
```
|
||||||
|
|
||||||
|
Chrome writes the port and the `/devtools/browser/<id>` path to the
|
||||||
|
`DevToolsActivePort` file in its user data directory. REA does not read that
|
||||||
|
file for you.
|
||||||
|
|
||||||
|
- Only `list_browser_targets`, `inspect_web_page`, `analyze_web_bundle`,
|
||||||
|
`observe_web_session`, `discover_webmcp_tools`, and `capture_web_screenshot`
|
||||||
|
accept a browser socket. Website runtime attribution, Electron inspection,
|
||||||
|
and scenario attach mode still require HTTP discovery.
|
||||||
|
- Each call opens one WebSocket and uses it for discovery
|
||||||
|
(`Browser.getVersion`, `Target.getTargets`) and for the selected page.
|
||||||
|
Discovery must finish within the same 10-second deadline as HTTP discovery.
|
||||||
|
Chrome may ask you to approve each connection.
|
||||||
|
- The browser identifier controls access to the socket. Evidence records the
|
||||||
|
endpoint as `ws://127.0.0.1:9222/devtools/browser/[REDACTED]`.
|
||||||
|
- `browser.revision` is the socket's `Browser.getVersion` value, such as
|
||||||
|
`@e533e98…`. HTTP discovery reports `WebKit-Version`, such as
|
||||||
|
`537.36 (@e533e98…)`.
|
||||||
|
- `Target.getTargets` reports whether each target is attached. Chrome's
|
||||||
|
`/json/list` can omit it, so HTTP discovery may report `attached` as `null`.
|
||||||
|
- An existing profile can hold many unrelated pages. Target listing returns
|
||||||
|
each eligible page's URL and title, so pass `--allowed-origins` to list only
|
||||||
|
the origins you are investigating.
|
||||||
|
|
||||||
|
A browser driven only through `--remote-debugging-pipe` or a vendor's private
|
||||||
|
automation channel has neither endpoint, and REA cannot attach to it.
|
||||||
|
|
||||||
## Request boundary
|
## Request boundary
|
||||||
|
|
||||||
CDP connections enforce the shared 64 MiB limit per WebSocket message. A larger
|
CDP connections enforce the shared 64 MiB limit per WebSocket message. A larger
|
||||||
@@ -91,9 +157,13 @@ decoded strings or JSON objects.
|
|||||||
|
|
||||||
Discovery supplies a literal loopback CDP endpoint and returns all eligible
|
Discovery supplies a literal loopback CDP endpoint and returns all eligible
|
||||||
page targets unless an exact HTTP(S) origin filter narrows the result. Follow-up
|
page targets unless an exact HTTP(S) origin filter narrows the result. Follow-up
|
||||||
inspection requests select one target; their default scope is its current origin. `localhost`, private-LAN
|
inspection requests select one target; their default scope is its current origin.
|
||||||
addresses, HTTPS CDP endpoints, credentials, paths, queries, fragments, and
|
The endpoint is either `http://127.0.0.1:PORT` or a
|
||||||
implicit ports are not valid CDP endpoints. Origin filters contain only scheme,
|
[browser socket](#browsers-without-http-discovery),
|
||||||
|
`ws://127.0.0.1:PORT/devtools/browser/ID`; `[::1]` may replace `127.0.0.1`.
|
||||||
|
`localhost`, private-LAN addresses, HTTPS and `wss:` endpoints, credentials,
|
||||||
|
queries, fragments, implicit ports, and any other path are not valid CDP
|
||||||
|
endpoints. Origin filters contain only scheme,
|
||||||
host, and port; paths, credentials, queries, fragments, and wildcards are not
|
host, and port; paths, credentials, queries, fragments, and wildcards are not
|
||||||
valid origins.
|
valid origins.
|
||||||
|
|
||||||
@@ -203,7 +273,7 @@ commands fail closed. A correlated reply's session ID must match the command's
|
|||||||
selected session. An optional method is unavailable only when the browser
|
selected session. An optional method is unavailable only when the browser
|
||||||
rejects it as unknown; other command rejections retain their reported failure.
|
rejects it as unknown; other command rejections retain their reported failure.
|
||||||
|
|
||||||
Network and console coverage starts only after REA attaches and enables the relevant CDP domains. `prior_activity_available` is always `false`; absence from these arrays is not evidence that an event never occurred. If CDP reuses a request ID without supplying redirect metadata, REA retains the predecessor observation and marks network coverage incomplete.
|
Network and console coverage starts only after REA attaches and enables the relevant CDP domains. `prior_activity_available` is always `false`; absence from these arrays is not evidence that an event never occurred. Scripts are different: scripts the page parsed before REA attached are still reported under `scripts`. A page that loaded before attach can therefore list its scripts while `network.requests` lacks the requests that fetched them. If CDP reuses a request ID without supplying redirect metadata, REA retains the predecessor observation and marks network coverage incomplete.
|
||||||
|
|
||||||
Source maps are not fetched by inspection. Bundle analysis fetches them only when `fetch_source_maps` is selected, with exact-origin redirect checks and no credentials, cookies, or referrer. Each fetch operation has a 30-second deadline and a 64 MiB aggregate streamed-response budget across redirects. A deadline or byte-limit failure remains explicitly unavailable and makes bundle completeness partial. Source-map decoding also bounds raw resolved identities to 64 MiB and aggregate inline evidence to 32 MiB. Failed maps preserve their failure context when it fits; if another context cannot fit, collection stops with the full requested count, the returned processed count, and an explicit unknown-results limitation. Retained mappings and original sources are returned inline. See [source-location limits](web-source-location.md) for the structural decoder bounds. Original source artifacts with `.ts`, `.tsx`, `.mts`, or `.cts` suffixes carry `text/typescript`; other source names retain `text/javascript`.
|
Source maps are not fetched by inspection. Bundle analysis fetches them only when `fetch_source_maps` is selected, with exact-origin redirect checks and no credentials, cookies, or referrer. Each fetch operation has a 30-second deadline and a 64 MiB aggregate streamed-response budget across redirects. A deadline or byte-limit failure remains explicitly unavailable and makes bundle completeness partial. Source-map decoding also bounds raw resolved identities to 64 MiB and aggregate inline evidence to 32 MiB. Failed maps preserve their failure context when it fits; if another context cannot fit, collection stops with the full requested count, the returned processed count, and an explicit unknown-results limitation. Retained mappings and original sources are returned inline. See [source-location limits](web-source-location.md) for the structural decoder bounds. Original source artifacts with `.ts`, `.tsx`, `.mts`, or `.cts` suffixes carry `text/typescript`; other source names retain `text/javascript`.
|
||||||
|
|
||||||
@@ -312,3 +312,9 @@ artifacts carry their normalized before/after digests and capture states.
|
|||||||
Every changed or unknown artifact record is returned inline for each aligned
|
Every changed or unknown artifact record is returned inline for each aligned
|
||||||
step. Missing, truncated, or mismatched capture coverage remains unknown
|
step. Missing, truncated, or mismatched capture coverage remains unknown
|
||||||
instead of being treated as equality.
|
instead of being treated as equality.
|
||||||
|
|
||||||
|
`scenario.event_families` records the sorted, de-duplicated `capture.events`
|
||||||
|
selection. Captures with different selections report event evidence as unknown
|
||||||
|
with a recovery instruction, even when no selected family emitted an event.
|
||||||
|
Captures written before this field existed omit it, so their event evidence is
|
||||||
|
also unknown.
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user