## A child is killed at the rename that would publish the store.
# metab <ORIGIN-A> --no-serve
exit: SIGKILL
--- stdout ---
--- stderr ---
cloning <ORIGIN-A> into <HOME>
## Nothing is published: one abandoned staging entry, no store, no source.
# metab <ROOT> --api /api/cache/layout
exit: 0
--- stdout ---
api: /api/cache/layout
status: 200
{
  "home": "present",
  "supported_format": "f01",
  "state": "current",
  "layout": {
    "format": "f01",
    "created_by": "<VERSION>"
  },
  "config": {
    "format": "f01",
    "written_by": "<VERSION>",
    "upgrades": []
  },
  "reclamation": {
    "staging_entries": 1
  }
}
--- stderr ---
# metab <ROOT> --api /api/cache/stores
exit: 0
--- stdout ---
api: /api/cache/stores
status: 200
{
  "home": "present",
  "layout_format": "f01",
  "stores": [],
  "unrecognized_entries": 0,
  "limit": 25,
  "next_after": null
}
--- stderr ---
# metab <ROOT> --api /api/cache/sources
exit: 0
--- stdout ---
api: /api/cache/sources
status: 200
{
  "home": "present",
  "layout_format": "f01",
  "sources": [],
  "unrecognized_entries": 0,
  "limit": 25,
  "next_after": null
}
--- stderr ---
## The next acquisition sweeps the entry, fetches again, and publishes.
# metab <ORIGIN-A> --no-serve
exit: 0
--- stdout ---
acquired: <ORIGIN-A>
slug: <SLUG-A>
store: <STORE-A>
revision: 8f05aafe23bbeade03ef581868a59e3c944ac5c4
--- stderr ---
cloning <ORIGIN-A> into <HOME>
cloned <ORIGIN-A> in 0.0 s
# metab <ROOT> --api /api/cache/layout
exit: 0
--- stdout ---
api: /api/cache/layout
status: 200
{
  "home": "present",
  "supported_format": "f01",
  "state": "current",
  "layout": {
    "format": "f01",
    "created_by": "<VERSION>"
  },
  "config": {
    "format": "f01",
    "written_by": "<VERSION>",
    "upgrades": []
  },
  "reclamation": {
    "staging_entries": 0
  }
}
--- stderr ---
# metab <ROOT> --api /api/cache/stores
exit: 0
--- stdout ---
api: /api/cache/stores
status: 200
{
  "home": "present",
  "layout_format": "f01",
  "stores": [
    {
      "id": "<STORE-A>",
      "publication": "published",
      "mode": "full",
      "lender": null,
      "identity": {
        "created_at": "2026-09-17T12:00:00Z",
        "acquisition": {
          "git_version": "<GIT_VERSION>",
          "object_format": "sha1"
        }
      },
      "state": {
        "default_remote_ref": "refs/remotes/origin/topic",
        "default_revision": "8f05aafe23bbeade03ef581868a59e3c944ac5c4",
        "last_fetch_at": "2026-09-17T12:00:00Z",
        "last_operation": {
          "kind": "acquire",
          "outcome": "succeeded",
          "at": "2026-09-17T12:00:00Z"
        }
      },
      "problems": [],
      "referenced_by": [
        {
          "slug": "<SLUG-A>",
          "generation": 1
        }
      ],
      "reference_state": "referenced"
    }
  ],
  "unrecognized_entries": 0,
  "limit": 25,
  "next_after": null
}
--- stderr ---
# metab <ROOT> --api /api/cache/sources
exit: 0
--- stdout ---
api: /api/cache/sources
status: 200
{
  "home": "present",
  "layout_format": "f01",
  "sources": [
    {
      "slug": "<SLUG-A>",
      "publication": "published",
      "identity": {
        "id": "<SOURCE-A>",
        "display_url": "<ORIGIN-A>",
        "clone_url": "<ORIGIN-A>",
        "transport": "file",
        "created_at": "2026-09-17T12:00:00Z"
      },
      "alias": {
        "store_id": "<STORE-A>",
        "generation": 1,
        "updated_at": "2026-09-17T12:00:00Z"
      },
      "state": {
        "last_opened_at": "2026-09-17T12:00:00Z"
      },
      "problems": []
    }
  ],
  "unrecognized_entries": 0,
  "limit": 25,
  "next_after": null
}
--- stderr ---
