Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix: fix-check wording follow-ups
garrytan73a6c986ef29
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex aa7dc3ecf4..2bce84cba6 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -12,7 +12,7 @@ identifiers and attribution are available in the pre-removal Git revision## [Unreleased]-**On a managed brain, `gbrain sources record-origin --remote` can no longer report success while a reclone still clones with git-lfs on, and it locks down the existing checkout too.** On a managed brain the record took only the source row lock, so a reclone that had already read the source, or held its worktree locks, could clone with git-lfs downloads and hooks on after the command said the source was recorded. The record now takes the worktree locks and rows a reclone takes (refusing the id `source_busy` while one runs), and the reclone reads the record under its own locks. `--remote --apply` now also turns git-lfs downloads and hooks off in the existing checkout's `.git/config`, because a reclone only happens when a checkout is lost or replaced, and until then doctor read green while the checkout still fetched git-lfs objects and ran hooks. The git-lfs check now reads a committed `.gitattributes` under a directory whose name holds a tab (it was cut at the tab and skipped), ignores commented-out `filter=lfs` lines, says "declares a git-lfs filter" when a rule only declares one, and records a clone of an empty repository instead of telling the operator to restore an intact checkout. A failed write is reported for its own id instead of ending the run without saying which ids were recorded.+**`gbrain sources record-origin --remote` now locks down the existing checkout too, and on a managed brain it can no longer report success while a reclone still clones with git-lfs on.** On a managed brain the record took only the source row lock, so a reclone that had already read the source, or held its worktree locks, could clone with git-lfs downloads and hooks on after the command said the source was recorded. The record now takes the worktree locks and rows a reclone takes (refusing the id `source_busy` while one runs), and the reclone reads the record under its own locks. `--remote --apply` now also turns git-lfs downloads and hooks off in the existing checkout's `.git/config`, because a reclone only happens when a checkout is lost or replaced, and until then doctor read green while the checkout still fetched git-lfs objects and ran hooks. The git-lfs check now reads a committed `.gitattributes` under a directory whose name holds a tab (it was cut at the tab and skipped), ignores commented-out `filter=lfs` lines, says "declares a git-lfs filter" when a rule only declares one, and records a clone of an empty repository instead of telling the operator to restore an intact checkout. A failed write is reported for its own id instead of ending the run without saying which ids were recorded.### Itemized changesdiff --git a/docs/guides/repair.md b/docs/guides/repair.mdindex 90f8f6a084..d87ecf12e2 100644--- a/docs/guides/repair.md+++ b/docs/guides/repair.md@@ -2849,9 +2849,9 @@ doctor stops listing either. Each apply re-reads the source inside onetransaction and refuses `source_changed` if it moved since the check. On amanaged brain it first takes the worktree locks and rows a reclone takes, sono reclone runs between the record and the clone; while a reclone, refresh or-write holds them the id is refused `source_busy` (nothing changed; run it-again once that finishes, and finish a refresh with `gbrain sources refresh-<id> --resume`). A write that fails is reported for its own id as+write holds them the id is refused `source_busy` (nothing changed, unless+the reason says the checkout already got the lock-down; run it again once+that process or refresh has finished). A write that fails is reported for its own id as`write_failed`, saying whether the checkout already got all or part of thelock-down, and the other ids keep their results. Without git-lfs files aclone with these settings holds the same tracked bytes, so the stored writerdiff --git a/src/core/url-source-origin.ts b/src/core/url-source-origin.tsindex ace670a183..c3b227b3b1 100644--- a/src/core/url-source-origin.ts+++ b/src/core/url-source-origin.ts@@ -208,7 +208,7 @@ export async function recordSourceOrigin(engine: BrainEngine, ids: string[], optresults.push(code === 'write_pending'? refusal(id, 'source_busy', `Another gbrain process (a reclone, refresh or write) holds source ${id}'s worktree locks, so its origin was not recorded; ${unchanged} Run this again once that process finishes.`): code === 'refresh_in_progress'- ? refusal(id, 'source_busy', `A refresh of the worktree holding source ${id} is still running, so its origin was not recorded; ${unchanged} Finish it (gbrain sources refresh ${id} --resume), then run this again.`)+ ? refusal(id, 'source_busy', `${message} So source ${id}'s origin was not recorded; ${unchanged} Run this again once that refresh has finished or been recovered.`): refusal(id, 'write_failed', `Recording source ${id}'s origin failed: ${message} The record was not written.${lockdown} The other ids in this run keep their own results; run this again for ${id}.`));}}