Keep Spotify research separate from roster enrollment
Researching a Spotify recording currently enrolls every credited artist in the creator's personal roster and selected organization roster. Guest adoption invokes the same completion function, so unrelated contributors can become roster members even when the operator only wanted research.
Add a forward-only replacement of commit_spotify_context that removes those two roster writes. Provider artist identity reuse, ordered recording/release credits, source/version lineage, request output and worker-claim behavior remain unchanged. Intentional enrollment uses the existing onboard_spotify_artist / create_artist_with_roster operations; it reuses researched artist identities. Existing roster rows are preserved, with no cleanup or rights/mandate interpretation. Both ready-before-adoption and adoption-before-completion guest paths use the correction automatically. No API schema or permission changes, provider calls, paid flags or financial operations.
Validation: seven regressions failed before the fix because research created roster links; all27 real transaction tests pass on disposable PostgreSQL15/17. This includes nine new research/guest/persistence/role cases plus18 existing explicit-onboarding regressions, both guest timing orders, stale worker delivery, preservation of existing links, later explicit enrollment identity reuse, and fresh SQL connection source-lineage readback. Browser roles cannot execute the function; inherited enrollment tests cover revoked membership. Python compilation and diff checks pass. Existing onboarding CI's test_*roster.py pattern includes the suite. The fixture applies actual Context/guest/canonical migrations over minimal legacy tables; it is not a replay of all historical migrations.
No migration, hosted intake or deployment occurred. This changes the current function body only; previously applied migrations remain untouched. It does not change existing HTTP/MCP authorization or prove authenticated production parity. Before release verify the production function is still the expected predecessor, obtain explicit approval, then use the normal database workflow and verify body/permissions and supported authenticated behavior. Do not call providers merely to populate verification fixtures. Part of recoupable/app#2116 and #2147; attachment PR90/API983 remain separate pending approvals.
Summary by cubic
Keeps Spotify research separate from roster enrollment. commit_spotify_context no longer writes personal or organization roster links for credited contributors, so researching a recording can't accidentally add guest artists to a roster; explicit onboard_spotify_artist remains the enrollment path, and existing roster rows are preserved with no cleanup. Artist identity reuse, credits, source lineage, output shape, and worker-claim behavior are unchanged, and both guest adoption timing paths get the fix automatically.
Testing
- Adds nine real-transaction tests plus 18 existing onboarding regressions, all passing on disposable PostgreSQL 15/17.
- Tests cover personal and organization research, both guest timing orders, stale worker delivery, exact preservation of existing roster links, and identity reuse on later explicit enrollment.
Rollout
- Applies a new forward-only migration that replaces the function body; previously applied migrations are untouched.
- Before deploying, verify the production function is still the expected predecessor, obtain explicit approval, then run the normal database workflow and verify body/permissions and supported authenticated behavior.