Skip to content

core: the git maintenance step fails on a brain with no pack yet (incremental-repack refuses) #3375

Closed

Description

@schlessera

Problem

Found while working #3357 (PR #3373). With git 2.43, git maintenance run --task=incremental-repack refuses to run on a repository that has no pack file yet. Because of that, brain maintain's git step (and brain storage pack) report the step as failed on a brain whose objects are all still loose, for example a freshly cloned or newly created brain. The next run succeeds, because by then some other operation has created a pack, so the failure is self-healing but shows up as a spurious failed step.

Acceptance criteria

  • With a repository that has no pack yet, the git maintenance step either first creates an initial pack (for example with the loose-objects task or a one-off pack) or reports the case as a no-op success with its reason, rather than a failure.
  • A keyless test reproduces the refusal on a pack-less fixture repository and fails before the fix.
  • Repositories that already have packs behave exactly as before.

Refs #3357.

Activity

  1. added this to the 0.45.0 milestone on Nov 2, 2026
  2. added
    type: fixSomething is broken and must behave the way it is documented.
    area: corepackages/core: the brain CLI, indexer, hybrid search, config, taxonomy, skills.
    priority: p3Someday. Needs a driving use case before it starts.
    agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.
    on Nov 2, 2026
  3. self-assigned this
    on Nov 2, 2026
  4. schlessera commented on Nov 2, 2026

    @schlessera
    OwnerAuthor

    Claiming this issue (claim token claim-3375-662866). Branch: fix/3375-maintain-pack-less-repack, based on main after #3373. Collision check: closure-only overlaps with open PRs, no path collisions on maintain.ts/git-storage.ts/storage.ts.

  5. schlessera commented on Nov 3, 2026

    @schlessera
    OwnerAuthor

    Implementation is in draft PR #3399 (head 40cde29bd, milestone 0.45.0). On a repository with no pack, the git step leaves incremental-repack out. The same run's loose-objects task writes the first pack, and an object-less repository is a no-op success. Repositories that already have packs run the same tasks as before. Failing-first and mutation receipts on git 2.53.0 (host) and 2.43.0 (offline container) are in the PR. Local preflight passed. It is waiting for the integration lease, then bun scripts/integrate.ts confirm 3399 --issues schlessera/brain-kit#3375. I'm releasing my assignment; the PR carries the work.

  6. removed their assignment
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    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.

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions