mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 22:36:08 +00:00
fix: restore JavaScript analysis and current regression checks (#3080)
Restore source-position-aware ambient aliases, scalar env/argv reads, candidate endpoint worker data, Chrome DOMSnapshot empty strings, and accumulated Ghidra LaunchSupport diagnostics. Align regression fixtures with declared current contracts, while preserving identity, provenance, cancellation, and cleanup checks. Assert workflow caveats independently at both established locations. Validation: original five source failures reproduced on main; 307 focused tests passed with one platform skip, 22 fixture follow-up tests and 22 workflow/MCP tests passed; full static and docs checks passed. Real public http-server CLI analyses preserve identical artifact identity, statistics, and 581-token selected output. Real Chromium confirms restored DOM form destinations; isolated real service-worker verification passes on main and the change. The complete local browser run retained an unclassified later marker timeout; current-head CI provides complete real-browser and recovery lane results. Native IDA/Ghidra execution and complete local suite execution are not claimed. Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com> Co-authored-by: N0zoM1z0 <161784452+N0zoM1z0@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
25 files changed
+395
-145
No files matched your search
@@ -56,9 +56,13 @@ const createAmbientPathResolver = (
|
||||
const prior = possibleWrites ? undefined : cached.get(node);
|
||||
if (prior !== undefined) return prior;
|
||||
const result = new Map<string, AmbientPath>();
|
||||
const pending: { node: t.Node; suffix: AmbientProjection }[] = [
|
||||
{ node, suffix: [] },
|
||||
];
|
||||
// The caller's write site selects initializers for the written target.
|
||||
// Reads reached through an initializer occur at their own position.
|
||||
const pending: {
|
||||
node: t.Node;
|
||||
suffix: AmbientProjection;
|
||||
readsAtSelf?: true;
|
||||
}[] = [{ node, suffix: [] }];
|
||||
// Join projections at their producing expression, rather than enumerating
|
||||
// alias histories. Each key can only widen to a wildcard, and conflicting
|
||||
// depths widen to unknown, so diamonds and cycles have finite state.
|
||||
@@ -105,7 +109,11 @@ const createAmbientPathResolver = (
|
||||
// A widened projection is a possible write, never proof of an intrinsic.
|
||||
if (suffix === undefined && !possibleWrites) continue;
|
||||
const continueWith = (node: t.Node, path: AmbientProjection = suffix) =>
|
||||
pending.push({ node, suffix: path });
|
||||
pending.push({
|
||||
node,
|
||||
suffix: path,
|
||||
...(current.readsAtSelf && { readsAtSelf: true }),
|
||||
});
|
||||
if (
|
||||
t.isMetaProperty(root) &&
|
||||
root.meta.name === "import" &&
|
||||
@@ -126,20 +134,19 @@ const createAmbientPathResolver = (
|
||||
const binding = resolveSemanticBindingState(state, root, root.name);
|
||||
if (binding === undefined) continue;
|
||||
const stable = semanticStableInitializer(binding, state);
|
||||
const readAt = current.readsAtSelf ? root : capture;
|
||||
const initializers = possibleWrites
|
||||
? capture === undefined
|
||||
? readAt === undefined
|
||||
? binding.initializers
|
||||
: semanticMutationInitializers(
|
||||
binding,
|
||||
capture,
|
||||
state.parentsByNode,
|
||||
).initializers
|
||||
: semanticMutationInitializers(binding, readAt, state.parentsByNode)
|
||||
.initializers
|
||||
: stable === undefined
|
||||
? []
|
||||
: [stable];
|
||||
for (const initializer of initializers)
|
||||
pending.push({
|
||||
node: initializer.node,
|
||||
readsAtSelf: true,
|
||||
suffix:
|
||||
suffix === undefined
|
||||
? undefined
|
||||
|
||||
Reference in new issue
Block a user