* refactor(mcp): bind web network capture through the shared service binding table
* refactor(mcp): bind web runtime tools through the shared service binding table (#11395)
Flutter build/Dart AOT results (4) and Android manifest component and text
coverage (3) each spelled a local ["complete", "partial"] enum. They now
derive it from coverageStatusSchema without "unknown": every producer
derives "partial" from failures, caps or truncation it recorded, so its
coverage is always known. The Android parser's coverage parameter uses the
same type. Advertised schemas are unchanged. local-completeness-enum
-7.
* refactor(javascript): ask one owner whether opaque code changed an intrinsic global read
Six intrinsic global readers combined semanticOpaqueGlobalMayHaveChanged and semanticOpaqueNameMayHaveChanged themselves, each choosing which effect kinds applied and where to time them.
isIntrinsicGlobalReference and opaqueCodeMayChangeGlobalRead in javascriptSemanticGlobalReference.ts now own both proofs: a sloppy direct eval visible from the reference may introduce its root name, and global code that may run before the observation site may replace a writable global. The owner also knows that undefined, NaN and Infinity are non-writable, so global code cannot replace them. Map lookups and XMLHttpRequest open calls pass the call as the observation site, keeping their call-time timing. An architecture guard forbids the two helpers outside their owners.
Slice 1 of docs/adr/javascript/pushed-effect-invalidation.md (#11188).
* refactor(javascript): ask one owner whether opaque code rebound a binding (#11254)
Ten binding readers combined semanticBindingCanBeRebound, semanticBindingMayHaveOpaqueEffect and semanticOpaqueBindingReadMayHaveChanged themselves; three repeated the same rebindability-and-effect pairing.
opaqueCodeMayRebindBinding(binding, state, read?) and opaqueCodeMayReachBindingReference(binding, state, capturePoint) in javascriptSemanticOpaqueEffects.ts now own the rebinding, read-timing, capture and introduced-name proofs. semanticBindingMayHaveOpaqueEffect is private to the owner and semanticOpaqueBindingReadMayHaveChanged is removed, so a reader cannot pick effect kinds again.
Slice 2 of docs/adr/javascript/pushed-effect-invalidation.md (#11188).
* refactor(javascript): ask one owner whether an intrinsic instance method changed (#11266)
* refactor(javascript): ask one owner whether an intrinsic instance method changed
Map lookups and XMLHttpRequest.open each walked receiver aliases and combined
member-effect checks for the method, the instance prototype link and the
intrinsic prototypes. isIntrinsicInstanceMethodCall now owns that walk; Map
lookups also gain the prototype-link check XHR already made. The member-effect
view asks semanticOpaqueReferenceEffects for opaque sites instead of combining
the rebinding and reach helpers, which become private.
Refs docs/adr/javascript/pushed-effect-invalidation.md (slice 3).
* refactor(javascript): keep global opaque-effect checks private to their owner
opaqueCodeMayChangeGlobalRead moves into javascriptSemanticOpaqueEffects.ts, so
semanticOpaqueGlobalMayHaveChanged and semanticOpaqueNameMayHaveChanged are no
longer exported and the slice 1 text guard is replaced by the compiler.
* refactor(javascript): make the effect log the one reader of recorded opaque sites (#11282)
* refactor(javascript): make the effect log the one reader of recorded opaque sites
Rename javascriptSemanticOpaqueEffects.ts to javascriptSemanticEffectLog.ts
(ADR decision 1) and move the reference-effects view
(visitSemanticReferenceEffectsAtSite, the effect report, the member-path
query and its completeness gate) out of javascriptSemanticAnalysis.ts into it.
Recorded opaque sites move behind javascriptSemanticEffectRecord.ts accessors
(direct-eval site, recorded direct eval, global-code sites), which the timing
producer in javascriptSemanticMutationInitializers.ts and the call frontier in
javascriptSemanticCalls.ts now ask instead of reading state.opaqueEffects.
The member-mutation completeness WeakSet duplicated
state.memberMutationFactsComplete and is removed.
An architecture guard keeps `.opaqueEffects` reads inside the log and its
record module.
* refactor(javascript): keep the opaque reference-effect generator private to the effect log
* refactor(javascript): drop analysis-hub imports that only the moved effect queries used
* refactor(javascript): ask the effect log for a binding reference's recorded effects (#11295)
The value engine applied member writes, escapes and direct-eval reach to a
binding's reference itself, with its own capture proofs. That application
moves into javascriptSemanticEffectLog.ts as
applySemanticBindingReferenceEffects, and opaqueCodeMayReachBindingReference
becomes private to the log.
A counted guard (javascript-effect-index-read) records every remaining read
of the per-kind effect indexes outside the log; it can only shrink, so new
reader-side checks fail the guard.
* refactor(javascript): ask the effect log whether an ambient path may have changed (#11308)
* refactor(javascript): ask the effect log mayObserve for member-path reads (#11313)
* refactor(javascript): name the member-path effect query mayObserve
* refactor(javascript): ask the effect log whether an ambient path effect may precede a read
* refactor(javascript): ask the effect log about require and process rebinding (#11318)
refactor(javascript): ask the effect log about require and process rebinding and effect generations
* refactor(javascript): build the ambient-write module interop in one owner (#11323)
* refactor(javascript): build the ambient-write module interop in one owner and ask the effect log in CommonJS receivers
* refactor(javascript): ask the effect log whether binding assignments precede a read (#11329)
refactor(javascript): ask the effect log whether binding assignments or prototype writes precede a read
* fix(javascript): count prototype escapes before resolving a URL object request target (#11368)
fix(javascript): count URL and Object prototype escapes before resolving a URL object target
inspect_analysis_view and inspect_il2cpp_metadata wrote "--evidence-bundle"
and "--ghidra-seeds needs --binary" into their own input issues, copying
the CLI's option spelling into the service. They now name the field
(binary_path) or the input ("An Evidence bundle"), and the CLI's field
binding keeps owning option spellings.
A counted architecture guard records the 41 remaining REA CLI option
spellings outside src/cli (mostly "(CLI: --flag)" remediation hints) so
the list can only shrink.
* refactor(domain): charge the Interface Builder, NativeAOT, managed and runtime budgets through Budget
* test(browser): show a refused runtime retention charge leaves the room intact
* refactor(domain): charge the remaining fixed allowances through Budget (#11383)
* refactor(domain): charge CUDA metadata and SQLite reply budgets through Budget
CudaMetadataBudget (visits, section reads, temporary index) and the SQLite
OutputBudget kept hand-written allowances whose field names escaped the
budget-arithmetic guard; the SQLite reply budget also charged each part
before checking it. Both now charge Budget, which refuses an oversized
charge without changing the remainder.
The guard now also counts, inside any hand-written ...Budget class, a field
that is adjusted by hand and compared with < or >, whatever its name.
Unchecked tallies (a yield counter, a reservation ledger) stay uncounted.
Firmware arena cursors are write offsets, not allowances: they are renamed
#arenaWriteOffset and leave the guard's scope. Baseline 17 -> 15.
* refactor(domain): move cache, re-priced, checkpointed and ledger retention onto Budget
Budget gains chargeEvicting (evict the oldest cache entries until a charge
fits) and restore (refund everything charged since a used mark, never
re-charging). With them:
- the Bun metadata range cache evicts through chargeEvicting and charges
physical reads through a second Budget;
- Playwright scenario events refund an event's old cost and try-charge its
re-priced cost, and admission charges with tryCharge;
- WebNetworkProjectionAccumulator keeps one shared allowance plus retained
and temporary shares whose checkpoints restore by refunding;
- EvidenceLedger commits its admitted delta (charge, or refund when a
replacement shrinks) and clears with restore(0);
- the web bundle worker charges an admitted result, and on the completed-
snapshot path retains facts only when they still fit;
- the Pyc nested code walk charges steps and retained references.
budget-arithmetic 15 -> 4 (JavaScriptAnalysisWorker only).
* build(verify): declare the budget-arithmetic guard's counter for typed tests
* refactor(domain): compare snapshot targets through one target identity key
* fix(domain): refuse snapshot targets whose kind their format cannot have
* test(lifecycle): let phase gates release with a value or a rejection
phaseGate<T, R> now hands R back from hold, and reject(error) makes hold
throw, so gates around a late module load or a descriptor read that
completes or fails after cancellation fit the shared harness. Migrates the
src/application gates (AnalysisProviderRegistry x5, LazyAnalysisProvider,
BinarySessionLiveness, CapabilityScope, McpClientRegistration) and
fileHandleChunks, which exercises reject.
* test(lifecycle): cover an early phase-gate rejection and first-decision release
* test(lifecycle): move src/artifacts and src/process phase gates onto the harness (#11371)
Bun, Deno, FIT, NTFS and Mach-O slice reader gates, and the artifact
resources, owned worker, owned lease and launcher grace gates now use
phaseGate. The lipo capture and launcher grace gates release with their
command result and exit verdict. Arrival-only acknowledgements (ESP and HEX
decoder writes, process cleanup start) and the abort-aware process listing
fake stay as they are.
refactor(catalog): let the recorded digests own their shape
src/recordedCatalogDigests.ts typed its recorded value with CatalogDigestProfiles from src/catalogIdentity.ts, which imports the recorded value, so the two files imported each other. The recorded file now declares the digest shape (plain type aliases, so they remain JsonValue-compatible) and catalogIdentity imports it. The layer baseline drops the cycle.
The repository is user-owned, and GitHub offers merge queues only to organization-owned repositories, so no merge_group event can occur. Revert what 5efaedda88 (#11297) added only for merge groups. Reapply that commit if the repository moves to an organization.
* ci: run required checks on merge-queue groups
Add the merge_group trigger to CI and PR title validation so every required
check reports on the queued group's exact head. Group runs use exact-head
concurrency groups that pushes cannot cancel, classify the group's combined
diff from its base (a non-ancestor base fails planning), and keep the CI
required gate running when a group is cancelled so it fails instead of
reporting a skipped check. Title validation checks every squash commit
subject between the group base and head.
* ci: read the merge-group comparison from a file
* 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>
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>
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.
* 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
* 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.
* 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
* 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
* 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.
* 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
* 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).
* 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
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).
* 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
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.
* 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
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.
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.
* docs(native): scope function-matching complete-within-inputs to supplied inventories
* docs(native): say partial covers unresolved as well as unpaired rows
* 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