Skip to content

Commit eccc741

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix/byte-entropy-profile
# Conflicts: # tests/boundary/mcp/binaryDiagnosticsMcp.test.ts
2 parents 7a67707 + 7e3a198 commit eccc741

591 files changed

Lines changed: 32941 additions & 4456 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
name: rea-ci-tests-audit
3+
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.
4+
---
5+
6+
# REA CI and tests audit
7+
8+
Establish which checks still catch real regressions and which costs can be
9+
removed without losing that protection. The outcome may be a verified fix,
10+
an evidence-backed recommendation, or an explicit decision to stop.
11+
12+
Follow the checkout's `AGENTS.md`, [testing guide](../../../docs/testing.md),
13+
and [contribution rules](../../../CONTRIBUTING.md). Use their current commands
14+
and pinned toolchain, rather than commands remembered from an earlier audit.
15+
Preserve the requested scope: investigation alone does not authorize edits;
16+
this skill does not grant permission to publish issues, push, or merge. Existing
17+
user authorization still applies. Keep audit notes and raw results outside the
18+
tracked tree, normally in a task-specific `/tmp` directory.
19+
20+
## Establish the executed baseline
21+
22+
Fetch when the user asks for latest main. Pin the baseline SHA and inspected
23+
workflow revision; use an isolated worktree when changing or comparing code.
24+
Do not modify another task's checkout. Record dirty changes and the exact
25+
command, toolchain, host, selected tests, instrumentation, and prerequisites.
26+
An old run is evidence for its executed revision, even if main advances.
27+
28+
Trace workflow triggers, changed-path selection, job dependencies, reusable
29+
actions, package scripts, test discovery, artifact producers, and report gates
30+
through to the commands that actually execute. Include scripts, generated data,
31+
runtime registration, and subprocess boundaries missing from import graphs.
32+
Check positive and negative selection paths: required files must be discovered
33+
once per intended test configuration; deliberate platform/configuration repeats
34+
are separate coverage. A missing explicit test or missing required report must
35+
not turn green. Optional lanes may skip; preserve their stated prerequisites.
36+
37+
Use existing timing and failure artifacts to select suspicious families. Run
38+
relevant checks to establish a baseline; reserve a full local suite for broad
39+
CI diagnosis or uncertainty that focused checks cannot resolve. Do not rebuild
40+
or rerun an unchanged complete suite after every documentation edit.
41+
42+
## Prove the failure or protection
43+
44+
For each candidate, state the expected observable behavior and its owner,
45+
then construct the smallest reproduction against production behavior. Follow
46+
the producer and affected consumers before deciding where to fix it.
47+
48+
- For drift, compare fixtures with current admission requirements, protocol
49+
replies, named contracts, tool versions, and actual public entrypoints. A
50+
plausible-looking mock can fail before the behavior its test claims to cover.
51+
Search the whole affected fixture family, including other version strings.
52+
Preserve intentionally malformed fixtures and test their intended rejection.
53+
- For a suspicious green test, perturb the relevant behavior in an isolated
54+
copy or inject a controlled failure. Verify that the existing assertion or
55+
gate detects it. A test may merely repeat its mock, import abandoned code,
56+
or hide a subprocess/checker failure. Restore mutations after the experiment.
57+
- For shared setup or pruning, map distinct assertions to their retained
58+
scenarios. Preserve malformed inputs, cancellation, cleanup failure,
59+
permissions, capacity, identity, and meaningful concurrency interactions.
60+
A faster run that skips a case or weakens its oracle is not an improvement.
61+
- For provider coverage, separate fake-producer, boundary, and actual-engine
62+
evidence. Inspect named skips and prerequisites; fixtures do not establish
63+
real Ghidra, LLDB, browser, or other provider behavior.
64+
65+
Classify findings as reproduced defects, supported costs, hypotheses, or
66+
unavailable evidence. Record the baseline command, observed output/exit status,
67+
expected result, affected scope, and competing explanation. A failure on main
68+
may be pre-existing; that does not by itself make it irrelevant to a CI audit.
69+
Attribute PR failures using the executed revision and a clean baseline, not
70+
just their resemblance to a previous failure. Retry only to test a specific
71+
transient explanation; retain the original failure and stop when repetition
72+
adds no evidence. A passing retry does not establish a root cause or a fix.
73+
74+
## Assess efficiency without losing the gate
75+
76+
Read [measurement and CI checks](references/measurement-and-ci.md) when
77+
investigating slowness, caching, runner waits, shared artifacts, or log noise.
78+
Compare equivalent completed work before claiming a speedup. Distinguish
79+
setup/build time, test execution, coverage instrumentation, dependency waits,
80+
and runner scheduling; state which costs remain unmeasured.
81+
82+
Prefer removing proven duplicate preparation, reusing immutable setup, and
83+
reducing repeated subprocess work before shrinking correctness coverage.
84+
Preserve independent sessions where lifecycle or concurrency is the oracle.
85+
Keep live tests fresh; a cached previous pass cannot validate current host,
86+
installed provider contents, permissions, or external state.
87+
88+
## Fix, verify, and hand off within scope
89+
90+
If implementation is authorized, make the smallest structural change at the
91+
owning boundary and add a regression that fails on the baseline for the right
92+
reason. Retest affected consumers and meaningful negative paths; verify cache
93+
invalidation or discovery when those mechanisms change. Read the installed
94+
Turbo documentation before changing its configuration or commands.
95+
96+
Run the repository's applicable checks and inspect complete current-head CI
97+
results before an authorized merge. Preserve required coverage and discovery
98+
gates. Do not suppress a failure, add blanket retries, raise timeouts, or delete
99+
distinct assertions solely to make CI green. Changes to these controls need
100+
their own demonstrated reason and retained failure detection.
101+
102+
Report each confirmed issue with exact revision, reproduction, consequence,
103+
proposed correction, and validation limits. Report performance with workload
104+
and measurements, not just a percentage. Use English issue/PR records when
105+
requested; follow the user's assignment, commit identity, review, and merge
106+
preferences without assuming them for other users. Open ready-for-review PRs
107+
only when that lifecycle is authorized. Resolve necessary review findings and
108+
check final main against the tested tree after merging.
109+
110+
Stop when the authorized work is verified, remaining benefits are unproven,
111+
or further changes would trade correctness for speculative speed. List genuine
112+
uncertainties without turning them into additional optimization rounds.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
interface:
2+
display_name: "REA CI and tests audit"
3+
short_description: "Audit CI/test correctness and measured performance"
4+
default_prompt: "Use $rea-ci-tests-audit to investigate CI and test correctness, drift, and performance before proposing changes."
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Measurement and CI checks
2+
3+
## Equivalent completed work
4+
5+
Record the source/workflow SHA, command, test identities and counts, skips,
6+
assertions or output contract, exit status, coverage scope and thresholds,
7+
toolchain/provider versions, host resources, and prepared artifacts. Inspect
8+
both the child result and its report: a profiling wrapper may exit successfully
9+
after the measured command failed. Focused tests can pass while global coverage
10+
thresholds fail; describe both rather than calling the command green.
11+
12+
Measure wall time, user/system CPU, and peak process-family memory for relevant
13+
completed tasks. Parent-only RSS misses workers and their children. On Linux,
14+
summed RSS can double-count shared pages; report RSS/PSS semantics, sampling
15+
interval, missing samples, and observed cleanup limits. Use equivalent host
16+
tools elsewhere. State unknown costs, including agent tokens; fewer log bytes
17+
alone prove neither fewer tokens nor faster tests.
18+
19+
Separate cold execution, warm build/file caches, and warm runtime caches.
20+
Use repeated or alternating runs when variance affects the decision, with
21+
enough observations to distinguish the proposed benefit from noise. Keep
22+
workload, instrumentation, and host conditions comparable; record interference.
23+
A run with fewer tests, early rejection, lost coverage, or a different runner
24+
does not prove suite acceleration. CI-wide claims need end-to-end measurements,
25+
not an extrapolation from one improved family.
26+
27+
## Workflow, caches, and shared artifacts
28+
29+
Trace each reused result from producer to consumers and identify its lifetime.
30+
Check key/input coverage against the actual file inventory and result-affecting
31+
configuration, environment, generated data, tool versions, and host state.
32+
Exercise an affected input change to prove invalidation; exercise an irrelevant
33+
change to support reuse where useful. Cache deterministic preparation and
34+
static analysis only when their inputs fully describe the result.
35+
36+
Verify downloaded artifacts match the expected revision, platform, runtime,
37+
and schema. Check restore misses, failed/partial producers, stale reports,
38+
removed output files, and consumers after producer failures. Shared writers
39+
need output ownership or locks; tests need isolated state, not an unnecessary
40+
global lock. Worker counts do not bound children spawned within each test.
41+
Preserve intentionally concurrent scenarios while bounding unrelated batches.
42+
43+
Check matrix expansion and all job pages before saying CI passed. Inspect
44+
required gates after failed, cancelled, and skipped dependencies. `always()`
45+
alone does not preserve failures; inspect the aggregation logic. Test/report
46+
uploads should retain available diagnostics after failure, while absent or
47+
malformed required results must fail closed. Do not demand an optional report
48+
from a lane intentionally excluded by the selector.
49+
50+
## Runner waits and console noise
51+
52+
Use per-job and per-step timestamps where available. Workflow creation to job
53+
start includes dependencies and other delays; it is not necessarily runner
54+
queue time. Identify when the job became eligible before attributing waits to
55+
runner capacity. If eligibility/queue timestamps are unavailable, report the
56+
combined delay and unknown split. Compare equivalent lanes and runner types
57+
across enough runs; a single busy runner is not a workflow regression.
58+
59+
For console reductions, retain checker exit codes, actionable errors, useful
60+
summary counts, and complete machine-readable artifacts. Verify authored code
61+
remains in the actual checker inventory when excluding generated outputs.
62+
Introduce an authored error as a control; it must still fail. An ignore pattern
63+
can hide real source as well as noise. Show that cached reports are restored,
64+
stale successful reports cannot mask current failures, and report parse errors
65+
remain failures. Measure readability or byte reduction separately from runtime.

‎.agents/skills/reverse-engineer-anything/references/connection-and-recovery.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ rea setup --client codex --dry-run --json
4646
Use the current supported client's ID: `claude_code`, `claude_desktop`, `codex`,
4747
`cursor`, `gemini_cli`, `windsurf`, `devin`, `opencode`, `antigravity`,
4848
`copilot_cli`, `commandcode`, `qwen_code`, `vscode`, `trae`, `grok_build`, `omp`, `pi`,
49-
`hermes`, `qoder`, `zcode`, `dsh`, or `grok_bot`. If unknown, inspect `doctor --json` before choosing a
49+
`hermes`, `qoder`, `droid`, `zcode`, `dsh`, or `grok_bot`. If unknown, inspect `doctor --json` before choosing a
5050
scope. `grok_bot` uses a chat registration step rather than local `mcp.json`.
5151
For unsupported clients, use version-pinned manual stdio registration or CLI.
5252

‎.agents/skills/reverse-engineer-anything/references/native-and-artifacts.md‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ additional evidence only when the provider accepts and matches them.
175175
REA has a built-in read-only snapshot parser for x64 PE targets with .NET 8 RTR
176176
9.1 metadata. An optional headless Ghidra adapter adds database annotations and
177177
broader metadata recovery on Linux; it requires an explicitly configured
178-
NativeAOT JAR. These are separate routes. See the
178+
NativeAOT JAR. These are separate routes. The built-in parser also runs on
179+
Windows Ghidra P0; read frozen literals from its report, because
180+
`search_strings` does not include them. See the
179181
[NativeAOT guide](https://github.com/morluto/rea/blob/main/docs/ghidra-nativeaot.md)
180182
for setup, supported layouts, and host restrictions. Preserve binary identity
181183
and distinguish derived metadata from Ghidra database observations. Recovered
@@ -226,10 +228,13 @@ Use `inspect_byte_entropy` to triage high- and low-entropy ranges before extract
226228

227229
For other headerless images (embedded firmware without ELF/Mach-O/PE/MZ
228230
headers), open with `format: "raw-binary"`, `architecture` (`x86`, `x86_64`,
229-
`arm`, or `arm64`), and `entry_point` (`0x` hex). File offset 0 is mapped at
231+
`arm`, `arm64`, or `6502`), and `entry_point` (`0x` hex). File offset 0 is mapped at
230232
that address. Hopper and IDA refuse this interpretation; Ghidra uses
231233
`BinaryLoader` with a little-endian generic language. Big-endian, Thumb-only,
232-
and Cortex-M variants are unsupported. See [raw binary guide](https://github.com/morluto/rea/blob/main/docs/raw-binary.md).
234+
and Cortex-M variants are unsupported. `6502` selects NMOS 6502; the entry and
235+
complete file mapping must fit within `0x0000..0xffff`. 65C02, 65816, cartridge
236+
containers, bank switching, and mapper semantics are unsupported. Windows
237+
Ghidra P0 admits raw images only for `6502`. See [raw binary guide](https://github.com/morluto/rea/blob/main/docs/raw-binary.md).
233238

234239
### Function annotations in Ghidra
235240

@@ -246,3 +251,9 @@ resolution is explicit; missing references and size mismatch remain visible.
246251
Other payloads are opaque, and this operation does not decode images or simulate
247252
Windows resource loading. Consult the budgets and supported tree profile in
248253
[offline binary diagnostics](https://github.com/morluto/rea/blob/main/docs/binary-diagnostics.md).
254+
255+
For exact core-module import/export differences, use `compare_wasm_interfaces`
256+
with two complete inspection Evidence records (or current-session retained
257+
references) and explicit scope. Preserve unknown types/duplicate names; static
258+
interface equality is not runtime compatibility. CLI accepts complete inline
259+
Evidence in `rea compare-wasm-interfaces input.json --json`.

‎.github/actions/portable-build-cache/action.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ runs:
1212
steps:
1313
- name: Download portable build outputs from this workflow run
1414
if: inputs.build_cache_artifact != ''
15-
uses: actions/download-artifact@v4
15+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
1616
with:
1717
name: ${{ inputs.build_cache_artifact }}
1818
path: .turbo/cache/
@@ -39,14 +39,14 @@ runs:
3939
' >> "$GITHUB_OUTPUT"
4040
- name: Restore portable build outputs
4141
if: inputs.build_cache_artifact == '' && inputs.save != 'true'
42-
uses: actions/cache/restore@v4
42+
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
4343
with:
4444
path: .turbo/cache/
4545
key: ${{ steps.plan.outputs.key }}
4646
restore-keys: ${{ steps.plan.outputs.prefix }}
4747
- name: Restore and save portable build outputs
4848
if: inputs.build_cache_artifact == '' && inputs.save == 'true'
49-
uses: actions/cache@v4
49+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
5050
with:
5151
path: .turbo/cache/
5252
key: ${{ steps.plan.outputs.key }}

‎.github/workflows/ci-timings.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020
timeout-minutes: 5
2121
steps:
2222
# Consume only API data and execute batch code from the trusted default branch.
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
2424
with:
2525
ref: ${{ github.event.repository.default_branch }}
2626
persist-credentials: false
27-
- uses: actions/setup-node@v4
27+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2828
with:
2929
node-version-file: .nvmrc
3030
- name: Record queue, execution, and matched step timing
@@ -36,7 +36,7 @@ jobs:
3636
- name: Upload CI timing artifacts
3737
if: always() && hashFiles('.cache/ci-job-timings/*') != ''
3838
continue-on-error: true
39-
uses: actions/upload-artifact@v4
39+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
4040
with:
4141
name: ci-job-timings-batch
4242
path: .cache/ci-job-timings/

0 commit comments

Comments
 (0)