Commit Graph
8861 Commits
Author SHA1 Message Date
morluto e1e24543e4 test: prove retained facts and remove preinstall source greps 2026-11-19 22:12:19 -05:00
morluto 6bb2ad90ac test: harden verifier assertions and prune duplicate checks 2026-11-19 22:09:03 -05:00
morluto f3734d90e7 test(ci): repair stale coverage expectations on main 2026-11-19 22:09:03 -05:00
RRFZ af0d9ed45a test(uninstall): cover Windows purge without POSIX cache assumptions (#12696) 2026-11-19 22:04:23 -05:00
d9df0f9ca2 perf(javascript): allocate nested evaluation contexts with fixed shapes (#9007)
nestedContext builds one EvaluationContext per recursive expression step. A conditional object spread forces V8 through the generic property-copy path even when the spread adds no fields, and prevents a stable shape. It was the top self-time frame (25.4%) in a profile of semantic indexing.

Use two explicit object literals selected by capturePoint, keeping the same field set, order, values and optionality. Completed analyses are byte-identical across 12 representative sources (36 IR/facts/coverage digests), and member-mutation indexing is 1.47-1.65x faster on the profiled alias-chain workload.

Co-authored-by: Zhenyang Han <mshzy@users.noreply.github.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 22:01:02 -05:00
morluto 34f3682afd docs: apply agent brittleness guidance across the codebase 2026-11-19 21:48:29 -05:00
morluto ba01214063 docs: keep parser brittleness rules explicit in agent guidance 2026-11-19 21:47:52 -05:00
morluto 32753c1b24 docs: consolidate repository agent guidance 2026-11-19 21:47:05 -05:00
morluto 88f885a2f3 docs(development): clarify parser boundary review criteria (#12713) 2026-11-19 21:46:18 -05:00
morluto 6cab415894 fix(desktop): validate group padding before hidden ID masking (#12708)
* fix(desktop): validate group padding before hidden ID masking

* test(desktop): compact group padding overrides
2026-11-20 02:44:32 +00: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 c0ee832a30 fix(javascript): honor outer lexical order through standalone blocks (#12701)
fix(javascript): carry lexical timing through standalone blocks
2026-11-19 21:24:20 -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 ed96765d11 refactor(macho): share unsigned dispatch metadata reads (#12668) 2026-11-20 02:17:09 +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 870f9b7432 fix(desktop): refuse malformed hidden application overrides (#12686)
* fix(desktop): require structure before masking an application by ID

* fix(desktop): record invalid group names in hidden overrides
2026-11-20 02:16:49 +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 60707abd94 fix(desktop): preserve APT one-line source token boundaries (#12692)
fix(desktop): honor APT one-line separators and comments
2026-11-20 02:15:18 +00:00
morluto ddd31b0289 fix(javascript): preserve uncertainty before lexical initialization (#12682)
* fix(javascript): preserve uncertainty before lexical initialization

* fix(javascript): respect lexical declarator initialization order
2026-11-20 02:13:04 +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 d7269f7385 fix(desktop): respect APT ASCII source field separators (#12680) 2026-11-20 02:05:53 +00:00
morluto acd967c58a fix(elf): report the enforced kernel build config parser limit (#12679) 2026-11-20 02:02:48 +00:00
morluto 0fcbfe83dc fix(elf): retain readable build IDs beside compressed notes (#12674) 2026-11-20 02:02:45 +00:00
RRFZ 460517d1b7 fix(desktop): honor hidden application overrides during ID lookup (#12675)
* fix(desktop): honor hidden application overrides during ID lookup

* test(desktop): preserve refusal details for invalid user overrides
2026-11-19 21:02:24 -05: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 a5f19cbaf6 fix(javascript): preserve uncertainty after immutable pattern targets (#12673)
* fix(javascript): preserve uncertainty after immutable pattern targets

* fix(javascript): retain self-name assignment rules in patterns
2026-11-20 02:01:05 +00:00
morluto 2c7c858c5a refactor(native): share mapped ELF and FAT scalar readers (#12631) 2026-11-20 01:59:55 +00:00
morluto bd887a96be refactor(apk): project signing block pair limits from the parser (#12670)
* refactor(apk): project the signing-block pair limit from the parser

* test(apk): compare the pair refusal with the parser-owned reason
2026-11-20 01:58:07 +00:00
morlutoandCursor Agent 976edd68e7 docs(agents): state limit, test, verifier and feature-record conventions and list PR title types (#12652)
* docs(agents): state limit, test, verifier and feature-record conventions

Record ceiling, runtime-setting, assertion, verifier, and feature-record
rules for agents, and make the pull request title pattern explicit.

* docs(agents): defer limit controls to their owning guide

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-19 20:56:20 -05:00
morluto 0ab693fe81 fix(maven): match declarations in the project namespace (#12672) 2026-11-20 01:54:59 +00:00
RRFZandmorluto 070d6420ec test(platform): skip POSIX host-path premises on Windows (#12664)
* test(platform): skip POSIX host-path premises on Windows

* test(inspector): retain Windows target listing coverage

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-11-19 20:53:15 -05:00
RRFZ 25f6adffdc test(setup): keep literal Hermes profiles distinct from named homes (#12658) 2026-11-19 20:52:32 -05:00
morluto a3df11ebf5 refactor(apk): project the v1 directory entry limit from the parser (#12665)
* refactor(apk): project the v1 directory entry limit from the parser

* test(apk): compare v1 refusal with the parser-owned reason
2026-11-20 01:51:02 +00:00
morlutoandCursor Agent e21efd7664 fix(limits): drop never-landed limits from the numeric-limit verifier (#12669)
REQUIRED_RUNTIME_LIMITS still named three limits whose PRs never merged.
The checker skipped a required name absent from source, so the stale
entries passed. Remove them and fail that case with a typed result that
names the limit.

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-20 01:50:02 +00:00
morluto e7ea60ace1 fix(deno): retain valid specifiers beside undecodable rows (#12667) 2026-11-20 01:49:51 +00:00
morluto 13613a0476 docs: group guides by task and consolidate verification links 2026-11-19 20:47:23 -05:00
morluto 46943787cb fix(macho): require exact legacy minimum-version command size (#12666) 2026-11-20 01:47:07 +00:00
RRFZ 308a5b2f06 test(providers): give Windows a drive-rooted configured launcher (#12626)
* test(apktool): give Windows a drive-rooted authored launcher

The apktool unit and CLI boundary tests configure REA_APKTOOL_COMMAND
as /authored/apktool, /opt/apktool/apktool or /nonexistent/apktool.
On win32 hosts REA admits a configured launcher only when it is drive-
or UNC-rooted, so 17 cases there failed with the absolute-path refusal
before reaching the behavior they test. On Windows they now use the
same paths under C:\; other hosts keep the original strings.

* test(adb): give Windows a drive-rooted missing adb in the CLI refusals

The two "/nonexistent/adb names the host requirement" cases hit the
same win32 absolute-path refusal as the apktool launcher cases before
reaching the not-found check. On Windows they now use C:\nonexistent\adb.
2026-11-19 20:47:04 -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
morluto fd2bc88d53 fix(javascript): retain effects only from reachable first defaults (#12659) 2026-11-20 01:40:30 +00:00