Skip to content

Reduce response contents to remove unneeded fields#1073

Merged
pditommaso merged 4 commits into
masterfrom
codex/reduce-response-contents
Jul 15, 2026
Merged

Reduce response contents to remove unneeded fields#1073
pditommaso merged 4 commits into
masterfrom
codex/reduce-response-contents

Conversation

@gavinelder

@gavinelder gavinelder commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Strip user PII (name and email) from the container-detail API responses while keeping the existing response shapes unchanged (non-breaking for API clients)
  • GET /v1alpha2/container/{requestId} still returns WaveContainerRecord; the user is reduced to an id-only copy via WaveContainerRecord.withoutUserDetails()
  • DescribeWaveContainerResponse.RequestInfo keeps the User-typed user field but populates only the id via the new User.ofId(...) factory
  • Align the build, mirror, and container view pages to show the user id instead of the user name/email
  • Mail service is intentionally unaffected — it reads the live request identity and still sends to user.email

Notes

  • PII reduction is scoped to the API response builders only; the User class itself is unchanged (no @JsonIgnore), so name/email remain available to the mail service and internal flows
  • Because Jackson is configured with NON_ABSENT, an id-only user serializes as {"id":...} — same object shape, no name/email leaked
  • TypeSpec route/model reverted to WaveContainerRecord (no new response model), matching the unchanged wire shape

Tests

  • ./gradlew generateOpenApi :test --tests 'io.seqera.wave.exchange.DescribeWaveContainerResponseTest' --tests 'io.seqera.wave.controller.ContainerControllerTest.should return the container record' --tests 'io.seqera.wave.controller.ViewControllerTest.should create build binding' --tests 'io.seqera.wave.controller.ViewControllerTest.should render build page' --tests 'io.seqera.wave.controller.ViewControllerTest.should render container view page' --tests 'io.seqera.wave.controller.ViewControllerTest.should render in progress build page' --tests 'io.seqera.wave.controller.ViewControllerTest.should render mirror page'

@gavinelder
gavinelder requested a review from pditommaso July 7, 2026 11:04
@gavinelder
gavinelder marked this pull request as ready for review July 9, 2026 10:14
gavinelder and others added 3 commits July 14, 2026 09:53
Keep the existing response shapes for both container-detail endpoints and
only remove the user name and email from the serialized identity:

- GET /v1alpha2/container/{requestId} continues to return WaveContainerRecord;
  the user is reduced to an id-only copy via WaveContainerRecord.withoutUserDetails()
- DescribeWaveContainerResponse.RequestInfo keeps the User-typed `user` field
  but populates only the id via User.ofId()
- Revert the TypeSpec route/model back to WaveContainerRecord
- Mail service is unaffected: it reads the live request identity and still
  sends to user.email

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@pditommaso pditommaso left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed for breaking changes: verified none of the Wave ecosystem clients (nextflow nf-wave, wave-cli, platform, sched, seqera-mcp) consume the two affected describe endpoints — all use submit + status/build/inspect paths that don't carry the stripped user fields. PII reduction is non-breaking for API clients. Applied minor rename withoutUserDetails() → withUserIdOnly() for clarity. LGTM.

@pditommaso

Copy link
Copy Markdown
Collaborator

Small follow-up: I pushed a one-line rename withoutUserDetails()withUserIdOnly() — it reads symmetrically with the User.ofId(...) it calls and states what actually survives (the id) rather than what's removed. No behavior change. Feel free to revert if you prefer the original. 🙂

@gavinelder

Copy link
Copy Markdown
Contributor Author

LGTM on the change

@pditommaso
pditommaso merged commit 0718f70 into master Jul 15, 2026
4 checks passed
@pditommaso
pditommaso deleted the codex/reduce-response-contents branch July 15, 2026 07:09
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.

2 participants