Skip to content

Fix Suno media credential scoping and partial audio reporting - #38

Merged
szmyty merged 1 commit into
mainfrom
agent/suno-asset-failures
Oct 18, 2026
Merged

szmyty merged 1 commit into
mainfrom
agent/suno-asset-failures

Conversation

@szmyty

@szmyty szmyty commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

A real capture retrieved 36 clip records and 72 artwork files but every primary audio request returned HTTP 403. The CLI still displayed “Capture Complete” and verification PASS. This change fixes two confirmed client/reporting defects and adds a safe way to investigate the remaining live provider rejection.

  • Scope API cookies, JWT and browser headers to the exact configured API origin. External media requests use a separate client with explicit requests that never merge cookie jars. Asset redirects permanently drop API credentials once they leave that origin; supplied signed queries remain intact in requests and redacted in saved asset metadata.
  • Report downloaded versus advertised primary audio and mark failed advertised audio, artwork, video or media variants as a partial capture. Persist expected/downloaded/failed counts and completeness through normalized metadata, manifest and JSON/Markdown reports. Keep saved-file integrity separate from capture completeness, including human summaries, inspection and capture JSON. Progress goes to stderr in JSON mode. Failed/empty/interrupted downloads clean up temporary files; HTTP403 guidance is actionable without echoing URLs or response bodies.
  • Add mindcap inspect suno "<existing-version-directory>" --asset-diagnostics: an offline, count-only JSON report that classifies saved primary links, including Suno's /api/forbidden placeholder and signature-parameter presence. It reads verified canonical metadata, prints no titles/IDs/hosts/URLs/credentials and works with old captures. Regression coverage includes malformed input and unchecked metadata substitution.
  • Document the existing Clerk-auth flow, the difference between metadata login and media download eligibility, Suno's September 2026 download-policy changes, a one-song browser Download check and the current adapter/format limitations.
  • Fix the adjacent --no-include-video unbound-local crash. Remove pre-existing formatter-only blank lines in the vault catalog and normalize a touched CLI string so repository formatter gates pass; no vault behavior changes.

Limits: These fixes do not establish the cause of the maintainer's live 403s. The adapter still consumes URLs from clip metadata and does not add a new provider download-authorization/allowance flow. We need the new offline diagnostics and/or the site's own Download result to distinguish a forbidden placeholder, expired/denied CDN link or account eligibility. No actual credentials/browser state were accessed, no real media was downloaded, and no quota-consuming export request was made. Existing --audio-format only changes the extension; WAV/stem export negotiation is not implemented by Suno capture.

Validation on exact tree 765b63b933e7f506ce4b11086792c1eaf276e127: 527 tests passed; Ruff lint and format checks passed with both uv-lock 0.15.22 and Poetry-lock 0.16.0 versions; focused strict Mypy passed 12 files; wheel and sdist built. A fresh wheel installation, run outside the checkout, inspected a synthetic old-style 36-clip capture and emitted only the expected safe counts. Mock transports exercise authenticated API metadata, credential-rejecting CDNs, signed queries, same/cross-origin redirects, temp cleanup, all/individual asset failures, complete captures, partial archive integrity and machine-readable CLI output. Full-repository Mypy has the exact same 28 pre-existing diagnostics in nine files as main. Offline tests clear this environment's inherited SOCKS proxy, as with #37; runtime dependencies and lockfiles are unchanged.

This PR is independent of bookmark PR #37 and does not modify the roadmap or attempt ADR backfill.

GitHub Actions CI run 39128879922 passed on head e804974d10c75c1d9080e31ea1b14e4285079392: Poetry configuration/install, formatting, lint, full tests, architecture boundaries, wheel/sdist build, required package contents and clean-tree checks. Independent review closed its findings and reran inspector/pipeline coverage: 31 passed.

@szmyty
szmyty marked this pull request as ready for review October 18, 2026 13:55
@szmyty
szmyty merged commit bdee26c into main Oct 18, 2026
1 check passed
@devactivity-app

Copy link
Copy Markdown

Pull Request Summary by devActivity

Metrics

Cycle Time: 1h 6m

Achievements

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