Skip to content

fix: ignore inherited Object keys in pipeline output queries - #41

Open
Flame119052 wants to merge 1 commit into
tscircuit:mainfrom
Flame119052:cursor/pipeline-own-outputs-73fd
Open

fix: ignore inherited Object keys in pipeline output queries#41
Flame119052 wants to merge 1 commit into
tscircuit:mainfrom
Flame119052:cursor/pipeline-own-outputs-73fd

Conversation

@Flame119052

Copy link
Copy Markdown

Summary

Fixes #40

hasStageOutput used in on pipelineOutputs = {}, so inherited names like constructor, toString, and __proto__ looked like completed stages. getStageOutput did an unrestricted lookup and returned those values.

Use Object.hasOwn so only own output entries count. A real completed stage that returns 0 still reports as present.

Verification

  • bun test tests/pipeline-output-lookup.test.ts tests/BasePipelineSolver.test.ts
  • bunx tsc --noEmit

hasStageOutput used `in`, so constructor/toString/__proto__ looked like
completed stages on an empty pipeline. Use Object.hasOwn so only own
outputs count, including a valid zero-valued stage result.
@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

@Flame119052 is attempting to deploy a commit to the tscircuit Team on Vercel.

A member of the Team first needs to authorize it.

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.

Pipeline output queries report inherited Object properties as completed-stage outputs

1 participant