Skip to content

fix(sql): read historical empty file content - #1675

Merged
samuelstroschein merged 1 commit into
mainfrom
fix/historical-empty-file-state-at
Sep 1, 2026
Merged

fix(sql): read historical empty file content#1675
samuelstroschein merged 1 commit into
mainfrom
fix/historical-empty-file-state-at

Conversation

@samuelstroschein

Copy link
Copy Markdown
Member

Summary

  • distinguish actual historical plugin ownership from ordinary blobless files
  • load the durable plugin-owner row alongside historical file content state
  • keep rejecting genuinely plugin-owned files whose durable materialization is missing
  • add regressions for raw empty, owned blobless, and materialized plugin files

Why

An empty tracked file has a descriptor but intentionally no blob reference. Point-in-time file reads treated every such descriptor as potentially plugin-owned and returned historical plugin-owned file is missing its durable materialization. This broke LixRay review-mode previews for empty files such as a newly created CSV.

Complexity

This changes only cold lix_state_at('lix_file', ...) reads that project content. They perform one additional indexed owner-row scan. Full historical reads remain linear in retained file/blob/directory/owner rows; exact-ID reads remain point-scoped. Live/HOT reads add no I/O or plugin execution.

Public surface

No Rust, JS, or SQL API/surface changes.

Local verification

  • cargo nextest run -p lix --features all-simulations — 3,451 passed
  • cargo test -p lix --doc — 10 passed
  • two independent agent reviews — approved, no findings

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 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-09-01T06:09:39.368665Z d4376b3 PR opened
ℹ️ 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.

@samuelstroschein
samuelstroschein merged commit 42221bd into main Sep 1, 2026
12 checks passed
@samuelstroschein
samuelstroschein deleted the fix/historical-empty-file-state-at branch September 1, 2026 06:14
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