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
27 changes: 27 additions & 0 deletions docs/adr/0024-owned-vpn-protocol-transitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,33 @@ 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.

## Private controller publication

Under the existing project lock, prepare a bounded journal containing all four
expected public epoch files before requesting guest completion. Its predicted
completion is not an acknowledgment and does not publish a head. Validate the
complete old graph, closed peer segment, source/ingress manifests and capacity;
allow only that candidate's confined additional artifacts. Ordinary graph readers
continue to reject the pending journal. Missing publication authority is never
reconstructed from an orphan bundle or peer directory.

After the coordinator supplies the exact separately authenticated guest response,
durably record `observed`, create the exact empty next peer namespace, publish the
new head and retire terminal ingress metadata and, last, the publication journal.
Retain complete known-terminal provider references; unknown dispatch cannot be
retired. Immutable public files use manifest-last exact-prefix recovery; changed
bytes, inode replacements, file-order gaps and directory membership ABA refuse.
Keep the full immutable snapshot pinned across later head and cleanup barriers.
Late snapshot drift preserves or restores the same observed protective journal;
it grants no new guest/cloud authority. Repeated completion uses the same epoch
and guest response. Read-only status repairs nothing.

Mutating project-lock admission synchronizes the published project namespace before
any subsequent peer/guest write, closing a failed final journal-unlink directory
barrier. Read-only coordination does not synchronize. These are local publication
primitives: authenticated RPC, live attestation, cloud ordering and public CLI
admission still require integration, and no local record itself proves them.

## Consequences and validation

This requires extra bounded metadata and recovery paths, but keeps original
Expand Down
36 changes: 32 additions & 4 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 or public protocol CLI yet. A separate
private guest schema-2 finalizer is described below. Existing ordinary entrypoints still reject epoch metadata until
This reader has no public protocol CLI yet. Separate private guest schema-2
completion and controller publication primitives are 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,7 +904,7 @@ 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, invocation of common completion, generation-bearing epoch publication, fresh-build
Cloud ordering, invocation of common completion and 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.

Expand All @@ -921,7 +921,7 @@ actual kernel/service state and consumed history, exact installed file identitie
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.
RPC or public CLI integration in this primitive. Local publication is separate below.

An exact immutable schema-2 completion commits the measured historical result.
Its common head is published before retiring verified input/generation/runtime
Expand All @@ -940,6 +940,34 @@ 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.

## Journaled local epoch publication

The private controller publisher requires caller-held project coordination. It
retains a bounded complete candidate with four public epoch files before guest
completion, distinguishing `prepared` expected bytes from an `observed` exact
authenticated response supplied by the coordinator. It verifies complete previous
graph ancestry, peer closure, sources, ingress intent and capacity. It does not
infer an acknowledgment or lost authority from an orphan artifact. Public graph
traversal continues to refuse pending publication.

After the separate exact response, publication records `observed`, creates the
empty next peer namespace, publishes the epoch head and removes only its known
terminal ingress journal and, last, its own journal. Every prefix is recoverable
from the same retained evidence; ordered immutable file prefixes are appended,
never replaced. Unknown bytes, gaps, unexplained temporary files, stale authority,
unknown dispatch, nonempty peer segments, inode replacements and membership ABA
refuse. Complete immutable file/manifest descriptors remain pinned and verified
through later head and cleanup barriers. Late snapshot drift preserves or restores
the same observed journal before returning failure. A mutation-only project-lock
barrier persists final namespace absence before later segment or guest writes;
read-only coordination remains free of synchronization or repair.

Historical metadata recovery uses retained public manifests when private source
bodies are lost; it never reconstructs credentials. Repeated native epochs retain
all prior segments and source files. There is no real guest/provider dispatch or
live attestation in this local backend. Protocol RPC, the coordinator and public
entrypoint integration remain #128 work.

## 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:c217ca08ac2ff6a115d354c2217cb691141d8f0f2255941f1d557a12e65ed865"
reviewedTranslationHash = "sha256:65772dad0efeffe8d3ba20fff8a80778b08d2142a11d9ef22f49a31f761942ac"
sourceHash = "sha256:69fc2e9696d9d7dbc54b378e64d1836a90ffd330c8abe04fcbdd67b2715bd67c"
reviewedTranslationHash = "sha256:73324d415942b3d94608cfd4f9707f3ffc468ddb903ea1b25952cb33254ca685"
reviewer = "Codex"
reviewerType = "ai"
reviewedAt = "2026-11-07T09:16:39.090557Z"
reviewedAt = "2026-11-07T09:44:22.875277Z"
reviewRoles = ["editorial", "technical"]
body = '''# ADR 0024: Управляемые переходы VPN-протоколов и неизменяемые эпохи

Expand Down Expand Up @@ -275,6 +275,33 @@ vendor-CVE, закреплённой сборки инструмента и ко
не синхронизирует и не исправляет метаданные. Backend покрывает нативные конечные
операции; отмена схемы 1 до внешней отправки остаётся отдельным путём без изменения.

## Приватная публикация контроллера

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

После отдельного точного аутентифицированного ответа гостя координатор надёжно
записывает `observed`, создаёт точное пустое пространство следующего сегмента клиентов,
публикует новую голову и удаляет конечные входные метаданные, последним — журнал
публикации. Сохраняются полные известные конечные ссылки провайдера; неизвестную
отправку удалить нельзя. Неизменяемые публичные файлы восстанавливаются по точному
префиксу с манифестом последним. Изменённые байты, замены inode, разрывы порядка
файлов и ABA состава каталога отклоняются. Полный неизменяемый снимок закреплён до
поздних барьеров головы и очистки. Поздний дрейф сохраняет или возвращает тот же
защитный журнал observed, не выдавая новых облачных/гостевых полномочий. Повтор
использует ту же эпоху и ответ гостя. Read-only status ничего не исправляет.

Изменяющий допуск блокировки проекта синхронизирует опубликованное пространство
проекта до следующей записи клиентов/гостя, закрывая ошибку каталожного барьера после
последнего unlink журнала. Read-only координация не синхронизирует. Это локальные
примитивы публикации: аутентифицированный RPC, живая аттестация, облачный порядок и
публичный CLI ещё требуют интеграции; сама локальная запись их не подтверждает.

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

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