Refactor architecture into eight components and consolidate reliability work
Build and publish container images / images (push) Successful in 9m34s
Release container images / release (push) Successful in 36s

Extract Grammaratur, Dregarnuhr, Geduldh, Mestionora, Ordoschnellic, Schutzaria, Kunstzeal and Seheweit behind compatible application contracts.

Include accumulated editor resilience, navigation and theme UX, remote CLI, storage/schema and DR groundwork, tests and design/operations documentation.

Verified: uncached full Go suite; go vet ./...; race tests for all eight components; 11 targeted Chromium tests; Node suites; 19 Python CLI tests; reproducible editor build. No push, release tag or deployment in this checkpoint.
This commit is contained in:
Anya Tokugawa committed 2026-11-01 15:23:31 +09:00
1 parent 9dd425f765
commit d5d21b7841
302 files changed
+20037 -3492

No files matched your search

+113
View File
@@ -1,7 +1,75 @@
# Architecture Implementation Roadmap
## Current highest priority (2026-10-31)
The user-prioritized [daily UX / browser / editor / CLI backlog](ja/priority-ux-20261031.md)
takes precedence over the feature backlog below. It covers type-to-search, virtual
Path navigation and browser commands, editor/plain-text and code styling, theme
switching, session timeouts, contacts, City labels and a session-aware terminal client.
Preserve authorization and storage safeguards. Track implementation, tests and
deployment separately; a source checkpoint includes the pre-existing dirty worktree.
## Principles
### Named architecture components (2026-11-01)
- [x] Adopt stable responsibility-based names for eight components; preserve UI terminology,
public APIs, persisted IDs, event consumer checkpoints and deployment boundaries.
- [x] Extract Grammaratur: ordinary and protected authoring conversions, compatibility
facades and application connections. Verification is recorded separately from deployment.
- [x] Extract Dregarnuhr clock/loop/admission/retry contracts and the queue adapter;
register the 14 existing business handlers outside the core. Preserve IDs/schema and atomic claims.
- [ ] Add Dregarnuhr expiring leases, fencing, multi-process scheduling and application shutdown integration;
these are not provided by the initial extraction. See [contract and remaining work](ja/dregarnuhr.md).
- [x] Extract Geduldh local payload storage and bounded materialization; preserve the Document Store
contract through aliases, connect application consumers, and test layout/Range/backfill/DR compatibility.
External backends and placement changes remain separate work; see [contract and remaining work](ja/geduldh.md).
- [x] Extract Mestionora SQLite search/index/City lookup with explicit read-policy callbacks,
legacy aliases, candidate/snippet budgets, plan and authorization tests; see [search contract](ja/mestionora.md).
- [ ] Preload lazy user-space read policies before Page search; retain snapshot consistency while
removing nested connection requirements. Keep current-only/Domain-partitioned and language-aware indexing as later migrations.
- [x] Extract Ordoschnellic bounded Web Push dispatch, retry policy and encrypted transport;
preserve transactional Inbox enqueue, authorization, event IDs and subscription checkpoints.
See [delivery contract and remaining work](ja/ordoschnellic.md).
- [ ] Add distinct Push claim generations and subscription-version fencing, Retry-After and
delivery metrics. Initial extraction retains existing retry/lease limitations, not exactly-once delivery.
- [x] Extract Schutzaria pure Path/locality/group/publication/user-space evaluation and approval state transitions;
retain authenticated fact loading, alias checks and transaction ownership in the application.
See [policy contract and remaining work](ja/schutzaria.md).
- [ ] Complete consistent authorization snapshots, lazy user-space preloading, reviewer inheritance/quorum,
and publication revalidation. State-machine extraction alone does not enable the reviewer workflow.
- [x] Extract Kunstzeal built-in adapter selection, bounded Kroki rendering and diagram hash/cache;
retain source authorization/CSP and add redirect refusal plus atomic cache replacement.
See [rendering contract and remaining work](ja/kunstzeal.md).
- [ ] Add provider-versioned cache keys, render concurrency/coalescing, unified disable/metrics and
additional diagram/slide providers. Initial extraction does not implement nwdiag or slides.
- [x] Extract Seheweit resource collection, typed snapshots and history window/retention policy;
retain APIs/schema/event IDs, connect foreground and background paths, bound proc reads,
guard storage arithmetic, propagate write cancellation and reject read-only sample writes.
See [observation contract and remaining work](ja/seheweit.md).
- [ ] Add source availability, bounded/coalesced collection, rollups/retention budgets,
component/provider metrics and instance-scoped HA/SNMP collectors. These are not part of the initial extraction.
See [component names, boundaries and acceptance criteria](ja/component-names.md).
All eight initial component extractions are implemented; unchecked items describe remaining capabilities.
### Storage portability and operations (2026-09-27)
Implemented and fixture-tested in the working tree; **not deployed**.
- [x] Immutable local Document Store contract, bounded materialization and streaming archive access.
- [x] Resumable document backfill with store identity, UUID cursor and batch checkpoints.
- [x] SQLite migration ledger with version/checksum, atomic adoption and current-schema assertions.
- [x] Managed projection, resource, broadcast, navigation, adapter-session, import and event-queue schemas.
- [x] Read-only `pageswiki schema status|check` with JSON output, pending steps and explicit legacy exclusions.
- [ ] Remaining legacy schema/repository contracts and context propagation; configurable materialization limits/metrics.
- [ ] PostgreSQL/MySQL, S3/SFTP and mounted-store contracts, optional Redis cache.
- [ ] Coordinated backup/restore, portable export/import, Web operations and initial setup wizard.
See the [Japanese design and acceptance criteria](storage-portability-and-operations.md) and
[preflight / deployment procedure](../operations/storage-schema-rollout.md).
Passing managed-schema checks does not replace an isolated full-startup rehearsal.
### Task management first slice (2026-09-24)
2026-09-25 task CalDAV (`0.8.0`, implemented and fixture-tested, **deployed to app/app2 on 2026-09-26 at 00:24 JST**; [deployment record](../operations/deployments/2026-09-26-task-caldav.md)):
@@ -443,6 +511,12 @@ without changing user-visible Page identity.
## Phase 6 — Activity, notification, and collaboration
- [x] Editor resilience E1–E5 initial delivery: local drafts, conditional language-head saves,
conservative merge/conflict review, revision restore, language forks, mobile input, macro completion,
and protected HTML authoring blocks. See [Japanese implementation contract](ja/editor-resilience.md).
- [ ] Editor E6: authorized cross-instance editing presence and feature-gated CRDT collaboration.
Follow-up: block-level HTML protection, hosted-editor/CLI migration, and extensible insertion palette.
- [ ] Formalize a Domain-sequenced event outbox for Page, Revision, Path,
topology, policy, share, comment, reaction, quality, and federation events.
- [ ] Add Page/Spot/Street/Quartier subscription and change-notification rules.
@@ -479,6 +553,43 @@ without changing user-visible Page identity.
## Phase 8 — Controller disaster recovery and high availability
First slice: [Japanese DR design and operator runbook](ja/disaster-recovery.md).
This is **instance-scoped offline recovery**, not automatic controller HA.
DR-D1 follow-up is **design complete, implementation pending** (2026-09-27):
[authority/rejoin](ja/dr-authority-and-rejoin.md),
[protocol/synchronization](ja/dr-protocol-and-sync.md),
[delivery plan and acceptance matrix](ja/dr-delivery-plan.md).
No DB/schema/code changes were made for this design-only follow-up.
- [x] Specify separate controller/data authority, shared-writer coupling,
authenticated rejoin/probe, Learning state, checkpoint verification,
fenced handover/preempt, API contracts, rollout gates and acceptance tests.
- [ ] DR01–DR03: implement validated models, pure state machine and
observation-only authenticated probe; discovery must not grant write access.
- [ ] DR04–DR05: connect restart write gates and authority providers only after
the separately managed storage interfaces and all writer paths are agreed.
- [ ] DR06–DR10: connect consistent checkpoints, bounded resumable transfer,
epoch-aware control manifests, verified fencing and manual group transitions.
- [ ] DR11–DR13: certify preempt policy, scoped operator UI and failure drills;
automatic lossless failover requires an independently verified durability boundary.
- [x] Node-local primary/standby configuration; read-only SQLite startup without
migrations, key generation, scheduler, GC or managed-campus reconciliation.
- [x] Offline snapshot/verify/restore CLI: committed WAL via SQLite Backup API,
canonical files and keys, payload/reference verification, atomic new generations.
- [x] Offline operator-attested promotion, old-primary identity/data-loss checks,
promotion audit and explicit restored-job resumption. External fencing itself
is not implemented or independently verified by these commands.
- [x] Reject standby writes and stale reads; separate read/write readiness;
coordinate server and data CLI with an instance maintenance lock.
- [ ] Rebuild-free read-only organizer/CalDAV paths, standby UI/role indicators,
DR settings panel and instance-operator authorization.
- [ ] Online cross-store snapshot barrier, GC pins, resumable bounded delta
transfer, encrypted/signed generations, retention and measured restore drills.
- [ ] Restore controller sequence safely across accepted newer manifests; local
audit epoch alone does not solve managed-instance replay protection.
- [ ] Add controller manifest journal replication to a designated DR instance,
including signing-key rotation/escrow, encrypted backup, sequence verification,
last-known-good snapshots, RPO/RTO reporting, and restore drills.
@@ -519,6 +630,8 @@ without changing user-visible Page identity.
freezing and configured hosted-editor actions.
- [ ] Add Kroki and PlantUML diagram adapters with bounded input, pinned renderer
version, cached immutable output, timeout, and network policy.
Existing bounded Kroki execution is now in Kunstzeal; renderer-version keys and complete
provider network/resource policy remain pending rather than marking this whole item complete.
- [ ] Add nwdiag as a bounded network-diagram projection and editor adapter;
support static SVG fallback, pinned renderer versions, and explicit source
import/save without executing authored code.