Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
* fix(comparison): preserve incomplete function call evidence Keep missing, unknown, partial and unresolved call relationships unknown in function comparisons and reconstruction claims. Aggregate IDA caller and callee coverage without overwriting uncertainty. Validate with 144 focused tests, typecheck/lint, docs checks and test discovery. Real providers were not verified; the full headless IDA session suite requires unavailable Windows native controls. * fix(comparison): recheck historical calls-only changes --------- Co-authored-by: morluto <[email protected]>
Keep layered environment choices, current byte-exact recovery snapshots, and package-manager failure details. Report pinned package drift without claiming runner resolution. Retain failed Linux installer cleanup for host-owned retry while preserving the install outcome. Reviewed fixes include #2632, #2769, #2783, #2959, #2979, #2983, #2995, #3009, and #2559. Validation: 98 focused setup/registration tests passed; 45 Linux installer tests passed. Real Linux package installation remains unverified.
Merge main at bcc1415, preserving layered environment validation and the current recovery backup owner. Include the upstream Windows inspection verifier correction for retained handles after rename. Validated 277 focused tests, npm run check, npm run docs:check, npm run verify:package, and npm pack --dry-run. The integrated tree matches the captured main revision, which already incorporates PR morluto#2769.
|
Heads up: main already has this change in ec56c1d. The code is in 🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
|
Thanks for checking! I compared the current PR head ( |
|
Thanks @To3akaRin for catching that registration could pass setup validation yet fail at runtime because its environment was invalid. Main now reuses runtime environment semantics during registration checks in |
Summary
Setup and doctor could report a registration as current even when its explicit environment prevented MCP startup. They now use the same pure environment parsing rules as startup, report the offending setting, and refuse setup writes until the caller repairs it. Valid settings split across OpenCode configuration files remain valid after merging.
Fixes #2665.
Problem and expected behavior
For example, a Cursor entry with
HOPPER_LOADER_ARGS_JSON: "{"was accepted as aligned althoughrea mcpimmediately exited with a configuration error. An unpairedREA_GHIDRA_COMPILER_SPEC_IDhad the same mismatch. These failures must be diagnosed before creating a backup or changing the registration. OpenCode may put the language identifier inopencode.jsonand the compiler specification inopencode.jsonc; that pair must be checked in their merged environment, while malformed values in either source must still be reported.Change and scope
parseEnvironmentValuesparses individual settings and decoded arrays;parseEnvironmentalso validates dependencies in a complete environment. Startup consumes the parsed collections instead of decoding them again. Neither stage probes the host.Contract and boundary impact
needs_humanwith empty planned/applied actions, doctor reports the registration asinvalid, and startup retains its existing error. Tool schemas and Evidence are unchanged.Evidence and regression coverage
On base
f0f09950f34d96e3b1c62fd04821af5e301f80c7, the extended registration boundary tests produced 10 failures / 92 passes before the production change. The failures covered malformed loader JSON, wrong JSON shape, NUL arguments, malformed/empty exclusion patterns, the missing language companion, DSH literal settings and an invalid literal replacing a DSH expression.Real compiled CLI tests compare MCP startup with setup and doctor for Cursor and DSH, assert unchanged bytes and no backup on refusal, then repair the fixture and verify raw-value preservation, backup readback and repeatable setup. Filesystem boundary controls cover Cursor, Codex, OpenCode and Hermes, including exact environment equality so defaults cannot leak into a registration. DSH controls preserve tagged expressions and distinguish known companions from unresolved ones. Eight additional layered filesystem cases verify split settings, a genuinely missing companion, precedence, unchanged lower-layer bytes, backups, invalid lower-priority fields, missing targets and non-final write targets. A real OpenCode CLI journey verifies setup/doctor accept the valid split pair without writes and reject the same configuration after its required language is removed.
Validation performed
Executed on macOS arm64 with Node 24.19.0 / npm 11.17.0 and locked dependencies. The repository pins 24.18.0 / 11.16.0; the exact pinned pair was not used for these runs.
npm run test:focused -- src/config.test.ts tests/boundary/filesystem/clientConfigurationEnvironment.test.ts tests/boundary/filesystem/clientConfigurationLayeredEnvironment.test.ts tests/boundary/filesystem/clientConfigurationDialects.test.ts tests/boundary/filesystem/dshClientConfiguration.test.ts tests/acceptance/setup/registrationRuntimeEnvironmentCli.test.ts tests/acceptance/setup/dshClientSetup.test.ts tests/acceptance/setup/clientConfigurationDiagnosticsCli.test.ts— 197 passed / 8 files. Includes the existing DSH setup, actual SDK MCP connection, repeat and uninstall journey.npm run check— passed; typecheck, format, lint, knip, metadata and architecture guards. Lint reported 0 errors and 1,051 repository warnings.npm run docs:check— passed, including 2 README consistency tests.npm run verify:test-discovery— all 1,057 test files discovered exactly once.npm run jscpd— passed, 2.98% duplicated lines.npm run verify:package— passed: isolated install/update, CLI/MCP, setup/uninstall, backups, failure recovery and cleanup; 191 tools / 6 prompts, verified lineage with no descendants.npm pack --dry-run --json— passed, 1,549 package entries.git diff --check— passed.Compatibility, safety, and release
No migration for valid configurations. Invalid literal overrides need the named setting repaired before setup can continue. Error settings and startup diagnostics retain the existing contract.
Remaining coverage limits: no live Cursor/Codex/Hermes application or native Hopper/Ghidra execution, no Windows/Linux run, and no evaluation of DSH expressions in a real Harness process. The package verifier's controlled bridges do not establish real-provider behavior. All registration mutations used test-owned temporary homes; no user registration was changed.
Before merge