You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[DRAFT RDTE] Fence layered state-init against an active WineBot writer - #201
Source: immutable parent #184b76846de498f28f3a26ef4bfcf23d7fef3078746. This draft adds a fail-closed nonblocking kernel flock in the app-bundle's one-shot state initializer on the same externally mounted /state/artifacts/sessions/.winebot-active-writer.lock inode that WineBot's runtime Python writer-admission uses as /artifacts/sessions/.winebot-active-writer.lock. It verifies direct non-symlink lock ancestry, single link, FD/dev/inode identity, exact root/uid1000 0600 lock schema and requires exclusive admission before any ownership changes to persistent user volumes. It never deletes user state. State-init exits with a fixed diagnostic when runtime is already writing.
The isolated state-init only gains CHOWN+DAC_OVERRIDE to reopen the uid1000-owned 0600 lock after the first boot; no network, other capabilities, third-party install, rootfile write, service token, production host or image publication. App-bundle build requires flock present, otherwise fails closed (do not auto-install dependencies). Added offline independent-open-file-description contender test and source/ordering controls, plus an actual second one-shot state-init in the already-existing public Wine11 layered composite HIL while its first runtime is healthy. Any success by the second initializer fails HIL. No private GHA minutes; exact-head current CI must be read before acceptance.
Critical limits: A short-lived state-init relinquishes its OFD on exit and runtime subsequently acquires the same lock. Thus simultaneous cooperative mutation is prevented once the lock is proven, but there remains a non-atomic deployment ownership/handoff interval: competing Compose projects can win the lock after one state-init completes and before its runtime starts. No generation/lease attestation, unrelated hostile same-UID containment, cross-host/NFS consensus or end-to-end deployment admission is claimed. An external controller-held lease or complete post-admission in-process state initialization must close the handoff gap before release. The unrelated pre-runtime app-seed is separate and versioned. Added CAP_DAC_OVERRIDE is an explicit privilege tradeoff requiring security review.
Draft only / do not merge / not ready for hardware. Requires exact-head public synthetic tests, long Wine11 composite HIL and adversarial competing-deployment review. Main and owners #184/#187/#200 unchanged; DLE remains the authority.
R040 first-red / corrective head / precise nonclaims — 2026-11-23
Current draft rdte/layered-state-init-writer-fence-r1-20261123@2159807b731ba757e2104be8cf1308665d3d426c. First new disposable layer run #45171637561 terminal FAIL at LAYER_RDTE stage=state_preparation_idempotency, not at first initialization: the independent disposable harness (scripts/ci/qualify-disposable-layers.sh) still launched root with legacy CAP_CHOWN-only, unlike candidate Compose's CHOWN+DAC_OVERRIDE requirement for reopening an existing UID1000-owned mode-0600 lock. Changed only that harness to match both first/second state-init invocations and documented privilege need in commit 2159807, preserving fail-closed lock and all replay expectations. New exact-head disposable run #45171800157, CI #45171800284 and live Wine11 HIL #45171800176 PENDING/IN PROGRESS at readback. No green assumed. Security gate: CAP_DAC_OVERRIDE raises privilege within the isolated root initializer, requires independent threat review. POSIX flock prevents overlapping cooperative mutations after admission but does not atomically transfer deployment ownership or protect across hosts / hostile same-UID aliases. Keep DRAFT / BLOCKED for release.
At exact 2159807b731ba757e2104be8cf1308665d3d426c, public disposable layer contract/replay run #45171800157 is now terminal SUCCESS. The first red stage state_preparation_idempotency on older source required matching the already-approved isolated state-init container DAC_OVERRIDE capability in the independent disposable test harness; no lock bypass or state validation waiver. Formal and provenance checks have separate green receipts. Source exact Wine11 HIL #45171800176 and broad CI #45171800284 still running at latest read. Draft remains release-blocked by non-atomic state-init→runtime OFD transfer and privilege review. No new code changes to this head after qualification.
R040 housekeeping — exact-source superseded, not released
This independent source draft is wholly carried forward by integration PR #205, exact b520f5c419d1199ff536d5c6f8260dcadd2bc5ed. The exact source is the second parent of #205; full CI and source-built Wine11 composite HIL passed. The guest-writable runtime writer lock security STOP remains.
Decision: close this redundant review surface as superseded without merge. No code from this PR is thereby accepted on protected main; all relevant release/security/provenance gates remain. Do not delete this source branch: a local-worktree census is still unavailable, and the immutable commit is referenced by the integration ancestry. Follow #205 and the authoritative winebot-research DLE #3 for new work. A hidden independent requirement can justify reopening with source evidence.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
R040 independent state-init writer-fence qualification (single-host/cooperative only)
Source: immutable parent #184
b76846de498f28f3a26ef4bfcf23d7fef3078746. This draft adds a fail-closed nonblocking kernelflockin the app-bundle's one-shot state initializer on the same externally mounted/state/artifacts/sessions/.winebot-active-writer.lockinode that WineBot's runtime Python writer-admission uses as/artifacts/sessions/.winebot-active-writer.lock. It verifies direct non-symlink lock ancestry, single link, FD/dev/inode identity, exact root/uid1000 0600 lock schema and requires exclusive admission before any ownership changes to persistent user volumes. It never deletes user state. State-init exits with a fixed diagnostic when runtime is already writing.The isolated state-init only gains CHOWN+DAC_OVERRIDE to reopen the uid1000-owned 0600 lock after the first boot; no network, other capabilities, third-party install, rootfile write, service token, production host or image publication. App-bundle build requires
flockpresent, otherwise fails closed (do not auto-install dependencies). Added offline independent-open-file-description contender test and source/ordering controls, plus an actual second one-shot state-init in the already-existing public Wine11 layered composite HIL while its first runtime is healthy. Any success by the second initializer fails HIL. No private GHA minutes; exact-head current CI must be read before acceptance.Critical limits: A short-lived state-init relinquishes its OFD on exit and runtime subsequently acquires the same lock. Thus simultaneous cooperative mutation is prevented once the lock is proven, but there remains a non-atomic deployment ownership/handoff interval: competing Compose projects can win the lock after one state-init completes and before its runtime starts. No generation/lease attestation, unrelated hostile same-UID containment, cross-host/NFS consensus or end-to-end deployment admission is claimed. An external controller-held lease or complete post-admission in-process state initialization must close the handoff gap before release. The unrelated pre-runtime app-seed is separate and versioned. Added CAP_DAC_OVERRIDE is an explicit privilege tradeoff requiring security review.
Draft only / do not merge / not ready for hardware. Requires exact-head public synthetic tests, long Wine11 composite HIL and adversarial competing-deployment review. Main and owners #184/#187/#200 unchanged; DLE remains the authority.