Skip to content

push to a new project fails with "remote project identity is <unreadable>": server 409 IDENTITY_CONFLICT against a sibling project's identity #329

Closed

Description

@Zaba505

Summary

On atomic.storage, the first atomic push to a newly created project fails at the project-identity bind. POST <remote>?project-identity=1 returns 409 IDENTITY_CONFLICT, and the hash it conflicts with belongs to a different project in the same workspace. For the new project, GET <remote>?project-identity=1 returns {"bound":false}, so the server disagrees with itself.

The CLI then reports remote project identity is <unreadable> and suggests atomic repo identity adopt / fork. Neither one addresses the cause.

There seem to be two bugs:

  1. Server: the bind-conflict check is scoped wider than a single project, and it disagrees with the read path.
  2. CLI: the 409 body is dropped. The user sees <unreadable> and is told the projects are different.

Environment

  • atomic 0.21.0 (installer), linux x86_64
  • Hosted atomic.storage, org z5labs, workspace oss (set as default with atomic workspace set oss)
  • Both projects are public. Both local repos were created with atomic git import and sign with the same identity.

Steps to reproduce

  1. Repo A (sexpr-go): atomic git import → atomic project init sexpr-go --visibility public → atomic push
    Succeeds at 2026-11-11T00:06:08Z (24 changes stored).
  2. Repo B (journeys, a separate Git repo): atomic git import → atomic project init journeys --visibility public → atomic push
    Fails. The first attempt was at 2026-11-11T00:33:09Z, and every retry since has failed the same way.

atomic push --dry-run on repo B succeeds ("Remote main does not exist yet", 26 changes to store) because a dry run never reaches the identity bind.

Observed

$ atomic push
Pushing to origin (https://z5labs.atomic.storage/workspaces/oss/projects/journeys/code)
✓ Connected
✗ Invalid operation: remote project identity is <unreadable>; local is CUTB34Y7WOPXKDUOV5QBWFPJOO2PWM524UI32SB3WJCJHRJCKI7A. These are different projects — run 'atomic repo identity adopt' to take the remote lineage, or 'atomic repo identity fork' to start a new project, then push accordingly.

Neither -v nor RUST_LOG=trace logs request paths or status codes. I captured the exchange with a local TLS-terminating proxy (HTTPS_PROXY=… atomic push -k), with the Authorization header redacted:

# Request Response X-Trace-Id
1 GET /workspaces/oss/projects/journeys/code (sync/1, view main) 200 cce25fd1-2cb3-4969-80fd-e26fa1b3c434
2 POST /workspaces/oss/projects/journeys/code?project-identity=1 409 9f173bfa-44fd-4c8d-9652-50f6bca11741
3 GET /workspaces/oss/projects/journeys/code?project-identity=1 200 {"bound":false} 0f10b997-b544-4ae0-990a-166ba9745c5c

Request 2 body (repo B's local identity):

{"@context":{"atomic":"https://atomic.dev/ns/workflow#","dcterms":"http://purl.org/dc/terms/"},"@type":"atomic:ProjectIdentity","atomic:issuer":{"@id":"did:atomic:26O7DB3EMHOC3D7T65QLUHOIF2AVFVEELPNVUPFHSJ4J6G7IN4CQ"},"atomic:projectId":"CUTB34Y7WOPXKDUOV5QBWFPJOO2PWM524UI32SB3WJCJHRJCKI7A","atomic:schemaVersion":1,"dcterms:created":"2026-11-11T00:32:03.210089132+00:00","proof":{"@type":"DataIntegrityProof","cryptosuite":"eddsa-jcs-2022","proofPurpose":"assertionMethod","proofValue":"z4BJ6r3Cif1ggYhb5yYu4vsLTmzro5SofSmGQEB7VtJzchsB6L9kjHMRdQC5f6hbmnJdToGuMkb6gpaXT5Z5SunRP","verificationMethod":"did:atomic:26O7DB3EMHOC3D7T65QLUHOIF2AVFVEELPNVUPFHSJ4J6G7IN4CQ#key-1"}}

Request 2 response:

{"code":"IDENTITY_CONFLICT","message":"project identity already bound to <unparsable> (hash ce34221530d75bdeb642cb2d24f3ae55d0b3be96f603e9e7c7f380e4919f3737); pulls adopt it, pushes must match it"}

The conflicting hash is project A's binding

GET https://z5labs.atomic.storage/workspaces/oss/projects/sexpr-go/code?project-identity=1 (unauthenticated):

{"bound":true,"hash":"ce34221530d75bdeb642cb2d24f3ae55d0b3be96f603e9e7c7f380e4919f3737","identity":{"@type":"atomic:ProjectIdentity","atomic:issuer":{"@id":"did:atomic:26O7DB3EMHOC3D7T65QLUHOIF2AVFVEELPNVUPFHSJ4J6G7IN4CQ"},"atomic:projectId":"5VMHPKTVNNYM7IYKKOQCA7LIK3FYRCFSFKW7WP35W564SB66WS7Q", "...": "..."}}

The server rejects the bind for project B because project A's identity is already bound, even though it reports project B as unbound. The <unparsable> in the 409 message suggests the conflict lookup finds a record that doesn't belong to this project.

The two identity records share an atomic:issuer and a workspace. The bind-uniqueness check appears to key on one of those instead of on the project. I didn't create more test projects to work out which.

Expected

Server: the first push to an unbound project should bind the pushed identity, as it did for project A. Sibling projects in a workspace should have independent bindings ("A project maps to one Atomic repository on the server", per /commands/project).

CLI: when the bind returns a 409, the CLI should print the server's code and message instead of <unreadable>. It also shouldn't suggest adopt / fork when the remote reports bound:false:

  • adopt has nothing to adopt.
  • fork would probably hit the same 409, since the conflict is with project A's hash. I haven't tested this, because both commands overwrite the local identity.

Docs gap

docs.atomic.dev doesn't define project identity, its scope, when binding happens, or repo identity adopt / fork. /commands/repo returns 404.

Activity

  1. Zaba505 commented on Nov 11, 2026

    @Zaba505
    Author

    Follow-up: it isn't a hash collision

    I worked out how the server computes the hash it reports, then checked whether project B's document could have produced ce34…. It couldn't, so the 409 really is citing project A's stored binding.

    The server's hash is blake3(JCS(document)), taken over the full document with proof included and no domain prefix. Running that over the identity served by GET …/sexpr-go/code?project-identity=1 gives ce34221530d75bdeb642cb2d24f3ae55d0b3be96f603e9e7c7f380e4919f3737 exactly.

    Document Server recipe Client project_identity_hash
    A (sexpr-go, as served) ce342215… (matches what the server reports) 99c212cd…
    B (journeys, the POST body above) df57585b… e2cb47f9…

    What this shows:

    • Not a collision. B's body doesn't hash to ce34… under either recipe. A and B are identical once atomic:projectId, dcterms:created and proof are removed, so a recipe that skipped those fields would have collided. The server's recipe doesn't skip them.
    • The 409 loaded A's record. The cited hash is A's binding, byte for byte, yet GET …/journeys/code?project-identity=1 still returns {"bound":false} (re-checked 2026-11-11). The POST's existing-binding lookup must be keyed on something A and B share (workspace, org, or issuer DID), while the GET is keyed per project.
    • <unparsable> refers to that same record, which the GET serves and parses without trouble. So the 409 path seems to read the binding through a different decoder or store than the GET does.

    A separate mismatch (not the cause): the client's project_identity_hash (atomic-repository/src/repository/project_identity.rs) is blake3("atomic.project-identity.v1\0" || JCS(document without proof)). Client and server disagree on what an identity's hash is, so a hash quoted in a 409 can't be checked against the client's own record.

    To re-check the server recipe:

    let served: serde_json::Value = /* the "identity" object from GET sexpr-go */;
    let hash = blake3::hash(atomic_canonical::jcs::canonicalize(&served).as_bytes());
    assert_eq!(hash.to_hex().as_str(), "ce34221530d75bdeb642cb2d24f3ae55d0b3be96f603e9e7c7f380e4919f3737");

    Test coverage gaps

    • tests/harness/47_project_identity_transport.sh only ever binds one project per workspace, so sibling bindings were never exercised. It also runs push --remote origin, but remote is a positional argument, so that step is rejected before it reaches the bind.
    • atomic-remote/tests/project_identity_transport.rs fakes the 409 body as {"error":{"code":…}}. The real server sends a flat {"code","message"}, and no test covers a 409 followed by {"bound":false}.

    A harness scenario that pushes fresh sibling projects, changing one thing at a time (same workspace and issuer, a different workspace, a different issuer), would both catch this regression and show from which pushes fail which key the bind check is scoped by.

    The CLI fix (showing the 409's code and message instead of <unreadable>, and not suggesting adopt/fork when the remote reports bound:false) depends on what the server returns, so it probably makes sense after the server fix.

  2. added a commit that references this issue on Nov 11, 2026
    8053c02
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions