Repository navigation
A computer that only opened codeaf can pair, and the local relay stops rebuilding in a loop - #2540
Merged
Merged
Conversation
Opening codeaf once and quitting writes an empty conversation: its environment inventory, an empty owned working folder with its own Git repository, a capture policy, empty memories and session files, and a transcript with no turns. Pairing counted those as local work and refused with 'this computer has local work', although the computer had no chats and the code meant to let a started-only computer join. They now count as starting, so code pairing and link pairing both go through. One sent turn, saved memories and real settings still refuse, and the refusal names the chat count. Fixes #2538 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Asked from inside a directory that the enclosing repository ignores, git ls-files --ignored --directory fails with an internal error, so codeaf could not read Git's ignore answer and refused to seal the chat at all; when the whole project was ignored the engine also dropped the chat's own state. codeaf now asks Git about the project folder itself before listing, and keeps an ignored project's files out while the chat's own words still save and move. Nested repositories and discovery ceilings keep Git's meaning, and a genuine Git failure still stops saving rather than admitting ignored private files. Fixes #2539 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review found that saving a chat whose project folder Git ignores cannot be fixed safely in codeaf alone. The workaround let an ignored project's own .furrowpolicy into saved history unscreened, still lost the chat when that policy turned on gitignore, failed past the engine's 1,024-rule limit and on non-English Git, and added several Git processes to every save. The engine has to keep the chat's own state when Git ignores the whole folder. #2539 stays open with these findings. This reverts commit e7e3e9c. Refs #2539 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deciding whether an opened chat's own repository is untouched read Git's file names newline-terminated and trimmed them, so a file named only with spaces, staged or committed and then deleted, printed a blank line that trimming discarded. The repository then passed as the empty one made at first open, and joining could replace that work. The names are now read NUL-terminated and any output counts as work; the startup repository prints nothing at all. Refs #2538 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hosted relay's build hook wrote src/raft/core.wasm inside the folder wrangler watches, so rewriting it, even with the same bytes, could run the hook again; under disk load npm run dev rebuilt and reloaded in a loop, every reload of the eleven-megabyte module grew the Node process, and it aborted at about nine gigabytes, which on WSL also wrote a crash dump of that size. The Go build is reproducible, so the hook now builds beside the tree and moves the module into place only when its bytes differ; two runs in a row leave core.wasm untouched. The local wrapper also bounds Node's heap at 2 GB unless the caller sets its own limit. Fixes #2541 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Two bugs found while testing #2536 and the hosted relay locally. Each has its own issue with a replication anyone can run.
What changes
codeaf pairthen refused with "this computer has local work", although there were no chats. The code meant to let a computer that has only been started join.--replace.scripts/raft-hosted-build.shwrote the 11 MBsrc/raft/core.wasminside the folderwrangler devwatches, so rewriting it, even with identical bytes, could run the hook again. Under disk load,npm run devrebuilt and reloaded in a loop. Every reload grew the Node process until it aborted at about 9 GB, and on WSL each abort wrote a crash dump of that size.relay/hosted/test/local.shcaps Node's heap at 2 GB unless the caller sets its own limit.Taken back out: #2539, a chat whose project folder Git ignores cannot be saved. A review showed the codeaf-only workaround had three problems:
.furrowpolicyinto saved history unscreened;gitignore;The engine has to keep the chat's own state when Git ignores the whole folder. #2539 stays open with those findings.
Validation
core.wasm's modification time, inode and size unchanged, and left no temporary file.make test-lawspass. The touched package suites run on CI. Locally they could only hit deadlines while other sessions held the laptop's disk at 60 to 90 % pressure.🤖 Generated with Claude Code