Skip to content

Push accepts a repository ID that differs from the ID registered for the remote name #190

Description

@dtmland

Lore version

lore 0.9.0

Installation method

Built from source

Operating system / architecture

Linux -- x86_64

Steps to reproduce

Steps to reproduce:

  1. Create an offline repository whose .lore/id is A and configure its remote_url as lore://127.0.0.1:/library.
  2. Create the server repository named library with explicit repository id B, where A != B.
  3. Commit content in the offline repository.
  4. Run lore push from the offline repository.

Expected vs actual behavior

Expected: Push rejects the request before transferring or advancing data because the repository ID registered for library differs from the local repository ID.
Actual: Push exits successfully and reports that it pushed the revision.

Component

Both / unsure

Server context

Unauthenticated loopback loreserver with isolated local immutable and mutable stores.

Additional context:
repository create validates name-to-ID consistency, and repository info returns the registered ID, but the push path does not enforce the same invariant. A client can preflight with repository info, but that leaves a time-of-check/time-of-use window. The server should enforce identity at the write boundary.

Regression?

No response

Relevant logs or output

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

    bugSomething isn't workingneeds-triageNot yet reviewed by a maintainer, awaiting initial triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions