Skip to content

Commit 335f2c1

Browse files
committed
improvement(provenance): inherit copied-path reasons once per copy
Semantics are unchanged — reasons are still inherited only when at least one incomplete path was actually copied — but the source set is walked once rather than once per copied path.
1 parent 398e2a3 commit 335f2c1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/sim/executor/utils/resolved-secret-trace-registry.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1818,11 +1818,13 @@ export class ResolvedSecretTraceRegistry {
18181818
target: ResolvedSecretTraceRegistry,
18191819
roots?: readonly ResolvedSecretInputPath[]
18201820
): void {
1821+
let copied = false
18211822
for (const [key, path] of this.incompleteInputPaths) {
18221823
if (roots && !roots.some((root) => inputPathsOverlap(path, root))) continue
18231824
target.incompleteInputPaths.set(key, [...path])
1824-
target.inheritIncompletenessReasonsFrom(this)
1825+
copied = true
18251826
}
1827+
if (copied) target.inheritIncompletenessReasonsFrom(this)
18261828
}
18271829

18281830
private addActiveEntry(entry: ActiveSecretEntry, options: { propagated?: boolean } = {}): void {

0 commit comments

Comments
 (0)