Skip to content

Eagerly hydrate Slack content in the background - #237

Merged
aseembits93 merged 8 commits into
mainfrom
codex/slack-eager-background-hydration
Aug 27, 2026
Merged

Eagerly hydrate Slack content in the background#237
aseembits93 merged 8 commits into
mainfrom
codex/slack-eager-background-hydration

Conversation

@aseembits93

Copy link
Copy Markdown
Collaborator

Summary

  • add a connector-level background hydration policy and opt Slack into eager hydration
  • enqueue discovered Slack users and recent-message pages as durable, low-priority prefetch work for virtual and plain-file mounts
  • defer background provider calls during Slack cooldowns while preserving foreground hydration priority
  • document the policy and cover virtual discovery, scheduled reconciliation, persistence, and deduplication

Validation

  • cargo check -p localityd
  • cargo test -p localityd
  • cargo test --workspace
  • git diff --check

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
locality Ready Ready Preview Aug 27, 2026 9:33pm

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codex review

Finding: major
crates/localityd/src/reconcile.rs:106

The new eager Slack path can enqueue Prefetch for a target that already has a higher-priority hydration job, but persistence is keyed only by (mount_id, remote_id). queue_hydration merges priority correctly in memory, then still upserts the incoming lower-priority request to SQLite, overwriting the persisted reason. If the daemon restarts before the in-memory queue drains, an interactive FileOpen/explicit pull can come back as low-priority Prefetch, delaying foreground hydration behind Slack backlog.

Minimal fix: when enqueueing a duplicate target, persist the effective merged request instead of the incoming request, or skip the SQLite upsert when the incoming request loses to an existing higher-priority job. Add a regression test that queues a foreground hydration, then a Slack eager Prefetch for the same target, reloads persisted hydration jobs, and verifies the foreground reason is preserved.

@aseembits93
aseembits93 merged commit 65371c0 into main Aug 27, 2026
9 of 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.

1 participant