Repository navigation
fix: preserve seek positions and paginated track ranks - #84
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 15, 2026, 3:36 AM ET / 07:36 UTC. ClawSweeper reviewWhat this changesThe PR validates seek positions before initializing playback, preserves large millisecond values when parsing and formatting, and includes pagination offsets in displayed top-track ranks. Merge readiness✅ Ready for maintainer review The fixes remain necessary on main and v0.13.0. No actionable introduced defect was found; this collaborator-authored PR is suitable for normal merge review. Likely related people: steipete and hibachipapi are routing candidates based on prior area work. Priority: P2 Review scores
Verification
How this fits togetherSpogo translates terminal commands into Spotify playback requests and formats Spotify results for terminal users. These changes affect seek input validation and human/plain output. flowchart LR
A[Seek argument] --> B[Validate and convert milliseconds]
B --> C[Spotify playback engine]
B --> D[Format seek confirmation]
E[Spotify tracks and page offset] --> F[Calculate full-result ranks]
F --> G[Human and plain output]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep checked millisecond arithmetic and response-offset ranking within the existing CLI paths, preserving valid inputs and JSON output contracts. Do we have a high-confidence way to reproduce the issue? Yes, from source: main overflows duration arithmetic for large minute values and restarts ranks at 1 for a nonzero page offset. These paths were not executed during this review. Is this the best way to solve the issue? Yes. Checked integer arithmetic and reuse of the existing response offset directly repair the defects without introducing a parallel implementation or configuration surface. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against f00ba02a4b11. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Seek parsed
mm:ssthrough nanosecondtime.Durationarithmetic, so large valid positions wrapped into negative playback positions. It also accepted negative inputs and malformed seconds, sometimes reporting success after an engine silently clamped the value. Top-track output separately restarted ranks at 1 for every page, so--offset 20mislabeled tracks 21 and 22 as 1 and 2.Validate seek components and check the millisecond integer boundary before constructing a playback client. Convert and format durations with integer arithmetic so large representable values remain exact. Include Spotify's response offset in human/plain top-track ranks; JSON keys are unchanged. Update command/output docs and the Unreleased changelog.
Validation: new regressions failed before the fix and pass afterward, covering rejected inputs without playback, integer boundaries, duration formatting, and page ranks in both output formats. Built CLI checks intercept AppleScript with a synthetic executable: invalid inputs invoke no playback,
2:03yields 123000 ms, and153722868:00yields 9223372080000 ms. Rank fixtures are synthetic; no live Spotify account or real playback device was used.Full local race/coverage gate passes at 90.6%; lint, deadcode, and the docs build pass. Independent autoreview is clean through P2.