Skip to content

Mint lance-graph-hydrate: generic SoA->S3->volume->Lance hydration pattern - #957

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/q2-osm-map-reencoding-56p5e2
Aug 17, 2026
Merged

Mint lance-graph-hydrate: generic SoA->S3->volume->Lance hydration pattern#957
AdaWorldAPI merged 1 commit into
mainfrom
claude/q2-osm-map-reencoding-56p5e2

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

Summary

  • Mints crates/lance-graph-hydrate, closing ISS-REMOTE-URI-CONSTRUCTORS-PREDATE-THE-HYDRATION-DOCTRINE (.claude/board/ISSUES.md): a hydrate_from(remote) -> local counterpart to VersionedGraph::{s3,azure,gcs} did not exist anywhere in the tree. Generalized off this repo's own .claude/knowledge/s3-hydration-lifecycle.md doctrine and crates/lance-graph/examples/hydration_probe.rs's proven byte-for-byte object copy, plus two mechanisms invented in q2's cockpit-server/src/osm_slab_hydrate.rs (the mtime+len warm-marker skip-rehash check, and posix_fadvise(DONTNEED) idle release) that predated any lance-graph doctrine covering them.
  • Minted here, not in OGAR, per operator directive: OGAR (and q2, and any future consumer) is meant to inherit this as a plug-and-play path/git dependency rather than re-implement it.
  • Modules: env::HydrationSource (shared AWS_* reading), lifecycle::LifecycleState (the doctrine's four-state machine with "flush only from Hydrated, never Dirty" as a hard transition guard), copy::hydrate_dir + file::hydrate_file (hydrate-aside/publish-by-rename, idempotency-boundary enforced), marker::WarmMarker, release::release_dir, dirty::is_dirty (the idle-flush plan's named §4 dirty-detector).
  • No new dependency versions anywhere in the workspace graph — Cargo.lock diff is a clean 15-line addition of the new crate's own node; lance/object_store stay pinned to this repo's existing upstream-authoritative versions (=9.0.0 / 0.13).
  • Board hygiene in the same PR: LATEST_STATE.md Contract Inventory entry + ISSUES.md regrade (append-only, not closed — pending CI green and the still-open VersionedGraph wiring follow-up).

Verification status (please read before merging)

This session's sandboxed container hit repeated disk exhaustion (ENOSPC) trying to build the lance/arrow/aws-lc-rs sub-tree this crate's addition activates for the first time in this workspace's build graph — a previously-dormant, unbuilt transitive edge (confirmed: zero new package versions in Cargo.lock, only the new crate node itself). I was not able to run cargo build/test locally.

What I did verify:

  • The dependency-free modules (lifecycle.rs, marker.rs's non-test code) were syntax/type-checked directly via rustc --emit=metadata — clean, no errors.
  • Every lance/object_store-touching module (copy.rs, file.rs, dirty.rs, env.rs) was written by closely mirroring already-compiling code in this same repo (dev_s3_env.rs, hydration_probe.rs) for API usage, and manually re-checked against those files' verified signatures (ObjectStore::list/get, GetResult::into_stream, Dataset::version_id, WriteMode::Append, etc.).
  • 8 modules ship TDD-first tests (lifecycle guards two-sided per state; marker identity trust/distrust; hydrate_dir against a real object_store::local::LocalFileSystem — hydrate-aside/publish-by-rename + idempotency-boundary + empty-prefix no-publish; hydrate_file checksum accept/reject; dirty-check against a real written-then-appended Dataset; release_dir file-count + missing-dir case) — none of them have run yet in this session.

I'm watching this PR's CI and will fix and re-push on any failure.

Test plan

  • CI rust-test.yml (or equivalent) actually compiles and runs the new crate's test suite — the real gate this session could not run locally
  • cargo clippy -p lance-graph-hydrate clean
  • Confirm no other workspace member's build is affected (this crate is additive-only; Cargo.lock diff shows zero version changes elsewhere)

🤖 Generated with Claude Code


Generated by Claude Code

…ttern

Closes ISS-REMOTE-URI-CONSTRUCTORS-PREDATE-THE-HYDRATION-DOCTRINE: a
hydrate_from(remote) -> local counterpart to VersionedGraph::{s3,azure,gcs}
did not exist anywhere in the tree. Generalized off this repo's own
s3-hydration-lifecycle.md doctrine and hydration_probe.rs's proven raw
byte-copy mechanism, plus two inventions from q2's repo-local
osm_slab_hydrate.rs (the mtime+len warm-marker skip-rehash trust check,
and fadvise DONTNEED idle release) that predate any lance-graph doctrine
covering them.

Minted here per operator directive rather than in OGAR: OGAR (and q2, and
any future consumer) is meant to inherit this as a plug-and-play path/git
dependency, never re-implement it locally.

New crate crates/lance-graph-hydrate:
- env::HydrationSource - shared AWS_* env reading (same names dev_s3_env.rs
  already uses)
- lifecycle::LifecycleState - Absent -> Hydrated -> {Dirty | Flushed} with
  the doctrine's hard rule (flush only from Hydrated) as a transition guard
- copy::hydrate_dir - hydrate-aside/publish-by-rename raw object copy,
  idempotency-boundary enforced (refuses to overwrite an existing dest)
- file::hydrate_file - single-artifact checksum-pinned sibling (.part +
  atomic rename)
- marker::WarmMarker - mtime+len skip-rehash trust marker
- release::release_dir - posix_fadvise(DONTNEED) idle page-cache release
- dirty::is_dirty - Dataset::version_id() compare, the plan's named §4 gate

No new dependency versions anywhere in the graph (clean 15-line Cargo.lock
diff, all deps already pinned workspace-wide).

Verification status: the dependency-free modules were syntax/type-checked
via rustc directly (clean). The lance/object_store-touching modules were
NOT locally compiled - this session's container hit repeated disk
exhaustion building the lance/arrow/aws-lc-rs sub-tree this crate's
addition activates for the first time in this workspace. Real verification
deferred to this repo's CI; the PR will be watched and any CI failure
fixed and re-pushed.

Board hygiene in the same commit: LATEST_STATE.md Contract Inventory entry
+ ISSUES.md regrade (append-only, not closed pending CI + the still-open
VersionedGraph wiring follow-up).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NMeiLmtDKhomJNSo2ecbJw
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Important

Review available on request

  • 🔍 Trigger review

Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment @coderabbitai review to review the latest changes. For a full review, comment @coderabbitai full review.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8b0d0d71-d4e3-4921-be17-3fddc2632cf3


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.

@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_d9d06a83-238e-4dd2-8864-73e45c76ac1c)

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review August 17, 2026 22:01
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@AdaWorldAPI
AdaWorldAPI merged commit fac1370 into main Aug 17, 2026
7 checks passed
AdaWorldAPI added a commit that referenced this pull request Aug 17, 2026
…ardening-council

5+3 council: harden lance-graph-hydrate (fast-follow to merged #957)
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