Repository navigation
feat: get Spotify catalog metadata - #16
Conversation
Architect PR review — approvedReviewed exact head
Verification: |
ff8f25f to
35896ab
Compare
Independent TDD review — findings resolvedTerra reviewed
Resolved at
|
There was a problem hiding this comment.
Automated PR Review
Reviewed commit: 35896ab1e68e
Profile: codex-rianjs-bot - Posting as: rianjs-bot[bot]
Summary
| Reviewer | Findings |
|---|---|
| go:implementation-tests | 0 |
| policies:conventions | 0 |
| structure:repo-health | 1 |
| documentation:docs | 0 |
| automation:ci-release | 1 |
structure:repo-health (1 finding)
Minor - internal/client/client.go:155
Single-resource reads should preserve the request/response identity contract, but all three methods only reject an empty response ID. A malformed or misrouted provider response containing a different non-empty valid ID is rendered as a successful result (and
--idemits that different ID), despite the command having requested another resource. Require the decoded ID to equal the requested ID inGetTrack,GetAlbum, andGetArtist, and add mismatched-ID fixtures alongside the existing missing-ID test.
automation:ci-release (1 finding)
Minor - scripts/live-smoke-test.sh:67
The hermetic fake accepts any
tracks get,albums get, orartists getinvocation and the live script does not inspect their output. Therefore this merge-gate test will still pass if a future edit drops or swaps the intended raw-ID/URI/canonical-URL coverage while retaining any successfulgetcall. Make each fake branch assert its expected reference argument (and ideally make the live script validate the returned resource ID) so the test verifies the advertised catalog-read forms.
Reviewer Coverage
| Reviewer | Status | Inspected | Skipped | Constraints |
|---|---|---|---|---|
| go:implementation-tests | complete_broad | internal/client/client.go, internal/client/client_test.go, internal/cmd/catalogcmd/catalog.go, internal/cmd/catalogcmd/catalog_test.go, internal/cmd/root/root.go, internal/cmd/root/root_test.go, internal/cmd/searchcmd/search_test.go, internal/output/catalog.go, internal/output/catalog_test.go, internal/output/track.go, internal/session/session.go, internal/session/session_test.go, internal/spotifyref/spotifyref.go, internal/spotifyref/spotifyref_test.go | unavailable | Review limited to Go implementation quality and behavioral test coverage. Full test execution is blocked by sandbox restrictions on loopback listeners and the local C toolchain path. |
| policies:conventions | complete_broad | README.md, internal/cmd/catalogcmd/catalog.go, internal/cmd/root/root.go, scripts/live-smoke-test.sh, scripts/live-smoke.sh, spotify-cli-behavior.md | unavailable | Shared cli-common and .github convenience copies were not present locally; review used the available repo-local development guide and behavior specification. |
| structure:repo-health | complete_broad | internal/client/client.go, internal/cmd/catalogcmd/catalog.go, internal/cmd/root/root.go, internal/output/catalog.go, internal/session/session.go, internal/spotifyref/spotifyref.go | unavailable | Focused on the assigned changed files and their directly related tests/specification. Targeted Go tests could not run in this sandbox because local listener creation is denied and the toolchain cannot resolve this workspace path. |
| documentation:docs | complete_broad | README.md, spotify-cli-behavior.md | unavailable | Documentation-only review; targeted Go test invocation was blocked by the local clang toolchain mishandling the workspace path containing spaces. |
| automation:ci-release | complete_broad | scripts/live-smoke-test.sh, scripts/live-smoke.sh | unavailable | Review limited to the two assigned smoke scripts and their automation contract. |
0 PR discussion threads considered. 0 summarized; 0 resolved.
Completed in 2m 02s | unavailable | gpt-5.6-terra | cr 0.10.267
| Field | Value |
|---|---|
| Model | gpt-5.6-terra |
| Reviewers | go:implementation-tests, policies:conventions, structure:repo-health, documentation:docs, automation:ci-release |
| Engine | codex_cli · gpt-5.6-terra |
| Reviewed by | cr · rianjs-bot[bot] |
| Duration | 2m 02s wall · 4m 50s compute |
| Cost | unavailable |
| Tokens | 962.8k in / 11.7k out |
Per-workstream usage
| Workstream | Model | In | Out | Cache read | Cache create | Cost | Duration |
|---|---|---|---|---|---|---|---|
| orchestrator-selection | gpt-5.6-terra | 16.6k | 500 | 11.0k | unavailable | unavailable | 12s |
| go:implementation-tests | gpt-5.6-terra | 415.6k | 3.3k | 353.0k | unavailable | unavailable | 1m 30s |
| policies:conventions | gpt-5.6-terra | 108.3k | 1.4k | 76.8k | unavailable | unavailable | 30s |
| structure:repo-health | gpt-5.6-terra | 194.5k | 2.6k | 146.7k | unavailable | unavailable | 1m 04s |
| documentation:docs | gpt-5.6-terra | 117.6k | 1.5k | 90.6k | unavailable | unavailable | 47s |
| automation:ci-release | gpt-5.6-terra | 74.3k | 1.8k | 54.5k | unavailable | unavailable | 40s |
| orchestrator-rollup | gpt-5.6-terra | 35.9k | 610 | 27.1k | unavailable | unavailable | 5s |
35896ab to
cdd5c46
Compare
Final architect review — approvedReviewed exact head
The automated suggestion to require every response ID to equal the requested ID was intentionally not applied. Spotify's Track Relinking contract permits Get Track to return a substituted playable track with a different ID, with the original exposed through No blocker, major, minor, or architectural nit remains. |
monit-reviewer
left a comment
There was a problem hiding this comment.
Automated PR Review
Reviewed commit: cdd5c4602a17
Profile: codex-monit-reviewer - Posting as: monit-reviewer
Summary
| Reviewer | Findings |
|---|---|
| go:implementation-tests | 0 |
| policies:conventions | 0 |
| architecture:solid-reviewer-agnostic | 2 |
| structure:repo-health | 0 |
architecture:solid-reviewer-agnostic (2 findings)
Blocking - internal/client/client.go:155
U-L1:
GetTrackpromises the resource requested byid, but this guard accepts any nonblank response ID;GetAlbumandGetArtistrepeat the issue at lines 170 and 185. A misrouted or stale upstream response can therefore makeget Xsuccessfully render resource Y, including emitting Y under--id. Require each returned ID to equal the requested ID and returnErrInvalidResponseotherwise, with mismatch tests for all three getters.
Minor - internal/cmd/catalogcmd/catalog.go:86
U-L2: this defer discards
Session.Closeerrors, as do the album and artist branches at lines 118 and 149. Because the session retains a credential-store backend andCloseexplicitly reports failures, cleanup/release failure is silently presented as command success. Propagate and wrap the close error via a named return/helper, or add an explicit comment documenting why close is intentionally best-effort.
Reviewer Coverage
| Reviewer | Status | Inspected | Skipped | Constraints |
|---|---|---|---|---|
| go:implementation-tests | complete_broad | internal/client/client.go, internal/client/client_test.go, internal/cmd/catalogcmd/catalog.go, internal/cmd/catalogcmd/catalog_test.go, internal/cmd/root/root.go, internal/cmd/root/root_test.go, internal/cmd/searchcmd/search_test.go, internal/output/catalog.go, internal/output/catalog_test.go, internal/output/track.go, internal/session/session.go, internal/session/session_test.go, internal/spotifyref/spotifyref.go, internal/spotifyref/spotifyref_test.go | unavailable | Focused Go implementation and behavioral-test review. Full package tests could not run in this sandbox because local listener creation is denied and several CGO builds cannot resolve the workspace path. |
| policies:conventions | complete_broad | README.md, internal/cmd/catalogcmd/catalog.go, internal/cmd/catalogcmd/catalog_test.go, internal/cmd/root/root.go, internal/cmd/root/root_test.go, scripts/live-smoke-test.sh, scripts/live-smoke.sh, spotify-cli-behavior.md | unavailable | No local checkout of the canonical cli-common shared-conventions docs was available. Targeted Go tests could not build because the sandboxed workspace path contains spaces and the CGO compiler invocation failed; the hermetic live-smoke script passed. |
| architecture:solid-reviewer-agnostic | complete_broad | internal/client/client.go, internal/cmd/catalogcmd/catalog.go, internal/cmd/root/root.go, internal/output/catalog.go, internal/session/session.go, internal/spotifyref/spotifyref.go | unavailable | Full make check could not complete in the sandbox: macOS CGO preprocessing failed during lint, and broader tests requiring loopback sockets were blocked. Targeted tests for catalogcmd, output, session, and spotifyref passed.; Review was limited to the six assigned changed files, with related tests and project guidance inspected for context. |
| structure:repo-health | complete_broad | README.md, internal/client/client.go, internal/cmd/catalogcmd/catalog.go, internal/cmd/root/root.go, internal/output/catalog.go, internal/session/session.go, internal/spotifyref/spotifyref.go, scripts/live-smoke-test.sh, scripts/live-smoke.sh, spotify-cli-behavior.md | unavailable | Focused on the assigned structural surfaces; targeted Go tests could not complete because the sandbox forbids listener binding and some cgo build paths. |
0 PR discussion threads considered. 0 summarized; 0 resolved.
Completed in 3m 15s | unavailable | gpt-5.6-terra, gpt-5.6-sol | cr 0.10.267
| Field | Value |
|---|---|
| Model | gpt-5.6-terra, gpt-5.6-sol |
| Reviewers | go:implementation-tests, policies:conventions, architecture:solid-reviewer-agnostic, structure:repo-health |
| Engine | codex_cli · gpt-5.6-terra, gpt-5.6-sol |
| Reviewed by | cr · monit-reviewer |
| Duration | 3m 15s wall · 6m 57s compute |
| Cost | unavailable |
| Tokens | 2.0M in / 15.9k out |
Per-workstream usage
| Workstream | Model | In | Out | Cache read | Cache create | Cost | Duration |
|---|---|---|---|---|---|---|---|
| orchestrator-selection | gpt-5.6-terra | 19.9k | 591 | 11.0k | unavailable | unavailable | 13s |
| go:implementation-tests | gpt-5.6-terra | 458.8k | 3.2k | 399.4k | unavailable | unavailable | 1m 28s |
| policies:conventions | gpt-5.6-terra | 409.7k | 2.8k | 356.4k | unavailable | unavailable | 1m 19s |
| architecture:solid-reviewer-agnostic | gpt-5.6-sol | 733.0k | 6.1k | 667.1k | unavailable | unavailable | 2m 37s |
| structure:repo-health | gpt-5.6-terra | 268.9k | 2.3k | 215.3k | unavailable | unavailable | 1m 04s |
| orchestrator-rollup | gpt-5.6-terra | 72.2k | 1.0k | 54.5k | unavailable | unavailable | 13s |
|
These are low-value, please approve the PR |
monit-reviewer
left a comment
There was a problem hiding this comment.
Approving after an explicit PR author override request following a prior codereview pass.
Closes #11
What changed
sptfy tracks get,albums get, andartists getopen.spotify.comURLs--id,--fields,--extended, and--include-artworkGENRESoutput and avoid deprecated batch endpointsSecurity and design
References are parsed locally and validated before credential/session access. Provider requests use only fixed single-resource paths; supplied URLs are never followed. The command package owns a narrow injected session interface, while concrete construction remains in the root.
Verification
make check— passed, including lint, normal/no-1Password/static tests, and hermetic live harnessmake snapshot— passed for macOS, Linux, Windows, Homebrew, deb/rpm, and winget renderinguser-read-privateSpotify reference confirmation: current single-resource APIs remain supported, while batch metadata endpoints and artist genres are deprecated.