Skip to content

lab(drf-w1): staged writeback coalesced per canonical row (W1–W3) - #1765

Merged
AdaWorldAPI merged 5 commits into
mainfrom
lab/drf-w1-writeback-20261025
Oct 24, 2026
Merged

AdaWorldAPI merged 5 commits into
mainfrom
lab/drf-w1-writeback-20261025

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

This is the next falsifier block after #1762–#1764, in the same lab crate.

Focus::writeback() returns a Writeback that stages facet writes addressed by focus slot. flush(&soa) then:

  • re-checks the seal and the source, and refuses if either moved;
  • emits one RowImage per distinct dirty canonical row, in ordinal order. Each image is the sealed source row with every staged facet applied;
  • keeps writes to different facets of the same row (W2);
  • refuses two different values for the same facet of the same row with Refusal::Conflict (W3); equal values coalesce.

The focus itself is never mutated.

Falsifiers

ID Setup Result
W1 4096 slots over 37 distinct rows, 64 thoughts 37 images, 18 944 B, in ordinal order; bytes outside the written facet equal to the source
W2 two slots alias one row, writing different facets, both staging orders one image keeps both writes, identical for either order
W3 same facet of one row, different values Conflict; equal values coalesce; a stale source at flush gives StaleMap

The dirty fraction (A1) for the W1 workload is 37 / 4096 = 0.009.

Disable runs, each red:

  • one image per patch fails W1, W2 and W3;
  • last-payload-wins row replacement fails W2;
  • removing the conflict check fails W3.

Gates: 14/14 tests pass on native AVX-512 and on x86-64-v3; clippy --all-targets -D warnings is clean.

Open

  • W3's deterministic ordered apply (by declared stream position) is not built; this probe only refuses conflicting writes.
  • W4–W8 (owned handoff to a CycleWriter, WAL, durability, eviction under pressure) are not run.

The images are owned copies by design: they are the frozen batch a writer takes ownership of (W4), not a read path.

Board entry: .claude/board/entries/2026-10-25-drf-w1-writeback.md.


Generated by Claude Code

Focus::writeback() returns a Writeback that stages facet writes by focus
slot. flush(&soa) re-checks the seal and source, then emits one RowImage
per distinct dirty canonical row, in ordinal order: the sealed source row
with every staged facet applied. Different facets of one row all survive
(W2); two different values for the same facet of one row refuse with
Refusal::Conflict (W3); equal values coalesce. The focus is never mutated.

W1: 4096 slots over 37 distinct rows, 64 thoughts -> 37 images, 18 944 B,
bytes outside the written facet equal to the source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d87d172f-8c88-4671-bc85-e38cd5ec5e97
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review October 24, 2026 23:43
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T23:44:05.341212Z 8c51d01 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8c51d019d1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/drf-focus-probe/src/lib.rs Outdated
Codex P2 on #1765: offsets 16 and 17 overlap in bytes 17..20, and flush
let the second write silently corrupt the first. Neighbour check after
the (ord, offset) sort now refuses any overlap; touching facets survive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
@AdaWorldAPI
AdaWorldAPI merged commit 22bac9d into main Oct 24, 2026
11 checks passed
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.

2 participants