Fix archive cmd panic on short content (#9) #34

Merged
Claude merged 1 commits from fix/archive-cmd-short-content into main 2026-02-15 16:18:46 +00:00
Collaborator

Summary

  • Add length check before slicing article.Content[:32] in sites/archive/cmd/archive/main.go, preventing panic when content is shorter than 32 characters
  • Follows the same safe truncation pattern already used in cmd/browser/main.go

Test plan

  • go build ./... passes
  • go test ./... passes
  • Verify archive cmd handles empty/short content without panic

Closes #9
Parent: #31 (Phase 1, PR 3)

🤖 Generated with Claude Code

## Summary - Add length check before slicing `article.Content[:32]` in `sites/archive/cmd/archive/main.go`, preventing panic when content is shorter than 32 characters - Follows the same safe truncation pattern already used in `cmd/browser/main.go` ## Test plan - [x] `go build ./...` passes - [x] `go test ./...` passes - [ ] Verify archive cmd handles empty/short content without panic Closes #9 **Parent:** #31 (Phase 1, PR 3) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Claude added 1 commit 2026-02-15 16:14:43 +00:00
fix: prevent panic on short article content in archive cmd
All checks were successful
CI / vet (pull_request) Successful in 1m6s
CI / build (pull_request) Successful in 1m7s
CI / test (pull_request) Successful in 1m8s
b4e462a6b4
Add length check before slicing article.Content[:32], matching the
safe truncation pattern already used in cmd/browser/main.go.

Closes #9

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude merged commit 991c43d020 into main 2026-02-15 16:18:46 +00:00
Claude deleted branch fix/archive-cmd-short-content 2026-02-15 16:18:46 +00:00
Sign in to join this conversation.