Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions docs/adr/0024-owned-vpn-protocol-transitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ With systemctl show --all, no job renders an empty Job value rather than a numer

Cache preparation itself does not mutate an active root, unit, input policy or cloud
resource. Native transitions remain private and keep the common reservation exposed.
Cloud ordering, common completion, generation-bearing epoch publication and public
CLI admission still require controller integration. Neither cache nor input preparation
Cloud ordering, invocation of common completion, generation-bearing epoch publication
and public CLI admission still require controller integration. Neither cache nor input preparation
alone authorizes a service command or retires an exposed reservation.

A change to another protocol preserves active WireGuard keys/configuration/root
Expand Down Expand Up @@ -357,9 +357,33 @@ validity window and records actual restored provider IDs/tags. Reserve enough
bounded recovery/epoch capacity before dispatch. A snapshot equal to the old rules
does not turn an unknown submission into an undispatched cancellation. Local graph
validation checks declared evidence and ancestry; authenticated live attestation,
guest completion, publication recovery and public entrypoint admission remain the
invoking guest completion, publication recovery and public entrypoint admission remain the
coordinator's separate obligations.

### Private native completion

The private common finalizer accepts a closed candidate binding the schema-2 epoch
intent, full composite request, terminal native/input journals and source-bound
service proofs. It reconstructs all native terminal records before I/O. Under the
common then WG locks, first publication rechecks pinned generation files, actual
native state/history, installed file identities and terminal input policy. A trusted
observer dependency must measure every unrelated service; caller-supplied hashes
alone cannot satisfy this requirement. Cloud and local graph attestation remain
controller responsibilities, and no RPC or public CLI invokes this backend yet.

The exact immutable schema-2 completion is the commit point. Publish its common
head, retire only verified canonical input/generation/runtime sidecars and remove
the reservation last. Reappearing sidecars or unexplained temporary entries preserve
the reservation. A complete exact record can recover metadata publication/cleanup
after reboot without claiming current service health. An incomplete exact record
prefix requires fresh terminal attestation before append; different bytes cannot
be adopted or replaced. No recovery restores consumed peer history.

Ordinary mutating WG admission synchronizes the completed common namespace before
proceeding, closing a failed final-unlink directory barrier. Read-only admission
does not synchronize or repair metadata. This backend covers native terminal
operations; schema-1 unexposed cancellation remains the separate no-op path.

## Consequences and validation

This requires extra bounded metadata and recovery paths, but keeps original
Expand Down
38 changes: 35 additions & 3 deletions docs/development/wireguard-implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -756,8 +756,8 @@ Schema-1 intent loading is unchanged, and these checks need no private source bo
Native epochs also preserve each unrelated protocol's preceding complete service
receipt or absence proof; unchanged source selection alone cannot replace that proof.

This reader has no publication workflow, guest schema-2 finalizer or public
protocol CLI yet. Existing ordinary entrypoints still reject epoch metadata until
This reader has no publication workflow or public protocol CLI yet. A separate
private guest schema-2 finalizer is described below. Existing ordinary entrypoints still reject epoch metadata until
the coordinator, transport-generation handling, authenticated live attestation and
recovery are integrated. The reader performs no guest, cloud or desktop operation
and never infers actual runtime health from a locally authored proof record.
Expand Down Expand Up @@ -904,10 +904,42 @@ planned identity on rollback with the same credentials/runtime and a new history
link. Read-only native status reports recovery required. A stopped `unchanged`
rollback cannot open input until restored; previously restored input stays unchanged.

Cloud ordering, common completion, generation-bearing epoch publication, fresh-build
Cloud ordering, invocation of common completion, generation-bearing epoch publication, fresh-build
orchestration and public protocol CLI admission remain integration work.
No live server/client or traffic acceptance is implied by these private primitives.

## Native common completion

The private finalizer validates its closed candidate before guest I/O or mutation:
schema-2 epoch metadata, exact full composite, terminal native journal, applied or
rolled-back input proof and source-bound service receipts/absence. It supports
enabled, removed, restored, unchanged and rolled-back native outcomes. This is not
an unstarted-operation producer; unexposed schema-1 cancellation remains separate.

First publication holds common then WG locks and verifies the prepared generation,
actual kernel/service state and consumed history, exact installed file identities,
terminal input journal/policy and unrelated services through a trusted observer
dependency. Request JSON cannot choose that dependency. Cloud proof and local graph
attestation still belong to the controller. There is no concrete AWG/VLESS observer,
RPC, controller publication workflow or public CLI integration in this primitive.

An exact immutable schema-2 completion commits the measured historical result.
Its common head is published before retiring verified input/generation/runtime
sidecars and, last, the reservation. Unknown entries, changed history and reappearing
canonical sidecars refuse that final retirement. Cleanup pins file/directory
identities, verifies bytes and synchronizes every barrier; it does not enumerate or
delete private runtime payloads. A complete exact record permits metadata recovery
without live service health after a crash or reboot. This replay makes no current
health or peer-history claim. Only an exact incomplete byte prefix can be appended,
and only after all live terminal proofs are rechecked. Neither path rewinds history.

If final reservation unlink succeeds but its directory synchronization fails, the
next ordinary mutating WG guest/peer entrypoint must synchronize the completed
namespace before any write. A failed barrier refuses admission. Read-only status
does not perform this synchronization or repair. Deterministic fault tests cover
publication/cleanup interruptions, incomplete records, reappearing sidecars and
failed directory barriers; every service/network boundary remains synthetic.

## Remaining integration

Adding/removing a protocol on an existing guest, schema-1 migration, explicit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
schemaVersion = 1
sourcePath = "docs/adr/0024-owned-vpn-protocol-transitions.md"
sourceHash = "sha256:81e2df46a70f3781a4060976d2fd386fbceeb6b0d25651d8c368dc5cabdc65b6"
reviewedTranslationHash = "sha256:375ff603cbefdc60e8b53a8b1ed51244d22eecbd61ad2d0159de1fa91399ddff"
sourceHash = "sha256:c217ca08ac2ff6a115d354c2217cb691141d8f0f2255941f1d557a12e65ed865"
reviewedTranslationHash = "sha256:65772dad0efeffe8d3ba20fff8a80778b08d2142a11d9ef22f49a31f761942ac"
reviewer = "Codex"
reviewerType = "ai"
reviewedAt = "2026-11-07T08:00:48.180642Z"
reviewedAt = "2026-11-07T09:16:39.090557Z"
reviewRoles = ["editorial", "technical"]
body = '''# ADR 0024: Управляемые переходы VPN-протоколов и неизменяемые эпохи

Expand Down Expand Up @@ -158,7 +158,7 @@ helper или кандидат. Неизвестный ABI отклоняетс

Сама подготовка кэша не меняет активный корень, unit, входящие правила или облако.
Native-переходы приватны и оставляют общую резервацию открытой. Порядок облачных действий,
общее завершение, публикация эпох с поколениями и публичный CLI ещё требуют интеграции
вызов общего завершения, публикация эпох с поколениями и публичный CLI ещё требуют интеграции
контроллера. Одна подготовка кэша или входа не разрешает команду сервиса и не закрывает
открытую резервацию.

Expand Down Expand Up @@ -248,9 +248,33 @@ vendor-CVE, закреплённой сборки инструмента и ко
и метки провайдера. До отправки резервируется ёмкость полного восстановления и эпохи.
Совпадение снимка с прежними правилами не превращает неизвестную отправку в отмену
до отправки. Локальный граф проверяет объявленные свидетельства и происхождение;
аутентифицированная живая аттестация, завершение гостя, восстановление публикации и
аутентифицированная живая аттестация, вызов завершения гостя, восстановление публикации и
допуск публичных точек входа остаются отдельными обязанностями координатора.

### Приватное завершение нативной операции

Приватный общий finalizer принимает закрытый кандидат, связывающий намерение эпохи
схемы 2, полный составной запрос, конечные журналы native/input и сервисные
свидетельства с источниками. До ввода-вывода восстанавливаются все нативные конечные
записи. Под блокировками общая → WG первая публикация повторно проверяет закреплённые
файлы поколения, фактическое нативное состояние и историю, идентичности установленных
файлов и конечную входную политику. Доверенный observer обязан измерить остальные
службы; одних заданных вызывающим кодом хешей недостаточно. Облако и локальный граф
аттестует координатор. RPC и публичный CLI пока не вызывают этот backend.

Точная неизменяемая запись завершения схемы 2 — точка фиксации. Затем публикуется общая
голова, удаляются только проверенные канонические журналы input/generation/runtime,
последней — резервация. Повторно появившиеся журналы или необъяснённые временные
файлы сохраняют резервацию. Полная точная запись позволяет после перезагрузки
восстановить публикацию и очистку метаданных без утверждения о текущей исправности
службы. Неполный точный префикс требует свежей конечной аттестации перед дописыванием;
другие байты не принимаются и не заменяются. Израсходованная история не возвращается.

Обычный изменяющий вход WG синхронизирует завершённое общее пространство имён перед
работой, закрывая сбой каталожного барьера после последнего unlink. Read-only допуск
не синхронизирует и не исправляет метаданные. Backend покрывает нативные конечные
операции; отмена схемы 1 до внешней отправки остаётся отдельным путём без изменения.

## Последствия и проверка

Нужны дополнительные ограниченные метаданные и пути восстановления, но исходная принадлежность остаётся независима от желаемых слушателей, а непрерывность устройств сохраняется. Отказ при неоднозначном состоянии предпочтительнее молчаливого принятия правил или возвращения отозванного клиента. Блокировки проекта и сервера остаются advisory для внешних облачных администраторов; распределённая атомарность или исправление произвольного дрейфа не обещаются.
Expand Down
Loading
Loading