Skip to content

Make URL persistence policies explicit - #21973

Draft
charliermarsh wants to merge 2 commits into
mainfrom
charlie/url-persistence-types
Draft

charliermarsh wants to merge 2 commits into
mainfrom
charlie/url-persistence-types

Conversation

@charliermarsh

Copy link
Copy Markdown
Member

Summary

Follow up on #21971 by making URL persistence policies explicit. DisplaySafeUrl redacts display output, but no longer implements generic Serde serialization. Callers choose a URL type that retains credentials, removes userinfo, or removes userinfo and recognized query credentials.

Use lossless serialization for artifact locations and internal data, retain query parameters in typed direct_url.json fields, and strip recognized credentials from persisted index and configuration references. Index comparisons use the same normalization as their persisted references, while ordinary query parameters remain part of source identity. Deserialization retains credentials for requests.

Rename without_credentials and remove_credentials to without_userinfo to make their narrower behavior clear. Display and debug output remain redacted for every persistence policy.

@codspeed

codspeed Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 0.16%

2 warnings

⚠️ 6 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚠️ Base and head ran on different runner types

Some benchmarks with significant performance changes were compared across different runner types, so the changes might not come from the code. Run base and head on the same runner type, or use CodSpeed Macro Runners for more stable results.

Learn more about Macro Runners

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
❌ 1 regressed benchmark
✅ 37 untouched benchmarks
⏩ 12 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ CPU Simulation decode[48] 1.6 µs 1.7 µs -6.45%
⚡ CPU Simulation decode[64] 1.8 µs 1.7 µs +6.54%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing charlie/url-persistence-types (523dda1) with main (30de9e2)

Open in CodSpeed

Footnotes

  1. 12 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@astral-sh-bot

astral-sh-bot Bot commented Sep 24, 2026

Copy link
Copy Markdown

uv test inventory changes

This PR changes the tests when compared with the main base revision.

  • Added tests: 2
  • Removed tests: 1
  • Changed suites: 1
uv-redacted: +2 / -1

Added:

  • uv-redacted::persistence::tests::persistence_policies
  • uv-redacted::tests::remove_userinfo

Removed:

  • uv-redacted::tests::remove_credentials

This branch was previously deployed

1 inactive deployment
automations — 523dda18 Deployed Sep 24, 2026 by charliermarsh via review / security review #47579
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