This commit is contained in:
Priec
2026-07-21 22:20:20 +02:00
parent c9c93cc4a7
commit 2dc719e55b
2 changed files with 45 additions and 1 deletions

View File

@@ -448,3 +448,47 @@ typst compile \
The client currently exports the API-backed JSON and saves the document
snapshot, but it does not invoke the Typst compiler itself.
## Deterministic five-person company simulation
The repository also contains a standalone bootstrap that creates a separate
`small_company_2026` profile, installs its Steel calculations, and pushes all
fixture rows through the same gRPC APIs used by the client:
```text
server/scripts/bootstrap_small_company.py
```
It expects the existing passwordless users `admin` and `filipko`. The admin
token is used only for table definitions and scripts. The accountant token is
used for every business-row insert.
Preview the scope without contacting the server:
```bash
python3 server/scripts/bootstrap_small_company.py --dry-run
```
Create and populate the profile:
```bash
python3 server/scripts/bootstrap_small_company.py
```
If a run stops after creating some objects, resume from its checkpoint:
```bash
python3 server/scripts/bootstrap_small_company.py --resume
```
The checkpoint defaults to `small_company_2026.bootstrap-state.json`. It
contains table IDs, script IDs, and inserted row IDs, but no access tokens or
passwords. The bootstrap does not delete an existing profile. If the profile
already exists without its matching checkpoint, it stops instead of modifying
unknown data.
The fixed scenario includes five employees, customers, suppliers, products,
CRM leads, sales orders, invoices and partial payments, purchase orders,
supplier invoices, stock movements and positions, expenses, and service time
entries. It verifies parent totals, outstanding balances, and stock values by
reading the rows back after insertion.