Skip to content
quarry History Of Ticket e67a02268c38cc37d2ad1956a9bcbb7891716046
Login

History Of Ticket e67a02268c38cc37d2ad1956a9bcbb7891716046

Artifacts Associated With Ticket e67a02268c38cc37d2ad1956a9bcbb7891716046

  1. Ticket change [f6cdd9ee14] (rid 696) by dmestas on 2026-08-18 00:33:26:

    1. comment initialized to:
      A repository can only be added to quarry by editing the server's command line and restarting it. Neither a user nor an admin can do it through the forge.
      
      The whole mechanism is a startup flag:
      
          quarry serve --repo name=/path/to/store --repo other=/path/...
      
      There is no `repo.add` op — the registry holds only `repo.list` and `repo.counts`, both read-only — and no CLI verb (`version|spec|serve|reindex|user|account|webhook|docs`). quarry also never creates a store: there is no `zit init` path anywhere, so the repository must already exist on disk before it can be named.
      
      Hosting repositories is the feature of a forge, and none of it is reachable through the API. Principle 5 again, and a more central case than account management.
      
      ## What adding one costs today
      
      Observed, twelve times over, adding the gaia-gis repositories:
      
      1. Clone or create the store yourself, outside quarry.
      2. `zit import-fossil --compatible` if it came from fossil.
      3. Edit the server invocation to add `--repo name=path`.
      4. **Restart the server** — every other repository goes down and re-runs its ingest round.
      
      Step 4 is what makes this worse than the account gap. Creating an account needs shell access but disturbs nothing; adding a repository takes the whole fleet offline. With 23 repositories the restart also re-opens 23 indexes and re-runs 23 ingest rounds, which is the exact path that has to be bounded for memory (see the ingest lane).
      
      ## The invocation is itself a liability
      
      The serve command is now 57 argv elements held nowhere but shell history. That is not a hypothetical problem: building it with an unquoted shell variable silently dropped twelve `--repo` flags, and quarry started and served the remaining eleven **without any diagnostic**, because Go's flag parser treats the malformed element as a positional argument and ignores it.
      
      Two things fall out:
      
      - The registry belongs in storage, not in argv. It is forge configuration exactly like `mirror` and `webhook`, and those already live in OLTP.
      - `serve` should refuse unknown positional arguments. It accepts and ignores them today, which turned a twelve-repository omission into a silent one.
      
      ## What is needed
      
      1. **Persist the registry** in OLTP beside `mirror` and `webhook`. `--repo` stays as a bootstrap and override, but stops being the only source of truth.
      2. **`repo.add` / `repo.remove` ops**, `ops.Admin`, with the CLI on top of them rather than beside them.
      3. **Dynamic registration.** Adding a repository must not restart the fleet: open its index, start its pipeline, register it. Removal is the reverse, and needs to stop the pipeline and close the index rather than leak both.
      4. **Create an empty repository** — `zit init` behind `repo.add --create`. This is the "host my project here" case and quarry cannot do it at all today.
      5. **Adopt by cloning a remote** — which is the mirror machinery pointed at a store that does not exist yet, so most of it is already written.
      6. **`serve` rejects unknown positionals**, so a malformed invocation fails loudly.
      
      ## Ordering
      
      Items 1–3 are the feature. Items 4–5 are what makes it useful to somebody who is not already holding a `.fossil` file. Item 6 is a few lines and should not wait for any of it.
      
      ## Related
      
      - Private repositories: a repository created through `repo.add` needs a visibility from the moment it exists, not after.
      - Account management in the API: both are cases of forge administration being shell-only.
      
      
    2. status initialized to: "Open"
    3. title initialized to:
      Repositories can only be added by restarting the server
      
  2. Ticket change [3dfea87299] (rid 742) by dmestas on 2026-08-18 10:45:17:

    1. comment changed to:
      Landed across 4a479e6c, 2c157378, 9f788306 and 87a492fe. api.Repos is a concurrent registry; the registry persists in OLTP; repo.add/remove register and tear down at runtime; create and adopt-by-clone work; path is optional against --repos-root; serve refuses stray positionals.
      
    2. resolution changed to: "Fixed"
    3. status changed to: "Closed"
  3. Ticket change [14c0a66a73] (rid 852) by dmestas on 2026-08-18 18:40:01:

    1. Untracked field cmimetype: "text/x-markdown"
  4. Ticket change [c97433a40e] (rid 12449) by zeitgeist on 2026-09-24 00:52:45:

    1. Untracked field number: "14"