feat: support explicit source bundles through the common installer

This commit is contained in:
Codex
2026-10-06 18:31:23 +02:00
parent 785d96ea50
commit 5c05778614
11 changed files with 353 additions and 5 deletions
+29
View File
@@ -266,6 +266,35 @@ the lock; after a forcibly killed process, confirm that its owner is no longer r
before explicitly removing a stale lock. A different release requires the upgrade
path rather than this command.
## Advanced source build with the same prepared documents
Source compilation is an explicit choice before planning. It requires a ThothII
checkout containing the selected commit, Git, Node 24/npm, Go, Docker Buildx and
network access for dependencies. From `backend`, after `npm ci`:
```bash
node scripts/prepare-source-installation.mjs \
--revision COMMIT --version 0.1.0-source.1 \
--platform linux/amd64 --output /private/path/new-build
```
The command builds an isolated temporary worktree, excluding local edits and
untracked secrets. It does not publish images. The output directory must be new;
after failure preserve its private logs and retry in a new directory. Select
`--platform linux/arm64` explicitly when appropriate.
Use the resulting `bundle/bin/tht` and `bundle/release-manifest.json` in the same
`installation validate`, `plan` and `apply` steps above. The sealed plan records
`release.distribution: source`, revision, version and immutable local image IDs.
Use the Docker daemon containing those images and a Linux operator host matching
the bundle architecture; Windows runs the operator in WSL2.
`apply` pulls only PostgreSQL, Qdrant and Ollama and shares locks, journal,
migrations, binding import and readiness with prebuilt installation. A missing
local image or different source revision blocks planning, without automatic build
fallback. Changing revision or distribution requires a separate installation or
explicit upgrade. Source testing does not certify a public Docker Hub release.
## Manual source path: the two repositories
The remaining sections describe the existing manual path. Do not run its build/setup
+31
View File
@@ -275,6 +275,37 @@ nuovo piano. Ctrl+C rilascia il lock; dopo un arresto forzato del processo verif
che non sia più attivo prima di rimuovere esplicitamente il suo lock residuo.
Un rilascio differente richiede il percorso di aggiornamento, non questo comando.
## Percorso avanzato da sorgenti con gli stessi documenti
La build è una scelta esplicita precedente alla predisposizione del piano.
Richiede un checkout ThothII con il commit desiderato, Git, Node 24/npm, Go,
Docker Buildx e rete per le dipendenze. Da `backend`, dopo `npm ci`:
```bash
node scripts/prepare-source-installation.mjs \
--revision COMMIT --version 0.1.0-source.1 \
--platform linux/amd64 --output /percorso/privato/build-nuova
```
Il comando usa un worktree temporaneo del commit, escludendo modifiche locali e
segreti non tracciati. Non pubblica immagini. L'output deve essere nuovo; se la
build fallisce, conservarne i log privati e riprovare in una nuova directory.
Per Linux arm64 scegliere esplicitamente `--platform linux/arm64`.
Usare `bundle/bin/tht` e `bundle/release-manifest.json` prodotti dal comando
negli stessi passi `installation validate`, `plan` e `apply` descritti sopra.
Il piano sigilla `release.distribution: source`, revisione, versione e identità
immutabili delle immagini locali. L'operatore deve usare lo stesso daemon Docker
che contiene quelle immagini; la piattaforma del bundle deve corrispondere al
sistema Linux che esegue l'operatore. Su Windows usare WSL2.
`apply` scarica solo PostgreSQL, Qdrant e Ollama. Usa gli stessi lock, journal,
migrazioni, binding e controlli di readiness del percorso precompilato. Un'immagine
locale mancante o di un'altra revisione blocca il piano: nessuna build automatica.
Cambiare revisione o modalità richiede una nuova installazione o il percorso
esplicito di aggiornamento. La prova da sorgenti non vale come accettazione del
rilascio pubblico Docker Hub.
## Percorso manuale da sorgenti: i due repository
Le sezioni successive documentano il percorso manuale esistente. Non eseguire i
@@ -0,0 +1,16 @@
# Explicit source installation — T08/#50
The advanced `backend/scripts/prepare-source-installation.mjs` command builds core
and frontend from an isolated committed worktree, loads local image IDs and creates
a source bundle. It never publishes images or uses uncommitted operator files.
Native planning checks local image identity, OCI revision/version and architecture;
the sealed manifest records source mode. Apply shares document validation, lock,
journal, migrations, binding import and readiness with the prebuilt path. Only
upstream service images are pulled. Switching distribution is not an implicit upgrade.
Verification before the real source build: source producer command-boundary and
bundle tests passed (3 Node tests including prebuilt packaging); Go preflight and
apply suites passed, including local identity rejection, no registry fallback and
source apply through the common readiness stages. Standards and Spec review found
no code findings. A real build/start proof remains pending and is required before
calling T08 acceptance complete; it does not certify a published-image installation.