Alur kerja instalasi
Bagaimana apothem install, update, dan uninstall bekerja secara menyeluruh.
Alur instalasi
flowchart TD
accTitle: Apothem install workflow
accDescr: Top-down flowchart of the apothem install command from CLI invocation through adapter lookup, profile load, adapter install call, native config write, and final apothem verify check.
A[apothem install --harness X] --> B[Resolve adapter through registry]
B --> C[Load and validate profile YAML<br/>before writes]
C --> D[Adapter.install(profile, project)]
D --> E[Write native config and support cohorts]
E --> F[apothem verify --harness X]
F --> G{All checks pass?}
G -- yes --> H[Done]
G -- no --> I[Report failures]Alur pembaruan
Pada apothem update --harness X:
- Memuat dan memvalidasi
~/.config/apothem/profile.yamlatau--profile PATH. - Menyelesaikan harness yang dipilih atau
allmelalui registri pusat. - Memvalidasi seluruh rencana materialisasi sebelum penulisan pertama.
- Memanggil
Adapter.update(profile, project=...). - Melaporkan hasil yang dibuat, diperbarui, tidak berubah, dilewati, peringatan, dan kesalahan.
Alur penghapusan instalasi
Pada apothem uninstall --harness X:
- Memanggil
Adapter.uninstall(). - Adapter hanya menghapus berkas yang ditulisnya; profil bersama YAML dan berkas tak terkait yang ditulis operator tetap utuh.
Resolusi cakupan
Setiap adapter menulis ke root instalasi tetapnya sendiri: direktori home pengguna
untuk adapter bercakupan pengguna dan path lokal proyek untuk adapter bercakupan
proyek. CLI tidak mengekspos flag --scope; adapter bercakupan proyek memerlukan
--project <path>. Setiap tujuan didokumentasikan di
site/content/docs/harnesses/<harness>.mdx.
Penanganan kesalahan
Operasi instalasi/pembaruan memvalidasi sebelum menulis, mencadangkan target yang
cocok yang sudah ada sebelum penggantian, dan hanya menggabungkan entri anak yang
dikelola Apothem di direktori penemuan bersama. --dry-run menjalankan validasi
yang sama dan mengembalikan hasil dilewati atau tidak berubah tanpa membuat
direktori atau berkas.
Reversibility (backup and rollback)
Every install pass is reversible. Replaced bytes are captured into the Apothem
backup root and the pass is recorded in the harness ledger under a ULID
install id; apothem rollback selects a
recorded pass and restores those captured backups.
%% provenance: hand-authored %%
%% verified: 2026-07-06 %%
%% cross-reference: this page's Error handling section (back up before replace); /docs/cli-reference/rollback %%
flowchart LR
accTitle: Apothem backup and rollback lifecycle
accDescr: At install time each replaced target's prior bytes are captured into the Apothem backup root and the pass is recorded in the harness ledger under a ULID install id. The rollback command selects a recorded install pass by latest or install-id, restores every captured backup from the backup root, and appends a rollback record to the ledger.
subgraph Install
direction TB
I1["Back up existing targets<br/>before replacement"] --> I2["Apothem backup root"]
I1 --> I3["Ledger install record<br/>ULID install-id"]
end
subgraph Rollback
direction TB
R1["Select install pass<br/>--last or --install-id ULID"] --> R2["Restore captured backups<br/>from the backup root"]
R2 --> R3["Append rollback record<br/>to the harness ledger"]
end
I2 -.->|captured bytes| R2
I3 -.->|resolves pass| R1Kontrak pemaketan cohort
Kontrak yang stabil dan dapat dikonsumsi hilir untuk pemaketan cohort dan manifes plugin — menyebutkan cohort dan menyelesaikan target asli per-harness-nya tanpa menurunkan ulang pemetaan.
Runtime mandiri
Bagaimana mesin Apothem berjalan dari checkout mana pun — dependensi yang diinternalkan, model invokasi PYTHONPATH=src, dan bootstrap pohon plugin.