Repository navigation
fix(hopper-verifier): restore npm run verify:hopper on current main - #11800
Diego-9612 wants to merge 3 commits into
Conversation
[Low impact] The reviewed changes appear safe to merge. SummaryUpdates the Hopper verifier to follow current contracts.
No actionable new issues or security concerns were found. No previous review threads were supplied. Tests and real Hopper verification were not run during this review. Whether another PR supersedes this one could not be checked because GitHub access required authentication. Reviews (2) · Last reviewed commit: "fix(hopper-verifier): identify switched ..." · Reviewed by Greptile |
Codex Review Summary: ❌ FailedThis 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. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Friendly ping: Could a maintainer approve the CI workflows when convenient? Thanks! |
The real-Hopper verifier failed on macOS before reaching its lifecycle checks: - compare_functions received two complete analyze_function dossiers inline, which exceeds the default MCP input element allowance (1024). Compare the retained session record by reference on both sides. - Target-switch checks compared native document names, but REA now opens an owned copy of each target under a fixed image name, so every document is "image.hop". Assert disposal by document count instead, matching the target-switch check in verify-real-hopper.mjs. The fixture receipt test now requires retained-evidence references for compare_functions. Refs morluto#342, morluto#343 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Counting documents shows that a target switch does not retain the old native document, but not that the current document belongs to the new target. Check binary_session's selected path after every switch and reopen, alongside the listed current document and a document count that never grows. Validate analyze_function's evidence_id before comparing by retained reference, so a missing record fails with a clear message instead of a compare_functions schema error. Merge the duplicated compare_functions branch in the receipt test. Refs morluto#342, morluto#343 Co-Authored-By: Claude Opus 5.5 <[email protected]>
An omitted detail returns a retained summary above 32 KiB since 59a7999, so the large fixture search no longer received its expected rows inline. Co-Authored-By: Claude Opus 5.5 <[email protected]>
43083f7 to
d0856db
Compare
|
I rebased this onto current
Failure 3: since 59a7999, an omitted One caveat: one run of the previous version failed with |
Summary
Refs #342, #343.
npm run verify:hoppercurrently fails on macOS with a real Hopper. Three stale verifier assumptions cause this; with all of them fixed, the full real-Hopper verifier passes on currentmain, including the main → entry → branch → leaf chain those issues ask to prove.Problem and expected behavior
On
mainate896f6054(macOS 26.6.2 arm64, Hopper 6.6.2-demo),npm run verify:hopperfails in three places. The run stops at the first one, so they appear one at a time, in the order 1, 3, 2:scripts/lib/real-hopper-semantic.mjs(analyzeFixtureProcedure) sends two completeanalyze_functiondossiers inline tocompare_functions. REA rejects that before validation:scripts/lib/real-hopper-boundaries.mjs(verifyHopperLifecycleAndCli) failedassert.notEqual(firstDocument, secondDocument)with both values equal to'image.hop'. REA opens an owned copy of every target under a fixed name (image.executable/image.machoinsrc/hopper/BridgeLauncher.ts), so Hopper names every documentimage.hopand names cannot tell targets apart. The later!list_documents().includes(secondDocument)check has the same flaw.scripts/lib/real-hopper-exhaustive-search.mjs(collectAllMatches) failedsearch_procedures did not return every expected match. Since 59a7999, an omitteddetailreturns a retained summary when the Evidence exceeds 32 KiB, and the verifier expects 1205 rows inline.Expected: the verifier exercises the same behavior with current contracts and passes on a working host.
Change and scope
real-hopper-semantic.mjs: compare{ kind: "retained-evidence", evidence_id }on both sides. This is the reference form the error's remediation names andfunctionComparisonInputSchemaaccepts. Theevidence_idis checked againstev_<sha256>first, so a missing record fails with a clear message.real-hopper-boundaries.mjs: after the first open, the switch and the final reopen,requireSelectedTargetchecks three things:binary_sessionselects the expected target path (asverify-real-hopper.mjsdoes after its own switch),current_documentis listed, and the document count never grows. Names alone cannot identify the target, because every document isimage.hop.real-hopper-exhaustive-search.mjs: passdetail: "complete", as 59a7999 describes.tests/conformance/providers/hopper/realHopperExhaustiveSearch.test.ts: the fake client returns a summary unless complete detail is requested.tests/conformance/providers/hopper/realHopperSemantic.test.ts: the fixture receipt test now requires retained-evidence references for everycompare_functionscall.Not changed: product code, the input element limit, or the fixed image naming. If maintainers consider
image.hopfor every target a product problem, for example because document names are user-visible, that is a separate decision; this PR only stops the verifier from depending on unique names.Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
src/config/mcpInputBudget.ts) and Hopper image preparation (src/hopper/BridgeLauncher.ts) are unchanged; the verifier now follows them.compare_functionsstill compares the same authenticated record, now by retained reference.docs/public/product-catalog.json), package, or installation impact: none.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
(No new effects; the verifier's existing effects are unchanged.)
Evidence and regression coverage
realHopperSemantic.test.tsfails with the old inline arguments (1 failed, 4 passed);realHopperExhaustiveSearch.test.tsfails withoutdetail: "complete"(2 failed, 1 passed).npm run verify:hopperresult summary after the fix:verify:hopper:linuxnot run);verify:hopper:callers,:deadlines,:fatand:fat64were not rerun one896f6054;Target switching did not replace the previous Hopper document. The document lists were not captured and the cause is unknown. It did not recur in 7 further runs of that tree and its variants, or in the 6 runs of the final commit.Validation performed
All on macOS 26.6.2 arm64, Node 24.22.1 (
.nvmrc), Hopper 6.6.2-demo.On d0856db, rebased onto
maine896f6054:npm run verify:hopper— passed, 6 of 6 runs, Hopper launched fresh for each.npm run test:focused -- tests/conformance/providers/hopper/realHopperExhaustiveSearch.test.ts tests/conformance/providers/hopper/realHopperSemantic.test.ts— 8 passed.check:fast,check:changed,docs:check,verify:test-discovery— passed.Reproductions on
e896f6054:main— failed:compare_functionsresource_constraint (failure 1).mainwith fixes 1 and 2 — 4 of 4 runs failed: 3 with failure 3, 1 with the unexplained switch failure above.mainwith fixes 1 and 3 — failed:'image.hop'document-name assertion (failure 2).Compatibility, safety, and release
Author readiness
Human owner: @Diego-9612
Before merge
type(scope): outcome.🤖 Generated with Claude Code