Skip to content

fix(contracts)!: return structured workflow failures - #87

Merged
morluto merged 3 commits into
mainfrom
codex/rea-low-mid-batch
Jul 13, 2026
Merged

morluto merged 3 commits into
mainfrom
codex/rea-low-mid-batch

Conversation

@morluto

@morluto morluto commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Description

Enhanced workflows currently encode partial failures in prose, forcing callers to parse strings and making normal name-resolution misses indistinguishable from provider errors. This change returns exact discriminated results and makes native cancellation classification deterministic.

  • batch_decompile returns ordered ok/error items plus total, succeeded, and failed counts. Empty input returns zero counts.
  • get_call_graph gives every node an explicit status and projects failures as { tag, message, details }.
  • find_xrefs_to_name resolves exact names through the exhaustively paged Hopper name inventory and returns resolved or unresolved with the stable name_not_found reason.
  • Error projection coverage is compile-time exhaustive across all 23 AnalysisErrorTag variants and excludes causes and local paths.
  • Pre-aborted native requests return AnalysisCancelledError before operation dispatch or subprocess work.

The MCP inventory remains 68 tools.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Refactoring (no functional change)
  • Tool contract change (MCP schema modification)

Review Order

  1. src/contracts/toolOutputSchemas.ts and src/domain/errors.ts for the public variants and exhaustive error projection.
  2. src/application/EnhancedTools.ts and src/domain/hopperValues.ts for workflow behavior and exact-name resolution.
  3. src/native/NativeMacOSProvider.ts for cancellation-first classification.
  4. Tests and package/real-Hopper verifier updates.

Testing Performed

  • Unit tests added or updated
  • TypeScript typecheck passes (npm run typecheck)
  • Linting passes (npm run lint)
  • Full test suite passes (npm test) — 54 files, 345 tests; coverage thresholds passed
  • Real Hopper verification performed (npm run verify:hopper) — unavailable because this host has no Hopper installation
  • Linux real Hopper verification performed (npm run verify:hopper:linux) — unavailable because this host has no Hopper installation or desktop runtime
  • Package verification performed (npm run verify:package) — packaged CLI and 68-tool target-free MCP smoke passed
  • npm pack --dry-run — 135 package files
  • Autoreview against origin/main — clean after fixing exact-name resolution and not-found classification

Tool Contract Impact

This is an intentional breaking output-shape change for batch_decompile, get_call_graph, and find_xrefs_to_name. No tools are added or removed. Callers must consume the new discriminants instead of parsing error strings.

Related Issues

Closes #23.
Closes #53.

Breaking Change

batch_decompile, get_call_graph, and find_xrefs_to_name now return structured discriminated output shapes; their previous prose-encoded shapes are not retained.

morluto added 2 commits July 13, 2026 05:03
Replace prose-encoded partial failures in batch decompilation, call graphs, and named xref lookup with discriminated structured results.

BREAKING CHANGE: batch_decompile, get_call_graph, and find_xrefs_to_name now return structured discriminated output shapes.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@morluto
morluto merged commit 0d7d9e0 into main Jul 13, 2026
11 checks passed
@morluto
morluto deleted the codex/rea-low-mid-batch branch July 28, 2026 17:39
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
fix(contracts)!: return structured workflow failures
@morluto morluto added the bug Something isn't working label Oct 14, 2026
DrAbdulmalek pushed a commit to DrAbdulmalek/rea that referenced this pull request Oct 26, 2026
…morluto#87 (morluto#101)

* feat(cookbook): extend nonpe-format-cookbook with 52 rules (AW-DC) for Issue morluto#87

* feat(cookbook): add 6 semantic-enhancement rules (DD-DI) per issue morluto#87 feedback

* feat(cookbook): edge-case hardening (DJ-DN) + inline enhancements from practitioner research
@morluto morluto added the area: domain Domain logic, errors, and pure functions label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: domain Domain logic, errors, and pure functions bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Correct provider-neutral analysis error classification Replace generic MCP outputs with exact agent-first tool contracts

1 participant