diff options
| author | eunhhu <[email protected]> | 2026-09-24 17:33:55 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-24 17:33:55 +0100 |
| commit | 4525124c01cc4c4ee335b0a430354a235a6539e0 (patch) | |
| tree | 094372b8d78e05dca5d462aace4affd93450ff21 /prototypes/connections | |
| parent | b1ce1927022d374198441afafeb27199fc8a052a (diff) | |
| download | pure-4525124c01cc4c4ee335b0a430354a235a6539e0.tar.gz pure-4525124c01cc4c4ee335b0a430354a235a6539e0.zip | |
Admit aligned OS pages in selected paged store
Diffstat (limited to 'prototypes/connections')
| -rw-r--r-- | prototypes/connections/Makefile | 8 | ||||
| -rw-r--r-- | prototypes/connections/README.md | 4 | ||||
| -rw-r--r-- | prototypes/connections/SOURCE_PREVIEW.md | 2 | ||||
| -rw-r--r-- | prototypes/connections/results/2026-09-24-logical-page/hybrid-package-check.json | 15 | ||||
| -rw-r--r-- | prototypes/connections/results/2026-09-24-logical-page/pure-document-hybrid-cli-tui-linux-aarch64.tar.gz | bin | 0 -> 58203 bytes | |||
| -rw-r--r-- | prototypes/connections/results/2026-09-24-logical-page/pure-source-preview.tar.gz | bin | 0 -> 338384 bytes | |||
| -rw-r--r-- | prototypes/connections/results/2026-09-24-logical-page/source-package-check.json | 15 | ||||
| -rw-r--r-- | prototypes/connections/store-paged.c | 8 |
8 files changed, 47 insertions, 5 deletions
diff --git a/prototypes/connections/Makefile b/prototypes/connections/Makefile index 502d359..4d4e5a2 100644 --- a/prototypes/connections/Makefile +++ b/prototypes/connections/Makefile @@ -3,7 +3,7 @@ CFLAGS ?= -O2 -g CFLAGS += -std=c17 -Wall -Wextra -Wpedantic -Werror BUILD ?= build -.PHONY: all core async-core editor fixed-editor fixed-server fixed-tui source-tui compiler mirror window server async-server document-peer document-server check check-policy check-policy-peer check-portable check-portable-tui check-portable-peer check-native-checkpoint check-mirror check-core check-async check-async-server check-async-service-scale check-profile check-fixed-profile check-fixed-server check-service-scale check-tui-profile check-source-tui-profile check-tui check-source-tui check-release check-micro-memory check-hybrid check-flat-export check-copy-range check-peer-profile check-document-server-profile check-window-profile check-document-peer check-document-server FORCE +.PHONY: all core async-core editor fixed-editor fixed-server fixed-tui source-tui compiler mirror window server async-server document-peer document-server check check-policy check-policy-peer check-portable check-portable-tui check-paged-portable check-portable-peer check-native-checkpoint check-mirror check-core check-async check-async-server check-async-service-scale check-profile check-fixed-profile check-fixed-server check-service-scale check-tui-profile check-source-tui-profile check-tui check-source-tui check-release check-micro-memory check-hybrid check-flat-export check-copy-range check-peer-profile check-document-server-profile check-window-profile check-document-peer check-document-server FORCE CORE = runtime.c STORE ?= store.c FIXED_PROGRAM ?= examples/editor.pure @@ -243,6 +243,12 @@ check-portable-tui: fixed-editor fixed-tui editor source-tui python3 check_tui.py --build $(BUILD) --portable $(if $(PORTABLE_FIXED_TUI_EVIDENCE),--output "$(PORTABLE_FIXED_TUI_EVIDENCE)") python3 check_tui.py --build $(BUILD) --source --portable $(if $(PORTABLE_SOURCE_TUI_EVIDENCE),--output "$(PORTABLE_SOURCE_TUI_EVIDENCE)") +# Exercise the selected logical-page store without Linux-only size/RSS gates. +# The CI runner separately asserts its real OS page size before this target. +check-paged-portable: + $(MAKE) BUILD=build/paged-portable STORE=store-paged.c check-portable check-portable-tui check build/paged-portable/test-paged-store + build/paged-portable/test-paged-store + # Host-native behavior plus the same real document workload on both CLI variants. # RSS is recorded on macOS and Linux; only check-micro-memory enforces the # reviewed Linux AArch64 ceiling. diff --git a/prototypes/connections/README.md b/prototypes/connections/README.md index 31b9c27..67cccd5 100644 --- a/prototypes/connections/README.md +++ b/prototypes/connections/README.md @@ -145,7 +145,9 @@ python3 prototypes/connections/export_flat_store.py \ [기본 형식으로 내보내는 검증](../../docs/research/062-paged-store-rollback.md). 같은 `.pure` 문서 편집기를 선택형 페이지 저장소와 함께 터미널에서 사용하려면 -Linux의 16 KiB OS 페이지 환경에서 새 저장 디렉터리를 지정한다. CLI와 TUI를 +새 저장 디렉터리를 지정한다. 논리 페이지는 16 KiB이며 OS 페이지가 이를 +나눌 때만 초기화한다. 현재 실제 검사는 Linux 16 KiB 환경에서만 통과했고, +4 KiB Linux와 macOS는 CI 실행 결과가 아직 없다. CLI와 TUI를 함께 담은 [선택형 묶음](results/2026-09-24-native-save/pure-document-hybrid-cli-tui-linux-aarch64.tar.gz)은 다음 빌드로 만들며, 기본 `make all`과 기본 저장 형식은 유지된다. diff --git a/prototypes/connections/SOURCE_PREVIEW.md b/prototypes/connections/SOURCE_PREVIEW.md index 9e0d78d..a4bbfc3 100644 --- a/prototypes/connections/SOURCE_PREVIEW.md +++ b/prototypes/connections/SOURCE_PREVIEW.md @@ -72,7 +72,7 @@ Writers may receive `busy` until it finishes; schedule this as maintenance. The destination must not exist. `make -C prototypes/connections check-flat-export` exercises the conversion with real mixed-size and repeatedly edited documents. -On a Linux host with 16 KiB OS pages, the selected hybrid store can also run +On a Linux host whose OS page size divides the 16 KiB logical page, the selected hybrid store can also run the source-loaded native terminal editor without adding it to the default app: ```sh diff --git a/prototypes/connections/results/2026-09-24-logical-page/hybrid-package-check.json b/prototypes/connections/results/2026-09-24-logical-page/hybrid-package-check.json new file mode 100644 index 0000000..0162011 --- /dev/null +++ b/prototypes/connections/results/2026-09-24-logical-page/hybrid-package-check.json @@ -0,0 +1,15 @@ +{ + "archive_sha256": "649b2d5f0432f58cb9b7c36b5607a3b81d7034d678c836c9307d3a323e2340dc", + "archive_bytes": 58203, + "selected_hosts": [ + "pure-edit", + "pure-edit-tui" + ], + "checks": [ + "relocated archive has only declared files and every file hash matches", + "extracted native CLI creates and restores the real document", + "selected storage keeps small values inline and maps large values", + "editing the packaged .pure source changes the executed reply", + "relocated source-loaded TUI and CLI share UTF-8, large and many-document paths" + ] +} diff --git a/prototypes/connections/results/2026-09-24-logical-page/pure-document-hybrid-cli-tui-linux-aarch64.tar.gz b/prototypes/connections/results/2026-09-24-logical-page/pure-document-hybrid-cli-tui-linux-aarch64.tar.gz Binary files differnew file mode 100644 index 0000000..1f692f9 --- /dev/null +++ b/prototypes/connections/results/2026-09-24-logical-page/pure-document-hybrid-cli-tui-linux-aarch64.tar.gz diff --git a/prototypes/connections/results/2026-09-24-logical-page/pure-source-preview.tar.gz b/prototypes/connections/results/2026-09-24-logical-page/pure-source-preview.tar.gz Binary files differnew file mode 100644 index 0000000..de6dbbc --- /dev/null +++ b/prototypes/connections/results/2026-09-24-logical-page/pure-source-preview.tar.gz diff --git a/prototypes/connections/results/2026-09-24-logical-page/source-package-check.json b/prototypes/connections/results/2026-09-24-logical-page/source-package-check.json new file mode 100644 index 0000000..0b960fd --- /dev/null +++ b/prototypes/connections/results/2026-09-24-logical-page/source-package-check.json @@ -0,0 +1,15 @@ +{ + "archive_sha256": "5b01f1a4a6c4db6e405bd6eedc9f550060b67fdd4550bab35dd83f6465a326b8", + "archive_bytes": 338384, + "source_files": 173, + "checks": [ + "every extracted source file matches the manifest", + "clean default build contains only the core, parser-free CLI and its build-time compiler", + "clean C17, both real terminal PTY scenarios and fixed/source CLI document RSS checks pass", + "source-loaded CLI and parser-free CLI share the real stored document", + "editing .pure changes the native source-loaded reply", + "clean selected page store runs the source-loaded TUI and relocatable CLI+TUI package", + "clean Linux release behavior, code, dependency and RSS gates pass", + "clean source-loaded terminal editor PTY scenarios pass" + ] +} diff --git a/prototypes/connections/store-paged.c b/prototypes/connections/store-paged.c index 89c0148..137301a 100644 --- a/prototypes/connections/store-paged.c +++ b/prototypes/connections/store-paged.c @@ -11,7 +11,7 @@ #include <sys/stat.h> #include <unistd.h> -/* Selected Linux/16 KiB-page storage experiment. Small values retain the +/* Selected Linux storage experiment with 16 KiB logical pages. Small values retain the * existing PUREB001 inline file. Large roots name an append-only page * generation. Both forms expose one immutable, contiguous mapped read. */ enum { PAGE = 16384, INLINE_BYTES = 24, ROOT_BYTES = 48, @@ -167,7 +167,11 @@ static PureResult open_locked(const char *path, bool writer, int *directory, int } PureResult pure_store_init(const char *path) { - if (!path || !*path || sysconf(_SC_PAGESIZE) != PAGE) return PURE_STORE_ERROR; + long host_page = sysconf(_SC_PAGESIZE); + /* Every file offset and MAP_FIXED address uses a PAGE-sized step, so a + * smaller OS page works when its size divides the logical page. */ + if (!path || !*path || host_page <= 0 || PAGE % host_page) + return PURE_STORE_ERROR; bool created = mkdir(path, 0700) == 0; if (!created && errno != EEXIST) return PURE_STORE_ERROR; int directory = open(path, O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); |
