You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
core: git packing preflight measures only the objects filesystem and mis-resolves untrimmed paths #4412
agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: corepackages/core: the brain CLI, indexer, hybrid search, config, taxonomy, skills.priority: p3Someday. Needs a driving use case before it starts.type: fixSomething is broken and must behave the way it is documented.
Part of #4278. Deferred from the tenth review of PR #4323 (#4287).
Context
gitPackingHeadroom (packages/core/src/lib/git-storage.ts:165-191) calls statfsSync only on the --git-path objects result (:187).
packRepository also runs --task=pack-refs (:145), which writes packed-refs in the Git common directory. With objects on a separate mount and a full common-directory filesystem, the preflight admits the run and Git fails after object packing has started.
The git() helper trims stdout (:42), and that string is used as a pathname at :126-128 and :166. An objects path ending in whitespace therefore resolves to a different path. Capacity is unknown, and packing is skipped on every run, although Git itself can pack.
The pack-directory listing at :128-139 has the same fault.
Scope
Measure every filesystem the maintenance tasks write to, and take paths from Git without altering them. Out of scope: the headroom rule itself, and where packing runs (#4288).
Acceptance criteria
With the objects directory on one filesystem and zero available bytes injected for the common directory, the git step reports the named packing_headroom skip and Git is not started.
A repository whose objects path ends in a space gets a measured availableBytes and packs when headroom allows.
The pack-directory listing used for leftover cleanup resolves the same untrimmed path.
brain storage pack --json keeps its shape, or changes additively in a CONTRACT: commit.
agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: corepackages/core: the brain CLI, indexer, hybrid search, config, taxonomy, skills.priority: p3Someday. Needs a driving use case before it starts.type: fixSomething is broken and must behave the way it is documented.
Activity