Repository navigation
Conversation
695d01a to
be603e3
Compare
4a67650 to
210cf5c
Compare
210cf5c to
787a7d8
Compare
be603e3 to
405882c
Compare
405882c to
95f6e01
Compare
787a7d8 to
8fb2e72
Compare
95f6e01 to
0644502
Compare
8fb2e72 to
43c35c6
Compare
0644502 to
f0d4b5b
Compare
43c35c6 to
5c6644b
Compare
5c6644b to
0cdd712
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
0cdd712 to
da4ecd7
Compare
f0d4b5b to
88db503
Compare
da4ecd7 to
a6dd1b4
Compare
88db503 to
2efe898
Compare
Merging this PR will degrade performance by 0.09%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ |
Simulation | discover_workspace_from_all_members |
131 ms | 156 ms | -16.02% |
| ❌ |
Simulation | discover_workspace_from_all_members_with_excludes |
139.5 ms | 162.3 ms | -14.05% |
| ❌ |
Simulation | run_python_version_synthetic_workspace |
540.6 ms | 572.8 ms | -5.61% |
| ⚡ | Simulation | load_python_download_catalog |
455.5 ms | 348.7 ms | +30.6% |
| ⚡ | Simulation | pypi_json[32] |
300.6 µs | 282.8 µs | +6.31% |
| ⚡ | Simulation | pypi_json[4096] |
35.9 ms | 34.1 ms | +5.17% |
| 🆕 | WallTime | git_fetch_cold_precise[django] |
N/A | 5.3 s | N/A |
| 🆕 | WallTime | git_fetch_cold_precise[flask] |
N/A | 279.6 ms | N/A |
| 🆕 | WallTime | git_fetch_cold_precise[sampleproject] |
N/A | 36.3 ms | N/A |
| 🆕 | WallTime | git_fetch_revision_history[django/1] |
N/A | 5.3 s | N/A |
| 🆕 | WallTime | git_fetch_revision_history[django/10] |
N/A | 7.5 s | N/A |
| 🆕 | WallTime | git_fetch_revision_history[django/4] |
N/A | 6.1 s | N/A |
| 🆕 | WallTime | git_fetch_warm_commit[django] |
N/A | 2.6 ms | N/A |
| 🆕 | WallTime | git_fetch_warm_commit[flask] |
N/A | 2.6 ms | N/A |
| 🆕 | WallTime | git_fetch_warm_commit[sampleproject] |
N/A | 2.6 ms | N/A |
| 🆕 | WallTime | git_fetch_warm_precise[django] |
N/A | 2.6 ms | N/A |
| 🆕 | WallTime | git_fetch_warm_precise[flask] |
N/A | 2.6 ms | N/A |
| 🆕 | WallTime | git_fetch_warm_precise[sampleproject] |
N/A | 2.5 ms | N/A |
| 🆕 | WallTime | git_fetch_warm_reference[django] |
N/A | 8.1 ms | N/A |
| 🆕 | WallTime | git_fetch_warm_reference[flask] |
N/A | 8.2 ms | N/A |
| ... | ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing zsol/url-persistence-02-credentials (a6dd1b4) with zsol/url-persistence-01-safe (88db503)2
Footnotes
-
54 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. ↩
-
No successful run was found on
zsol/url-persistence-01-safe(2efe898) during the generation of this report, so 95b6e63 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
| assert_snapshot!(serde_json::to_string(&url)?, @r#""https://user:[email protected]/files/project:build@nightly?sig=abc%2Bdef%3D&other=a+b""#); | ||
| assert_eq!(url.as_url().as_str(), input); | ||
| assert_eq!(url.to_string(), url.as_url().to_string()); | ||
| assert_eq!(format!("{url:?}"), format!("{:?}", url.as_url())); |
There was a problem hiding this comment.
This test only checks equally, but not whether the values are redacted, we should snapshot the redacted form here instead
`SafeUrl` currently serializes the full URL, so fields can persist credentials without an explicit choice. Add a type-level policy that defaults to `Unserializable`; `Stripped` removes sensitive userinfo while retaining the complete query, and `Raw` serializes the full parsed URL. `Display` and `Debug` continue to redact passwords and recognized sensitive query parameters. Index URLs in `pylock.toml` and publish URLs in tool receipts use `Stripped`. The inherent `serialize` and `serialize_internal` methods prevent those method calls from falling through `Deref` to `Url`. Ordinary Serde serialization of `SafeUrl` requires `Stripped` or `Raw`; the internal serialization method requires `Raw`. The serialization policies are an alternative to the wrapper types in #22356, #22357, and #22358, combined in astral-sh#2712 for comparison. `Stripped` and `Raw` follow the same serialization rules as `PersistSafeUrl` and `CredentialPersistingUrl`. Using `SafeUrl<P>` carries the policy through `VerbatimUrl`, stored fields, and transformations such as `join`; shared implementations are generic over the policy. The aforementioned stack also changes how `DirectUrl` metadata is parsed and written; those changes are outside this PR's scope. See also #22600 (comment) Stacked on #22599. Co-authored-by: zaniebot <[email protected]>
Some URL fields need to retain credentials when serialized, while their display and debug output should still redact them.
DisplaySafeUrlcurrently provides both behaviors through its generic serialization implementation.Add
CredentialPersistingUrlfor these fields. It serializes the complete parsed URL, including userinfo and query parameters, while retainingDisplaySafeUrlredaction for display and debug output. It deserializes URL strings without the ambiguity checks intended for human input.Use the wrapper for authentication services, proxy URLs, OSV references, direct requirement sources,
pyproject.tomlsources, andpylock.tomlURLs. That should result in this PR not changing uv's behavior.Adapted from #21973. Stacked on #22356.