Skip to content

Mirrors whose names sanitize to the same token share a warn file and a WIP ref #16

Description

@ligon

Deferred from the review of #9 (fixes in #13). #13 fixes the script
collision (staging is now an atomic rename, so a second launch can no
longer truncate a running timer); this is the remaining shared state.

_sanitize_session_token maps anything outside [A-Za-z0-9._-] to _
(mirror.py:198), so K Agg and K/Agg both become K_Agg. Two such
mirrors, or one mirror launched on two targets that share a $HOME
(the reuse-probe is keyed per target, session.py:55), then share:

The second is the one that loses work.

For "the same mirror on two targets" this is arguably correct — it is
one mirror. For two genuinely different mirrors that happen to collide
it is not. Options: include the target name in the token, use a short
hash of the unsanitized name as a suffix, or refuse at config-load time
when two configured mirrors sanitize alike (cheapest, and it turns a
silent data-loss path into an error at the only moment someone can fix
it).

Low likelihood — it needs deliberately awkward mirror names — but the
failure is silent and costs work, so it should not just stay implicit.

🤖 Generated with Claude Code

https://claude.ai/code/session_018Ty45bJv1jADvUbyLaW4RD

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions