Repository navigation
fix(managed): project metadata with empty names without a display label - #3853
Conversation
The managed application graph copied metadata names into observation labels. The graph schema requires a non-empty label or null, so Evidence whose Module name was the string heap's empty entry made project-managed-application-graph fail with invalid_request at observations.0.label. The inspector accepts that Evidence as complete, and no graph was returned. Labels derived from metadata names (assembly, module, type, member, P/Invoke import and native implementation) now become null when the name is empty. The node's properties keep the source value, so display formatting no longer rejects identity facts. Fixes #3352 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The PR appears safe to merge; no blocking issues were found. SummaryManaged graph nodes now map empty display labels to null while keeping the original metadata values in their properties.
Reviews (1) · Last reviewed commit: "fix(managed): project metadata with empt..." · Reviewed by Greptile |
Summary
Fixes #3352.
inspect-managed-membersreturns complete, authenticated Evidence for a PE/CLI Module row whose name is the empty string. Passing that exact Evidence toproject-managed-application-graphfailed with exit1:invalid_requestatobservations.0.label. No graph was returned, so the readable type, method and field observations were lost.Now the projection succeeds. The module node's observation has
label: null, andproperties.namekeeps the source value"".Problem and expected behavior
managedApplicationGraphNodes.tscopied metadata names directly into graph observation labels. The shared application-graph schema allowslabelto be a non-empty string ornull. The managed inspector schema admits any string (z.string()) for these names. An empty metadata name (heap index 0) is therefore valid inspector Evidence, but it was an invalid graph label, so a display constraint rejected an identity fact.Change and scope
src/domain/managed/managedApplicationGraphNodes.ts, gainsmetadataLabel(name), which maps""tonull. It is applied to every label derived from a metadata name, all of which the inspector admits as empty:propertieskeeps the source values unchanged.basenameof the path, never empty) and JavaScript graph labels.Contract and boundary impact
labelwas already nullable, and a previously rejected input now projects.properties; only the display label becomes null.Expected effects:
Evidence and regression coverage
tests/composition/analysis-sessions/managedApplicationGraph.test.tsbuilds the repository PE fixture and points the Module row's Name at the empty string-heap entry, as the issue does. It inspects the result with the productioninspectManagedMembersBytesand projects that Evidence. It asserts the module observation{ label: null, properties: { name: "" } }and that the type, method and field nodes are retained.1 failed | 17 passed).projection 1 {"code":"invalid_request",...,"message":"A nested value failed validation at observations.0.label: Too small: expected string to have >=1 characters"}.For evidence-bearing changes:
Validation performed
npm run test:focused -- tests/boundary/cli/jsonInputStatus.test.ts tests/composition/analysis-sessions/managedApplicationGraph.test.ts: 51 passednpm run check:fast,npm run knip: passed0with 5 nodes, at about 0.4 s each, the same as the control before the change.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.🤖 Generated with Claude Code