[PR #2413] [MERGED] feat(managed): add retained metadata overview and pages #5209

Closed
opened 2026-10-31 01:04:49 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/2413
Author: @N0zoM1z0
Created: 10/12/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @N0zoM1z0

Base: main ← Head: feat/managed-artifact-summary-20261012


📝 Commits (3)

  • 902f968 docs(managed): pin complete artifact delivery baseline
  • 8bc1601 feat(managed): add opt-in retained metadata overview and pages
  • 69b4621 docs(managed): record real token results and migration verification

📊 Changes

17 files changed (+873 additions, -28 deletions)

View changed files

📝 .agents/skills/reverse-engineer-anything/references/native-and-artifacts.md (+12 -0)
📝 docs/managed-code-analysis.md (+41 -0)
📝 experiments/analysis-efficiency/README.md (+5 -0)
📝 experiments/analysis-efficiency/compare.mjs (+1 -0)
➕ experiments/analysis-efficiency/managed-artifact-summary.md (+234 -0)
📝 experiments/analysis-efficiency/measure.mjs (+55 -3)
📝 experiments/analysis-efficiency/review-model.py (+17 -2)
📝 src/contracts/analysisViewToolContracts.ts (+1 -1)
📝 src/contracts/managed/managedToolContracts.ts (+13 -2)
📝 src/contracts/toolOutputSchemaGroups.ts (+10 -2)
📝 src/domain/analysisView/analysisView.test.ts (+8 -0)
📝 src/domain/analysisView/analysisView.ts (+43 -15)
📝 src/domain/analysisView/binaryLayoutView.ts (+6 -0)
➕ src/domain/analysisView/managedArtifactView.ts (+140 -0)
📝 src/server/createServer.ts (+1 -1)
📝 src/server/registerManagedTools.ts (+29 -2)
➕ tests/boundary/mcp/managedArtifactSummaryMcp.test.ts (+257 -0)

📄 Description

Identity/classification investigations currently receive complete managed metadata inventories even when unrelated custom attributes dominate the reply: shipped ShareX assemblies return about 1.27–1.30 MB of metadata SDK JSON. Add explicit detail: "summary" on the first inspect_managed_artifact call, retain the complete source Evidence, and return a distinct linked overview. Existing omitted/complete requests and CLI inspection keep complete output.

The overview preserves complete PE/CLI and classification/evidence, metadata status, nullable module/MVID, assembly, frameworks, returned-row counts, coverage/issues and limitations. Typed retained/portable reference/resource/attribute pages preserve original tokens, nulls, offsets, order and build-local identity scope. Page exhaustion does not imply complete metadata. A server without retention refuses selected delivery before file access. Reuse existing admission/projection/retention hooks and strip delivery detail before provider execution. The shared projector remains owned by each source operation; layout's fallback positively requires a page kind.

Measured delivery benefit; model-token benefit is not established. Two comparable SDK pairs per shipped assembly preserve selected facts/settings. Metadata bytes repeat at 1,270,839 → 10,549 for ShareX.dll and 1,296,839 → 10,937 for HelpersLib. Native-boundary output remains unchanged. The complete discovered catalog grows by 15,431 bytes (input definitions +1,293). Four actual Codex CLI 0.161.0 trials, requested gpt-5.6-terra high, the unchanged question and identical two-tool configuration show higher candidate input/uncached tokens in both comparisons and mixed latency. This PR does not claim actual token savings or a stable whole-task speedup. The curated findings include the answer/grader limitations and retain negative observations.

Validation:

  • 20 related domain/MCP tests pass: actual static PE parser and SDK schemas, first-call retention, unchanged defaults, selected target reuse, paging after removing the source, portable views/export, malformed metadata, synthetic historical null-subject shape, digest mismatch and unavailable retention before file access. Existing managed MCP tests also pass in the initial focused run.
  • Actual old-runtime complete Evidence for both shipped assemblies passes the new public SDK inline summary and all collection pages (28 view calls total), preserving original facts, coverage, IDs/links, row order and source bytes. Separate actual omitted-detail candidate calls reproduce all normalized metadata/native facts and canonical complete Evidence IDs from both controls. This verifies the recorded baseline, not every historical release.
  • The changed shared dispatcher also passes actual shipped SQLite WASM inspection using configured real WABT. No additional OS/provider coverage is inferred.
  • Complete project typecheck passes using the installed compiler's supported --singleThreaded scheduling under unchanged resource safeguards. Lint/format/knip/metadata and generated documentation checks pass. Normal pre-commit hooks and a private command-scoped checked pre-push hook run; repository hooks/configuration remain unchanged. Review-only documentation/grader changes use relevant checks.
  • Feature head 8bc1601ca51e417ca472d90ea0367e9418a1a0f2 has all CI checks green after browser cleanup and macOS hdiutil jobs pass on same-head retry. Initial failures remain recorded; no unrelated fixes were made. Final head CI and manual review will be verified before merging.

Control: ae8051302b5834322fa00cfa31c968ae74ab6ed9; measured committed candidate: 8bc1601ca51e417ca472d90ea0367e9418a1a0f2. Frozen runtime digests and reproduction settings are in experiments/analysis-efficiency/managed-artifact-summary.md; raw replies, runtimes, artifacts, profiles and detailed receipts stay outside Git. One CPU, 4 GiB hard memory, unchanged 3 GiB early-stop, no swap and bounded tasks apply. Final cgroup counters remain unknown and are not reported as verified no-OOM proof.

Continues #2016. No provider algorithm change, target execution, plugin SDK, database cache, release publication or deployment.


🔄 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/2413 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/12/2026 **Status:** ✅ Merged **Merged:** 10/12/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `feat/managed-artifact-summary-20261012` --- ### 📝 Commits (3) - [`902f968`](https://github.com/morluto/rea/commit/902f968f0c1c28dd0a59e87557d053d4b0d7693a) docs(managed): pin complete artifact delivery baseline - [`8bc1601`](https://github.com/morluto/rea/commit/8bc1601ca51e417ca472d90ea0367e9418a1a0f2) feat(managed): add opt-in retained metadata overview and pages - [`69b4621`](https://github.com/morluto/rea/commit/69b4621b5a001879940d12f91f757a958c17f508) docs(managed): record real token results and migration verification ### 📊 Changes **17 files changed** (+873 additions, -28 deletions) <details> <summary>View changed files</summary> 📝 `.agents/skills/reverse-engineer-anything/references/native-and-artifacts.md` (+12 -0) 📝 `docs/managed-code-analysis.md` (+41 -0) 📝 `experiments/analysis-efficiency/README.md` (+5 -0) 📝 `experiments/analysis-efficiency/compare.mjs` (+1 -0) ➕ `experiments/analysis-efficiency/managed-artifact-summary.md` (+234 -0) 📝 `experiments/analysis-efficiency/measure.mjs` (+55 -3) 📝 `experiments/analysis-efficiency/review-model.py` (+17 -2) 📝 `src/contracts/analysisViewToolContracts.ts` (+1 -1) 📝 `src/contracts/managed/managedToolContracts.ts` (+13 -2) 📝 `src/contracts/toolOutputSchemaGroups.ts` (+10 -2) 📝 `src/domain/analysisView/analysisView.test.ts` (+8 -0) 📝 `src/domain/analysisView/analysisView.ts` (+43 -15) 📝 `src/domain/analysisView/binaryLayoutView.ts` (+6 -0) ➕ `src/domain/analysisView/managedArtifactView.ts` (+140 -0) 📝 `src/server/createServer.ts` (+1 -1) 📝 `src/server/registerManagedTools.ts` (+29 -2) ➕ `tests/boundary/mcp/managedArtifactSummaryMcp.test.ts` (+257 -0) </details> ### 📄 Description Identity/classification investigations currently receive complete managed metadata inventories even when unrelated custom attributes dominate the reply: shipped ShareX assemblies return about 1.27–1.30 MB of metadata SDK JSON. Add explicit `detail: "summary"` on the first `inspect_managed_artifact` call, retain the complete source Evidence, and return a distinct linked overview. Existing omitted/complete requests and CLI inspection keep complete output. The overview preserves complete PE/CLI and classification/evidence, metadata status, nullable module/MVID, assembly, frameworks, returned-row counts, coverage/issues and limitations. Typed retained/portable reference/resource/attribute pages preserve original tokens, nulls, offsets, order and build-local identity scope. Page exhaustion does not imply complete metadata. A server without retention refuses selected delivery before file access. Reuse existing admission/projection/retention hooks and strip delivery detail before provider execution. The shared projector remains owned by each source operation; layout's fallback positively requires a page kind. **Measured delivery benefit; model-token benefit is not established.** Two comparable SDK pairs per shipped assembly preserve selected facts/settings. Metadata bytes repeat at 1,270,839 → 10,549 for ShareX.dll and 1,296,839 → 10,937 for HelpersLib. Native-boundary output remains unchanged. The complete discovered catalog grows by 15,431 bytes (input definitions +1,293). Four actual Codex CLI 0.161.0 trials, requested `gpt-5.6-terra` high, the unchanged question and identical two-tool configuration show higher candidate input/uncached tokens in both comparisons and mixed latency. This PR does not claim actual token savings or a stable whole-task speedup. The curated findings include the answer/grader limitations and retain negative observations. Validation: - 20 related domain/MCP tests pass: actual static PE parser and SDK schemas, first-call retention, unchanged defaults, selected target reuse, paging after removing the source, portable views/export, malformed metadata, synthetic historical null-subject shape, digest mismatch and unavailable retention before file access. Existing managed MCP tests also pass in the initial focused run. - Actual old-runtime complete Evidence for both shipped assemblies passes the new public SDK inline summary and all collection pages (28 view calls total), preserving original facts, coverage, IDs/links, row order and source bytes. Separate actual omitted-detail candidate calls reproduce all normalized metadata/native facts and canonical complete Evidence IDs from both controls. This verifies the recorded baseline, not every historical release. - The changed shared dispatcher also passes actual shipped SQLite WASM inspection using configured real WABT. No additional OS/provider coverage is inferred. - Complete project typecheck passes using the installed compiler's supported `--singleThreaded` scheduling under unchanged resource safeguards. Lint/format/knip/metadata and generated documentation checks pass. Normal pre-commit hooks and a private command-scoped checked pre-push hook run; repository hooks/configuration remain unchanged. Review-only documentation/grader changes use relevant checks. - Feature head `8bc1601ca51e417ca472d90ea0367e9418a1a0f2` has all CI checks green after browser cleanup and macOS `hdiutil` jobs pass on same-head retry. Initial failures remain recorded; no unrelated fixes were made. Final head CI and manual review will be verified before merging. Control: `ae8051302b5834322fa00cfa31c968ae74ab6ed9`; measured committed candidate: `8bc1601ca51e417ca472d90ea0367e9418a1a0f2`. Frozen runtime digests and reproduction settings are in `experiments/analysis-efficiency/managed-artifact-summary.md`; raw replies, runtimes, artifacts, profiles and detailed receipts stay outside Git. One CPU, 4 GiB hard memory, unchanged 3 GiB early-stop, no swap and bounded tasks apply. Final cgroup counters remain unknown and are not reported as verified no-OOM proof. Continues #2016. No provider algorithm change, target execution, plugin SDK, database cache, release publication or deployment. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:04:49 +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#5209
No description provided.