Skip to content

impact: a TypeScript object-literal key survives the bound-field-access line rule - #1818

Merged
swapnilpaliwal-sd merged 1 commit into
apps/integration-0.1.9from
fix/ts-object-key-not-a-bound-access
Sep 30, 2026
Merged

swapnilpaliwal-sd merged 1 commit into
apps/integration-0.1.9from
fix/ts-object-key-not-a-bound-access

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor

A probe that passed before now failed. impact EventMeta.eventId lost its writer on the line { eventId: options.eventId }.

Cause. The per-line rule fa_line in dl/impact.dl, added for C# field access, drops every name match on a line where the engine bound a field access. On that line it binds options.eventId to PublishOptions.eventId. The object-literal key eventId, which writes EventMeta.eventId, was stored as the same kind of reference with no column to tell the two apart, so it was dropped as well.

Fix. axiomcode-index tags TypeScript object-literal keys OBJECT_PROPERTY_KEY, and the fref rule keeps them past fa_line. IMPACT_VERSION goes to 56. The C# rule's intent still holds: a read of the same name on another line stays excluded.

Tests

  • New case tests/cases/typescript/object-key-beside-a-bound-access, with two controls: red before the fix, green after.
  • tests/run.py --lang typescript: 204/204. The base passes 201/201; the three extra checks are the new case.
  • TypeScript app-loop probes on the same product snapshot: 33/74, against 32/74 on the base. bus-meta-event-id-causation is the only probe that changed.

…same-named field on its line

What was wrong
- `const meta: EventMeta = { eventId: options.eventId ?? … }` stopped listing its function
  under `impact EventMeta.eventId`. The per-line rule that drops a name match on a line where
  the engine bound a field access (to this field or to another field of that name) drops every
  ref of that name on the line. Refs carry no column, and TypeScript stored the literal key
  `eventId` as a plain UNKNOWN identifier, so the key went with the bound `options.eventId`
  read of PublishOptions.eventId. field_access has no row for an object literal key, so
  nothing else reported the write.

The change
- axiomcode-index: a TypeScript expression in the OBJECT_PROPERTY_KEY role is stored with
  entity kind OBJECT_PROPERTY_KEY instead of UNKNOWN.
- dl/impact.dl: fref keeps a ref of that kind past fa_line. A bound access on another line,
  and the bound access itself, are still not this field's readers.
- IMPACT_VERSION 56.

tests/cases/typescript/object-key-beside-a-bound-access: red before, green after, with two
controls (a line that only reads the other type's field stays out; the bound read stays the
other field's resolved reader). tests/run.py --lang typescript: 204 of 204.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
@swapnilpaliwal-sd
swapnilpaliwal-sd force-pushed the fix/ts-object-key-not-a-bound-access branch from 72a59b3 to a2c47e2 Compare September 30, 2026 08:51
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit e99e018 into apps/integration-0.1.9 Sep 30, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the fix/ts-object-key-not-a-bound-access branch September 30, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant