- add Docker deployment for independent jarca-ledger container - enable FastMCP streamable-http runtime configuration - document dcy-013, REQ-019, and BAT-015 verification evidence - update structure/runtime baselines and deployment runbook
142 lines
3.4 KiB
Markdown
142 lines
3.4 KiB
Markdown
# BAT-015 Verification
|
|
|
|
## Verification summary
|
|
|
|
Status: PASS
|
|
|
|
The Docker network MCP deployment is implemented and running. `jarca-ledger` is independent of `genichin-agent`, exposes streamable-http MCP on port 8000, uses `/volume1/docker/jarca-ledger/data` as the operating volume, and serves the migrated operating ledger DB.
|
|
|
|
## Acceptance criteria evidence
|
|
|
|
### AC-1. Runtime config tests pass
|
|
|
|
- Command: `python -m pytest tests/test_mcp_http_runtime.py -q`
|
|
- Result: PASS
|
|
- Output: `... [100%]`
|
|
|
|
### AC-2. Full regression suite passes
|
|
|
|
- Command: `python -m pytest -q`
|
|
- Result: PASS
|
|
- Output: `........................ss..................ss... [100%]`
|
|
|
|
### AC-3. Docker build and independent service start succeed
|
|
|
|
- Command: `docker compose build`
|
|
- Result: PASS, image `jarca-ledger:latest` built.
|
|
- Command: `docker compose up -d --no-build`
|
|
- Result: container `jarca-ledger` created/started.
|
|
|
|
Docker state evidence:
|
|
|
|
```text
|
|
state=running health=healthy restart=unless-stopped
|
|
```
|
|
|
|
Mount evidence:
|
|
|
|
```text
|
|
/volume1/docker/jarca-ledger/data -> /data (bind)
|
|
```
|
|
|
|
Log evidence:
|
|
|
|
```text
|
|
StreamableHTTP session manager started
|
|
Application startup complete.
|
|
Uvicorn running on http://0.0.0.0:8000
|
|
```
|
|
|
|
### AC-4. Network MCP smoke passes
|
|
|
|
Endpoint used from `genichin-agent` container:
|
|
|
|
```text
|
|
http://192.168.55.253:8000/mcp
|
|
```
|
|
|
|
Smoke evidence:
|
|
|
|
```text
|
|
tool_count 56
|
|
ledger_health_check success true
|
|
db_path /data/ledger.sqlite3
|
|
schema_version 10
|
|
active_transactions 6225
|
|
```
|
|
|
|
### AC-5. Operating DB migration preserved data
|
|
|
|
Source DB before migration:
|
|
|
|
```text
|
|
jarca:/root/.local/share/jarca/ledger.sqlite3
|
|
size 8343552
|
|
sha256 f43532a41db3fd64edfe26d3dcc6f54ab8cf34bf79018fed9e53324996e4413b
|
|
accounts 8
|
|
transactions 6312
|
|
import_batches 13
|
|
category_rules 46
|
|
ledger_categories 62
|
|
```
|
|
|
|
Migration snapshot evidence:
|
|
|
|
```text
|
|
snapshot_integrity ok
|
|
snapshot_size 8343552
|
|
snapshot_sha256 e940a237e25e71561fe1af332f29cb11e92f02612b4ff89a7ab562585f82f278
|
|
```
|
|
|
|
Post-migration target evidence:
|
|
|
|
```text
|
|
path /data/ledger.sqlite3
|
|
size 8343552
|
|
sha256 e940a237e25e71561fe1af332f29cb11e92f02612b4ff89a7ab562585f82f278
|
|
integrity ok
|
|
accounts 8
|
|
transactions 6312
|
|
budgets 0
|
|
import_batches 13
|
|
category_rules 46
|
|
ledger_categories 62
|
|
manual_assets 0
|
|
asset_snapshots 0
|
|
```
|
|
|
|
MCP `get_ledger_db_status` evidence:
|
|
|
|
```text
|
|
integrity_check ok
|
|
table_counts.accounts 8
|
|
table_counts.transactions 6312
|
|
table_counts.import_batches 13
|
|
table_counts.category_rules 46
|
|
table_counts.ledger_categories 62
|
|
```
|
|
|
|
### AC-6. Documentation and baselines updated
|
|
|
|
- `docs/runbooks/docker-network-mcp-deploy.md` added.
|
|
- `docs/project-structure.md` updated with Dockerfile/compose/network MCP service and deployment boundaries.
|
|
- `docs/runtime-flows.md` updated with Docker network MCP and DB migration flows.
|
|
- StagePilot trace added: `dcy-013`, `REQ-019`, `BAT-015`.
|
|
|
|
## Safety boundary
|
|
|
|
- No raw financial statement source files were copied into the image.
|
|
- `.dockerignore` excludes DB/source financial files from image build context.
|
|
- Existing empty target DB was backed up before replacement.
|
|
- Existing source DB was not modified; migration used a snapshot copy.
|
|
|
|
## Blocking Issues
|
|
|
|
- None for internal Synology network operation.
|
|
|
|
## Follow-up candidates
|
|
|
|
- Add remote MCP endpoint registration to the finance-agent profile.
|
|
- Consider a separate auth/TLS/reverse-proxy Discovery before any external network exposure.
|
|
- Consider an automated backup scheduler as a separate operations requirement.
|