Commit Graph
2831 Commits
Author SHA1 Message Date
gensokyo-devandgensokyo-dev 4a6fa19379 docs(install): link Windows native build steps from a source checkout
npm ci and npm run build:cached leave the Windows addon and manifest
unbuilt; point checkout readers at the contributor guide's extra step.

Fixes #10317

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-21 19:00:27 +01:00
gensokyo-devandgensokyo-dev 4bd9327325 docs(cli): list the desktop_build doctor scope in provider selection
DOCTOR_PROVIDER_IDS accepts desktop_build alongside the five engines,
but the CLI guide implied that only engines are accepted.

Fixes #10251

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-21 19:00:27 +01:00
gensokyo-devandgensokyo-dev c0af3e293c docs(install): describe setup's direct-launch MCP registrations
The setup summary still said setup pins package-runner registrations to
the installed version. Setup records the absolute runtime and entry
script instead, as the guide's MCP Registry section already explains.

Fixes #10252

Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-21 19:00:27 +01:00
morluto ba31a11180 feat(website): recognize contributors in a shared commit-ranked directory 2026-11-21 09:17:40 -05:00
morluto 08880c3542 docs(readme): link contributor avatars to the contributor directory 2026-11-21 08:54:23 -05:00
morluto d2a8b8d3d6 fix(docs): align translated READMEs and verify catalog links 2026-11-21 08:46:58 -05:00
morluto a914bba78d docs(readme): simplify setup and move target details to the reference 2026-11-21 08:27:39 -05:00
morluto c7bc7436b4 docs(readme): refresh project badges 2026-11-21 08:20:17 -05:00
Kaoru0822 4aed56eccb fix(verify): require confirmed DeepSeek process cleanup (#13043)
* test(verify): reproduce false passes with incomplete DeepSeek lineage

* fix(verify): require confirmed DeepSeek process cleanup
2026-11-21 00:48:12 -08:00
Kaoru0822 baad68f437 docs(mcp): clarify DeepSeek catalog refresh compatibility (#13041)
* docs(mcp): describe the DeepSeek in-task refresh limit

* test(setup): preserve DeepSeek catalog profile choices
2026-11-21 00:47:50 -08:00
Kaoru0822 8f2b865c06 perf(mcp): reduce deferred catalog startup data (#13039)
* perf(mcp): trim deferrable result schema storage

* test(mcp): guard the deferred catalog output projection

* test(mcp): validate hardening against the canonical output schema
2026-11-21 00:47:31 -08:00
Kaoru0822 42a34f8a7f fix(verify): cancel owned DeepSeek Harness commands (#13035)
* test(verify): reproduce detached DeepSeek client interruptions

* fix(verify): clean up owned DeepSeek commands on interruption

* refactor(verify): bind interruption at DeepSeek command acquisition

* fix(verify): retain late cancellation through receipt publication
2026-11-21 00:47:04 -08:00
Kaoru0822 9b1631a1d7 fix(verify): require DeepSeek Harness terminal JSON (#13034)
* test(verify): cover DeepSeek final transcript false positives

* fix(verify): validate DeepSeek terminal JSON independently of exit
2026-11-21 00:46:30 -08:00
morluto 2533a8b32b fix(electron): preserve waits and cancellation through renderer shutdown (#12972)
* fix(electron): preserve scenario waits through renderer crashes

* fix(electron): retain action cancellation across final Inspector failure

* fix(electron): collect active state in a single Inspector call
2026-11-21 03:08:49 +00:00
6822ebe1f3 feat(ida): support the official Hex-Rays IDA MCP headlessly (#4813)
* feat(ida): support the official Hex-Rays IDA MCP headlessly

Hex-Rays IDA MCP serves database reads only through execute_python, so
REA rejected it as an upstream. A `hexrays` headless stdio registration
now leases a private idalib worker through open_database, answers the
existing database-supervisor reads with a fixed, packaged, read-only
query module, and releases the lease with close_database, verified by
list_databases.

Observations record execute_python, the query and the module digest.
Tool errors are typed so a completed rejection is distinguished from an
unknown outcome; an unconfirmed release is retried and a late lease on
the private input is adopted.

Validated IDA source and bridge tests, static checks, docs, and npm run
verify:ida on Linux x64 against x86-64 and AArch64 ELF fixtures.

* feat(ida): name the Hex-Rays registration for its catalog

A registration without `protocol` that reaches the official Hex-Rays
server failed with only the missing database-supervisor tools. Startup
profile failures now report the advertised catalog, and when it is the
Hex-Rays one the message and recovery name the `hexrays` registration.

Refs #1416

* docs(ida): state Hex-Rays prerequisites and upstream session traces

Upstream needs IDA 9.4 or later with idalib, Python 3.11 or later, uv
and Git. The profile does not analyze databases open in the IDA GUI, and
the server keeps its own session traces outside REA's workspace.

Refs #1416

* fix(ida): skip inline data when scanning Hex-Rays calls

The call scan decoded every head that FuncItems yields. Inline data such
as a jump table can decode as a call and refer to a function or import,
which reported false callees and call-graph edges. Skip non-code heads
before decoding, as disassembly already does.

Refs #1416

* fix(ida): retain Hex-Rays health reads in evidence

The identity and readiness reads around each operation kept only their
parsed result, dropping the bridge digest and any engine output. Keep
them whole as health_observations beside the parsed metadata, in both
successful and partial-failure Evidence.

Refs #1416

* test(ida): list the Hex-Rays bridge in package fixtures

The packed-bridge verifier has required bridge/ida/hexrays_queries.py
since the Hex-Rays profile landed, but three package tests still built
their member lists without it. The verifier stopped at that file, so 21
cases failed or asserted on the wrong omission.

Refs #1416

* feat(ida): open existing IDA databases through the Hex-Rays profile

A headless open re-ran auto-analysis from the input binary, discarding
the names, types and comments of an existing database and taking far
longer on large targets. Target admission now identifies IDA databases
by their IDA1/IDA2 signature, and the hexrays profile opens a private
copy of one; Hopper and the other IDA profiles reject them.

The copy is required, not incidental: idalib repacks a database when
its last lease is released, even without a save. A database reports
the input it was created from, so the session is bound to the opened
copy's idb_path, and health now reports the input SHA-256 it records.

Validated with resolver, provider and session tests, check:fast,
docs:check and test:changed, plus a real Hex-Rays MCP run against a
1.4 GB SC2 .i64 whose original file was left byte-identical.

Refs #1416

* fix(ida): verify the private workspace of a database target by idb_path

* test(ida): fix Hex-Rays health stand-ins and Windows path and runtime teardown

* refactor(ida): resolve the registration once for target support

* docs(ida): record the real Hex-Rays run on an existing .i64

* docs(ida): make the Hex-Rays registration example install-neutral

* chore: keep merge-hook formatting outside the IDA change

* fix(ida): retain live Hex-Rays databases this server does not lease

A list_databases row with instance_id null is a live owner, not a stopped
database. Mapping it to the supervisor's released-worker shape made cleanup
delete files another client still held. Unleased rows stay active, so the
private path must leave inventory before the workspace is removed.

Accept idat inventory rows, hash the query bridge with sha256Hex, and
complete databaseEngine on Hopper fixtures added on main.

* fix(ida): report uncapped Hex-Rays call graphs

* docs(ida): link to the Hex-Rays bridge on GitHub

* fix(ida): verify Hex-Rays worker identity and cleanup

* feat(ida): support Hex-Rays idat headless workers

Refs #12921

* fix(ida): retain workspace after ambiguous Hex-Rays startup

* fix(ida): preserve typed Hex-Rays call edges and deadlines

* test(ida): verify Hex-Rays cleanup with a peer lease

* test(ci): use project deadlines for the Cutter verifier

* test(ida): keep verifier cleanup fixtures scoped to mocked modules

* fix(ida): retain the worker backend in partial evidence

---------

Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-20 17:58:27 -05:00
morluto a1dec2d2d5 docs: remove tracked planning and architecture records (#12856) 2026-11-20 09:47:41 -05:00
morluto c7353f4257 test(artifacts): remove descriptor registry mirror checks (#12796) 2026-11-20 12:45:05 +00:00
morluto 8af645c25c test(v8): consolidate code cache parser and recovery coverage (#12784)
test(v8): consolidate code-cache parser and recovery coverage
2026-11-20 12:37:49 +00:00
morluto ad2b34ca9b ci(release): preserve unpublished versions and verify npm before tagging (#12770)
* ci(release): require full qualification before tagging

* ci(release): preserve unpublished versions and verify npm before tagging

* test(release): exercise publication gates on both release routes

* fix(release): fetch the live main checkpoint before verifying it

* fix(release): constrain GitHub requests and workflow output

* fix(release): honor GitHub label and recovery API contracts
2026-11-20 12:08:59 +00:00
github-actions[bot] 8bb01b514a chore(main): release rea-agents 6.10.1 (#12737)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-20 05:30:05 +00:00
github-actions[bot]andmorluto 6896563df0 chore(main): release rea-agents 6.10.0 (#10188)
* chore(main): release rea-agents 6.10.0

* style(release): format the 6.10.0 contribution inventory

* docs(release): clarify debugger launch-file identities

* docs(release): label migration links with PR numbers

* docs(release): clarify which trace response statuses stay unknown

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 23:57:55 -05:00
dc2c31e76d test(limits): check documented limit defaults against code instead of per-file pins (#12720)
* test(limits): check documented limit defaults against code instead of per-file pins

The numeric-limit script now reads every default, floor, and maximum in
docs/design/rea-limit-inventory.md and compares it with ANALYSIS_SETTINGS
or the owner constant the parser enforces. A mismatch names the limit and
both values. Pins that only restated a covered value are removed.

Pwntools input bytes and the Kuna timeouts now use the shared exports, so
the registry value is the one the parser applies.

* fix(limits): reject a fractional documented limit cell

The cell parser treated a dot as the end of the integer, so 5000.5
compared equal to 5000. A documented number is now one complete integer,
with prose only after whitespace.

Co-authored-by: morluto <morluto@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-11-19 23:05:07 -05:00
hhangandhhang e1218b0388 fix(java): preserve Maven POM version spelling (#12714)
Co-authored-by: hhang <169027046+xu91102@users.noreply.github.com>
2026-11-19 23:04:11 -05:00
morluto f3734d90e7 test(ci): repair stale coverage expectations on main 2026-11-19 22:09:03 -05:00
morluto 88f885a2f3 docs(development): clarify parser boundary review criteria (#12713) 2026-11-19 21:46:18 -05:00
morluto e53c1a17fc fix(gpu): validate standalone PTX encoding during discovery (#12707) 2026-11-19 21:44:06 -05:00
morluto 8fb9456019 docs(development): illustrate parser ownership through APT replay (#12712) 2026-11-19 21:42:49 -05:00
morluto b61006e114 fix(desktop): preserve effective APT one-line source identity (#12711)
Use the same APT word reader for positional fields and option assignments. Carry authored and effective repository facts through capture and replay.

Fixes #12694.
2026-11-19 21:42:39 -05:00
192934c5b1 fix(desktop): verify single-stanza APT source identity (#12363)
* fix(desktop): verify single-stanza APT source identity

* fix(desktop): verify single-stanza APT source identity

* fix(desktop): match APT suites using its configured architecture

* fix(desktop): match APT URI architecture templates

* fix(desktop): normalize empty APT URI ports

* test(desktop): regress empty-port APT repository identity

Assert entryForTarget and repository facts keep the authored empty-port URI while matching the portless Repo-URI APT 2.8.3 emits, including the signing key.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(desktop): parse APT port suffixes with atoi

Match deb822 Repo-URI identity to APT's unsigned port: the host's last colon suffix is atoi'd, zero is omitted, and IPv6 brackets stay intact while the authored URI is kept.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(desktop): accept GNU architecture names and bound port scans

Keep x86_64 as an APT architecture token for $(ARCH) identity, and stop growing a port magnitude once it passes the signed 64-bit limit.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(desktop): keep file:// as APT's empty-path Repo-URI

An empty host with no path stays scheme://, matching APT 2.8.3. A path after that host still drops it, so file:///srv remains file:/srv.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(desktop): normalize APT scheme:host URIs in one host pass

APT 2.8.3 rewrites http:127.0.0.1:18743/archive to an http:// Repo-URI. Identity comparison follows that form and keeps the authored URI. Bracket removal copies each host character once.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(desktop): replay the APT suite selected during capture

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-11-19 21:40:33 -05:00
8c7977f174 fix(native)!: require separate inspection for plists outside bundles (#9754)
* fix(native): record inspected plist bytes and refuse files outside the bundle

An open app session keeps the executable as the Evidence subject for
inspect_plist, same as the other bundle-resource tools, but the result had
no digest of the plist bytes and any absolute path was sealed under that
subject. Record source_sha256 for the bytes read, and refuse a selection
that resolves outside the opened bundle.

Fixes #9479

* fix(native)!: scope plist selection to the opened bundle

BREAKING CHANGE: To inspect a plist outside an opened app bundle or resource root, open the plist as a separate target.

* fix(native): report plist snapshot filesystem effects

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 21:35:17 -05:00
morluto 2245d25aaa fix(harmony): match manifests at exact archive root paths (#12700) 2026-11-19 21:22:18 -05:00
morluto ea26a4a46c fix(elf): retain mapped leading GNU symbol version slots (#12685)
* fix(elf): retain mapped leading GNU symbol version slots

* fix(elf): report short version tables during admission
2026-11-20 02:19:55 +00:00
morluto cf64e4ce3c fix(nuget): respect OPC part-name equivalence (#12691)
fix(nuget): preserve ambiguous OPC manifest identity
2026-11-20 02:16:52 +00:00
morluto 68604b7e95 fix(elf): distinguish exhausted string tables from capped scans (#12693)
fix(elf): distinguish exact string-table ends from scan limits
2026-11-20 02:15:34 +00:00
morluto 8b60f3f25f fix(nuget): reject invalid manifest relationship target modes (#12684)
fix(nuget): require an internal OPC manifest mode
2026-11-20 02:08:39 +00:00
morluto 0fcbfe83dc fix(elf): retain readable build IDs beside compressed notes (#12674) 2026-11-20 02:02:45 +00:00
morluto 9c95d0ded3 fix(gradle): preserve variant identity in metadata evidence (#12677)
* fix(gradle): preserve unique variant identity

* test(gradle): cover unnamed variants and whitespace identity
2026-11-20 02:01:27 +00:00
morluto c6f86cce57 fix(elf): preserve dynamic string diagnostic provenance (#12678)
* fix(elf): preserve DT_NEEDED diagnostic source offsets

* fix(elf): distinguish missing dynamic strings from invalid indices
2026-11-20 02:01:09 +00:00
morluto 0ab693fe81 fix(maven): match declarations in the project namespace (#12672) 2026-11-20 01:54:59 +00:00
morluto 13613a0476 docs: group guides by task and consolidate verification links 2026-11-19 20:47:23 -05:00
morlutoandCursor Agent 63029a8c8a docs(testing): document the supervised verifier command and run helpers (#12654)
Name the verifier command owner, run helpers, and cleanup order so new
verifier scripts do not start compilers, readers, or the REA CLI with bare
execFile.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-19 20:46:23 -05:00
morlutoandCursor Agent e5b91f60ef docs: correct a moved LZ4 path and a nonexistent script example (#12651)
Keep the audited-base citation of src/gpu/Lz4Block.ts and record the
current src/compression/Lz4Block.ts location. Point the obligation-ledger
verifier example at an existing MCP cancellation test.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-19 20:46:12 -05:00
d53f87d6d8 docs(specs): index unlisted feature records and define when a record is required (#12650)
List the six feature records missing from the spec index, drop the open
ReFS owner-review task now that admission is on main, and state when a
record is required.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-11-19 20:46:03 -05:00
morlutoandCursor Agent e532d746f0 docs(limits): refresh the limit inventory and state the runtime-setting rule (#12655)
* docs(limits): refresh the limit inventory and state the runtime-setting rule

Recompute the inventory from ANALYSIS_SETTINGS and the numeric-limit
check, and make a hardcoded limit a runtime setting unless a fixed
ceiling has a stated format, protocol, or representation reason.

* docs(limits): distinguish runtime settings from per-call overrides

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-20 01:43:07 +00:00
吴佳浩Albenandmorluto ea4baaf6de fix(v8): read the code cache header size from the container (#10279)
* fix(v8): read the code cache header size from the container

V8 sizes the header with `kHeaderSize = POINTER_SIZE_ALIGN(kUnalignedHeaderSize)` and
`kUnalignedHeaderSize` is 28, so the header is padded *after* its words: a 64-bit producer writes
32 header bytes and a 32-bit one writes 28. The reader pinned 32 and required the declared payload
to equal `bytes.length - 32`, so every container from a 32-bit producer failed as "truncated or
corrupt".

Measured here on Node 24.22.1 (V8 in x64): take a real cache and drop the four alignment bytes at
offset 28. V8 loads it unchanged — `cachedDataRejected === false` — while the reader refused it:

    before: Header declares a 392-byte payload but 388 bytes follow the 32-byte header
    after:  ACCEPT header_bytes=28 words=7 payload.offset=28

The payload-length word sits at byte 20 in both layouts, so the declared length already states how
much trailing padding the container carries. The header size is derived from it now: `28` and `32`
are admitted, the reported word table covers exactly the header the container holds (7 or 8 words),
and the schema requires that table to agree with `header_bytes`.

Nothing is loosened. A header that is neither 28 nor 32 bytes is still `malformed`, and the
16 existing cases pass unchanged — dropping only the derivation back to the constant fails exactly
the new narrow-header case.

`src/v8` — 26 passing. `npm run lint` and `tsc --noEmit` clean.

* fix(v8): refuse a wide cache that is only four bytes short

A review finding on the previous commit, and a real one: deriving the header size from the declared
payload length makes a 32-byte-header container truncated by four bytes resolve to 28, because
`bytes.length - declaredPayload` loses exactly those four bytes. The reader then accepted a
truncated cache and read its payload one word long.

The wide header's last word is `POINTER_SIZE_ALIGN` padding that V8 leaves zero, and a narrow
container has payload where that word sits. Measured on Node 24.22.1 across six different sources:
the padding word is always `0x00000000` and the first payload word is always non-zero. So the zero
word is the only evidence that separates the two, and it is now required to be non-zero for the
28-byte layout:

| container | before this commit | after |
| --- | --- | --- |
| real 32-byte header | accept | accept, `header_bytes=32` |
| real 28-byte header | accept | accept, `header_bytes=28` |
| 32-byte header truncated by 4 | **accept** | refused as `malformed` |

The guide also described one pinned 32-byte header; it now describes both layouts, how the size is
resolved, and why an ambiguous container is refused.

`src/v8` — 27 passing. Removing the guard accepts the truncated container again.

* fix(v8): read the padding word through the header accessor

A Static checks finding: `verify/architecture-guards.mjs` counts raw Buffer reads in parser folders
and allows only a shrinking baseline, and the previous commit added one:

```
raw Buffer or DataView numeric read (use BinaryReader ...); new copies are not allowed:
  src/v8/V8CodeCacheParser.ts: 2 (baseline 1)
```

The read is the narrow-header discriminator — the alignment word a 64-bit producer leaves zero at
offset 28. It now goes through the file's existing `field(index)` accessor instead of calling
`bytes.readUInt32LE` directly, so the count returns to the baseline while the check itself is
unchanged: `field(7)` is byte 28, and `V8_CODE_CACHE_NARROW_HEADER_BYTES / 4` spells that index.

`node scripts/verify/architecture-guards.mjs` — passed across 2 843 source files.
`src/v8` + `tests/boundary/rust` — 68 passing. `tsc --noEmit` 0 errors.
Setting the condition to `false` fails "refuses a wide container that is only four bytes short",
so the check is still load-bearing.

* fix(v8): ground the narrow-header rule in the producer, and test the word table

Two review findings.

**The rule was stated as measurement, not as format.** The previous comment justified the zero-word
discriminator with "measured on Node 24.22.1 every real payload begins with a non-zero word", which
makes support for other producers depend on one host. The producer zeroes that padding rather than
copying payload over it: `SerializedData::AllocateWithPayload` in `src/snapshot/snapshot-data.cc`
runs `std::fill_n(data_, header_size, 0)` before writing any header word, and
`kHeaderSize = POINTER_SIZE_ALIGN(kUnalignedHeaderSize)` in `src/snapshot/code-serializer.h` puts the
four padding bytes inside `header_size`. So a zero word at byte 28 is a fact about the producer, not
about one Node build.

The refusal is now worded as the reservation it is: a narrow container whose payload happened to
begin with four zero bytes would match the same test, and no reading of the header alone separates
the two cases. The message says both readings instead of asserting corruption.

**The word-table rule had no test that could fail.** `header.fields.length * 4 === header.header_bytes`
cannot disagree on a parsed container — the parser derives both from `payloadOffset` — so it is only
reachable through the schema, which is what a stored or projected report also goes through. The new
case builds four reports directly: seven words with 32 bytes and eight words with 28 are refused on
`header.fields`, while the two consistent pairs are accepted. Setting the rule to `false` fails it
with `7 words / 32 bytes: expected true to be false`.

`node scripts/verify/architecture-guards.mjs` — passed across 2 843 source files.
`src/v8` + `tests/boundary/rust` — 69 passing. `tsc --noEmit` 0 errors, `npm run lint` 0 errors.

* refactor(v8): share decoded code cache header words

* fix(v8): validate narrow header evidence without assuming runtime compatibility

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-20 01:41:01 +00:00
morlutoandCursor Agent e6ebfbecde docs(ghidra): label 12.1.x verification as history and point to the 12.2 baseline (#12656)
Recorded Ghidra 12.1.x runs are no longer the supported baseline. Mark those
results as history and link the supported Ghidra and JDK range to the
installation guide instead of restating it.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-19 20:34:52 -05:00
morluto ed336bd31c fix(ghidra): retain DOS images with order-dependent fixups (#12649) 2026-11-20 01:29:50 +00:00
3cfe8480c5 fix(elf): decode a 32-bit prpsinfo whose ABI gives pr_uid 32 bits (#10189)
* fix(elf): decode a 32-bit prpsinfo whose ABI gives pr_uid 32 bits

`decodeCorePrpsinfo` assumed every ELFCLASS32 core carries the i386/ARM `struct elf_prpsinfo`:
16-bit `pr_uid`/`pr_gid` and a 124-byte descriptor.

`pr_uid` is `__kernel_uid_t`, and its width is an ABI property, not an ELF-class one. Only
`arch/x86/include/uapi/asm/posix_types_32.h` and its ARM/m68k/sparc counterparts narrow it to
`unsigned short`; everything else takes `asm-generic/posix_types.h`'s `unsigned int`, so MIPS o32,
PowerPC-32, s390 and `compat_elf_prpsinfo` (`include/asm-generic/compat.h`:
`typedef u32 __compat_uid_t`) write a 128-byte struct with every member after `pr_flag` four bytes
later.

Reading a 128-byte descriptor with the 124-byte offsets published wrong values rather than null.
Measured through `parseElfNotes`, with `uid 70000, gid 80000, pid 4242, fname mips-proc`:

    before: {"pid":80000,"ppid":4242,"pgrp":1,"sid":4242,"uid":4464,"gid":1,
             "filename":"\u{10}","psargs":""}
    after:  {"pid":4242,"ppid":1,"pgrp":4242,"sid":4242,"uid":70000,"gid":80000,
             "filename":"mips-proc","psargs":"./mips-proc --serve"}

`pid` came out of the middle of `gid` and the two text fields came from the wrong offsets
entirely.

The kernel writes `sizeof(*psinfo)` as the descriptor — `fs/binfmt_elf.c`:
`fill_note(&info->psinfo, PRPSINFO, sizeof(*psinfo), psinfo)` — so the declared length already
carries the distinction and no machine table is needed. The 32-bit id width is now
`descriptor.length >= 128 ? 4 : 2`, and `pr_pid`/`pr_fname`/`pr_psargs` are derived from it. The
124-byte and 136-byte decodes are unchanged; the second new case pins that.

`src/native/elf` and `src/domain/native` — 535 passing. Forcing the 16-bit layout fails the new case.

* test(elf): produce the 32-bit prpsinfo layout from the shared note builder

Review finding: the regression hand-encoded a second NT_PRPSINFO layout while `corePrpsinfoNote` is
the repository's producer for this format, so nothing else could represent the MIPS/PowerPC/s390
ABI and the two encodings could drift.

`corePrpsinfoNote` takes `idWidth: 2 | 4` now. It allocates 124 or 128 bytes from it, writes
`pr_uid`/`pr_gid` at that width, and derives `pr_pid` through `pr_psargs` from `8 + idWidth * 2`
instead of the fixed 12/28/44 offsets. The option is ignored for a 64-bit image, whose layout is
fixed at 136.

Both new cases build their descriptor through the producer, so the test no longer carries offsets
the fixture does not know about.

* test(elf): drop the duplicate 124-byte prpsinfo case

The previous commit's rewrite left the original hand-built 124-byte block in place, so the same
regression ran twice — once through `corePrpsinfoNote`, once with the offsets written out again.
Keeping both is exactly the drift the shared producer was supposed to end.

* fix(elf): preserve SuperH PRPSINFO decoding

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
Co-authored-by: wunianze666-netizen <wunianze666@gmail.com>
2026-11-20 01:23:27 +00:00
morluto 78fdc7ecf7 fix(gradle): disclose unfamiliar metadata revisions (#12648) 2026-11-20 01:22:36 +00:00
morluto d68f6207cd fix(nuget): recognize license types case-insensitively (#12643) 2026-11-20 01:20:01 +00:00