docs: describe the PostgreSQL-only stores, state_dir and the import-only db_path
Architecture, deployment, installer, skill and PRD text now name the Postgres State Store, the offline recovery commands on database_url, state_dir for host state, and db_path as the legacy-file locator for archie-state-store import. Finalised PRDs, CHANGELOG, docs/news and docs/archive are unchanged records.
This commit is contained in:
1 parent
b6010a7913
commit
5c8a8b2393
39 files changed
+248
-219
No files matched your search
@@ -18,7 +18,7 @@ This archive contains six linux/amd64 binaries:
|
||||
this process they are simply absent — and nothing logs an error
|
||||
(`archie-core-1c01`), which is why it has a unit of its own in
|
||||
`deployments/systemd-user-service.md`.
|
||||
- **`archie-state-store`** — owns the single `archie.db` SQLite file behind
|
||||
- **`archie-state-store`** — owns the task data in PostgreSQL behind
|
||||
a gRPC contract. `archied` and `archie-gateway` are gRPC clients of it, not
|
||||
owners of the database.
|
||||
- **`archie-playbooks`** — standalone CLI to lint playbook binding YAML
|
||||
|
||||
@@ -43,13 +43,13 @@ systemctl --user start archied
|
||||
```
|
||||
|
||||
The templates use the extracted Gateway Service by default. Start
|
||||
`archie-gateway` before `archied`; it owns the conversation SQLite file and
|
||||
`archie-gateway` before `archied`; it owns the conversation tables and
|
||||
serves the `ChatContract` gRPC API on the configured target.
|
||||
|
||||
The State Store service (`archie-state-store`) owns the single `archie.db` task
|
||||
SQLite file and serves the `StateStore` gRPC contract. After the in-process
|
||||
store path was deleted, BOTH `archied` and `archie-gateway` dial it via
|
||||
`[services.state].target` and never open `archie.db` themselves
|
||||
The State Store service (`archie-state-store`) owns the task data in the
|
||||
PostgreSQL database `database_url` names and serves the `StateStore` gRPC
|
||||
contract. BOTH `archied` and `archie-gateway` dial it via
|
||||
`[services.state].target` and never open the task tables themselves
|
||||
(`docs/prds/state-store-contract.md` §12 step 7). The templates set
|
||||
`[services.state]` accordingly: a host-only agent reaches a loopback bind
|
||||
(`127.0.0.1:9090`) with no token, while a container-mode agent needs the
|
||||
@@ -117,10 +117,10 @@ curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:9091/healthz #
|
||||
curl -s http://127.0.0.1:9091/health/detailed # state_db component -> 200, or 503 when degraded
|
||||
```
|
||||
|
||||
A running State Store owns exactly one task SQLite file (`<db_path>-tasks.sqlite`);
|
||||
`archied` and `archie-gateway` never open `archie.db` directly, so a second
|
||||
store process on the same `db_path`, or a consumer that opens the task file,
|
||||
indicates dual-store ownership (`docs/prds/state-store-contract.md` §12 step 7/8).
|
||||
A running State Store holds the `state-store` ownership lock on its database;
|
||||
`archied` and `archie-gateway` never open the task tables directly, so a second
|
||||
store process on the same `database_url` refuses to start, and a consumer that
|
||||
opens the task tables indicates dual-store ownership (`docs/prds/state-store-contract.md` §12 step 7/8).
|
||||
The readiness probe is the single-writer check the runbook has against a
|
||||
degraded store: a `503` from `/health/detailed` means `archied` should be
|
||||
started only after the store is healthy.
|
||||
@@ -15,7 +15,9 @@ poll_interval = "60s"
|
||||
bot_user = "archie"
|
||||
diff_cap_lines = 0
|
||||
work_dir = "~/.local/share/archie/work"
|
||||
db_path = "~/.local/share/archie/archie.db"
|
||||
state_dir = "~/.local/share/archie" # NATS store, task logs
|
||||
# db_path (default ~/.local/share/archie/archie.db) only locates pre-PostgreSQL
|
||||
# files for `archie-state-store import`.
|
||||
# The State Store's PostgreSQL connection (required; Postgres-only epic).
|
||||
# `docker compose up -d postgres` provides this local default; point it at
|
||||
# your own Postgres 18 server otherwise.
|
||||
@@ -24,8 +26,8 @@ database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
|
||||
[services.gateway]
|
||||
target = "127.0.0.1:8585"
|
||||
|
||||
# The State Store gRPC service owns the single archie.db SQLite file; archied
|
||||
# and archie-gateway dial it and never open archie.db themselves (§12 step 7).
|
||||
# The State Store gRPC service owns the PostgreSQL task data; archied and
|
||||
# archie-gateway dial it and never open those tables themselves (§12 step 7).
|
||||
# This deployment runs the agent in containers, so target is the Docker bridge
|
||||
# gateway (172.17.0.1) the container can reach, with a matching target_token
|
||||
# that archie-state-store validates. Host-only agent: use 127.0.0.1:9090 with
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
# ==============================================================================
|
||||
|
||||
work_dir = "~/.local/share/archie/work"
|
||||
db_path = "~/.local/share/archie/archie.db"
|
||||
state_dir = "~/.local/share/archie" # NATS store, task logs
|
||||
# db_path (default ~/.local/share/archie/archie.db) only locates pre-PostgreSQL
|
||||
# files for `archie-state-store import`.
|
||||
# The State Store's PostgreSQL connection (required; Postgres-only epic).
|
||||
# `docker compose up -d postgres` provides this local default; point it at
|
||||
# your own Postgres 18 server otherwise.
|
||||
@@ -15,8 +17,8 @@ database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
|
||||
[services.gateway]
|
||||
target = "127.0.0.1:8585"
|
||||
|
||||
# The State Store gRPC service owns the single archie.db SQLite file; archied
|
||||
# and archie-gateway dial it and never open archie.db themselves (§12 step 7).
|
||||
# The State Store gRPC service owns the PostgreSQL task data; archied and
|
||||
# archie-gateway dial it and never open those tables themselves (§12 step 7).
|
||||
# Host-only deployment: the agent runs on the host, so the loopback target
|
||||
# 127.0.0.1:9090 needs no token. Start archie-state-store with the matching
|
||||
# `-listen 127.0.0.1:9090`.
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
# ==============================================================================
|
||||
|
||||
work_dir = "~/.local/share/archie/work"
|
||||
db_path = "~/.local/share/archie/archie.db"
|
||||
state_dir = "~/.local/share/archie" # NATS store, task logs
|
||||
# db_path (default ~/.local/share/archie/archie.db) only locates pre-PostgreSQL
|
||||
# files for `archie-state-store import`.
|
||||
# The State Store's PostgreSQL connection (required; Postgres-only epic).
|
||||
# `docker compose up -d postgres` provides this local default; point it at
|
||||
# your own Postgres 18 server otherwise.
|
||||
@@ -16,8 +18,8 @@ database_url = "postgres://archie:archie@127.0.0.1:5432/archie?sslmode=disable"
|
||||
[services.gateway]
|
||||
target = "127.0.0.1:8585"
|
||||
|
||||
# The State Store gRPC service owns the single archie.db SQLite file; archied
|
||||
# and archie-gateway dial it and never open archie.db themselves (§12 step 7).
|
||||
# The State Store gRPC service owns the PostgreSQL task data; archied and
|
||||
# archie-gateway dial it and never open those tables themselves (§12 step 7).
|
||||
# This deployment runs the agent in containers, so target is the Docker bridge
|
||||
# gateway (172.17.0.1) the container can reach, with a matching target_token
|
||||
# that archie-state-store validates. Host-only agent: use 127.0.0.1:9090 with
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
# ==============================================================================
|
||||
|
||||
work_dir = "~/.local/share/archie/work"
|
||||
db_path = "~/.local/share/archie/archie.db"
|
||||
state_dir = "~/.local/share/archie" # NATS store, task logs
|
||||
# db_path (default ~/.local/share/archie/archie.db) only locates pre-PostgreSQL
|
||||
# files for `archie-state-store import`.
|
||||
# The State Store's PostgreSQL connection (required; Postgres-only epic).
|
||||
# `docker compose up -d postgres` provides this local default; point it at
|
||||
# your own Postgres 18 server otherwise.
|
||||
@@ -23,8 +25,8 @@ diff_cap_lines = 400
|
||||
[services.gateway]
|
||||
target = "127.0.0.1:8585"
|
||||
|
||||
# The State Store gRPC service owns the single archie.db SQLite file. archied
|
||||
# and archie-gateway dial it here and never open archie.db themselves
|
||||
# The State Store gRPC service owns the PostgreSQL task data. archied and
|
||||
# archie-gateway dial it here and never open those tables themselves
|
||||
# (docs/prds/state-store-contract.md §12 step 7). This deployment runs the
|
||||
# agent in containers, so the target must be the Docker bridge gateway address
|
||||
# (172.17.0.1) that the container can reach, and a non-loopback target requires
|
||||
|
||||
@@ -16,11 +16,10 @@ here, where it would drift from what is written.
|
||||
The Gateway unit is `archie-gateway.service`, written by `install.sh` beside
|
||||
`archied.service`.
|
||||
|
||||
The State Store unit is `archie-state-store.service`. It owns the single `archie.db` SQLite
|
||||
file and serves the `StateStore` gRPC contract. After the in-process store path
|
||||
was deleted, BOTH `archied` and `archie-gateway` dial it via
|
||||
`[services.state].target` (see the `archied` config below) and never open
|
||||
`archie.db` themselves (`docs/prds/state-store-contract.md` §12 step 7). A
|
||||
The State Store unit is `archie-state-store.service`. It owns the task data in
|
||||
PostgreSQL and serves the `StateStore` gRPC contract. BOTH `archied` and
|
||||
`archie-gateway` dial it via `[services.state].target` (see the `archied`
|
||||
config below) and never open the task tables themselves (`docs/prds/state-store-contract.md` §12 step 7). A
|
||||
host-only agent uses the loopback bind with no token below; a container-mode
|
||||
agent needs the Docker bridge gateway address plus a bearer token via
|
||||
`--token`/`STATE_STORE_TOKEN` or `[services.state].target_token`, and a
|
||||
@@ -254,6 +253,6 @@ with the operator's Docker credentials and retain `pull_policy = "missing"`:
|
||||
docker compose pull agent
|
||||
```
|
||||
|
||||
`db_path` and other paths are native host paths. Point them at the intended
|
||||
state directory; changing from an old containerized daemon path can otherwise
|
||||
start Archie against empty state files.
|
||||
`state_dir` and other paths are native host paths. Point `state_dir` at the
|
||||
intended state directory (embedded NATS store, task logs); `db_path` only
|
||||
locates pre-PostgreSQL files for `archie-state-store import`.
|
||||
Reference in new issue
Block a user