Skip to content

fix(contracts): align managed example MethodDef scope - #8900

Closed
ShuaixinHuang wants to merge 1 commit into
morluto:mainfrom
ShuaixinHuang:codex/fix-managed-example-row-scope
Closed

ShuaixinHuang wants to merge 1 commit into
morluto:mainfrom
ShuaixinHuang:codex/fix-managed-example-row-scope

Conversation

@ShuaixinHuang

@ShuaixinHuang ShuaixinHuang commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #8966 at the author's request.

Supersedes #8892 at the author's request. The branch and code are unchanged; this new PR requires its own CI and initial author readiness confirmation.

Summary

Fixes #8885. The canonical managed graph/reconstruction example contains MethodDef token 0x06000001 but inherits a complete zero-row MethodDef interval from the empty-member fixture. It now declares offset 0, count 1, total 1 for that one-method example.

Problem and expected behavior

A shipped complete one-method example must not claim that its full MethodDef table has zero rows. The graph and reconstruction-import examples share this source Evidence, so the correction belongs to their common producer.

Change and scope

Add the explicit one-row scope in runtimeMembers. The existing createEvidence constructor automatically commits the corrected payload into its Evidence identity. Empty comparison examples retain their own zero-row scopes. Add a canonical-example regression and real compiled CLI/stdio MCP checks for both graph projection and reconstruction import.

This is a synthetic example-data repair within existing functionality. Maintainer scope decision: not applicable. It does not broaden graph admission or claim that an actual PE/CLI inspector emitted the contradictory sample.

Contract and boundary impact

  • Semantic owner and earliest changed stage: canonical managedWorkflowExamples runtimeMembers, before Evidence construction.
  • Consumers: project_managed_application_graph and import_managed_reconstruction share the authenticated corrected record.
  • CLI/MCP schemas, provider support, target authority, package/install metadata and production inspection behavior: unchanged.
  • Effect scope: source tests and owned CLI/stdio processes consuming synthetic data; no managed assembly execution, CLR or real decompiler.

Evidence and regression coverage

Before the fix, the new source regression failed on count/total 0 versus expected 1 (1 failed, 6 passed). After the fix, it checks the row-1 token, complete one-row interval, no selection, intact Evidence commitment and shared reconstruction source. Public tests pass the corrected inline Evidence through both adapters, check the one-method complete graph and source links, and verify reconstruction input identity.

Validation performed

  • npm.cmd run test:focused -- src/contracts/workflowInputContracts.test.ts tests/composition/analysis-sessions/managedApplicationGraph.test.ts tests/acceptance/managedWorkflowExamples.test.ts: 32 passed in 3 files, 27.86 s, including actual compiled CLI and stdio MCP.
  • npm.cmd run check:fast: typecheck/lint 2 tasks passed, 44.636 s.
  • Repository formatter and git diff --check: passed.
  • Exact existing source/test base blobs match upstream 2d16a40; remote diff is one source line plus tests, with post-commit bytes checked.
  • Windows Node22.20.0/npm10.9.3 host; existing child-runtime selection and dependencies reused. npm is not the repository pin; no dependencies installed.

Compatibility, safety, and release

The corrected synthetic Evidence receives its corresponding identity through the normal constructor. No historical Evidence is rewritten and no caller inputs are repaired. No real-target/provider behavior or performance improvement is claimed.

Local validation used an isolated earlier surrounding tree with both edited existing files byte-identical to upstream; the complete remote integration tree needs its own CI. Upstream currently also has the duplicate-import build blocker tracked by #8884, which this focused example repair does not duplicate.

Author readiness

Human owner: @ShuaixinHuang

  • 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.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-04T12:53:43.314931Z
We couldn’t complete this review. Comment @codex review to try again.
329b664 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[Low impact] The code change appears safe to merge, with no actionable findings.

Summary

Corrects the shared managed example’s method_rows to describe its one method.

  • The managed example reports its single method in a complete one-row scope.

ShuaixinHuang acknowledges the existing duplicate-import build blocker tracked by #8884 as outside this repair.

Tests were not rerun during review. The description says this PR supersedes #8892; live supersession status could not be checked because GitHub access was not authenticated.

Reviews (1) · Last reviewed commit: "fix(contracts): align managed example Me..." · Reviewed by Greptile

@morluto morluto added area: domain Domain logic, errors, and pure functions bug Something isn't working labels Nov 22, 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.

[Bug] project-managed-application-graph canonical example claims zero MethodDef rows while containing a method

2 participants