CI / Build and test (SQLite) (pull_request) Successful in 45s
CI / PostgreSQL 16 integration (pull_request) Skipped
CI / PostgreSQL 17 integration (pull_request) Skipped
CI / YAML check (pull_request) Successful in 3s
CI / Docker image (pull_request) Successful in 51s
Every later milestone stores its data through this layer, so it has to behave the same on both engines and be safe by construction: - Khaemhat.Data: explicit entity maps, typed queries over a safe expression subset, SqlFragment where every interpolated value becomes a parameter, unit of work with transactions, repositories with audit columns and optimistic concurrency on row_version, retries on transient errors. - SQLite provider (STRICT tables, WAL, exact decimals as integers scaled by 10^6, Unicode case-insensitive LIKE, serialised writes) and PostgreSQL 16+ provider (numeric(19,6), timestamptz, jsonb, advisory locks, database creation and server info). Databases are configured from postgres:// and sqlite:// URLs whose password never appears in messages. - C# migrations with system and company catalogues, schema_version with checksums, one transaction per migration under a lock, refusal of unknown applied versions; first system tables sys_companies and sys_settings. - CompanyRegistry stores each company's database URL encrypted with the instance key (AES-256-GCM, HKDF-derived key, purpose as associated data), so a copied row cannot be read for another company. - tools/Khaemhat.DataModelTool, scripts/gen-datamodel.sh and scripts/new-migration.sh: the current schema section of docs/DATA-MODEL.md is generated from the migrations and a test fails when it is stale. - C# 14 binds array.Contains to MemoryExtensions over spans; the query translator unwraps the span conversion. - Tests run every data scenario on SQLite and PostgreSQL (PostgreSQL in CI); ADR 0018 records where the contracts differ from SPEC 5.1. Docs, wiki, changelog and status updated. Closes #7, #8, #9, #10, #11, #12, #13, #14 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
75 lines
4.9 KiB
Markdown
75 lines
4.9 KiB
Markdown
# Changelog
|
|
|
|
Tutte le modifiche rilevanti di Khaemhat sono annotate in questo file.
|
|
Il formato segue [Keep a Changelog](https://keepachangelog.com/it/1.1.0/) e le versioni seguono
|
|
[Semantic Versioning](https://semver.org/lang/it/). Ogni versione corrisponde a un tag git `vX.Y.Z` e a
|
|
un'immagine `gitea.encke-hake.ts.net/balbosoft/khaemhat:X.Y.Z`.
|
|
|
|
## [Unreleased]
|
|
|
|
## [0.1.0] - 2026-11-11
|
|
|
|
M1 — Strato dati. Nessuna funzione visibile nell'interfaccia: è il motore su cui si appoggiano tutte le milestone
|
|
successive.
|
|
|
|
### Added
|
|
- Micro-ORM interno in `Khaemhat.Data` (ADR 0004, ADR 0018): mappe esplicite `EntityMap<T>`, query tipizzate
|
|
`Query.For<T>().Where(...)` con un sottoinsieme sicuro di espressioni, `SqlFragment` con valori sempre
|
|
parametrizzati, `IUnitOfWork` con transazioni, `IRepository<T,TKey>` con colonne di audit e concorrenza
|
|
ottimistica su `row_version` (`ConcurrencyException`), tentativi automatici sugli errori transitori.
|
|
- Provider SQLite (tabelle `STRICT`, WAL, decimali esatti come interi scalati x10^6, LIKE senza distinzione di
|
|
maiuscole anche per le lettere accentate, scritture serializzate) e PostgreSQL 16+ (`numeric(19,6)`, `timestamptz`,
|
|
`jsonb`, `ILIKE`, lock di transazione, creazione ed eliminazione dei database aziendali, informazioni sul server).
|
|
- Configurazione dei database da URL `postgres://` e `sqlite://` (`DatabaseUrl`), con la password mai mostrata nei
|
|
messaggi.
|
|
- Migrazioni in C#: cataloghi di sistema e aziendale, `schema_version` con checksum in ogni database, una
|
|
migrazione per transazione sotto lock, rifiuto delle versioni sconosciute; prime tabelle di sistema
|
|
`sys_companies` e `sys_settings`.
|
|
- Registro delle aziende (`CompanyRegistry`) con la posizione del database cifrata e risoluzione
|
|
`DatabaseScope.System` / `DatabaseScope.Company(codice)` in `IUnitOfWorkFactory`.
|
|
- Cifratura dei segreti a riposo con AES-256-GCM e chiave derivata da `KHAEMHAT_SECRET_KEY` (`SecretProtector`,
|
|
formato `khs1`), con il mattone della rotazione delle chiavi.
|
|
- `scripts/new-migration.sh` e `scripts/gen-datamodel.sh` (con `tools/Khaemhat.DataModelTool`): la sezione
|
|
*Schema attuale* di `docs/DATA-MODEL.md` è generata dalle migrazioni e un test ne verifica l'aggiornamento.
|
|
- Test su SQLite e PostgreSQL (tipi, decimali, paginazione, upsert, LIKE, ordinamento temporale, CRUD, concorrenza,
|
|
transazioni, input ostile, migrazioni, registro, cifratura) e misure di riferimento delle prestazioni.
|
|
|
|
## [0.0.1] - 2026-11-11
|
|
|
|
Prima versione: M0 — Bootstrap. Nessuna funzione gestionale ancora; c'è lo scheletro su cui costruirle.
|
|
|
|
### Added
|
|
- Soluzione `Khaemhat.sln` con i progetti di SPEC §3 e i relativi progetti di test (MSTest); regole di build comuni,
|
|
warning come errori, analyzer, `.editorconfig`, Central Package Management con l'allowlist dei pacchetti.
|
|
- Test architetturali: riferimenti fra progetti ammessi da SPEC §3 e pacchetti ammessi da SPEC §1.2;
|
|
`scripts/check-packages.sh` fa lo stesso controllo prima di ogni build.
|
|
- Pagina "in costruzione" in italiano con marca, icone e versione; pagine di errore e 404.
|
|
- Endpoint di salute `/health/live`, `/health/ready` e `/health` con stato e versione (ADR 0012).
|
|
- Variabili `KHAEMHAT_URLS` e `KHAEMHAT_LOG_LEVEL`; log JSON su stdout fuori dallo sviluppo.
|
|
- Immagine Docker `gitea.encke-hake.ts.net/balbosoft/khaemhat`: multi-stage, utente non root con `PUID`/`PGID`
|
|
(ADR 0013), `pg_dump` 17, `HEALTHCHECK`, etichette OCI e Unraid, `restore-system.sh` incluso (ADR 0017).
|
|
- `deploy/docker-compose.yml` (PostgreSQL 17, Redis facoltativo) e `deploy/docker-compose.sqlite.yml` (demo);
|
|
versione dell'immagine scelta con `KHAEMHAT_VERSION`.
|
|
- Gitea Actions: `ci.yml` (build, test, immagine con smoke test, PostgreSQL 16/17 sui tag, controllo YAML),
|
|
`release.yml` (immagine e release dal tag, ADR 0015), `wiki.yml` (pubblicazione della wiki).
|
|
- Script `build.sh`, `test.sh`, `run-dev.sh`, `publish-image.sh`, `publish-wiki.sh` e stub delle milestone successive.
|
|
- Configurazioni di Visual Studio Code per debug, attività ed estensioni consigliate (`.vscode/`).
|
|
- ADR 0012-0017 sui punti aperti di M0 (salute, utente, varianti `_FILE`, tag e pubblicazione, icona versionata,
|
|
script di ripristino).
|
|
|
|
### Changed
|
|
- I file di `deploy/` puntano alla versione `0.0.1` e all'icona non versionata fino alla 1.0 (ADR 0016).
|
|
|
|
## Preparazione - 2026-11-10
|
|
|
|
Documentazione e pianificazione, nessun codice e nessun tag.
|
|
|
|
### Added
|
|
- Specifica di progetto in `docs/SPEC.md` ed emendamenti in `CLAUDE.md` (Gitea al posto di GitHub, solo Docker).
|
|
- ADR 0001-0011 sulle decisioni di base.
|
|
- Mockup: 22 schermate in alta risoluzione, galleria, 88 miniature, `mockup.css`, indice.
|
|
- Icone in `assets/`; file di deploy per Docker Compose e Unraid in `deploy/`.
|
|
- Wiki completa in bozza (`docs/wiki/`) e documentazione tecnica (`docs/*.md`).
|
|
- Pianificazione su Gitea: etichette, milestone M0-M14, issue con checklist, progetti
|
|
*Khaemhat 1.0 — Sviluppo* e *Khaemhat 1.1+ — Fase 2*.
|