Repository navigation
fix(semantics): preserve empty string property keys - #764
Conversation
|
Reviewed: nullable semanticStaticPropertyKey to distinguish '' from unknown/dynamic is the right direction, and the migrated paths (memberKey, evaluateObject, calls/objects/analysis projections, graph '""' label with raw name preserved) are each correct with good domain+graph+CLI coverage. COMMENT (non-blocking follow-up, not a blocker): same ''-as-dynamic conflation remains at src/domain/javascriptSemanticDataEffects.ts:146 (process.env[''] -> partial), src/domain/javascriptSemanticProjection.ts:239 (exact '' method mislabeled computed-dynamic), plus ~15 other semanticStaticPropertyName consumers using || null / length checks. Suggest a follow-up issue to audit/migrate them so the claim holds for all paths. |
Review — COMMENT (approve fix direction; follow-up needed)SummaryIntroduces nullable Verification
Follow-ups (same bug class survives on unmigrated paths)
|
Signed-off-by: Rudy Celekli <[email protected]>
|
Thanks for the review. Codex is assisting on behalf of @rudycelekli. Signed head The follow-up audit is filed as #783, with reproduced environment-key and method-name cases, a dynamic-key control, and per-consumer acceptance criteria. This PR's claim remains scoped to its tested read/destructuring/property-slot paths. |
There was a problem hiding this comment.
Reviewed headb453a6cc68. Nullable exact property keys preserve the legal empty string across value projection, destructuring and dynamic-key frontiers; the legacy method-name helper retains its existing behavior. Graph labels use a nonempty display value while raw keys and slot identity stay exact. Production build and all19 focused semantic/graph source tests and both relevant public-CLI acceptance cases passed on a frozen checkout; all19 hosted checks are green. Existing unconverted API-name consumers remain explicitly tracked in#783. No blocking findings in this patch.
|
Thanks, @rudycelekli, for your work on “fix(semantics): preserve empty string property keys.” I appreciate your contribution to REA. |
Signed-off-by: Rudy Celekli <[email protected]>
Summary
Analyze legal empty-string dictionary keys without treating them as dynamic or rejecting the graph display label. A root-route dictionary such as
const routes = {'': 'HOME'}previously causedanalyze-javascript-applicationto returnunreadable_outputwith/label (too_small). Member reads and destructuring also lost the exact HOME value.Use a nullable exact key for semantic value, object, projection and frontier recovery, preserving
''distinctly from an unknown key. Keep the legacy name helper's behavior for its existing consumers. Display the empty property slot as""while retaining the raw key and source identity. Dynamic identifier keys remain unknown; schemas are unchanged.Verification
root.npm run build:cached,npm run check,npm run check:fastpass (125 lint warnings, zero errors).Codex assisted on behalf of @rudycelekli. The signed DCO source received independent review before publication. Hosted CI is tracked separately.
Follow-up scope
This fix covers the tested property-read, destructuring, slot-identity, and display-label paths. Remaining configuration, method-name, provenance, and effect consumers of the legacy property-name helper are tracked in #783; their migration and API-name controls are separate follow-up work.