From 5b557c71790da2c74342ec8f47b38ac001934703 Mon Sep 17 00:00:00 2001 From: Genix Date: Fri, 13 Nov 2026 19:17:54 +0330 Subject: [PATCH 1/3] test(runtime): cover truncated notification resync --- tests/integration/run.lua | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/tests/integration/run.lua b/tests/integration/run.lua index 9f5ec3f..4d846cf 100644 --- a/tests/integration/run.lua +++ b/tests/integration/run.lua @@ -279,6 +279,55 @@ A.equal(line_document.length, 1) A.equal(line_view.scroll_anchor, 1) runtime:close_document(line_document.id) +-- Incomplete notification history must force an authoritative metadata resync. +-- Cover both an explicitly truncated edit list and a gap in the version chain. +local resync_document = runtime:open_document("seed") +local resync_subscription = host.subscriptions[resync_document.subscription.id] +A.truthy(resync_subscription ~= nil) +host.documents:replace(resync_document.handle, { + expected_version = resync_document.version, start = 0, finish = 4, bytes = "complete-state", + undo_blob_before = "", undo_blob_after = "", +}) +resync_subscription.queue = { + { + kind = "EDIT", from_version = 0, to_version = 1, current_version = 1, + edit_count = 1, edits_stored = 0, edits = {}, edits_truncated = true, + new_length = #"complete-state", + }, +} +local truncated_events = resync_document:drain_notifications() +A.equal(#truncated_events, 1) +A.equal(resync_document.version, 1) +A.equal(resync_document.length, #"complete-state") +A.equal(resync_document:read(0, 64), "complete-state") + +-- A later event whose from_version skips the client's current version is also +-- insufficient to transform byte anchors and must refresh version/length. +local gap_base = resync_document.version +host.documents:replace(resync_document.handle, { + expected_version = gap_base, start = resync_document.length, finish = resync_document.length, bytes = "!", + undo_blob_before = "", undo_blob_after = "", +}) +host.documents:replace(resync_document.handle, { + expected_version = gap_base + 1, start = resync_document.length + 1, + finish = resync_document.length + 1, bytes = "?", undo_blob_before = "", undo_blob_after = "", +}) +local latest_document = host.docs[resync_document.handle.id] +resync_subscription.queue = { + { + kind = "EDIT", from_version = gap_base + 1, to_version = gap_base + 2, + current_version = latest_document.version, edit_count = 1, edits_stored = 1, + edits = { { start = latest_document.length - 1, removed = 0, inserted = 1 } }, + edits_truncated = false, new_length = latest_document.length, + }, +} +local gap_events = resync_document:drain_notifications() +A.equal(#gap_events, 1) +A.equal(resync_document.version, latest_document.version) +A.equal(resync_document.length, latest_document.length) +A.equal(resync_document:read(0, 64), "complete-state!?") +runtime:close_document(resync_document.id) + -- Snapshots remain version-pinned while live document edits continue. local snapshot = document:snapshot() A.equal(snapshot:read(0, 10), "aZc") From 08d24a0a099fbc4ddbba2f39d19ccc837e818ffa Mon Sep 17 00:00:00 2001 From: Genix Date: Fri, 13 Nov 2026 19:18:45 +0330 Subject: [PATCH 2/3] test(runtime): fix fake host length assertion --- tests/integration/run.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/run.lua b/tests/integration/run.lua index 4d846cf..b9b7559 100644 --- a/tests/integration/run.lua +++ b/tests/integration/run.lua @@ -317,14 +317,14 @@ resync_subscription.queue = { { kind = "EDIT", from_version = gap_base + 1, to_version = gap_base + 2, current_version = latest_document.version, edit_count = 1, edits_stored = 1, - edits = { { start = latest_document.length - 1, removed = 0, inserted = 1 } }, - edits_truncated = false, new_length = latest_document.length, + edits = { { start = #latest_document.bytes - 1, removed = 0, inserted = 1 } }, + edits_truncated = false, new_length = #latest_document.bytes, }, } local gap_events = resync_document:drain_notifications() A.equal(#gap_events, 1) A.equal(resync_document.version, latest_document.version) -A.equal(resync_document.length, latest_document.length) +A.equal(resync_document.length, #latest_document.bytes) A.equal(resync_document:read(0, 64), "complete-state!?") runtime:close_document(resync_document.id) From 32da08d2d289d181da4d5923e355938247c80dfe Mon Sep 17 00:00:00 2001 From: Genix Date: Fri, 13 Nov 2026 19:19:57 +0330 Subject: [PATCH 3/3] docs(runtime): refresh stable release gate evidence --- docs/status.md | 104 ++++++++++++++++++++++++++++--------------------- 1 file changed, 60 insertions(+), 44 deletions(-) diff --git a/docs/status.md b/docs/status.md index 3a7b77e..5cd0340 100644 --- a/docs/status.md +++ b/docs/status.md @@ -22,72 +22,88 @@ bootstrap or complete editor application is Stable. ## Verified evidence -- **Runtime CI** on main commit +- **Runtime CI baseline** passed on [`5f37d733b42ad363abd8c26669157ae1bcc55186`](https://github.com/cdin-editor/runtime/commit/5f37d733b42ad363abd8c26669157ae1bcc55186) - passed in [run 43385962122](https://github.com/cdin-editor/runtime/actions/runs/43385962122): + in [run 43385962122](https://github.com/cdin-editor/runtime/actions/runs/43385962122): Lua 5.4 on macOS and Windows, Lua 5.5 on Linux, Pipeline quality, and - documentation/workflow validation. + documentation/workflow validation. The later 1.0.0 preparation merge is + `dafd508a0d862cf3b0efc5a5b70f7fcf8a735ab1`; its exact-main CI run is + [43455232678](https://github.com/cdin-editor/runtime/actions/runs/43455232678) + and must complete successfully before the release tag is created. - **Runtime package workflow** passed its package build, checksum and extracted Lua 5.4 consumer checks in [run 43385962119](https://github.com/cdin-editor/runtime/actions/runs/43385962119). This was a branch push / dry-run, not a tag publication. It verified the branch-derived development identity `1.0.0-rc.2.next.9+g5f37d73`, not a stable `1.0.0` Release. -- **Live Backend + PUC Lua 5.4 + installed Kernel integration** passed in - [Backend run 43385975403](https://github.com/cdin-editor/backend/actions/runs/43385975403). - The Backend checked out Runtime main at the exact commit above, installed - Kernel package 1.2.1 / ABI 1.1.0 and logger 0.1.0, ran Runtime tests and - boundaries, built Backend with Lua, and passed Backend/Kernel integration - plus the real Runtime startup/pump/shutdown smoke. The workflow ran on - Ubuntu 24.04; it is not cross-platform live-bridge evidence. -- The same live Backend run exercised document lifecycle, snapshots, - transactions, notifications, stale handles, Backend session ownership, - queue backpressure, ACK handling, Driver promotion and the Runtime - PaneTree result/layout/flush path. These checks are real native integration, - not FakeHost-only tests. +- **Live Backend + PUC Lua 5.4 + installed Kernel integration** passed on + Backend main commit + [`5d6371e8ca9ce1ee236d961181c259b3dfe72158`](https://github.com/cdin-editor/backend/commit/5d6371e8ca9ce1ee236d961181c259b3dfe72158) + in [run 43455376627](https://github.com/cdin-editor/backend/actions/runs/43455376627). + The run passed Linux, macOS and Windows live integration jobs. The separate + Backend resource/sanitizer run + [43455376090](https://github.com/cdin-editor/backend/actions/runs/43455376090) + also completed successfully, including ThreadSanitizer, ASan/UBSan and + bounded-job coverage. The five-target Backend package build passed in + [run 43455376998](https://github.com/cdin-editor/backend/actions/runs/43455376998); + its release-publication/provenance jobs were skipped because this was a + branch push, not a tag. +- Backend PR [#40](https://github.com/cdin-editor/backend/pull/40) and + [#41](https://github.com/cdin-editor/backend/pull/41) are merged. PR #40 + added live Lua 5.4 structured stale-version details and exact-once + `__gc` cleanup coverage for document, snapshot, transaction and + subscription handles. PR #41 adds the RT-013 single-file extension entry + path with ambiguity, symlink, confinement and bounded-read tests. The + merged Backend run above verifies these changes on all three OSes. ## Required gates before publishing Runtime 1.0.0 -1. **Native Host status and userdata ownership.** Backend PR - [#40](https://github.com/cdin-editor/backend/pull/40) adds live Lua 5.4 - assertions for structured `STALE_VERSION` details and `__gc` release of - document, snapshot, transaction and subscription handles. Its initial live - integration run [43449265418](https://github.com/cdin-editor/backend/actions/runs/43449265418) - passed and logged both `PASS runtime_host_conformance` and - `PASS runtime_host_smoke`. The follow-up head - [`4d002c3`](https://github.com/cdin-editor/backend/commit/4d002c3bf917418ee7c63ccd5c827bd791a5964f) - only corrects failure-diagnostic newline escaping; its fresh CI, live - integration and resource-stress runs were queued at this checkpoint. - Require those latest-head checks to pass and the PR to merge before treating - this gate as closed. +1. **Native Host status and userdata ownership.** Backend PRs + [#40](https://github.com/cdin-editor/backend/pull/40) and + [#41](https://github.com/cdin-editor/backend/pull/41) are merged. Latest + Backend main live integration, native platform matrix and sanitizer / + bounded-job checks passed in runs + [43455376627](https://github.com/cdin-editor/backend/actions/runs/43455376627), + [43455376998](https://github.com/cdin-editor/backend/actions/runs/43455376998) + and [43455376090](https://github.com/cdin-editor/backend/actions/runs/43455376090). + The live Runtime Host smoke explicitly verifies structured + `STALE_VERSION` details and exact-once finalization of document, snapshot, + transaction and subscription userdata. This closes the specific PR #40/#41 + work; it does not claim exhaustive runtime vectors for every Host API error + code. 2. **Complete native error/status conformance.** Verify the Host API's stable status-code mapping and detail payloads, invalid/stale handle behavior, owner-thread rejection, cleanup after partial startup, and shutdown/failure paths against the actual Backend adapter. A single stale-version vector is not the entire mapping table. -3. **Native event and projection conformance.** Preserve the already-passing - real Backend/Runtime UI projection, per-client ACK, backpressure and - PaneTree ordering checks; retain explicit notification overflow/resync and - failure-injection evidence where the relevant requirement applies. +3. **Native event and projection conformance.** Real Backend/Runtime UI + projection, per-client ACK, backpressure, driver promotion and PaneTree + result/layout/flush ordering pass in the latest Backend live integration. + Runtime PR [#28](https://github.com/cdin-editor/runtime/pull/28) adds + regression cases for both explicit `edits_truncated` notifications and + version-chain gaps, asserting authoritative version/length refresh and + unchanged exact document bytes. Its CI must pass before merge; these + additional tests exercise Runtime's fail-safe notification consumer with + FakeHost and do not replace the native Backend integration. 4. **Extension and migration scope.** Spec RT-013 records both directory - `/init.lua` and top-level `.lua` entry shapes. Backend PR - [#41](https://github.com/cdin-editor/backend/pull/41) implements the - single-file path with confined, bounded, no-follow reads, rejects - directory/file ambiguity and adds native tests. Its Linux/macOS/Windows CI - and live integration must pass and the PR must merge before this gate is - closed. The documented 1.0.0 contract supports both entry shapes; a - single-file package has no nested module namespace. RT-020 and RT-021 remain - Proposed and are explicitly not compatibility promises in this package: - no automatic deprecated-API shims or blanket parity for undocumented - behavior is claimed. The provisional `core.ui:publish` passthrough is not - part of the stable extension API. + `/init.lua` and top-level `.lua` entry shapes. Backend PR #41 + is merged and its cross-platform live integration passed. The documented + 1.0.0 contract supports both entry shapes; a single-file package has no + nested module namespace. RT-020 and RT-021 remain Proposed and are + explicitly not compatibility promises in this package: no automatic + deprecated-API shims or blanket parity for undocumented behavior is + claimed. The provisional `core.ui:publish` passthrough is not part of the + stable extension API. 5. **Exact immutable publication.** A final `v1.0.0` tag must resolve to the exact source commit being packaged. The tagged workflow must publish the universal Lua module TAR.GZ, ZIP companion, checksums and canonical `runtime-1.0.0.json` ADR-0028 metadata generated from that same tag commit. The extracted package test must load the modules with PUC Lua 5.4 outside - a Runtime source checkout. A branch dry-run or the historical RC2 release - is not a substitute. + a Runtime source checkout. The publisher script already enforces exact + `v1.0.0` tag-to-commit identity, canonical metadata name, schema 1.2.0 + publication declaration, one Registry artifact and archive digest/size + consistency. A branch dry-run or the historical RC2 release is not a + substitute. ## Immutable history and downstream adoption