One regex served both headers — `^[a-z][a-z0-9_.\x2d]*$` after lowercasing — so any token counted as a
declared policy. Measured through `safeResponseMetadata`:
| `Cross-Origin-Resource-Policy` | published | Fetch 3.7 |
| --- | --- | --- |
| `same-origin` | `same-origin` | `same-origin` |
| `SAME-ORIGIN` | `same-origin` | none |
| `Same-Site` | `same-site` | none |
| `same-origin-ish` | `same-origin-ish` | none |
| `same_origin` | `same_origin` | none |
| `unsafe-none` | `unsafe-none` | none |
The value ABNF is `%s"same-origin" / %s"same-site" / %s"cross-origin"`, and `%s` is case-sensitive,
so the internal check nulls every other spelling. Case folding made `SAME-ORIGIN` worse than a bad
echo: it turned a value browsers ignore into the enforced spelling, so an observation claimed
embedding isolation the page did not have.
`X-Content-Type-Options` declares exactly one case-insensitive `nosniff`, and "determine nosniff"
tests `values[0]` of the combined header. The strict whole-value match also dropped valid
declarations — `nosniff` sent on two lines, or `nosniff, sniff`, both published nothing. The reader
takes the first list member now.
| `X-Content-Type-Options` | before | after |
| --- | --- | --- |
| `nosniff` | `nosniff` | `nosniff` |
| `NOSNIFF` | `nosniff` | `nosniff` |
| `nosniff\nnosniff` | none | `nosniff` |
| `nosniff, sniff` | none | `nosniff` |
| `sniff, nosniff` | none | none |
| `nosniff-ish` | `nosniff-ish` | none |
Each header has its own grammar now, and `policyToken` is gone.
`src/browser/CdpSafeMetadata.test.ts` — 133 passing, 17 new cases. Reverting either reader fails
them.
`createPefileReadCompatibility` models pefile's section reads so an import hash is published only
when both readers see the same bytes. Its layout gate rejected any section whose
`PointerToRawData` was not 512-aligned — but pefile 2024.8.26's `get_PointerToRawData_adj()` skips
that rounding when `SectionAlignment < 0x1000` and `PointerToRawData == VirtualAddress`, the
`LdrpWx86FormatVirtualImage` layout ntoskrnl-era drivers use.
The gate already modelled the sub-page case two lines above (`SectionAlignment < 0x1000 ?
FileAlignment : SectionAlignment`), then rejected it against an absolute 512 rule — and
`docs/pe-imports.md` scopes the withhold to an incomplete table or a different row sequence, not to
a file offset.
Measured on a minimal image with `SectionAlignment = FileAlignment = 0x80` and `.idata` at RVA 0x300
== file offset 0x300:
| | before | after |
| --- | --- | --- |
| coverage | `complete` | `complete` |
| issues | `[]` | `[]` |
| `imphash.md5` | `null` | `92cef6cc91a85825f3c8a0516517c66f` |
The withheld hash is the only thing that differed: both readers were already reading the same bytes.
The exception is exact rather than approximate — a section with the same sub-page alignment whose
`PointerToRawData` differs from its `VirtualAddress` still withholds, because pefile does round it
there. That case is the second new test.
pefile's current `master` broadened the condition to every sub-page image; this matches the
2024.8.26 revision the module documents, which is the narrower and safer rule.
`tests/fixtures/binaryDiagnostics/peImports.ts` takes an optional `layout`, so the shared builder
produces the geometry instead of a test hand-encoding a second image. Its default is unchanged —
`SectionAlignment`/`FileAlignment` are written only when supplied, so every existing fixture keeps
its exact bytes.
`src/native/pe` — 265 passing. Restoring the absolute 512 rule fails the sub-page case.
When the target exits, the terminal sends SIGHUP to its foreground process group. The capture guide now says that, and that this signal is not REA cleanup.
Co-authored-by: Cursor <cursoragent@cursor.com>
Node Inspector discovery reports a target as `file://` plus the pathname,
with quotes and backslashes replaced by underscores. Whether such a
pathname is identifiable was decided twice: inline in
authorizeRuntimeTargetLocation and again as NODE_DISCOVERY_AMBIGUOUS in
the createNodeDiscoveryTempDirectory fixture. The copies could drift, and
the fixture could not import the product rule without loading
JavaScriptRuntimeScope and its Electron file-scope chain.
Move the rule to src/inspector/nodeDiscoveryPath.ts, a module with no
imports, and use it from both places. Behavior is unchanged. A unit test
covers the Windows branch, which Linux CI cannot reach through the
boundary tests.
Validation: nodeDiscoveryPath and cancellation tests 12/12;
javascriptRuntimeTargetLocations and javascriptRuntimeObservation 42/42
with TMPDIR containing an underscore (exercises the /tmp fallback);
check:fast passes.
Refs morluto/rea#9996
* fix(apple): rethrow internal invariant violations while resolving a bundle's program file
Bundle target resolution decodes Info.plist with the shared binary plist decoder, which reports a broken internal assumption as InternalInvariantError. The resolver caught every decode failure and reported it as a BinaryTargetError ("Info.plist is malformed, unsupported, or lacks CFBundleExecutable"), and its two outer catches wrapped anything else the same way. A REA defect therefore reached the caller as a fact about the user's bundle.
#11029 made the other plist consumers rethrow the invariant. The resolver's decode site and both outer catches now do the same.
Tests: a boundary test opens a .app and a .bundle through parseBinaryTarget with the decoder replaced by one that reports an invariant violation. Before this change both resolved { ok: false } with a BinaryTargetError; now both reject with the InternalInvariantError. The same bundles open normally with the real decoder.
* test(apple): mock the binary plist decoder at its domain path
Main moved the binary plist materializer from src/artifacts/apple to
src/domain/apple, and AppBundleExecutable now imports it from there. The
invariant test still mocked the old path, which no longer exists, so tsc
failed and the mock would have intercepted nothing.
The test now mocks src/domain/apple/binaryPlistMaterializer.js. With the
rethrow removed from AppBundleExecutable both cases fail; with it they pass.
Review follow-up: firstRuntimeArgument has separate paths for an array hole, a nested array spread and an empty spread followed by another argument. child.kill(...[, "SIGINT"]) sends SIGTERM, child.kill(...[...["SIGINT"]]) sends SIGINT and child.kill(...[], "SIGKILL") sends SIGKILL; the case now pins all three.
Address review feedback on the kill() signal fact:
- Drop the semanticResolutionBlocked import, which isUnshadowedGlobal
superseded.
- Expand spreads of array literals before selecting the signal, so
kill(...[]) reports Node's SIGTERM default and kill(...["SIGINT"])
reports SIGINT. A spread of anything else stays unknown.
- Follow const aliases whose only write is one unconditional initializer
(the same !mutable + semanticStableInitializer rule other producers
use), so `const signal = undefined; kill(signal)` reports SIGTERM.
let, var, reassigned, and shadowed bindings stay unknown.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
inspect_native_instruction reports `not-in-listing` when an address lies
in Ghidra's memory but the listing has no instruction or defined data
there. No decode is attempted, so the answer does not show the bytes are
data, yet the result named no way forward. #10623 added the declared-seed
recovery for procedure_not_found and not_in_procedure; this is the
instruction-level sibling, where a `code` seed applies.
A not-in-listing answer now carries ghidraNotInListingLimitation(source).
It names a `code` seed (or a `function` seed for an entry point) in
REA_GHIDRA_SEED_FILE, says which setting to unset first for a selected
project or checkpoint, and does not assert that the address holds code.
decoded, data and other statuses are unchanged. The installation guide's
seed section lists the new carrier.
Validation: src/ghidra/GhidraProvider.behavior.test.ts fails 1/298 with
the caveat removed and passes 298/298 with it; check:fast passes. No
real Ghidra run.
Refs morluto/rea#3767
A search_bytes cursor resumes the same target, profile and query, and
the limitation said only that. In a real session, renaming a function
between pages changed the procedure name on the next page from the same
cursor, while the page Evidence kept the same target and profile digest
and no limitation explained the difference.
The search_bytes limitation now states that the cursor does not pin
match metadata: procedure names and other match metadata are read live
on each page, so a rename in the session between pages appears on later
pages. This takes the issue's "identify that match metadata is live"
option; binding or qualifying pages to a metadata version is left open.
No prose-asserting test was added, following the direction in #10508.
Validation: src/ghidra/GhidraProvider.behavior.test.ts 296/296;
check:fast passes.
Refs morluto/rea#8365
The npm package does not ship docs/, so a repository-relative guide path
in doctor's remediation could not be opened by npm users. Link the guide
on GitHub instead.
Refs #7018
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
The Ghidra requirements said official archives may require building the
Linux arm64 decompiler but gave no steps, so doctor's new pointer to that
section led nowhere. Ghidra's own guide lists Linux ARM64 among the
platforms that need user-built natives; link its Building Native
Components section and state it plainly in the remediation too.
Refs #7018
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Official Ghidra release archives ship no macOS decompiler and may ship
none for Linux arm64, but doctor's native_decompiler remediation only
named the expected path. On those hosts it now says the archive's
decompiler source builds it and points to the installation guide's build
steps for that platform.
Fixes#7018
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
An empty or whitespace-only --client or --skill-client value normalizes to an empty key, which is a prefix of every id, so suggestion ranking named an arbitrary client. Skip the suggestion for an empty key and report the supported list.
Setup and doctor resolve --client and --skill-client values by trimming,
lowercasing and collapsing runs of '-', '_' and whitespace, then matching a
canonical id or an alias the client row already declares for 'rea mcp add'.
An unknown value now reports 'Unknown client' with the closest id from
suggestCommand, or the supported list when nothing is close. The error code
and field path are unchanged.
A SIGXCPU at the requested budget is the decoder's own ceiling. Raising RLIMIT_CPU does not extend it. A lower recorded ceiling remains an inherited limit. A failed close of the CPU record stays on the decoder scope and does not skip that classification.
Static checks reject a second AnalysisResourceConstraintError in CaptureFailures.ts. SIGXCPU still reports the recorded ceiling and tells the caller to raise RLIMIT_CPU. The CPU record is read through the stable artifact owner, so a failed close stays on the decoder scope.
A tighter inherited RLIMIT_CPU is kept, and that death had no reply. The decoder records the installed ceiling, and SIGXCPU becomes a CPU resource constraint that names it.
A tighter RLIMIT_FSIZE was installed, but the reply check still used the
requested budget. A reply under that budget could exceed the inherited
limit and truncate. The effective cap now bounds the write, and a reply
that does not fit returns a fixed file-size limit. Tests also keep a
higher hard limit distinct from the new soft limit.
setrlimit ran before the shutdown guard and asked for hard limits the
process may not raise. A tighter inherited hard limit then left mitmdump
running until the capture timeout.
A failed resolveTarget returned after a boolean assertion, so the setup
failure showed as a mismatch instead of the typed error. Format the long
AnalysisOutputError line that static checks rejected.
A failed first open whose client cleanup also failed cleared a staged
import even though no target had been retired. Clearing now waits until
this open has retired a previous target. A later open still retries that
cleanup before another profile can start.
* fix(desktop): claim agentenv capture exclusively and survive FIFO write errors
stop() used makedirs(exist_ok) before the control FIFO existed, so a
start already in that window kept running after stop reported the
capture absent. A broken or full FIFO also aborted stop and mark
instead of reporting that the capture was not reading.
* fix(desktop): retry agentenv stop until the reader accepts it
stop() treated the first failed FIFO write as final and then started a
second full timeout. A start() that has created the FIFO but not opened
it kept running, and an interrupted startup could take twice the
caller's timeout.
* fix(desktop): remember an absent agentenv stop for a retry
stop() claimed a missing directory and returned absent. A retry found
that directory and waited for a FIFO that start() will not create, so
the build-computer release could not clear the folder. The claim is a
file in the directory, and a later stop returns absent.
* test(lifecycle): name the renamed JEB and BEAM coverage tests
The full source suite still expects titles removed by the JEB catalog consolidation and the BEAM CLI consolidation. Point those entries at the tests that replaced them.