Fixes type contract violation between SessionMetadata interface and metadata.ts implementation: 1. readMetadata(): Add fallback for required project field (project: raw["project"] ?? "") - Consistent with other required fields (worktree, branch, status) - Returns empty string for legacy files (caught by session-manager validation) 2. writeMetadata(): Write project unconditionally with other required fields - Moved from conditional section (if metadata.project) to unconditional - Consistent with worktree/branch/status handling This ensures the implementation matches the type definition where project is required (not optional), while maintaining backward compatibility via empty string fallback and downstream validation. Addresses bugbot comment: "Type change leaves readMetadata and writeMetadata inconsistent" Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| agent-orchestrator | ||
| cli | ||
| core | ||
| integration-tests | ||
| plugins | ||
| web | ||