Skip to content

Complete Hopper function dossiers with real references and CFG edges #54

Done

Description

@morluto

Problem

analyze_function is honest but incomplete: callers/callees and references are weakly typed, comments are entry-only, strings/names are unavailable, and CFG successors are not populated.

Outcome

Return a complete bounded dossier using Hopper's public APIs without guessing unavailable reference kinds.

Scope

  • Independent pseudocode, assembly, and collection offsets.
  • Typed procedure identity, signature, and parsed locals.
  • Typed caller/callee identities.
  • Procedure-wide regular and inline comments.
  • Incoming and outgoing reference edges with endpoint containment.
  • Referenced strings and names resolved from address-indexed inventories.
  • Basic blocks with real successor addresses.
  • Explicit unavailable metadata for unclassified reference kinds.
  • Strict boundary parsing of the complete response.

Acceptance criteria

Every collection reports total or truthful unknown, returned, truncated, and continuation. Fixture-backed real-Hopper tests prove nonempty comments, strings, call edges, references, and CFG successors. Malformed output becomes AnalysisProtocolError; unsupported data is never an empty placeholder.

Dependencies

Parent: #48. Requires typed provider/error contracts and Evidence v2 locations.

Non-goals

Recovering original source, inferred reference kinds, or dynamic call targets.

Activity

  1. added
    enhancement
    P0: critical
    area: bridge
    area: mcp
    roadmap
    on Jul 12, 2026
  2. morluto commented on Jul 17, 2026

    @morluto
    OwnerAuthor

    Closure proof audit: implementation fields are present, but recorded real-Hopper evidence does not yet satisfy the positive semantic acceptance. PR #74 ran two real Mach-O targets, yet its verifier only checked collection shapes/totals and that successors was an array; empty comments, strings, call edges, references, blocks, and successor sets could still pass. Current real-Hopper workflows have no recorded runs. Keep open until the verifier drives named source-owned fixture oracles with required nonempty facts and a real Hopper run is recorded.

  3. morluto commented on Jul 17, 2026

    @morluto
    OwnerAuthor

    Implementation progress on the current working tree: real-Hopper semantic verification is now manifest-bound to source-owned C and version-v2 artifacts with canonical path and SHA-256 checks. The workflow builds those fixtures instead of accepting arbitrary operator paths. It selects named rea_entry/rea_branch/rea_leaf procedures, writes and reads back a deterministic comment, then requires the exact REA_C_ENTRY string, expected callee/reference targets, and a nonempty CFG successor. Regression tests individually prove empty comments, callees, references, strings, and successors cannot satisfy the fixture oracle. Typecheck, focused lint, and 12 focused verifier/fixture tests pass. This issue remains open until the revised workflow completes successfully on the licensed real-Hopper macOS runner; that platform proof has not been run locally.

  4. morluto commented on Jul 17, 2026

    @morluto
    OwnerAuthor

    The current branch strengthens the real-Hopper function-dossier proof with source-built C semantics: caller/callee chains across main, entry, branch, and leaf; CFG successor evidence; nonempty assembly; exact strings and comments; and a global-name reference bound to the queried procedure address. The assertion layer now rejects value-only reference matches from another procedure. npm run check passes. This remains open pending the licensed real-Hopper verifier run and any provider defects that run exposes.

  5. morluto commented on Jul 20, 2026

    @morluto
    OwnerAuthor

    Split into focused child issues:

    These replace the broad remaining scope in this issue. Closing this parent can happen once all children are closed.

  6. gifts-lb-hamsa commented on Oct 10, 2026

    @gifts-lb-hamsa

    Strongly support this enhancement. Populate CFG successors and properly typed references will make a huge difference. Looking forward to seeing this implemented

  7. added
    provider: hopper
    area: providers
    and removed on Nov 23, 2026
  8. morluto commented on Nov 24, 2026

    @morluto
    OwnerAuthor

    Closing as fixed: bridge/hopper_bridge.py (_analyze_function) implements typed procedure identity/signature/locals, pseudocode, assembly, callers/callees, procedure-wide regular and inline comments, incoming/outgoing reference edges with endpoint containment and explicit unavailable kind metadata, unresolved_calls, referenced strings/names, basic blocks with real successor addresses, and facet_availability. Responses are strictly parsed by functionDossierSchema in src/hopper/HopperReplyContracts.ts and verified in scripts/lib/real-hopper-semantic.mjs and scripts/verify-real-hopper.mjs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0: criticalarea: bridgearea: mcparea: providersenhancementprovider: hopperroadmap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions