diff --git a/CLAUDE.md b/CLAUDE.md index 2e64607..2a809d3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -156,4 +156,13 @@ bd close # Complete work - NEVER stop before pushing - that leaves work stranded locally - NEVER say "ready to push when you are" - YOU must push - If push fails, resolve and retry until it succeeds +- **SSH fallback**: If `git push` fails with SSH key errors, switch to HTTPS via `gh`: + ```bash + gh config set git_protocol https + git remote set-url origin https://github.com/sthadka/jai.git + git push + # Restore SSH after: + gh config set git_protocol ssh + git remote set-url origin git@github.com:sthadka/jai.git + ``` diff --git a/internal/sync/engine.go b/internal/sync/engine.go index 0870a7e..3876424 100644 --- a/internal/sync/engine.go +++ b/internal/sync/engine.go @@ -89,7 +89,19 @@ func (e *Engine) DiscoverFields(ctx context.Context, overrides map[string]string if f.Schema == nil { continue } - name := inferColumnName(f, overrides) + + // If this field already has a stored name, reuse it to avoid + // re-triggering collision warnings on every sync. + name := "" + if em, ok := existing[f.ID]; ok { + name = em.Name + } + if overrideName, ok := overrides[f.ID]; ok { + name = overrideName + } + if name == "" { + name = inferColumnName(f, overrides) + } fieldType := jiraSchemaToType(f.Schema) // If this name is already owned by a different field, append a suffix