Skip to content

[SUPERSEDED / UNMERGED] Persistent-owner CAS source integrated into qualified-base #187 - #186

Closed
mark-e-deyoung wants to merge 3 commits into
rdte/mvp-persistent-owner-pointer-model-20261122from
rdte/mvp-persistent-owner-cas-storage-20261122
Closed

mark-e-deyoung wants to merge 3 commits into
rdte/mvp-persistent-owner-pointer-model-20261122from
rdte/mvp-persistent-owner-cas-storage-20261122

Conversation

@mark-e-deyoung

Copy link
Copy Markdown
Collaborator

Purpose

Execute a source-safe, independent partial correction for the active-session pointer persistence gap captured in #185. This PR implements the small durable storage primitive and tests it separately. No live entrypoint/API/lifecycle path is wired to the new record, and it is NOT equivalent to a session-handover crash-recovery implementation.

Exact source / DLE

Based on #185 56d06dcbd1055fd0fe8c18abe6a85d722cb8aeb3, current head 505a4b8dea440dc0a09825f1cbd461a40308a20f, two source commits / five intentional paths. One new api/core/persistent_owner.py defines a strict version-1 root-local .winebot-committed-owner.json record with bounded size, exact schema, positive monotonic generation, operation identity, a real root-local session directory, and symlink rejection. commit_persistent_owner(root, session_dir, expected_generation, operation_id) obtains the same session-root writer admission as #183/#184 (or fails on contention), compares exact generation and increments on successful commit; exact operation/generation replay is idempotent. Strict source identity and corrupt/newer record errors are not treated as missing data.

Writes reuse the existing api.utils.files._atomic_write_text file fsync, replace, and parent-directory fsync. Crucial corrective second commit 505a4b8dea440dc0a09825f1cbd461a40308a20f: an idempotent retry after a prior rename/parent fsync failure must issue a new successful parent-directory fsync before acknowledging the previous record. No fabricated rollback or weak ACK. Independent synthetic tests exercise initial/replayed owner, stale epoch and reused op negative cases, out-of-root and symlink rejection, corruption and directory fsync error/replay, and two genuine competing disposable Python processes (exactly one permitted generation-0 CAS). Tests enrolled in executable mandatory scripts/ci/test.sh; source workflow TLC path triggers extended; design DLE docs updated.

Qualification and nonclaims

Require exact-head public $0 GitHub Actions full CI (lint/unit, frozen external conformance and smoke), focused formal TLC red/blue, source safety guards. Real Wine11 owner-recovery HIL and two complete entrypoints remain future sequential integration after early FD lock #184 terminal accept and actual shared-root/mount qualification. Standalone CAS only linearizes cooperative same-root local writers; it does not provide a distributed consensus service, replay/rollback of paired handover markers, native guest effects, automation recording finalization or WinInspect v0.5 native HWND. Preserve DRAFT and NOT_READY_FOR_HARDWARE_TEST; no main merge, private actions minutes, paid cloud, local sovereign hardware or private source projection.

Add strict root-local v1 pointer schema, explicit operation replay,
existing atomic fsync/replace/parent sync, and exclusive same-root CAS.
Enroll two-process contention and corrupted/symlink/fsync failure tests.
Do not switch live /tmp or claim end-to-end runtime recovery.
If previous atomic rename completed but the parent fsync failed, the
owner record may be visible without durable acknowledgement. A retry
must explicitly sync that directory before returning the same op ID.
Retain generation CAS and fail-closed error propagation.

Copy link
Copy Markdown
Collaborator Author

2026-11-22 R036 — isolated storage workcell, exact source custody and merge boundaries

Committed source: owner-model parent #185 56d06dcbd1055fd0fe8c18abe6a85d722cb8aeb3; current storage #186 exact 505a4b8dea440dc0a09825f1cbd461a40308a20f, 2 commits ahead/0 behind, five scoped changed paths. Source blobs api/core/persistent_owner.py@ac148c10e48d80acc349f656af5b49cc8aac0a0c and tests/test_persistent_owner.py@aa2bf630ffe25dd1087cc6abaabdbc1b10e45a68. Mandatory scripts/ci/test.sh is mode 100755; all runtime changes confined to a NEW uncalled persistent-owner module, with the production write_session_dir, read_session_dir, shell entrypoint and lifecycle unchanged.

Durability first-failure caught in source review, corrected before review: The first draft replay fast path could ACK the same operation after prior directory fsync failed: a rename could be visible but not durable. New head forces fresh parent-dir fsync before idempotent return; synthetic test asserts the barrier. Owner-pointer schema and old pointer coexist only as unintegrated design; no real startup recovery or generation CAS deployed.

Qualification: exact-head free public TLC #44982593645, BuildKit #44982593576, RPC redaction, evidence/provenance and disposable contracts were SUCCESS at checkpoint; full CI #44982593553 and unit isolation #44982593587 IN_PROGRESS, not PASS. No private minutes or paid cloud.

Required merge reconciliation: #184 and this #186 are INDEPENDENT branches. Both change .github/workflows/formal-cross-layer-tlc.yml; #184 extends tests for entrypoint and lock, #186 extends persistent-owner source triggers. Both touch scripts/ci/test.sh: do NOT take one full blob wholesale and lose the other's tests. Build a new one-tree integration with UNION of all correct triggers and tests, preserve all other exact source blobs, then run full exact-union CI/HIL before retiring any lineage PR. Production routing of durable pointer follows #184 full entrypoint qualification, and must include restart orphan marker discovery, generation CAS and real Wine11 crash replay. This draft is NOT release/hardware-ready.

Exact source CI #44982593553 first failed only at I001 requiring one
blank line before api.utils.files import. No source storage semantics,
CAS policy, durability or tests waived; trigger fresh exact-head CI.

Copy link
Copy Markdown
Collaborator Author

2026-11-22 — first exact-head broad CI failure isolated and corrected

Storage prototype #186 exact 505a4b8dea440dc0a09825f1cbd461a40308a20f passed TLC #44982593645 and all focused publication/provenance/redaction/disposable/evidence checks, but public CI #44982593553 FAILED at the initial lint step, Ruff I001 requested a blank import-group separator between api.core.writer_admission and api.utils.files in new api/core/persistent_owner.py:7 (job 137086134963). Unit, contracts and smoke were not executed under that failed head; no PASS claim.

Corrected exact source: commit 017dcbd25fb24e21958cd83a1dcc5bc3823d1bc9 adds only the Ruff-required blank line, preserving strict schema/CAS, idempotent retry directory-fsync, test manifests and all safety invariants. Fresh exact-head full public CI and tests must terminate before source acceptance; no waivers or release promotion. This remains an uncalled storage module, separate from #184 early entrypoint and #185 formal owner-pointer model.

Copy link
Copy Markdown
Collaborator Author

2026-11-22 — exact dependency-based failure and corrected combined survivor

Storage-only draft exact 017dcbd25fb24e21958cd83a1dcc5bc3823d1bc9 is stacked on the independent pointer-model #185, which was based on #181 and intentionally did not contain api/core/writer_admission.py. Consequently public full CI #44982722644 got past corrected lint but FAILED during unit collection: ModuleNotFoundError: No module named 'api.core.writer_admission' in new api/core/persistent_owner.py. This is a branch admission dependency, not grounds to create a duplicate lock or skip the tests. Its previous static TLC, provenance and public guards passed but do not qualify import or production CAS.

Safe corrective action: created draft combined PR #187 directly atop actual #184 early writer source edfffa4d4990fab0356b9e6a46bbd3801c46da6c, commit 590d1096f0427252808413224c93bc66ac200fc4. It carries the corrected exact api/core/persistent_owner.py and model/doc blobs from #185/#186, with all writer source dependencies actually present; combines the mandatory test manifest and BOTH full TLC model/negative-control families, rather than blindly replacing one. The synthetic loser process accepts only stale-generation or lock-contention denial; still exactly one committed owner. Fresh #187 TLC #44983034135 and focused publication/provenance guards terminal SUCCESS; full CI #44983034181 in progress at checkpoint.

This PR remains open for immutable source lineage until #187 terminal acceptance and then should close SUPERSEDED/UNMERGED. Do NOT merge #186 source blindly on main or #181 or assume two green ancestors prove union. Keep code unwired to live /tmp pointer, and native HIL #184 remains failed/pending correction.

mark-e-deyoung added a commit that referenced this pull request Nov 22, 2026
On combined source #187, Ruff recognizes the actual api.core.writer_admission
module as first-party and expects no blank separator before api.utils.files.
Standalone #186 had opposite detection because that module was absent.
Fix only import grouping; all CAS, barriers, models and tests unchanged.

Copy link
Copy Markdown
Collaborator Author

2026-11-22 — close unusable incomplete-base workcell UNMERGED, source custody retained

Exact original draft #186 017dcbd25fb24e21958cd83a1dcc5bc3823d1bc9 is unqualifiable as a standalone PR against #185: mandatory full CI #44982722644 fails during unit collection with missing actual dependency api.core.writer_admission. No production/source gate may ignore that failure or substitute a duplicate lock. This has been resolved structurally in combined #187 current source 71412921868f1f52cdf459c33ead40ca23d3e47b, which is based on actual early-admission #184, brings the exact strict storage semantics and model blobs, preserves both TLC and test manifest unions, and corrects Ruff based on the real dependency graph. #187 formal TLC #44983177712 and all focused source guards terminal SUCCESS; full CI still running, not yet accepted. Close this SUPERSEDED / UNMERGED now to prevent accidental invalid-base merge. Do not delete the original branch, source commits or receipts; #187 remains DRAFT/NOT_READY_FOR_HARDWARE_TEST, no live /tmp owner pointer integration, no release/main mutation.

@mark-e-deyoung mark-e-deyoung changed the title [DRAFT RDTE] Strict durable owner generation-CAS storage, isolated from live runtime [SUPERSEDED / UNMERGED] Persistent-owner CAS source integrated into qualified-base #187 Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant