store port: get and create documents; depositing a fact is a use case #3

Merged
k.renner merged 3 commits from fix/adapter-names into main 2026-09-24 11:39:39 +00:00
Member

The status page listed gitea twice, and the reason was a wrong cut: the fact sink was a second adapter over the same backend. Storage has get and put; what a raw note looks like is not the storage's business.

  • INoteStore gains CreateAsync(path, text, message), throwing DocumentExistsException when the path is taken. IFactSink is gone.
  • DepositFactUseCase (Application) validates the fact, builds the raw note with provenance frontmatter, picks the dated slug path and numbers it on collision, and calls the store. Tests moved with it (DepositFactUseCaseTests, with a fake store and a fake clock).
  • GiteaRepository implements the store only: HEAD, tree, raw read, contents POST (422 → DocumentExistsException). One adapter, one health entry, named gitea.
  • The note-store contract now covers create: new path readable at the next head, existing path refused.

82 tests green.

🤖 Generated with Claude Code

The status page listed `gitea` twice, and the reason was a wrong cut: the fact sink was a second adapter over the same backend. Storage has get and put; what a raw note looks like is not the storage's business. - `INoteStore` gains `CreateAsync(path, text, message)`, throwing `DocumentExistsException` when the path is taken. `IFactSink` is gone. - `DepositFactUseCase` (Application) validates the fact, builds the raw note with provenance frontmatter, picks the dated slug path and numbers it on collision, and calls the store. Tests moved with it (`DepositFactUseCaseTests`, with a fake store and a fake clock). - `GiteaRepository` implements the store only: HEAD, tree, raw read, contents POST (422 → `DocumentExistsException`). One adapter, one health entry, named `gitea`. - The note-store contract now covers create: new path readable at the next head, existing path refused. 82 tests green. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude-bot added 1 commit 2026-09-24 11:27:00 +00:00
gitea: distinct adapter names for the note store and the fact sink
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
80c7885dc2
Both reported as "gitea" on the status page.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
claude-bot changed title from gitea: distinct adapter names for the note store and the fact sink to gitea: one repository adapter for both ports 2026-09-24 11:30:10 +00:00
claude-bot added 1 commit 2026-09-24 11:30:26 +00:00
gitea: one repository adapter serving both the note-store and the fact-sink port
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
fe6a284c6c
Two classes over the same backend showed as two adapters on the status
page. One GiteaRepository, one HttpClient, one health entry; the host
lists an adapter once even when it serves several ports.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
claude-bot changed title from gitea: one repository adapter for both ports to store port: get and create documents; depositing a fact is a use case 2026-09-24 11:37:11 +00:00
claude-bot added 1 commit 2026-09-24 11:37:27 +00:00
store port: get and create documents; depositing a fact is a use case
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
6ff8d4bce6
The fact sink was a second adapter over the same backend. INoteStore
gains CreateAsync (DocumentExistsException on a taken path); the raw
note's shape, slug and collision numbering live in DepositFactUseCase;
GiteaRepository only moves text.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
k.renner merged commit d718a83f33 into main 2026-09-24 11:39:39 +00:00
k.renner deleted branch fix/adapter-names 2026-09-24 11:39:39 +00:00
Sign in to join this conversation.