[PR #5614] [MERGED] perf(reverse): add retained GDB and objdump summaries #6996

Closed
opened 2026-11-01 21:44:35 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5614
Author: @gensokyo-dev
Created: 10/20/2026
Status: ✅ Merged
Merged: 10/20/2026
Merged by: @gensokyo-dev

Base: main ← Head: perf/5584-command-output-summary-20261020


📝 Commits (2)

  • 2ceadb5 perf(reverse): add retained GDB and objdump summaries
  • 7269605 test(reverse): harden summary delivery verification

📊 Changes

27 files changed (+3163 additions, -116 deletions)

View changed files

➕ experiments/analysis-efficiency/command-observation-costs.py (+32 -0)
➕ experiments/analysis-efficiency/command-observation-oracle.py (+22 -0)
➕ experiments/analysis-efficiency/command-observation-queries.mjs (+212 -0)
➕ experiments/analysis-efficiency/command-observation-verify.py (+28 -0)
➕ experiments/analysis-efficiency/command-observation-views.json (+1328 -0)
➕ experiments/analysis-efficiency/command-observation-views.md (+139 -0)
➕ experiments/analysis-efficiency/command-observation-wire.py (+301 -0)
➕ experiments/analysis-efficiency/command_observation_delivery.py (+39 -0)
➕ experiments/analysis-efficiency/test_command_observation_delivery.py (+81 -0)
📝 src/application/reverse/ReverseEngineeringCommandPort.ts (+2 -2)
📝 src/application/reverse/ReverseEngineeringService.ts (+22 -5)
📝 src/cli/reverseEngineeringCommands.ts (+85 -44)
📝 src/contracts/analysisViewToolContracts.ts (+1 -1)
📝 src/contracts/gdbToolContracts.ts (+12 -17)
📝 src/contracts/reverseEngineeringToolContracts.ts (+8 -17)
📝 src/domain/analysisView/analysisView.ts (+29 -0)
➕ src/domain/analysisView/commandObservationView.ts (+176 -0)
➕ src/domain/commandObservation.ts (+44 -0)
📝 src/domain/reverseEngineering.ts (+15 -5)
📝 src/gdb/GdbSessionManager.ts (+1 -15)

...and 7 more files

📄 Description

Closes #5584.

Large GDB/objdump replies repeat command output in normalized/raw forms and GDB stream groupings. Explicit detail: "summary" retains the complete parent and returns existing facts with less duplication. Default complete Evidence and its identity remain compatible.

GDB keeps every ordered MI record, correlated result and completion/exit facts; objdump keeps opaque stdout/stderr and digest-change facts. Both preserve source parameters, provenance, partial/unknown semantics and nullable subjects. CLI and MCP reuse the existing analysis-view projection; CLI saves a nonoverwriting complete bundle. The domain owns one shared fact codec. No new tool, protocol decoder, live cache or command authority.

Validation:

  • Latest-head CI static checks pass all 8 tasks, including full typecheck; package build passes. Local strict checks of affected boundaries/transitive source, six standard static tasks, three delivery-oracle regressions, and docs/5 README checks pass. Resource-stopped local full typechecks are not reported as passes.

  • 383 focused tests across 14 files, including SDK/Ajv schemas, GDB cancellation/queues/ownership/cleanup, nine CLI publication regressions and 54 neighboring model-artifact tests; rebuilt and repeated after rebasing onto main@7d6f90485.

  • Real GDB 13.1/objdump 2.40 on installed Bash: all 239/15,428 selected function bytes match independently mapped ELF ranges. CLI default Evidence matches baseline; summary exports, overwrite rejection and a durable caller PTY are verified.

  • Actual Codex 0.163 client with all 210 schemas: completed small/large whole-request JSON token proxies 605,133 → 580,070 / 1,269,405 → 1,091,290, including replays and compaction. Local deterministic SSE, no AI inference/usage/quality claim. Small task is slower; retained bundles grow. Default-budget incomplete baseline is excluded from gains.

  • Resource-guarded runs verify payload exit/cleanup, CPU and peak family memory, with zero OOM events. Reproduction and full tradeoffs / receipt.

Real Rizin/Cutter and GUI workflows remain unverified. Their semantics are unchanged. The final integrated 211-tool catalog and real GDB/objdump/client entrypoints were revalidated; original performance numbers remain pinned to the 210-tool cohort. Remaining source/platform CI jobs were still queued at the final merge decision; the owner explicitly authorized a verified bypass.

Author readiness

Human owner: @gensokyo-dev

The owner dictated these declarations and authorized initial review and merge in this session.

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/5614 **Author:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Created:** 10/20/2026 **Status:** ✅ Merged **Merged:** 10/20/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `perf/5584-command-output-summary-20261020` --- ### 📝 Commits (2) - [`2ceadb5`](https://github.com/morluto/rea/commit/2ceadb5061bc3cc1cfa0b46550881e11ea0f02fe) perf(reverse): add retained GDB and objdump summaries - [`7269605`](https://github.com/morluto/rea/commit/726960566389097737ebf636acdaf656ff150334) test(reverse): harden summary delivery verification ### 📊 Changes **27 files changed** (+3163 additions, -116 deletions) <details> <summary>View changed files</summary> ➕ `experiments/analysis-efficiency/command-observation-costs.py` (+32 -0) ➕ `experiments/analysis-efficiency/command-observation-oracle.py` (+22 -0) ➕ `experiments/analysis-efficiency/command-observation-queries.mjs` (+212 -0) ➕ `experiments/analysis-efficiency/command-observation-verify.py` (+28 -0) ➕ `experiments/analysis-efficiency/command-observation-views.json` (+1328 -0) ➕ `experiments/analysis-efficiency/command-observation-views.md` (+139 -0) ➕ `experiments/analysis-efficiency/command-observation-wire.py` (+301 -0) ➕ `experiments/analysis-efficiency/command_observation_delivery.py` (+39 -0) ➕ `experiments/analysis-efficiency/test_command_observation_delivery.py` (+81 -0) 📝 `src/application/reverse/ReverseEngineeringCommandPort.ts` (+2 -2) 📝 `src/application/reverse/ReverseEngineeringService.ts` (+22 -5) 📝 `src/cli/reverseEngineeringCommands.ts` (+85 -44) 📝 `src/contracts/analysisViewToolContracts.ts` (+1 -1) 📝 `src/contracts/gdbToolContracts.ts` (+12 -17) 📝 `src/contracts/reverseEngineeringToolContracts.ts` (+8 -17) 📝 `src/domain/analysisView/analysisView.ts` (+29 -0) ➕ `src/domain/analysisView/commandObservationView.ts` (+176 -0) ➕ `src/domain/commandObservation.ts` (+44 -0) 📝 `src/domain/reverseEngineering.ts` (+15 -5) 📝 `src/gdb/GdbSessionManager.ts` (+1 -15) _...and 7 more files_ </details> ### 📄 Description Closes #5584. Large GDB/objdump replies repeat command output in normalized/raw forms and GDB stream groupings. Explicit `detail: "summary"` retains the complete parent and returns existing facts with less duplication. Default complete Evidence and its identity remain compatible. GDB keeps every ordered MI record, correlated result and completion/exit facts; objdump keeps opaque stdout/stderr and digest-change facts. Both preserve source parameters, provenance, partial/unknown semantics and nullable subjects. CLI and MCP reuse the existing analysis-view projection; CLI saves a nonoverwriting complete bundle. The domain owns one shared fact codec. No new tool, protocol decoder, live cache or command authority. Validation: - Latest-head CI static checks pass all 8 tasks, including full typecheck; package build passes. Local strict checks of affected boundaries/transitive source, six standard static tasks, three delivery-oracle regressions, and docs/5 README checks pass. Resource-stopped local full typechecks are not reported as passes. - 383 focused tests across 14 files, including SDK/Ajv schemas, GDB cancellation/queues/ownership/cleanup, nine CLI publication regressions and 54 neighboring model-artifact tests; rebuilt and repeated after rebasing onto `main@7d6f90485`. - Real GDB 13.1/objdump 2.40 on installed Bash: all 239/15,428 selected function bytes match independently mapped ELF ranges. CLI default Evidence matches baseline; summary exports, overwrite rejection and a durable caller PTY are verified. - Actual Codex 0.163 client with all 210 schemas: completed small/large whole-request JSON token proxies 605,133 → 580,070 / 1,269,405 → 1,091,290, including replays and compaction. Local deterministic SSE, no AI inference/usage/quality claim. Small task is slower; retained bundles grow. Default-budget incomplete baseline is excluded from gains. - Resource-guarded runs verify payload exit/cleanup, CPU and peak family memory, with zero OOM events. [Reproduction and full tradeoffs](https://github.com/morluto/rea/blob/726960566389097737ebf636acdaf656ff150334/experiments/analysis-efficiency/command-observation-views.md) / [receipt](https://github.com/morluto/rea/blob/726960566389097737ebf636acdaf656ff150334/experiments/analysis-efficiency/command-observation-views.json). Real Rizin/Cutter and GUI workflows remain unverified. Their semantics are unchanged. The final integrated 211-tool catalog and real GDB/objdump/client entrypoints were revalidated; original performance numbers remain pinned to the 210-tool cohort. Remaining source/platform CI jobs were still queued at the final merge decision; the owner explicitly authorized a verified bypass. ## Author readiness Human owner: @gensokyo-dev The owner dictated these declarations and authorized initial review and merge in this session. - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:44:35 +00:00
Sign in to join this conversation.
No milestone
No project
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#6996
No description provided.