Skip to content

fix: preserve static namespace bracket calls in default-auto call graphs #739

Description

@mohanagy

User story

As a developer tracing a cross-file call, I want a statically resolved namespace bracket call to retain the same authenticated relationship as the equivalent dot call, so that the call chain is not missing a real step.

Acceptance criteria

  • A literal namespace bracket call and its equivalent dot form resolve to the same source-grounded target through the real default-auto graph and public call-chain response.
  • Shadowed receivers and unresolved dynamic keys do not gain invented import/call relationships.
  • Existing dot calls, runtime heritage traversal, export resolution, provenance and cache/regeneration behavior remain correct; positive controls must themselves represent valid source semantics.
  • A future accepted correction has reviewed exact-candidate and integrated evidence. A diagnostic pass or helper-only result cannot close this defect as fixed.

Status and boundary — 10 September 2026

OPEN — BLOCKED. The previous mechanism remains stopped. Two rejected candidates do not establish a fix. The last review records heritage traversal regressions, an invalid positive control, and red or incomplete validation.

This story states the unresolved user behavior; it does not authorize a third repair, rerun or resumption of the old mechanism. A future mechanism decision must first address the invalid oracle and the documented regression within an explicit finite scope. Do not revive old implementation instructions from the history below.

This defect remains separate from #754's product-usefulness question. No claim about overall task quality, latency or cost follows from resolving it.

Historical issue body — preserved; current disposition above takes precedence

Current disposition — 5 September 2026

OPEN — BLOCKED. The mechanism is stopped after the second independent HOLD and the agreed stop condition. Current roadmap: #740. The latest review records real heritage traversal regressions, an invalid positive control, and red or incomplete required validation: #739 (comment). Preserve those distinct findings, both reviews, and all frozen historical controls and contracts.

No third repair, coding, acceptance rerun, PR, merge, release, or benchmark is authorized by this reconciliation. Any resumption requires a separately approved mechanism decision and a new versioned contract, including correction of the invalid oracle; it is not the next automatic action. #741's independent research and evaluation-contract preparation can proceed without resuming this issue. The original implementation authorization below is historical and does not override this current blocked disposition.


Preserve static namespace bracket calls in default-auto call graphs

Maintainer authorization, 5 September 2026: create this one implementation issue and assign the bounded correction and tests to Codex CLI. The reviewing lead coordinates GitHub, managed state and evidence; a separate fresh reviewer checks the exact candidate. This authorization follows the positive reviewed result of #738. It does not authorize merge, release, or a new model benchmark.

Problem and expected change

At 72ecb4aa72899c5fa1ba4e2c27795070e74871eb, default-auto generation omits a cross-file call made as names["prepareName"](input), while the equivalent names.prepareName(input) produces the relation. In the three-file #738 development example, the existing public MCP call_chain consequently returns zero paths for brackets and the complete renderGreeting() → prepareName() → trimName() path for dots.

The correction should make this statically resolved bracket form produce the same authenticated relations and public chain as the dot form. The receiver must bind to the actual imported namespace, and the literal member must resolve through the existing export map. A matching name on a locally shadowed receiver must not create an imported-export edge.

This is one call-graph correctness repair. No improvement in overall agent answer quality, token cost, latency or the completed #736 experiment is established by the feasibility result.

Evidence to read before editing

Read the complete #738 contract, research result and amendments. The lead supplies the local author report, reproduction instructions, author manifest, independent review and corrected reviewer manifest in the CLI dispatch. Their identities are recorded in the linked #738 result. These artifacts are preserved evidence, not files to repair during implementation.

The reviewer independently reproduced the public responses and stored graph facts. Its copied debugger probe exited with a trace-completeness failure because a source symlink changed breakpoint URLs; the original causal trace was hash-verified and checked against the exact source. Preserve this limitation. Do not report an independent full-probe pass or edit historical diagnostic evidence to remove the failure.

Implementation boundary

Extend the existing static namespace-member recognition in resolveCrossFileRelativeJsImports, within src/pipeline/extract/cross-file.ts. Reuse its lexical-shadow guard, namespace/export resolution, relation construction, callsite provenance and deduplication.

Eligible new recognition is an identifier receiver with a string-literal element key whose existing namespace/export lookup resolves the target. Arbitrary computed keys remain outside this repair. Preserve established dot-access behavior and the existing default-auto topology policy. Apply the existing extractor-cache invalidation mechanism for the changed extraction semantics so incremental generation does not carry forward missing relations. Previously stored graphs require regeneration; do not rewrite historical graph evidence.

If the source facts are unavailable at this owner, or the correction requires changing multiple architecture owners, stop and report the contradiction before expanding scope. Do not switch topology ownership to SPI or revive the rejected navigation candidate.

Required development controls

Codex CLI should reuse the repository's existing test facilities and exercise the real default-auto generation and public MCP behavior.

  1. Public regression: preserve the [Feasibility] Establish one bounded Madar recovery mechanism after #736 #738 task, source semantics and public request. Demonstrate the regression fails on the recorded base because the bracket chain is absent. After correction, regenerated bracket and dot variants must both return the same expected three-function chain. Inspect the actual relation endpoints and relevant provenance as well as the serialized result.
  2. Binding negative: a nested function parameter shadows a file-scope namespace import and contains a same-named method. A literal bracket call on that parameter must not acquire a call/import relation to the imported export. Verify the absence of that specific false edge, rather than only an aggregate count.
  3. Different positive: an unrelated, unshadowed namespace call uses a literal key that resolves through a renamed barrel export. Establish its source-grounded target and expected public chain before implementing the repair. It must resolve through the existing binding/export mechanism without identifier-specific exceptions.
  4. Compatibility: retain dot-call behavior, unresolved dynamic-key behavior, existing relation/provenance conventions and deduplication. Verify the existing cache invalidation path for regeneration following the extractor change.

These are visible development controls, not holdout or product qualification tasks. If another occurrence exposes the same incompletely modeled boundary after correction, stop this mechanism rather than adding a sequence of name-specific exceptions.

Execution and review

Refresh live next, issue amendments and root status before dispatch. The feasibility base is 72ecb4aa72899c5fa1ba4e2c27795070e74871eb; reconcile any intervening change explicitly. Use an isolated branch/worktree and preserve the user's root changes and all #738 evidence. Use the existing managed-state writer and record the actual Codex CLI session. Historical role assignments do not override the maintainer's assignment of implementation to Codex CLI.

Codex CLI implements the failing regression, bounded correction and controls, runs the relevant required checks, and returns the exact candidate commit/tree, diff, commands, before/after public evidence and remaining limitations. Run the repository's required validation appropriate to the change. Do not substitute helper-only tests or a green aggregate for the public regression and negative binding control.

A separate fresh reviewer checks the exact candidate and all four acceptance areas. Any corrected candidate needs review and checks on that updated identity. A successful review may support a later integration proposal under #738's product-qualification gate; merge and release retain the maintainer's separate authority, with exact-head CI and post-merge verification required if integration is later authorized.

No new model benchmark is part of this implementation issue. Product qualification remains a later decision using fresh, independently held tasks and frozen quality/completeness/citation/total-cost criteria. #697, #710 and historical recovery issues retain their dispositions.

Acceptance and stop outcome

Accept implementation only when the public regression fails at base, passes on the candidate, the materially different controls establish correct binding behavior, cache/compatibility requirements hold, and independent exact-candidate review accepts the evidence.

If any of those fail, preserve the candidate and evidence and return the specific unresolved result. Closing an implementation issue as fixed requires delivered integration evidence; completing a diagnostic or obtaining a local green test does not establish that status.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingindexingIndex build / extraction / SPItypescriptTypeScript-specific work

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions