fix: prevent internal fields from being exported to JSONL
ContentHash and SourceRepo were being exported to beads.jsonl even though they are internal database fields. This caused JSONL pollution where every issue got these extra fields, and re-exports would produce different output than the original clean JSONL. Changed JSON tags from `json:"...,omitempty"` to `json:"-"` for: - ContentHash: Internal optimization field for content-based diffing - SourceRepo: Internal metadata for multi-repo support This fixes the ZFC resurrection bug where re-exports after import would pollute the JSONL with internal fields. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
// Issue represents a trackable work item
|
||||
type Issue struct {
|
||||
ID string `json:"id"`
|
||||
ContentHash string `json:"content_hash,omitempty"` // SHA256 hash of canonical content (excludes ID, timestamps)
|
||||
ContentHash string `json:"-"` // Internal: SHA256 hash of canonical content (excludes ID, timestamps) - NOT exported to JSONL
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
Design string `json:"design,omitempty"`
|
||||
@@ -29,7 +29,7 @@ type Issue struct {
|
||||
CompactedAt *time.Time `json:"compacted_at,omitempty"`
|
||||
CompactedAtCommit *string `json:"compacted_at_commit,omitempty"` // Git commit hash when compacted
|
||||
OriginalSize int `json:"original_size,omitempty"`
|
||||
SourceRepo string `json:"source_repo,omitempty"` // Which repo owns this issue (multi-repo support)
|
||||
SourceRepo string `json:"-"` // Internal: Which repo owns this issue (multi-repo support) - NOT exported to JSONL
|
||||
Labels []string `json:"labels,omitempty"` // Populated only for export/import
|
||||
Dependencies []*Dependency `json:"dependencies,omitempty"` // Populated only for export/import
|
||||
Comments []*Comment `json:"comments,omitempty"` // Populated only for export/import
|
||||
|
||||
Reference in New Issue
Block a user