Description
On 3.17.0, dataflow <fn> returns an empty result (flowsTo / flowsFrom / mutates all empty, "0 data-dependent consumers" with --impact) for functions whose parameters are destructured or read through optional chaining, and it never shows object-property moves inside a function body. Functions with plain positional parameters in the same files produce full output, which isolates the gap to the parameter shape and to property-level flow.
Observed during a validation pass on optave/core-orchestrator-svc, where the three questions dataflow was supposed to answer (is a field deleted on every return path, is a field set on every path, is a value moved from one object to another) all had to be answered by reading.
Steps to Reproduce
On optave/core-orchestrator-svc at commit ca32aee92 (branch claude/opus-sonnet-orchestration-94be94):
npx -y @optave/codegraph@3.17.0 build --no-incremental
# destructured-with-default parameter: empty
npx -y @optave/codegraph@3.17.0 dataflow selectForContext # source/domain/logic/sources/knowledgeSources.js, signature (chunks, policy = {}) with destructuring of policy inside
# optional-chained parameter reads: empty
npx -y @optave/codegraph@3.17.0 dataflow resolveRagContext # source/domain/logic/sources/ragContext.js, reads execution_data?.rag_context_override / ?.sources
# object-property move inside the body: invisible
npx -y @optave/codegraph@3.17.0 dataflow defineAssistantPath --impact # source/commons/handlers/comp.task-definition.apigw.lambda.handler.js:149; lines 233-248 move results.knowledge_search into execution_data.retrieval.standard and delete the source key
# control, plain positional parameters: full output
npx -y @optave/codegraph@3.17.0 dataflow toStructuredSource # source/domain/logic/sources/structuredResults.js
npx -y @optave/codegraph@3.17.0 dataflow normalizeRetrieveResponse # only 1 of 4 toArray(...) call sites surfaced (dataplane.controller.js:150,161,173,193)
Minimal shapes:
// destructured / defaulted parameter -> empty dataflow
export function selectForContext(chunks, policy = {}) {
const { max_chars = 6000, per_doc_cap = 3 } = policy;
return chunks.filter(c => c.text.length < max_chars).slice(0, per_doc_cap);
}
// optional chaining -> empty dataflow
export function resolveRagContext(execution_data, format) {
if (execution_data?.rag_context_override) return execution_data.rag_context_override;
if (execution_data?.sources) return format(execution_data.sources);
return undefined;
}
// property move -> not reported as a mutation or a flow
function moveResult(results, execution_data) {
execution_data.retrieval = { standard: results.knowledge_search ?? null };
delete results.knowledge_search;
}
Expected Behavior
dataflow selectForContext lists chunks and the destructured policy fields as inputs and the returned array as flowing to the caller (exec.aggregation.apigw.lambda.handler.js).
dataflow resolveRagContext shows execution_data.rag_context_override and execution_data.sources as reads and the caller's assignment of the return value.
dataflow defineAssistantPath reports the write to execution_data.retrieval and the delete of results.knowledge_search under mutates.
dataflow normalizeRetrieveResponse surfaces all four toArray(...) call sites.
Actual Behavior
dataflow selectForContext -> header only; flowsTo/flowsFrom/mutates empty
dataflow resolveRagContext -> header only; flowsTo/flowsFrom/mutates empty
dataflow defineAssistantPath --impact -> "0 data-dependent consumers"
dataflow formatKnowledgeContext -> partial (destructured object parameter { sources, facts, language })
dataflow toStructuredSource -> full output (positional parameters)
dataflow normalizeRetrieveResponse -> 1 of 4 toArray call-arg edges
Codegraph Version
3.17.0 (npx -y @optave/codegraph@3.17.0); the build reported Dataflow (native orchestrator): 101 inter-procedural edges inserted for a 402-file repo.
Node.js Version
v22.18.0
Operating System
Windows 11 Pro 10.0.26200 (x64), Git Bash shell
Parser Engine
native (Active engine : native (v3.17.0))
Additional Context
Description
On 3.17.0,
dataflow <fn>returns an empty result (flowsTo/flowsFrom/mutatesall empty, "0 data-dependent consumers" with--impact) for functions whose parameters are destructured or read through optional chaining, and it never shows object-property moves inside a function body. Functions with plain positional parameters in the same files produce full output, which isolates the gap to the parameter shape and to property-level flow.Observed during a validation pass on
optave/core-orchestrator-svc, where the three questionsdataflowwas supposed to answer (is a field deleted on every return path, is a field set on every path, is a value moved from one object to another) all had to be answered by reading.Steps to Reproduce
On
optave/core-orchestrator-svcat commitca32aee92(branchclaude/opus-sonnet-orchestration-94be94):Minimal shapes:
Expected Behavior
dataflow selectForContextlistschunksand the destructuredpolicyfields as inputs and the returned array as flowing to the caller (exec.aggregation.apigw.lambda.handler.js).dataflow resolveRagContextshowsexecution_data.rag_context_overrideandexecution_data.sourcesas reads and the caller's assignment of the return value.dataflow defineAssistantPathreports the write toexecution_data.retrievaland the delete ofresults.knowledge_searchundermutates.dataflow normalizeRetrieveResponsesurfaces all fourtoArray(...)call sites.Actual Behavior
Codegraph Version
3.17.0 (
npx -y @optave/codegraph@3.17.0); the build reportedDataflow (native orchestrator): 101 inter-procedural edges insertedfor a 402-file repo.Node.js Version
v22.18.0
Operating System
Windows 11 Pro 10.0.26200 (x64), Git Bash shell
Parser Engine
native (
Active engine : native (v3.17.0))Additional Context
cfg <fn>works on the same functions (for examplecfg retrievalFlowreturned 135 blocks / 172 edges), so the parse is fine; the gap is in the dataflow extraction over destructuring patterns, optional chains and member assignments.