GitNexus/docs/languages/javascript-ingestion-gaps.md
Gergő Magyar 48f108a58a
docs: simplify guides and verify receiver gaps (#3694)
* docs: align resolution architecture and roadmap

* docs: add language ingestion gap inventories

* test: audit receiver gap targets and coverage

Check exact declaration IDs, expose the Dart await wrong-owner edge, and execute previously excluded C++, Rust, PHP, Dart and Vue shapes. Refresh the baseline and all language inventories from fresh measurements; call-drop counts remain unchanged.

* docs: focus roadmap and shorten project README

Keep the resolution roadmap limited to future work and acceptance criteria. Move detailed editor, CLI, MCP, deployment and wiki instructions into linked guides, preserve their command examples, and correct stale onboarding claims.

* docs: correct setup and audit descriptions

---------

Co-authored-by: Gergo Magyar <gergomagyar0@gmail.com>
2026-10-23 09:06:03 +01:00

48 lines
4.5 KiB
Markdown

# JavaScript Ingestion Gaps
Audited on 2026-10-23 with freshly built production sources at `c35806d24` and
the accompanying benchmark changes. See the [measurement audit](receiver-resolution-audit.md)
for commands, target checks, exclusions and test limits. Historical reports below
remain separate from freshly measured receiver cases; broader ingestion is not
exhaustively assessed.
## Receiver shape snapshot
States below come from [baseline.json](../../gitnexus/bench/receiver-resolution/baseline.json).
The [harness](../../gitnexus/bench/receiver-resolution/measure.mjs) defines each
spelling and its N/A reason. RESOLVES requires the exact expected declaration ID
and no same-named call to a different owner. WRONG-TARGET records incorrect edges.
| Shape | Recorded state | Expression or exclusion |
| ----------------------- | -------------- | ----------------------------------------------------------------------------- |
| `plainChain` | RESOLVES | `svc.getUser().save();` |
| `untypedChain` | VISIBLE-GAP | `svc.getUser().save();` (intentional untyped control) |
| `plainDeepChain` | RESOLVES | `svc.getUser().address.save();` |
| `optionalChain` | RESOLVES | `svc?.getUser().save();` |
| `nonNullAssert` | N/A | JavaScript has no non-null assertion operator. |
| `awaitParen` | RESOLVES | `(await svc.getUserAsync()).save();` |
| `explicitTypeArgs` | N/A | JavaScript has no type-argument syntax. |
| `indexElement` | VISIBLE-GAP | `repos[0].save();` |
| `fieldReceiverCall` | RESOLVES | `this.repo.save();` |
| `decoratedReceiverBase` | N/A | JavaScript method receivers carry no type decoration. |
| `decoratedFieldType` | N/A | JavaScript fields carry no declared type, so there is no decoration to strip. |
JSDoc supplies the types in the passing plain, deep, optional and awaited chains. `indexElement` remains a visible gap with `@param {User[]} repos`; JavaScript has no `ScopeResolver.elementTypeOf` hook. `untypedChain` is an intentional negative control, not a request to guess a target from its method name.
## Planning candidates
| ID | Evidence | Gap or boundary | Next planning step and acceptance |
| ------------- | ---------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| JAVASCRIPT-01 | Measured gap | A typed array does not establish the receiver type for `repos[0].save()`. | Preserve the container/element distinction and add a provider-owned element route. Require the exact User.save target, a same-name decoy and unsupported-container negatives. |
| JAVASCRIPT-02 | Negative control | `untypedChain` remains VISIBLE-GAP by design. | Keep the untyped receiver unresolved while adding typed coverage; resolving a same-named method elsewhere is a precision regression. |
## Code and regression entry points
- [Language provider directory](../../gitnexus/src/core/ingestion/languages/javascript/).
- [Scope resolver](../../gitnexus/src/core/ingestion/languages/javascript/scope-resolver.ts).
- [javascript.test.ts](../../gitnexus/test/integration/resolvers/javascript.test.ts).
- [javascript-object-properties.test.ts](../../gitnexus/test/integration/resolvers/javascript-object-properties.test.ts).
- [javascript-captures.test.ts](../../gitnexus/test/unit/scope-resolution/javascript/javascript-captures.test.ts).
Evidence details: [receiver baseline notes](../../gitnexus/bench/receiver-resolution/BASELINE.md) and
[current roadmap](../../type-resolution-roadmap.md#current-backlog).