Commit Graph
7843 Commits
Author SHA1 Message Date
morluto f82e2eb693 fix(verify): give the macOS checkpoints lane a fixture whose DWARF Ghidra can read (#11216) 2026-11-16 00:19:07 +08:00
morlutoandPhon 3fb17d72a9 fix(desktop): admit build export folders before running the in-computer export (#11307)
* fix(desktop): output-directory admission agrees with SafeOutputTree for #9291

* fix(desktop): admit build export and witness folders through planOutputTree

Main now owns new-or-empty folder admission in planOutputTree, so the
separate admitNewOrEmptyOutputDirectory check is superseded. Keep the
remaining parts of #9291 on that owner:

- export_build_environment plans the caller's directory before running
  export-desktop-application in the build computer.
- planOutputTree refuses a folder, or the nearest existing ancestor of an
  absent one, that the host cannot write, so check_build_task refuses it at
  the seed instead of after the recording ends.
- writeOutputTree creates missing parents through SafeOutputTree's
  createParents, which maps a file or denied parent to a destination
  refusal, instead of a raw mkdir before admission.

Restore main's withheld-copy test, which this design leaves unchanged.

* fix(desktop): require a readable parent where publication syncs it

SafeOutputTree.commit opens the output folder's parent read-only to sync
it, so a write-only parent passed admission and failed only at
publication. planOutputTree now also requires read access on that parent
when it already exists.

---------

Co-authored-by: Phon <twilyt1@proton.me>
2026-11-16 00:18:11 +08:00
morlutoandjianghh 6a5121363c perf(cli): answer a standalone --version without loading the command registry (#11312)
A plain `rea --version` reached loadCliRuntime with no command name, so
selectCliRegistration returned undefined and the complete CLI, with every
registrar and its schemas, loaded only for Incur to print the version.
selectCliRegistrations now returns the registrars an invocation needs:
none for a standalone --version, one for a recorded command, and
undefined when the complete CLI must answer. Combined flags, help and
shell completion keep the complete CLI.

Ported from #4083 onto main's lazy registration loader.

Co-authored-by: jianghh <3232826884@qq.com>
2026-11-16 00:17:39 +08:00
morluto e313654f81 test(verify): copy the ADB and Ghidra bridge-source verifiers with their import closure (#11314) 2026-11-16 00:17:15 +08:00
morluto 76c71f0dbd refactor(verify): keep each counted guard's baseline in its own file (#11316)
Every counted-baseline change edited scripts/verify/architecture-guard-baselines.json, so PRs touching unrelated guards conflicted there. Each guard now keeps its baseline in scripts/verify/baselines/<guard-key>.json with paths sorted by code unit; --shrink-baselines rewrites, and deletes a guard's file when its last count is removed, and the guard rejects unsorted files and files that name no counted guard.
2026-11-15 11:14:59 -05:00
morluto fdf856ab84 refactor(verify): give the native verifiers' roots to VerifierFixture (#11180)
* refactor(verify): give the native verifiers' roots to VerifierFixture

* fix(verify): report every nested JEB cleanup failure reason

* test(verify): give the isolated ADB verifier runs the fixture owner it now imports
2026-11-16 00:06:34 +08:00
morluto 0f53849160 feat(javascript): make the member-mutation work allowance a runtime setting (#11181)
* feat(javascript): make the member-mutation work allowance a runtime setting

The member-mutation alias-state allowance from #11144 was a fixed constant, so a refused source could not be admitted without a code change.

Register javascript.member_mutation_alias_states (default 524288, 1 to 8388608 alias states) with the launch seed REA_JAVASCRIPT_MEMBER_MUTATION_ALIAS_STATES. The application, web bundle and reference-source boundaries resolve it from the accepted operation snapshot and launch environment, refuse a malformed seed before analysis, and send it to the workers with each source. A refusal names the setting, its effective value, source and range, and the recovery; worker parents rebuild it from the allowance they sent.

Refs #8294

* fix(javascript): keep the setting and recovery of a refused web script

A web bundle script refused by the member-mutation allowance kept only its reason and reported limits, so the public unknown lost the setting, value, source and recovery. Carry the refusal's structured limit and remediation on the per-script result and its javascript_analysis unknown, grouping scripts only when that recovery agrees. Assert structured limit facts and the owning formatter's recovery instead of fixed wording.

* fix(browser): keep only registered setting limits on a refused web script

* feat(javascript): keep syntax facts for a source whose member-mutation phase is refused (#11187)

* feat(javascript): keep syntax facts for a source whose member-mutation phase is refused

A source refused by the member-mutation work allowance during static analysis lost every fact, so the application graph counted it as skipped. Reference-source import failed outright on such a file.

Checkpoint the parser, comment and text facts the static owner can still state, with parse status partial, examination not-examined and refused_phase member-mutations, before reporting the refusal; the semantic phase is not started because it indexes the same mutations. Reference-source import keeps the file's declaration-level imports and records that its CommonJS require calls were not examined.

Refs #8294

* test(javascript): compare the reference-source refusal with its owning formatter

* feat(javascript): keep a refused web script's parse and text facts

A captured script whose member-mutation phase was refused lost every fact in analyze_web_bundle, so it was neither counted as parsed nor kept its vendor markers.

The analyzer now returns the script as unavailable with partial facts: refused phase, parse status and the inferences read from script text alone. Findings gathered before the refusal are dropped, because they may have read an incomplete mutation index. The worker parent states the refusal and its setting recovery from the allowance it sent, through the same helper the isolated analyzer uses for every unavailable script. The bundle counts the script as parsed, keeps its text inferences, and its javascript_analysis unknown carries refused_phase.

Refs #8294

* chore(mcp): record the member-mutation setting in the advertised summary

* fix(javascript): rebuild a parked source worker when the member-mutation allowance changes

A worker parked on a resource scope was reused when heap, timeout and precision matched, but its requests carry the allowance it was built with. After update_analysis_settings accepted a new allowance, the next analysis on that scope kept the old one.

The reuse check now compares the allowance's value and source, so a changed setting gets a worker built with it. The web bundle worker already takes the allowance per script.
2026-11-16 00:05:14 +08:00
morluto 94c260017a refactor(verify): give the remaining verifiers' roots to VerifierFixture (#11184)
* refactor(verify): give the remaining verifiers' roots to VerifierFixture

* fix(verify): let the loader-relocation supervisor dispose itself so a retried stop can observe its exit

* test(verify): give the isolated bridge-sources and packaged-wasm runs the fixture owner they now import

* test(verify): observe the Bun and Go verifier roots where VerifierFixture loads them
2026-11-16 00:04:05 +08:00
morluto c56fffcd75 docs(javascript): record pushed effect invalidation for semantic reads (#11188)
* docs(javascript): record pushed effect invalidation for semantic reads

Record the decision that recorded member effects and eval rebinding invalidate reads through one effect log owner instead of 32 reader-side checks, with the slice order, per-slice corpus measurement and stop conditions.

* docs(javascript): require invalidation to reach dependent cached values

* docs(javascript): record the rejected global-reference fold and its measurements

* docs(adr): record per-target cache invalidation as measured and declined
2026-11-16 00:03:09 +08:00
morluto e09bbcaf5f refactor: report NativeAOT, Interface Builder and owned-MCP output limits through the shared limit owners (#11194)
* refactor: report NativeAOT, Interface Builder and owned-MCP output limits through the shared limit owners

* refactor(errors): carry a parser's required value on its limit reference and in adjustable-budget refusals (#11201)

* fix(android): keep the JADX output-limit refusal's retained process output

* refactor(native): name PE and native-export allowances in the BinaryResourceFailure limit (#11253)

PeImportLimitFailure, PeLoadConfigLimitFailure and NativeExportLimitFailure kept a parallel `limit` field beside the LimitRef their BinaryResourceFailure base already carries (named only "structure"). The allowance name now lives in the LimitRef, consumers read it with binaryResourceAllowance against the parser's exported allowance list, and the three subclasses are removed. The local-limit-error-class guard also counts limit subclasses of BinaryResourceFailure.
2026-11-16 00:02:47 +08:00
morluto f7706a199c fix(verify): recognize the ownership ps inventory from the process owner's arguments (#11291)
* fix(verify): recognize the ownership ps inventory from the process owner's arguments

* fix(verify): match the recorded-crash ps inventory against REA's fixed ps locations
2026-11-16 00:01:18 +08:00
morluto 90ce8bae4a fix(javascript): report version-comparison coverage unknown when a source graph cannot tell (#11206)
* fix(javascript): report version-comparison coverage unknown when a source graph cannot tell

* refactor(javascript): name the unavailable-graph coverage mapping once

* fix(javascript): give the version change graph and its edges the same unknown coverage

* fix(javascript): report export-shape comparison coverage unknown when a source graph cannot tell (#11218)

* fix(javascript): report export-shape comparison coverage unknown when a source graph cannot tell

* test(javascript): keep unknown export-shape coverage beside a truncated projection

* fix(javascript): read runtime-reconciliation input coverage once and report unknown when a static graph cannot tell (#11230)

* fix(javascript): read runtime-reconciliation input coverage once and report unknown when a static graph cannot tell

* fix(javascript): keep a known input truncation beside unknown reconciliation coverage

* fix(javascript): report export-shape source omission counts unknown when a side has no projection (#11261)

compare_export_shapes reported left/right_omitted_fields and omitted_property_coverage as 0 for a side whose export selection recovered no return-shape projection (missing, ambiguous or unavailable), while the sibling source_omitted_variants already reported null. Add Known<T> (src/domain/known.ts) and read each side's source coverage once through it; the counts are now null (unknown) with a limitation naming why. The runtime-reconciliation graph's omission sum and its parallel 'omissions known' flag become one Known<number> via sumKnownCounts (no output change).
2026-11-15 23:59:23 +08:00
morluto 8b7829e385 fix(verify): run the native-calls hardened-runtime check in the artifact CLI environment (#11236)
* fix(verify): run the native-calls hardened-runtime check in the artifact CLI environment

* fix(verify): give the native-calls get-task-allow copy its dSYM
2026-11-15 23:58:09 +08:00
morluto 6ec19b4b01 fix(wasm): report interface comparison coverage unknown when either side has no interface facts (#11243) 2026-11-15 23:57:29 +08:00
morluto dac48a1783 test(lifecycle): share late-handshake, final-cleanup cancellation and cleanup-retry controls (#11245)
* test(lifecycle): share late-handshake, final-cleanup cancellation and cleanup-retry controls

* test(lifecycle): move seven hand-rolled phase gates onto the lifecycle harness (#11289)
2026-11-15 23:56:46 +08:00
morluto 067f4ff98b fix(managed): report comparison and native-verification coverage unknown when an input cannot tell (#11257)
compare_managed_members reported partial when a side's member inspection was unavailable or when selected-scope agreement could not be established, and verify_managed_native_boundaries reported partial when the boundary inspection was unavailable. Both now fold their inputs with joinCoverageStatus, so unknown wins beside a known gap. The status enums gain unknown (additive).
2026-11-15 23:56:18 +08:00
morluto 7aea9843bc refactor(mcp): register service-backed tools through one contract binding loop (#11264)
* refactor(mcp): register service-backed tools through one contract binding loop

registerContractTools registers every bound contract from the registry through the shared Evidence or retained-summary handler its binding selects, and refuses a binding that names no registered contract. createServer declares the bindings by exact contract name; 41 per-tool register files are deleted.

* refactor(mcp): bind service-backed tools from one shared table and make each binding select one handler

serviceToolBindings owns the binding of every service-backed contract, keyed by its service; createServer and the MCP tests bind from it, so tests exercise the production handler kind, admission and dependencies. A binding can no longer carry both run and summary. The Go real-binary workflow follows the new registration owners.

* test(mcp): assert binding exclusivity with type-level checks that hold under every checker
2026-11-15 23:55:31 +08:00
morluto b41fe5a238 fix(release-exposure): count scan limitations past the cap instead of dropping them silently (#11267)
inspect_release_exposure kept the first eight scan limitations and dropped the rest with no count, at the collector and at two merge points that prepend a reason. Add boundedList/BoundedListCollector (src/domain/boundedList.ts), which always carry the omitted count, and report it as a 'limitations' coverage.omitted entry. A counted constant-maximum-slice guard keeps new .slice(0, MAX) copies from appearing outside the owner.
2026-11-15 23:54:42 +08:00
morluto 500c1f46b1 refactor(mcp): derive every advertised tool through one owner (#11268)
* refactor(mcp): derive every advertised tool through one owner

The server's registration and tools/list rewrite, catalog identity and the
Copilot verifier each assembled the advertised description, input and
output schema themselves. src/contracts/advertisedTool.ts now owns that
composition; served environment catalogs (MCP listing and card) go through
the same owner's dialect projection, keeping argument descriptions.

* test(mcp): pin each remaining environment dialect violation to its query union
2026-11-15 23:54:01 +08:00
morluto d1675822f6 refactor(capabilities): declare standalone and host-gated availability on the contract (#11270)
Contracts declare availability: "standalone" or { host: <feature> }, and CapabilityInventory interprets the declaration once through one feature table, replacing 39 per-name branches. HOST_RESTRICTED_FEATURES moves to the contracts layer.
2026-11-15 23:52:56 +08:00
morluto b6659b70a3 refactor(domain): type UTF-8 excerpts apart from identity strings (#11272)
utf8HeadExcerpt and utf8TailExcerpt now return ExcerptText, a branded string. compactStringIdentityKey takes NotExcerpt<T>, so passing a display excerpt where an identity key is expected is a compile error (covered by an @ts-expect-error test). Two consumers that re-derived truncation by comparing an excerpt with its source (environment replay metadata, rizin frame history) read the helper's truncated fact instead.
2026-11-15 23:52:08 +08:00
morluto 38cd72ee8a test(verify): resolve the copied verifier's relative helpers from the repository verifier (#11274) 2026-11-15 23:51:20 +08:00
morluto 8f8683544e fix(native): record breakpoint hits LLDB reports as exceptions and keep coverage partial for unattributed stops (#11276) 2026-11-15 23:50:48 +08:00
morluto 86537a11be perf(verify): bound the agent evaluation's version probe by its command budget (#11277) 2026-11-15 23:50:12 +08:00
morluto 936cef0a5b docs(native): scope function-matching complete-within-inputs to supplied inventories (#11279)
* docs(native): scope function-matching complete-within-inputs to supplied inventories

* docs(native): say partial covers unresolved as well as unpaired rows
2026-11-15 23:49:33 +08:00
morluto a93a9f43c9 test(support): copy isolated-repository scripts with their runtime import closure (#11281)
* test(support): copy isolated-repository scripts with their runtime import closure

* fix(test): resolve package imports to the file Node loads in the import closure
2026-11-15 23:49:11 +08:00
morluto 142d79428d perf(test): supervise JADX cleanup-failure children from launch (#11283) 2026-11-15 23:48:34 +08:00
morluto 3d67404132 refactor(domain): charge resource allowances through one Budget owner (#11293) 2026-11-15 23:47:20 +08:00
morluto c931ba43ab fix(managed): report a managed graph over an unavailable source as unknown (#11280) 2026-11-15 10:34:17 -05:00
morluto ac9064b394 fix(cli): treat ENOTCONN on stdout as a closed reader (#11275) 2026-11-15 10:22:40 -05:00
morluto ef77be17d2 fix(verify): report the agent evaluation's retained run root one level deep (#11273) 2026-11-15 10:19:25 -05:00
morluto 6cdfb01023 test(reference): give the MCP parity exclusion fixture its required entry kind (#11247) 2026-11-15 10:13:51 -05:00
morluto 32a851e048 test(browser): expect a WebMCP root loader replacement to report target_changed (#11255) 2026-11-15 10:13:36 -05:00
morluto e0f71725e4 test(artifacts): expect the named integrity check on MCP ASAR integrity errors (#11244) 2026-11-15 10:13:26 -05:00
morluto ec5cb5ec51 fix(setup): read MCPorter's XDG folder in the client configuration-root owner (#11193) 2026-11-15 10:13:14 -05:00
morluto 8a6c315ab9 test(mcp): accept compact-profile guidance after the JavaScript analysis description (#11195) 2026-11-15 10:13:02 -05:00
morluto f60d842718 test(verify): resolve the published-package verifier's fixture module in its npm-selection harness (#11260) 2026-11-15 10:12:52 -05:00
morluto c4154b0c7e test(cli): expect the update alias to pass the host platform to the update host (#11263) 2026-11-15 10:12:41 -05:00
morluto 4c5f5a3338 fix(process): relay a start abort missed during listener registration and expect owner-closed Rizin starts (#11200)
* test(rizin): expect closeAll to abort in-flight starts and cancel TTY validation with a real signal

* fix(process): relay a caller abort dispatched while the start registered its listener
2026-11-15 10:12:33 -05:00
morluto 456ca8e973 test(managed): expect resolved target rows on inspected call edges and field accesses (#11213) 2026-11-15 10:12:22 -05:00
morluto 90e192240a test(ghidra): expect malformed language XML as a malformed ParseFailure (#11234) 2026-11-15 10:12:16 -05:00
morluto e0f433ff1b test(kuna): expect doctor's failed version probe as its own check beside admission (#11232) 2026-11-15 10:12:08 -05:00
morluto 70351fe33b test(composition): expect a Rizin start after closeAll to be refused as owner-closed (#11211) 2026-11-15 10:12:00 -05:00
morluto c272d050b1 docs(adr): split src/domain by subsystem behind one entry point (#11231)
* docs(adr): split src/domain by subsystem behind one entry point

* docs(adr): say project references do not enforce the entry rule
2026-11-15 09:57:16 -05:00
6136c6f3ba fix(cli): refuse silent direct command-registry execution (#11204)
Fail visibly with a dispatcher hint and exit status 1 when the compiled command registry is executed directly. Reuse the existing argv/module identity owner for both entry modules and preserve normal imports and supported dispatch.

Fixes #10762.
Builds on #10766.

Co-authored-by: 2SinceJuly <202121119+2SinceJuly@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-15 22:23:49 +08:00
morluto 664fab7470 chore(mcp): record the selector schemas from #10753 in the advertised summary
#10753 changed 26 tools' advertised input schemas without regenerating the
committed catalog summary, so verify:advertised-schemas failed on main.
2026-11-15 09:12:15 -05:00
morluto b4cc1c998b test(mcp): record the advertised-schema summary per tool (#11192)
summary.json held every advertised pattern's site list and every tool's
schema digests in one file. Each new path-taking tool appended to the
shared path pattern's list, so concurrent tool PRs conflicted on it, and
updating it required a local build.

Each tool's digests and patterns now live in
scripts/verify/advertised-schemas/tools/<tool>.json. The check still prints
aggregated review lines such as "N tool schemas gained pattern /.../", and
on failure also prints the expected contents of each missing or stale file
so a PR can commit them from CI output without building. --update-summary
writes those files and deletes summaries of removed tools. The existing
summary was split into per-tool files from its recorded data.

Fixes #11189
2026-11-15 22:11:06 +08:00
1995ab7fce fix(elf): admit Xtensa through canonical target contracts (#11178)
Admit ELF machine 94 as the canonical Xtensa family through Ghidra's header-selected import. Share generic-header exclusions between static target types and live CLI/MCP summaries, preserving ELF-only format constraints and other providers' decline paths.

Fixes #10765.
Adapted from #10774.

Co-authored-by: Josh <joshuakrishna21@gmail.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
2026-11-15 22:09:41 +08:00
morluto 104b1a35b4 fix(contracts): refuse empty address and procedure selectors in the contracts (#10753)
* fix(contracts): refuse empty address and procedure selectors in the contracts

* refactor(cli): project decompile from its contract with --file-offset as an alternative selector (#10756)

* refactor(cli): project search from its contracts with --kind choosing the operation (#10761)

* refactor(cli): project search from its contracts with --kind choosing the operation

* fix(cli): check operation choices' option rules and bind errors to the selected contract

* test(cli): group operation-choice checks in their own block

* refactor(cli): project decompile-all from its contract onto a native session target (#10778)

* refactor(cli): project decompile-all from its contract onto a native session target

* refactor(cli): project native Mach-O, Swift and native UI commands from their contracts

* fix(cli): read search, decompile-all and native utility contracts from their groups so startup stays lazy

* test(cli): drop the empty-selector admission mismatches the contracts now refuse
2026-11-15 22:03:37 +08:00
morluto 271e375924 refactor(application): read the host from HostPlatform in the remaining application modules (#11124)
Scenario planning and plan Evidence take a required platform. Host file operations (target resolution, output trees, Windows spelling lookup, executable checks, native snapshot admission), the Linux distribution read and the process CLI adapter read HOST_PLATFORM explicitly. ByteEntropyService takes an optional platform seam, so its Windows casing test injects win32 instead of stubbing process.platform. src/application no longer reads process.platform or process.arch.
2026-11-15 22:03:14 +08:00