mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #4242] [Bug] Noncanonical rest-array keys select the wrong inferred IPC channel #1666
Closed
opened 2026-10-16 21:08:47 +00:00 by bsakaguchi
·
1 comment
No Branch/Tag specified
main
codex/procedure-reference-stacked
release-please--branches--main--components--rea-agents
release-please--branches--main--components--rea-agents--release-notes
codex/kuna-independent-retry
codex/byte-search-overlay-coverage
codex/open-failure-target-receipt
codex/kuna-xref-evidence
codex/ghidra-ambiguous-procedure-recovery
codex/function-source-bundle
codex/trace-function-integration-prototype
codex/snapshot-source-closure
codex/recorded-evidence-array-pages
codex/evidence-recovery-redesign
codex/trace-feature-address-scope
codex/call-discovery-scope
codex/ghidra-literal-candidate-evidence
codex/decompile-directory-independent-retry
codex/retry-provenance-base
codex/value-flow-capability-experiment
codex/ghidra-containing-instruction
cursor/readme-discord-button-ef9f
dependabot/github_actions/actions/setup-node-7.1.0
dependabot/github_actions/actions/upload-artifact-7.0.2
dependabot/npm_and_yarn/npm-minor-and-patch-d8d97ce6df
codex/kuna-1989
fix/8559-native-ui-fixture-ownership
fix/8555-go-verifier-mcp-ownership
codex/provider-capability-recovery
fix/8642-rizin-target-stdin
codex/ghidra-memory-effect-scope
codex/ghidra-annotation-entry-selector
codex/ghidra-readonly-recovery
codex/ghidra-regex-verifier-recovery
codex/evidence-discovery-view-guidance
fix/8545-bulk-append-overflow
fix/8428-navigation-refusal-alternatives
codex/address-context-recovery
codex/matching-member-limitations
codex/unknown-scope-contract
codex/evidence-view-guidance
feat/8373-native-trace-views
codex/ghidra-snapshot-verifier-binding
codex/elf-export-visibility
codex/evidence-view-recovery
codex/native-reference-cli-help
codex/provider-candidate-observation-scope
codex/kuna-session-verification
codex/ghidra-switch-lifetime-guidance
codex/pseudocode-paging-discovery
codex/clarify-evidence-view-support
codex/kuna-xrefs-selector-recovery
codex/context-capacity-recovery
codex/evidence-closure-large-links
codex/same-function-evidence-identity
codex/ghidra-verifier-inspected-jdk
codex/audit-guided-workflows
codex/crash-prompt-retained-dossiers
codex/analysis-view-error-recovery
codex/kuna-verifier-target-selection
codex/ghidra-selected-project-call-coverage
codex/docs-native-analysis-scope
codex/ghidra-java-socket-boundary
codex/ghidra-retained-snapshot-verifier
codex/ghidra-search-inventory-facts
fix/8284-zero-argument-parameter-bindings
fix/8198-ui-action-handler-offset
fix/8257-elf-entry-label-identity
fix/8304-deferred-output-schema-projection
fix/8277-call-path-computed-target-uncertainty
fix/pr-8089-conflicts
fix/ci-static-duplicate-export
dependabot/npm_and_yarn/lint-staged-17.6.0
dependabot/github_actions/actions/download-artifact-8.0.2
dependabot/npm_and_yarn/write-file-atomic-8.0.0
dependabot/npm_and_yarn/canonicalize-5.1.0
dependabot/github_actions/actions/cache/restore-6.1.0
dependabot/npm_and_yarn/toon-format/toon-4.4.0
dependabot/github_actions/actions/deploy-pages-5.0.1
codex/review-fixes-pr-2403
codex/review-fixes-pr-2400
codex/process-terminal-width
codex/test-brittleness-cleanup
verify/7167-browser-connect-macos
fix/7167-browser-connect
feat/native-matching-allowance-setting
feat/browser-scenario-dry-run
test/managed-caller-parameters-20261024
codex/parser-fortythird-boundaries
fix/6926-pinvoke-platform-decorations-20261023
fix/6889-har-body-encoding-20261023
fix/6888-sqlite-schema-budget-20261023
fix/dependency-security-gates-6708
cursor/evidence-overwrite-rebase-b4ac
feat/4057-verify-native-exports
fix/windows-acl-observer-overhead-20261022
cursor/erlang-beam-restack-4476
cursor/pe-certificate-review-bf32
fix/6116-javascript-application-fs-errors
fix/6061-unmapped-runtime-script-unknown
feat/browser-scenario-summary
fix/pe-certificates
codex/verify-3407
cursor/rebase-5699
cursor/rebase-5352
cursor/rebase-5600
cursor/fix-cli-schema-omission-10a8
codex/audit-hopper-shutdown-reasons-20261021
fix/demangle-swift-omitted-record
fix/nib-boolean-value-types
cursor/cancellation-partial-observation-a5ac
fix/ib-object-limit-reasons
fix/electron-fuse-limit-advice
fix/kuna-doctor-dangling-cache
fix/fixed-budget-refusal-advice
fix/js-ipc-listener-dedup
fix/js-return-member-provenance
fix/dmg-integrity-retry-advice
fix/ida-doctor-readiness
fix/kuna-version-probe-output-drain
fix/legacy-swift-runtime-name-matching
fix/dylib-lazy-load-commands
fix/browser-scenario-startup-cancel
fix/swift-nested-punycode-classification
fix/compare-unselected-scopes
fix/objc-method-budget-coverage
fix/dmg-mounted-root-observations
audit/ci-tests-20261019-round2
release/6.7.0
fix/wabt-cleanup-retry-resolution
fix/electron-fuse-elf-pe-architecture
fix/native-plist-descriptor-ownership
fix/kuna-caller-cleanup-ownership
experiment/atomic-codemode-20261016
review/first-contributor-3776
fix/call-resolution-full-read-cycles
fix/member-mutation-selection-repeat
experiment/atomic-re-tools-20261015
perf/member-mutation-lazy-origins
perf/static-network-mutation-index
fix/hopper-startup-lifecycle
audit/3050-windows-proof-20261015
feat/windows-window-capture-2183
audit/3049-windows-proof-20261015
audit/3735-macos-fixtures-20261015
fix/batch-decompile-null-pseudocode
fix/kuna-inventory-honors-jobs
experiment/browser-codemode-tool-design-20261015
fix/hopper-clean-runtime-argv
codex/review-2049-27f1b367
review-fixes/pr-2787-routing
fix/3360-scoped-this-emitters
fix/3367-replaced-global-effects
fix/3838-compact-any-value-items
test/hopper-download-probe-20261015
codex/windows-runtime-creation-red-green-20261015
codex/windows-readonly-root-red-green-20261015
codex/windows-root-share-red-green-20261015
codex/exp-1685-win-mcp-startup
codex/bug-sweep-20261015
investigate/2190-windows-package-phases
investigate/3543-macos-cli-deadline
perf/3281-reverse-tools-feedback-quality
fix/3406-hopper-doctor-fixture
fix/3341-wrapper-require-test-context
fix/3301-owned-uninstall-fixtures
fix/3164-compiler-input-ownership
fix/pcap-cleanup-stdout-newline-20261014
perf/interface-builder-summary
codex/review-fixes-pr-1977
fix/ghidra-effective-jvm-platform
fix/docs-turkish-rust-link-20261013
fix/main-maintenance-ci-20261010
fix/recover-binary-session-process-effects
codex/review-fixes-pr-2457
codex/ci-required-cancellation-gate
fix/main-format-baseline-20261013
fix/setup-preserve-entry-fields
cursor/restore-main-checks-1ffc
fix/ghidra-bridge-hashmap-import
codex/shared-ci-jadx-json-default-20261013
codex/shared-ci-ghidra-test-groups-20261013
codex/shared-ci-java-fixture-format-20261013
codex/fix-intrinsic-invocation-boundaries
test/release-preflight-reusable-jobs
test/js-parameter-provenance-expectation
fix/linux-hopper-verification-current
test/2419-ghidra-elf-probe-size
followup/pr-1544-native-ida
codex/fold-pr-2230-contribution
docs/readme-responsible-use
fix/issue-2064
fix/issue-2050
fix/issue-2053
fix/issue-1968
fix/issue-1945
experiment/codemode-bridge-20261011
fix/tool-effects-negative-wording-1904-20261012
fix/1842-electron-interop-provenance
feat/recover-javascript-multi-input
refactor/website-i18n-prep
fix/nativeaot-pe-virtual-extent
fix/browser-verifier-ci-hang
fix/pe-resources-input-selection
docs/beginner-friendly-guides
docs/beginner-setup-guide
fix/javascript-analysis-worker-1563
fix/1649-ghidra-duplicate-names
fix/javascript-export-keys-integration-1369
test/maintenance-boundary-contracts-20261011
review/javascript-export-keys-1369
review/process-live-progress-1483
test/javascript-1495-growth-ratio
fix/ci-escape-timing
docs/normalized-terminal-geometry-1450
release/6.3.0
archive/release-6.3.0-pr1381
release/6.2.0
fix/electron-preload-dynamic-override
fix/javascript-self-referential-bundler-edges
release/6.1.0
cursor/grok-client-cherry-pick-0b56
feat/signature-posture
feat/dyld-shared-cache
feat/artifact-integrity-policy
feat/pkg-inventory
release/6.0.0
chore/sync-release-5.0.0
release/5.0.0
cursor/cloud-agent-node-787e
fix/javascript-xhr-open-endpoints
review/pr-711-realpath-fallback-wording
cleanup/replay-confinement
codex/test-suite-performance
codex/issue-foundations
codex/address-open-issues-2026-07-20
agent/javascript-vite-rollup-esbuild-adapters
agent/process-cleanup
agent/triage-integration
agent/unknown-commands-registry
feat/mcp-identity-metadata
morlvps/issue_cleanup
codex/installer-redesign
morl/roadmap-investigation-core
morl/roadmap-investigation-docs
release-please--branches--main--components--rea
rea-agents-6.8.0
rea-agents-6.7.0
rea-agents-6.6.0
experiment/atomic-codemode-wait-runtime-20261016
rea-agents-6.5.0
rea-agents-6.4.0
rea-agents-6.3.0
rea-agents-6.2.0
rea-agents-6.1.0
rea-agents-6.0.0
rea-agents-5.0.0
rea-agents-4.1.0
rea-agents-4.0.1
rea-agents-4.0.0
rea-agents-3.2.1
rea-agents-3.2.0
rea-agents-3.1.0
rea-agents-3.0.0
rea-agents-2.7.0
rea-agents-2.6.0
rea-agents-2.5.1
rea-agents-2.5.0
rea-agents-2.4.0
rea-agents-2.3.0
rea-agents-2.2.0
rea-agents-2.1.0
rea-agents-2.0.0
rea-agents-1.7.0
rea-agents-1.6.0
rea-agents-1.5.0
rea-agents-1.4.0
rea-agents-1.3.0
rea-agents-1.2.0
rea-agents-1.1.0
rea-agents-1.0.0
rea-agents-0.5.0
rea-agents-0.4.0
rea-agents-0.3.0
rea-0.2.1
rea-0.2.0
Labels
Clear labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
Mirrored from GitHub Pull Request
question
roadmap
triage
No labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
question
roadmap
triage
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
morluto/rea#1666
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @coygeek on GitHub (Oct 15, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/4242
Before submitting
Area
Evidence, artifacts, or reconstruction
Observed behavior
analyze-javascript-applicationsubstitutes the channelSECONDinto the contextual path fordesktop.readwhen its returned closure sendsitems["01"] ?? "FALLBACK"and the rest arguments are the fixed literals"FIRST", "SECOND". The canonicalitems["1"]control produces the same inferred channel. The two keys have different ordinary JavaScript meanings: the fresh rest array has no property named"01", so the suspect expression selectsFALLBACK.The returned path remains a qualified static candidate, and the original dynamic expression remains available as observed syntax. The defect is the wrong literal value inside lexical substitution. This report does not claim that REA executes the fixture or reports an observed runtime channel.
Reproduction
Use the built source checkout at the revision below, with its locked dependencies and pinned Node.js runtime on PATH. From the repository root, run this complete reproduction. It creates inert CommonJS application directories and isolated home/config/cache/data/temporary directories, invokes the public CLI sequentially, and prints the relevant graph observations. It never executes
main.cjsor loads Electron.noncanonicalis the failing fixed-key source.canonicalchanges only the key from"01"to"1".fallbackreplaces the channel expression with the literal"FALLBACK".dynamicmakes the key a parameter of the exposed callback and checks genuine caller-dependent uncertainty. These are discriminating controls, not source-preserving workarounds.Expected behavior
Bounded lexical substitution must preserve literal property identity. A named array property
"01"must not select positional element 1. For the noncanonical source, withhold theSECONDcontextual channel and inferredliteral:SECONDnode attributed to this call. The analyzer may resolve the ordinary result toFALLBACKor retain explicit uncertainty if its abstraction cannot prove the missing property. Keep the canonical control'sSECOND, the fallback control'sFALLBACK, and the dynamic-key control's unresolved value. Preserve the written dynamic expression and all appropriate static-candidate limitations.The reconstruction guide documents returned-closure/wrapper substitution as a static inference with literal channels and unknowns. Its authority limits concern runtime reachability, overrides, registration and dispatch. The repository separately defines canonical array indices and already tests that
list["1"]resolves a slot whilelist["01"]remains unknown. This expectation does not require a precise Electron runtime model or exact undefined propagation for missing properties.Impact and scope
A valid inert CommonJS input produces a wrong machine-readable inferred IPC channel and contextual candidate path. This is a bounded P2 analysis-correctness defect; original source evidence, partial coverage and runtime-unverified limitations survive. No severe incident or whole-workflow blockage was established. The four-case reproduction returned the same results in separate baseline verification and current-main publication replays. NOT_ENOUGH_INFO: real-application prevalence and downstream tracing consequences were not measured.
No supported public option or unchanged-input workflow was verified to correct the contextual channel. Changing "01" to "1" changes the program's meaning and is a control. Workaround status remains unverified.
REA version
Tested current upstream main 921fa03fca7181af5d69ccc10a4ceadc22c9c9e0, built with
npm run build:cachedand locked dependencies. Original independent verification used source baseline 62bf09809ef7bb224028916424f8f07652a20f4f. The standalone CLI recipe succeeded at both tested revisions with the output below. The source manifest reports 6.5.0. These are repository builds; NOT_ENOUGH_INFO: published-package behavior was not tested, and the manifest version does not establish it.Runtime and platform
Repository-pinned Node.js v24.18.0 and npm 11.16.0 on macOS arm64. No external analysis provider was used.
Target and artifact context
Inert extracted CommonJS application directories, each with the complete authored main.cjs fixture above. The failing source has fixed rest arguments, a fixed named key, no call-site spread, assignment, accessor, branch or module-table bootstrap. REA does not execute these sources or require an Electron installation. A separate harmless recording oracle defines its own send operation.
Interface
CLI, through node scripts/rea.mjs analyze-javascript-application with JSON and full output.
Earliest failure stage
Native analysis or reconstruction. The symbolic evaluator supplies the wrong literal before graph projection; public request admission, parsing, Evidence creation and cleanup succeed.
Relevant output or evidence
The complete standalone reproduction succeeded. Each call exited 0, returned
ok: true, parsed one JavaScript file and reported zero parse failures. Its output was:For the noncanonical source, the contextual
desktop.readpath haschannel: "SECOND",resolution: "candidate", no conditions, and inferred evidence with high confidence. Its separate inferred IPC-channel node is keyedliteral:SECONDand usesresolution: "literal". The channel evidence retainsauthority: "static-relationship-inference",state: "inferred", and limitations that runtime registration, dispatch and execution remain unverified. The raw IPC-channel observation retainschannel: null,resolution: "dynamic", andchannel_expression: "items[\"01\"] ?? \"FALLBACK\""; its observed/exact evidence describes the written syntax.The result also retains partial graph coverage and separate semantic limitations such as
Binding items has no constant initializer.,Dynamic IPC channel expressions remain unresolved and are never paired by textual similarity., and unknown cross-function mutation/dynamic property resolution. These describe the generic source analysis and unresolved facts; the contextual wrapper result still substitutes the fixed rest arguments and publishesSECOND. Those runtime qualifications remain honest. They do not explain changing the fixed named key to a positional index. The canonical source has the same reported candidate channel even though a harmless recording oracle gives different results. A separate first pass using--jsonreproduced the same four cases, also with successful cleanup.The following self-authored recording oracle ran with the pinned Node runtime. It defines the recording send operation itself, uses ordinary fresh rest arrays, and does not import Electron:
The retained verification oracle also asserts that the noncanonical array has no own
"01"property and checks the fallback and dynamic controls. Its results wereFALLBACK,SECOND,FALLBACK,FALLBACK,SECONDfor noncanonical, canonical, literal fallback, dynamic key"01", and dynamic key"1", respectively. This establishes ordinary fixture language semantics with a recording object, not actual Electron engine or application execution coverage.The current-main publication replay also retained and inspected the full noncanonical result. The unchanged source suites javascriptSymbolicBindings.test.ts and electronWrappedCallPaths.test.ts passed all 90 existing tests during the original baseline verification. Those tests were not rerun on current main; the current-main proof is a fresh build and repeated public CLI reproduction.
Typed outcome or recovery expected
Run the same four-case public reproduction. The original noncanonical source must no longer acquire
SECONDthrough its named property lookup, either in its contextual path or an inferred channel node attributed to that call. A correctly inferredFALLBACKor meaningful retained unknown satisfies this check. Preserve the canonical control'sSECONDand the literal fallback control'sFALLBACK; preserve genuinely unresolved dynamic-key behavior and the original syntax evidence. Keep every recovered relationship explicitly static. These checks allow either a more precise property model or conservative uncertainty and prescribe no implementation.Analysis or suspected cause
Source-derived explanation: the symbolic array lookup treats every digit-only key as a positional index and reads
value.values[Number(key)]. Rest binding constructs the positional array from the fixed literal arguments, and member evaluation supplies the written key. The wrapper collector requires a literal string to emit a contextual channel; graph projection retains it as a static candidate.The expected contract is supported by the reconstruction guide, the canonical array-index owner, the existing index-identity test in the separate semantic evaluator, and the contextual collector's unresolved-channel controls. These support withholding a wrong literal without requiring exact missing-property propagation or runtime execution. The relevant symbolic evaluator, wrapper collector, projection and index-contract files are unchanged from the verified baseline; the current-main recipe directly reproduced the same failure.
Additional context
The related subtraction-assignment report #4206 concerns wrong branch pruning from evaluating an assignment expression's right operand as its result. This source has no assignment or conditional statement. That report's else-path restoration and this report's named-property/index distinction can fail independently, despite sharing a symbolic evaluator.
NOT_ENOUGH_INFO: the first affected revision and last known good revision are unknown. Published-package behavior, MCP transport, actual Electron operation, other platforms, full-suite coverage and post-fix restoration were not tested. The recording oracle establishes ordinary JavaScript fixture semantics, not Electron execution coverage.
Triage assessment
"01"with"1"changes the recording oracle's result fromFALLBACKtoSECOND, so it changes the program's meaning and is only a control.@morluto commented on GitHub (Oct 16, 2026):
Fixed on
mainin 43bc6e1d2. Rest-array lookups now use canonical array-index parsing, so a noncanonical key such as 01 cannot select slot 1.Regression controls retain canonical indices, fallback and dynamic-key uncertainty, including the public CLI cases.
Hosted main CI is still pending; this closure is based on the implemented fix and the scoped regression evidence.