fix: remove duplicate kind field in traceSpanSchema dropping memory/trigger spans — closes #39#57
Open
rishab11250 wants to merge 1 commit into
Conversation
…rigger spans Closes NEXARA-oss#39 Removes the narrower duplicate kind declaration (lines 76-84) that omitted 'memory' and 'trigger' span types. The comprehensive definition with all 9 kinds at line 74 now takes effect.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Overview
Fixes issue #39 — the
traceSpanSchemainpackages/contracts/src/index.tshad twokinddeclarations. Zod applies schemas sequentially, so the second (narrower) definition at lines 76-84 was overwriting the first (comprehensive) one at line 74. The narrower definition omitted'memory'and'trigger', causing any span with those kinds to silently fail validation and be dropped from the tracing subsystem without any error.Related Issues
Architecture and Implementation Details
kinddeclaration (lines 76-84) frompackages/contracts/src/index.tsthat only included 7 kinds (workflow,agent,tool,llm,queue,retry,replay).workflow,agent,tool,llm,queue,memory,trigger,retry,replay) at line 74 now takes effect as intended.Breaking Changes
Testing Methodology
pnpm --filter @pulsestack/contracts build— TypeScript compilation succeeded with zero errors.npx vitest run packages/contracts/src/— all 2 tests passed.traceSpanSchema.parse({ kind: 'memory', ...rest })andtraceSpanSchema.parse({ kind: 'trigger', ...rest })now succeed.Performance & Observability Impact
No performance impact. Fixes a data-loss bug in the tracing subsystem — memory-agent spans and trigger spans are now correctly recorded instead of being silently dropped.
Contributor Checklist