Skip to content

FS index#208

Draft
LilithSilver wants to merge 31 commits into
mainfrom
fs-cache
Draft

FS index#208
LilithSilver wants to merge 31 commits into
mainfrom
fs-cache

Conversation

@LilithSilver

@LilithSilver LilithSilver commented Apr 18, 2026

Copy link
Copy Markdown
Collaborator

This PR implements a full file index using blake3 hashing.

Experimentally, this PR uses that file index for local change check-in. If this is performant and OK, we can switch to it. Otherwise, we should go back to only checking-in the watched paths.

Once this PR is complete, then we have the functionality to scan the local filesystem for changes and compare it to Automerge. Only then are we able to properly implement #63.

TODO:

  • Fix text files being read as changed when they aren't
    • This could be due to hashing methodology, or due to file differences (line endings much?)
  • Fix hidden files (prefixed with .) behaving weird and thinking they're getting created during diffs
  • Fix scene parsing issues
    • Corrections are not applied back to the FS on commit (only UUIDs are correct)
    • Thrashing related to signals: signals have a bind array property that, for some reason, Godot wants a space after the = before the array.
    • Outro.tscn hashes wrong(?)
    • Won't fix: Signal connection order is opinionated differently between Godot and GodotScene
  • Performance check: Threadbare seems slow to commit. Figure out where it's coming from. Potential optimizations include:
    • Cache directories; don't crawl unless necessary (if FS crawl is the slow part)
    • Check to make sure fast hashing is actually being done
    • Go back to the old watched-paths-only method (if FS crawl is the slow part)
    • My instinct is that the crawl isn't the hard part... what's taking so long?
  • Perf check round 2: Fix the bad interim solution of "just don't update the heads on commit dummy"
    • Option 1: Only update the heads on commit if we're sure the hashes match
    • Option 2: Refactor sync_automerge_to_fs to not block when collecting changes that must sync
  • Bug check: Give it a solid runthrough with multiple clients
    • While another client has a scene with unsaved changes, their diff won't respect changed files edited by another user
    • Binary files, similar issue -- but they never sync, with "could not get linked file"
  • Ensure we don't break older clients
  • Scan filesystem changes at startup and check them in
  • Remove extra tracing instruments
  • Remove FileContent::Deleted?

@LilithSilver LilithSilver changed the base branch from fs-fixes to main May 19, 2026 10:54
@LilithSilver LilithSilver marked this pull request as draft May 20, 2026 09:12
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