[PR #598] [MERGED] fix(managed): classify truncated signatures as malformed #2098

Closed
opened 2026-10-16 21:14:15 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/598
Author: @rudycelekli
Created: 10/5/2026
Status: ✅ Merged
Merged: 10/5/2026
Merged by: @morluto

Base: main ← Head: campaign/rea-malformed-signature-status-20261005


📝 Commits (4)

  • 965bead fix(managed): classify truncated signatures as malformed
  • 1cccb80 fix(managed): use typed signature parsing failures
  • 9ee9ead chore(managed): refresh signature schema commitments
  • be62582 chore: sync upstream and regenerate signature schema commitments

📊 Changes

7 files changed (+86 additions, -13 deletions)

View changed files

📝 docs/product-catalog.json (+2 -2)
📝 docs/verification/managed-conformance-manifest.json (+2 -2)
📝 skills/reverse-engineer-anything/SKILL.md (+1 -1)
📝 src/domain/managedArtifact.ts (+1 -0)
📝 src/dotnet/ManagedMemberInspector.test.ts (+36 -0)
📝 src/dotnet/ManagedMemberInspectorCore.ts (+43 -7)
📝 src/generatedMcpToolCatalog.ts (+1 -1)

📄 Description

Summary

Distinguish malformed managed signatures from valid but unsupported elements.

No issue is linked: this is a newly reproduced correctness defect found while reviewing current upstream; the regression and affected production seam are included for review.

Problem and expected behavior

A truncated compressed integer or missing type operand was reported as unsupported. Structurally incomplete signature bytes must report malformed.

Change and scope

Use the existing ManagedReaderFailure/managedFailure algebra for structural and unsupported signature failures, with classification at each throw site. Only known typed signature failures are converted into parse_status; unexpected errors are rethrown.

Contract and boundary impact

  • Semantic owner and earliest changed stage: ManagedMemberInspectorCore.signature parser.
  • CLI and MCP/tool-catalog contract: existing operations and schemas remain compatible; Signature parse_status is malformed for truncated data and unsupported for an unimplemented element.
  • Provider, bridge, target-format, or platform compatibility: Static PE/CLI member inspection.
  • Evidence, artifact, provenance, or reconstruction contract: existing source identity and explicit incomplete/unsupported evidence remain preserved.
  • Process execution, authorization, cleanup, or containment impact: No new process or filesystem behavior.
  • Generated metadata and caller-visible schemas: add unsupported-signature to the existing ManagedParseIssue code enum because it had no capability-failure code. Regenerate the MCP wire-schema catalog, product catalog digests, skill catalog commitment, and dependent managed manifest. Tool inventory and operation names remain unchanged; no dependency or installation changes.

Evidence and regression coverage

  • Tests added or updated: src/dotnet/ManagedMemberInspector.test.ts.
  • Base reproduction or other evidence: Executed synthetic complete PE/CLI fixtures: five malformed signatures fail the upstream expectation; a genuinely unsupported multidimensional array remains unsupported after the fix. Affected base is ebb4c45.
  • User-visible CLI/MCP output: Signature parse_status is malformed for truncated data and unsupported for an unimplemented element.
  • Remaining proof gaps: Real CLR execution and optional ILSpy were not run. verify:managed uses synthetic fixtures; it does not establish actual CLR runtime equivalence.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

Current repair head: be62582738bcdeac1fc9ffd12d8ccd517413be8c.

  • Focused signature, source-map, MCP schema/registration, and product catalog tests: 5 files and 45 tests passed.
  • npm run check and npm run check:fast: passed.
  • npm run docs:check: passed on the updated upstream workflow; validates committed generated metadata without rendering API HTML.
  • npm run verify:managed: passed 11 synthetic conformance cases. Optional real operator/ILSpy paths were not configured.
  • npm run verify:package and npm pack --dry-run: passed.
  • npm run check:pr: not rerun for this focused repair, following the current routine verification policy. Earlier full-suite results applied to the original PR head, not this repair.

Current owner main has been merged with a signed commit. The four generated-file conflicts were resolved by retaining the owner’s source/contracts and regenerating the wire catalog, product/skill digests, and dependent managed manifest.

The original upstream reproduction remains five malformed cases failing and the unsupported control passing. The owner-requested follow-up folds these six regressions into the existing module test file and aligns failure handling with the existing provider algebra.

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: Real CLR execution and optional ILSpy were not run. verify:managed uses synthetic fixtures; it does not establish actual CLR runtime equivalence.
  • Package or release metadata impact: the additive managed issue enum updates the advertised schemas and generated commitments described above; tool inventory, package version, dependencies, and installation remain unchanged.
  • Security, privacy, process, or containment review: No new process or filesystem behavior. Final diff contains source and regression tests; local fixtures, binaries, caches and logs are excluded.

Review checklist

  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

AI assistance was used to investigate, implement, and test this change. Commits are signed and include a DCO sign-off.


🔄 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/598 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/5/2026 **Status:** ✅ Merged **Merged:** 10/5/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `campaign/rea-malformed-signature-status-20261005` --- ### 📝 Commits (4) - [`965bead`](https://github.com/morluto/rea/commit/965bead8d11a87bd6cada9e22fcb145fd0f0c012) fix(managed): classify truncated signatures as malformed - [`1cccb80`](https://github.com/morluto/rea/commit/1cccb80f30abee2f8b7cd17fdece6344aea63d34) fix(managed): use typed signature parsing failures - [`9ee9ead`](https://github.com/morluto/rea/commit/9ee9eadea645f7e448948b7a8323724b04065fdb) chore(managed): refresh signature schema commitments - [`be62582`](https://github.com/morluto/rea/commit/be62582738bcdeac1fc9ffd12d8ccd517413be8c) chore: sync upstream and regenerate signature schema commitments ### 📊 Changes **7 files changed** (+86 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `docs/product-catalog.json` (+2 -2) 📝 `docs/verification/managed-conformance-manifest.json` (+2 -2) 📝 `skills/reverse-engineer-anything/SKILL.md` (+1 -1) 📝 `src/domain/managedArtifact.ts` (+1 -0) 📝 `src/dotnet/ManagedMemberInspector.test.ts` (+36 -0) 📝 `src/dotnet/ManagedMemberInspectorCore.ts` (+43 -7) 📝 `src/generatedMcpToolCatalog.ts` (+1 -1) </details> ### 📄 Description ## Summary Distinguish malformed managed signatures from valid but unsupported elements. No issue is linked: this is a newly reproduced correctness defect found while reviewing current upstream; the regression and affected production seam are included for review. ## Problem and expected behavior A truncated compressed integer or missing type operand was reported as unsupported. Structurally incomplete signature bytes must report malformed. ## Change and scope Use the existing ManagedReaderFailure/managedFailure algebra for structural and unsupported signature failures, with classification at each throw site. Only known typed signature failures are converted into parse_status; unexpected errors are rethrown. ## Contract and boundary impact - Semantic owner and earliest changed stage: ManagedMemberInspectorCore.signature parser. - CLI and MCP/tool-catalog contract: existing operations and schemas remain compatible; Signature parse_status is malformed for truncated data and unsupported for an unimplemented element. - Provider, bridge, target-format, or platform compatibility: Static PE/CLI member inspection. - Evidence, artifact, provenance, or reconstruction contract: existing source identity and explicit incomplete/unsupported evidence remain preserved. - Process execution, authorization, cleanup, or containment impact: No new process or filesystem behavior. - Generated metadata and caller-visible schemas: add `unsupported-signature` to the existing ManagedParseIssue code enum because it had no capability-failure code. Regenerate the MCP wire-schema catalog, product catalog digests, skill catalog commitment, and dependent managed manifest. Tool inventory and operation names remain unchanged; no dependency or installation changes. ## Evidence and regression coverage - Tests added or updated: `src/dotnet/ManagedMemberInspector.test.ts`. - Base reproduction or other evidence: Executed synthetic complete PE/CLI fixtures: five malformed signatures fail the upstream expectation; a genuinely unsupported multidimensional array remains unsupported after the fix. Affected base is ebb4c45. - User-visible CLI/MCP output: Signature parse_status is malformed for truncated data and unsupported for an unimplemented element. - Remaining proof gaps: Real CLR execution and optional ILSpy were not run. verify:managed uses synthetic fixtures; it does not establish actual CLR runtime equivalence. For evidence-bearing changes: - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed Current repair head: `be62582738bcdeac1fc9ffd12d8ccd517413be8c`. - Focused signature, source-map, MCP schema/registration, and product catalog tests: 5 files and 45 tests passed. - `npm run check` and `npm run check:fast`: passed. - `npm run docs:check`: passed on the updated upstream workflow; validates committed generated metadata without rendering API HTML. - `npm run verify:managed`: passed 11 synthetic conformance cases. Optional real operator/ILSpy paths were not configured. - `npm run verify:package` and `npm pack --dry-run`: passed. - `npm run check:pr`: not rerun for this focused repair, following the current [routine verification policy](https://github.com/morluto/rea/pull/599). Earlier full-suite results applied to the original PR head, not this repair. Current owner main has been merged with a signed commit. The four generated-file conflicts were resolved by retaining the owner’s source/contracts and regenerating the wire catalog, product/skill digests, and dependent managed manifest. The original upstream reproduction remains five malformed cases failing and the unsupported control passing. The owner-requested follow-up folds these six regressions into the existing module test file and aligns failure handling with the existing provider algebra. ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: Real CLR execution and optional ILSpy were not run. verify:managed uses synthetic fixtures; it does not establish actual CLR runtime equivalence. - Package or release metadata impact: the additive managed issue enum updates the advertised schemas and generated commitments described above; tool inventory, package version, dependencies, and installation remain unchanged. - Security, privacy, process, or containment review: No new process or filesystem behavior. Final diff contains source and regression tests; local fixtures, binaries, caches and logs are excluded. ## Review checklist - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. AI assistance was used to investigate, implement, and test this change. Commits are signed and include a DCO sign-off. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:14:15 +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#2098
No description provided.