WEFT_OS/docs
Marco Allegretti a57cdbc8be
feat(pack): install and update packages as immutable revisions activated atomically
An installed package could not be updated: install refused it, and
uninstalling and reinstalling it was neither atomic nor safe for running
sessions, which read files from the package directory.

A package is now staged, checked, verified, admitted and flushed. It is
then renamed to an immutable revision named by its content digest,
<store>/.revisions/<id>/<digest>, and activated by one rename of the
link <store>/<id>. A failure or interruption at any point leaves the
previously active revision active, and a failed first installation
leaves nothing installed. The revision active before an update is kept,
and weft-pack rollback makes it active again after checking it against
the owner record. Other revisions are collected by later operations on
the app, unless a session still runs from them. Leftovers of interrupted
operations are collected too.

weft-appd follows the store link only to one of the app's own
revisions. It runs a session from the revision directory and holds a
shared lock on it for the session's lifetime, so an update, rollback or
uninstall never changes or removes the bytes of a running session. A
package directory from before revisions is still read. An update
replaces it in one exchange, and only while no session runs from it.
2026-10-09 17:33:57 +00:00
..
upstream Add WEFT architecture and interface design documents 2026-03-10 18:47:10 +01:00
architecture.md feat(pack): install and update packages as immutable revisions activated atomically 2026-10-09 17:33:57 +00:00
building.md fix(pack): normalize installed modes and never leave a partial or orphaned owner record 2026-10-09 13:59:54 +00:00
security.md fix(pack): let --claim-data install without HOME and test HOME refusals 2026-10-09 14:56:42 +00:00