rea/docs
Stefano Rizzello ab62ee9dcf
fix(windows): preserve caller affinity only within one processor group (#2202)
* fix(windows): preserve caller affinity only within one processor group

`spawnProcess` read the caller's affinity mask and applied it to the
suspended child unconditionally. A mask names processors relative to one
processor group, and Windows assigns each new process to a group of its
own choosing, so on hosts with more than 64 logical processors the child
is often placed in another group. `SetProcessAffinityMask` then rejects
the mask with ERROR_INVALID_PARAMETER (87) and the spawn fails, making
every owned provider process start intermittently on such hosts.

Affinity is a nicety, not an authority or isolation control, so it is now
applied only when the caller and the suspended child both occupy the same
single processor group. A child placed in another group keeps that group's
default affinity and the spawn proceeds. Job Object membership,
kill-on-owner-close policy, owner normalization and priority preservation
are unchanged, and the mask failure remains fatal within a shared group,
where it is not expected.

Single-group hosts, including every host with 64 or fewer logical
processors, are unaffected: `GetProcessGroupAffinity` reports one group
for both processes and the same mask is applied as before.

The optional process-boundary fixture gains an `affinity` observation,
and the native verification lane asserts that an owned spawn succeeds and
that the child's mask matches the caller's whenever both share a single
group.

Fixes #2181

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(windows): refuse to widen a pinned caller's affinity across groups

Addresses review feedback on the first commit.

An unconstrained caller loses nothing when Windows places an owned child
in another processor group, so that spawn proceeds with the group's
default. A caller deliberately pinned to fewer processors than its group
holds is a different case: silently accepting the default would hand the
provider tree the whole group, which `docs/installation.md` tells
operators to rely on affinity to prevent. Such a spawn now fails naming
the constraint instead. `GetProcessAffinityMask` already reports the
group's active set, which distinguishes the two without another query.

Selecting the caller's group at creation through
PROC_THREAD_ATTRIBUTE_GROUP_AFFINITY was tried first and rejected:
`CreateProcessW` fails with ERROR_INVALID_PARAMETER on a host with a
single processor group, both alongside PROC_THREAD_ATTRIBUTE_JOB_LIST and
on its own, so it cannot carry the ordinary path.

The boundary fixture's affinity observation now reports a process id's
own mask rather than its own, because a separate probe process is
assigned its own group and cannot stand in for the process that spawns
the child. Masks and the group's active set cross as fixed-width
hexadecimal strings: a mask can set bits above the safe-integer range,
where `JSON.parse` would round two different masks to one value.

The verification lane asserts the mask is inherited exactly when caller
and child share a group, and otherwise that the caller was unconstrained.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* docs(windows): record what owned-process affinity does not preserve

A mask covering its group's whole active set does not distinguish a
caller the system placed in that group from one that selected the group
deliberately, so an owned child can still be placed elsewhere with its
processor count bounded and its group placement lost. Treating that case
as constrained instead is not available: on a multi-group host an
ordinary process is assigned a group by the system and its mask is that
group's active set, so refusing it would fail every owned spawn there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-10-13 14:49:34 +08:00
..
.vitepress feat(fiddler): inspect native SAZ captures 2026-10-13 02:51:14 +00:00
assets docs: keep license sections text-only 2026-10-10 00:09:46 +08:00
releases chore(main): release rea-agents 6.4.0 (#1399) 2026-10-11 11:57:29 +08:00
adb-device-analysis.md fix: align MCP archive contracts and documentation (#2478) 2026-10-13 12:06:41 +08:00
android-analysis.md feat(android): add opt-in package summaries and retained manifest views 2026-10-13 10:21:53 +08:00
apktool-resource-analysis.md fix(apktool): run Windows batch launchers through cmd.exe (#1777) 2026-10-11 17:16:48 +08:00
apple-application-analysis.md fix(apple): limit already-loaded reuse to rpath dependencies (#2292) 2026-10-13 14:40:43 +08:00
architecture.mermaid refactor(evm): bind offline analysis through a static descriptor 2026-10-13 01:26:43 +08:00
binary-diagnostics.md docs: correct drift and reorganize English guides (#2207) 2026-10-12 22:14:25 +08:00
browser-observation.md feat(fiddler): inspect native SAZ captures 2026-10-13 02:51:14 +00:00
browser-scenario-contract.md fix(browser): report mismatched event family selection as unknown in capture comparison (#2239) 2026-10-13 02:36:45 +08:00
cli.md fix(reference): report sloppy scripts, PHP, C# and enclosing Git facts (#1770) 2026-10-13 05:52:27 +09:00
client-configuration.md fix: align MCP archive contracts and documentation (#2478) 2026-10-13 12:06:41 +08:00
client-verification.md test(hopper): repair Linux demo setup and native verification (#2638) 2026-10-13 14:39:18 +08:00
electron-observation.md fix(electron): support packaged app.asar pages and rewritten unpacked companions (#1400) 2026-10-10 23:01:54 +08:00
error-contract.schema.json feat(evm): inspect offline bytecode interfaces through EVMole (#1051) 2026-10-08 15:32:05 +08:00
evm-bytecode.md feat(evm): add retained interface summary delivery (#2308) 2026-10-13 03:09:32 +08:00
firmware-analysis.md feat(ghidra): admit RISC-V ELF analysis through a pinned generic lane (#2151) 2026-10-13 00:11:35 +08:00
flutter-analysis.md perf(flutter): add opt-in retained AOT summary and string pages 2026-10-13 11:39:30 +08:00
frida-instrumentation.md feat: add Frida instrumentation support (#1359) 2026-10-12 22:01:58 +08:00
ghidra-dos.md docs: correct drift and reorganize English guides (#2207) 2026-10-12 22:14:25 +08:00
ghidra-mips.md test(ghidra): require pending multi-HI16 coverage in the real MIPS relocatable lane (#1974) 2026-10-12 08:42:08 +08:00
ghidra-nativeaot.md feat(ghidra): inspect NativeAOT PE metadata read-only 2026-10-11 10:31:49 +08:00
ghidra-provider.md feat(ghidra): inspect NativeAOT PE metadata read-only 2026-10-11 10:31:49 +08:00
ghidra-psp.md feat(ghidra): admit bounded PSP ELF through installed Allegrex (#1599) 2026-10-11 19:47:33 +08:00
ghidra-riscv.md fix: align MCP archive contracts and documentation (#2478) 2026-10-13 12:06:41 +08:00
go-binaries.md feat(go): inspect embedded binary build metadata (#1363) 2026-10-12 11:34:02 +08:00
harmony-analysis.md feat(harmony): project HarmonyOS package inventory evidence (#1447) 2026-10-11 20:09:21 +08:00
ida-provider.md fix(ida): preserve native coverage and verify returned values (#2324) 2026-10-13 08:44:18 +08:00
index.md docs: correct drift and reorganize English guides (#2207) 2026-10-12 22:14:25 +08:00
installation.md fix(hopper): stop Linux demo children when the REA owner exits (#2499) 2026-10-13 12:59:22 +08:00
javascript-application-graph.md docs(contracts)!: explain canonical URL and skill metadata ownership 2026-10-10 02:49:46 +08:00
javascript-application-workflows.md fix(javascript): share source-map resolution and preserve path uncertainty 2026-10-13 13:48:24 +08:00
javascript-artifact-reconstruction.md docs: correct drift and reorganize English guides (#2207) 2026-10-12 22:14:25 +08:00
javascript-recovery.md feat(javascript): recover code-split bundles from multiple inputs (#1686) 2026-10-11 18:39:49 +08:00
javascript-runtime-observation.md fix(runtime)!: preserve unknown debugger attachment state 2026-10-12 12:37:00 +08:00
javascript-runtime-reconciliation.md fix: align MCP archive contracts and documentation (#2478) 2026-10-13 12:06:41 +08:00
jeb-analysis.md feat(jeb): add JEB engine provider over its MCP interface (#1536) 2026-10-10 23:03:27 +08:00
managed-code-analysis.md fix: align MCP archive contracts and documentation (#2478) 2026-10-13 12:06:41 +08:00
mcp-contracts.md fix(evidence): reject unsupported metadata before authentication 2026-10-13 13:00:39 +08:00
mcp-prompts.md docs: correct drift and reorganize English guides (#2207) 2026-10-12 22:14:25 +08:00
migration-6.2.md docs: correct MCP error and capture import guidance 2026-10-10 05:41:52 +08:00
native-investigation.md docs: preserve the native guide title anchor (#2224) 2026-10-12 23:09:11 +08:00
packet-captures.md feat(fiddler): inspect native SAZ captures 2026-10-13 02:51:14 +00:00
pcap-analysis.md feat(pcap): add bounded capture summaries through CLI and MCP 2026-10-13 04:53:03 +00:00
process-capture.md fix(process): add an opt-in Swift module cache (#2252) 2026-10-13 02:26:16 +08:00
raw-binary.md fix: align MCP archive contracts and documentation (#2478) 2026-10-13 12:06:41 +08:00
reconstruction-obligation-ledgers.md refactor: return complete analysis results inline 2026-09-29 08:07:24 +08:00
reconstruction-readiness.md docs(readiness): align required stage identifier and checks with evaluator (#2200) 2026-10-13 00:15:54 +08:00
recorded-crashes.md feat(native): inspect recorded crashes through pwntools and pwndbg (#1054) 2026-10-08 16:50:31 +08:00
releasing.md fix: align MCP archive contracts and documentation (#2478) 2026-10-13 12:06:41 +08:00
roadmap.md docs: remove retired architecture and migration artifacts 2026-10-10 05:41:45 +08:00
signal-recordings.md feat(signals): decode recordings with bounded sigrok output (#2339) 2026-10-12 20:59:02 +00:00
sqlite-databases.md feat(sqlite): inspect offline snapshots with selective evidence (#2271) 2026-10-12 18:33:23 +00:00
testing.md feat(pcap): add bounded capture summaries through CLI and MCP 2026-10-13 04:53:03 +00:00
tool-design.md docs: define performance priorities for analysis workflows (#2245) 2026-10-13 00:42:06 +08:00
user-visible-errors.csv fix(scripts, install): honor test:fast "without build" promise and orient Node.js engine mismatches (#2026) 2026-10-12 13:54:57 +08:00
wasm-artifacts.md docs: correct drift and reorganize English guides (#2207) 2026-10-12 22:14:25 +08:00
web-network-captures.md feat(browser): inspect retained aioquic qlog JSON captures 2026-10-13 03:24:05 +00:00
web-runtime.md fix(browser): treat module-import initiator positions as script positions 2026-10-08 16:44:25 +00:00
web-source-location.md fix(bun): report the real runtime and enforce worker memory budgets on Windows (#1730) 2026-10-11 19:20:00 +08:00
website-module-trace.md feat(browser): trace captured website module imports (#879) 2026-10-07 14:59:52 +08:00
website-script-export.md fix(browser): preserve body API provenance through script export 2026-10-12 14:12:19 +08:00
windows-ghidra-p0.md fix(windows): preserve caller affinity only within one processor group (#2202) 2026-10-13 14:49:34 +08:00