Skip to content

Migrate - #19

Merged
rn404 merged 15 commits into
mainfrom
migrate
Jul 5, 2026
Merged

Migrate#19
rn404 merged 15 commits into
mainfrom
migrate

Conversation

@rn404

@rn404 rn404 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

No description provided.

rn404 and others added 13 commits July 5, 2026 17:37
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Save CLI output samples and legacy JSON format to testdata/legacy-samples/
- Confirm hash bug ('[object Object]' stored for all items)
- Discover clear command path duplication bug: files are never actually deleted
- Update migration plan with findings

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- go mod init github.com/rn404/nippo-cli, cobra v1.10.2
- cmd/sava: root command (sava, v0.1.0) and subcommand stubs
- Error policy: one-line message to stderr + exit 1
- Add Go CI workflow (gofmt/vet/test/golangci-lint) alongside Deno CI
- Add go 1.26.4 to .mise.toml (deno kept during migration)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- internal/model: Item/Log structs, JSON byte-compatible with legacy files
- New ID scheme: crypto/rand 8-char hex (replaces broken md5 hash)
- internal/logfile: read/write/list/remove with correct path resolution
  (fixes Deno version's doubled-path bug that broke clear)
- internal/log: add/delete/finish/split operations
- internal/view: output rendering matching legacy layout
- Strict yyyy-MM-dd date validation via time.ParseInLocation

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- add/end/del/list/clear wired to cobra with injected log dir and I/O
- list: today/date/-a/-s combinations, strict date validation
- clear: 30-day retention and --all, both actually delete files now
- --yes flag on list/clear to skip confirmation in non-TTY use
- Command-level tests covering full add->end->del flow and prompts

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Verified against Deno-created legacy data: read/write both directions
- Confirmed hash fix (per-item end/del) and clear actually deleting files
- JSON output byte-identical to Deno format
- README rewritten for Go version with go install instructions
- goreleaser deferred (optional)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Delete src/, deno.json, deno.lock, Deno CI workflows, VSCode Deno config
- Remove deno from .mise.toml (go only now)
- Archive note added to deno-v2-migration-plan.md
- Migration complete; remaining: default branch switch on GitHub

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@rn404 rn404 self-assigned this Jul 5, 2026
rn404 and others added 2 commits July 5, 2026 18:18
CLI output write errors to stdout/stderr are not actionable;
golangci-lint v2 errcheck flagged view.go for unchecked returns.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Restrict log files to owner-only permissions (0700 dir, 0600 file) with test
- Add least-privilege permissions (contents: read) to Go CI workflow
- Pin golangci-lint to v2.12.2 in CI and .mise.toml (was 'latest')
- Document lint command in README

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@rn404
rn404 merged commit 45ab592 into main Jul 5, 2026
4 checks passed
@rn404
rn404 deleted the migrate branch July 5, 2026 09:27
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.

1 participant