Skip to content

fix(server): storage cleanup reads Git 2.56's broken-gitfile message - #769

Merged
Jacksondr5 merged 1 commit into
j5/mainfrom
j5code/storage-cleanup-git-256
Oct 28, 2026
Merged

Jacksondr5 merged 1 commit into
j5/mainfrom
j5code/storage-cleanup-git-256

Conversation

@Jacksondr5

Copy link
Copy Markdown
Owner

Problem

On GitHub runners with Git 2.56, storageCleanup.test.ts fails "compares the checked-out branch without a full status". This turns Test Server 3 red on every J5 PR, #767 included. When a worktree's .git file points at a missing directory, Git 2.56 reports "gitfile does not point to a valid repository" where it used to say "not a git repository". Storage cleanup only matched the old message, so it reported that worktree as failed instead of kept, repository or branch changed. The worktree was never deleted either way. Closes #768.

What changed

The branch-changed check in apps/server/src/storageCleanup.ts now matches either message. The existing test already covers this case, so this PR adds no new test. CI on a Git 2.56 runner is the check: this machine has Git 2.43, where the test passed before and after the change (137/137).

The other "not a git repository" checks in the server (GitManager, GitVcsDriverCore) handle a cwd that isn't a repository at all. They don't hit the broken-gitfile case and nothing is failing there, so they are left as upstream wrote them.

Upstream impact

apps/server/src/storageCleanup.ts is upstream's file, and upstream main has the same check. This PR records the edit in FORK.md as a temporary in-place patch, with a file-table row; it exits when upstream matches the new message. It's a candidate to offer upstream through #276.

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior — the existing storage cleanup test is the one that failed on Git 2.56
  • UI changes — not applicable
  • Live testing — not applicable; nothing here can be exercised in the UI
  • Upstream-owned files: recorded in FORK.md (temporary patch entry and file-table row)
  • Upstream product — not applicable; this keeps upstream's behavior on newer Git
  • Surfaces: server only
  • Docs — not applicable

Prepared with Claude Opus 5.5 (Claude Code harness).

🤖 Generated with Claude Code

Closes #768.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Oct 28, 2026 5:37am UTC

Request Review

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Oct 28, 2026
@github-actions github-actions Bot added the size:S 10-29 effective changed lines (test files excluded in mixed PRs). label Oct 28, 2026
@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 855d55f and f00e158.

Files selected for processing: 2
  • FORK.md
  • apps/server/src/storageCleanup.ts

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Walkthrough

StorageCleanup.branchChanged now treats Git’s “does not point to a valid repository” error as a missing repository. FORK.md records this temporary patch and adds storageCleanup.ts to the path-to-contract ledger.

Changes: Storage cleanup Git error handling

Layer / File(s) Summary
Classify invalid repository errors
apps/server/src/storageCleanup.ts, FORK.md
branchChanged returns null when Git reports “does not point to a valid repository,” as it does for “not a git repository.” Other nonzero results retain the existing failure path. FORK.md records the temporary patch and the affected path.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Possibly related issues

  • Issue 768, “Storage cleanup test fails on Git 2.56: a broken gitfile is reported as failed, not changed”: the change recognizes the Git error message described in the issue.
  • Issue 276: FORK.md records the storage-cleanup edit as a temporary fork patch and identifies its upstream tracking context.

Possibly related PRs

  • Jacksondr5/j5code#767: This release PR was blocked by the Git 2.56 storage cleanup test failure addressed here.

Suggested labels: size:XS

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to f00e1

The change is mergeable with no identified user-facing or operational risk.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the server fix for Git 2.56's broken-gitfile message.
Description check Passed The description includes the problem, issue reference, implementation, testing context, upstream impact, checklist, and model and harness attribution. UI and live-testing sections are correctly omitte…
Linked Issues check Passed Issue #768 requires storage cleanup to classify a broken worktree gitfile as a changed repository on Git 2.56. The supplied PR evidence states that StorageCleanup.branchChanged now matches both `not…
Out of Scope Changes check Passed The changes are limited to the storage cleanup message match and its FORK.md patch record. Both changes support issue #768: the source change fixes the Git 2.56 classification, and the ledger entry …
Full details: Description check

Explanation

The description includes the problem, issue reference, implementation, testing context, upstream impact, checklist, and model and harness attribution. UI and live-testing sections are correctly omitted because they do not apply.

Full details: Linked Issues check

Explanation

Issue #768 requires storage cleanup to classify a broken worktree gitfile as a changed repository on Git 2.56. The supplied PR evidence states that StorageCleanup.branchChanged now matches both not a git repository and does not point to a valid repository, and returns the kept, repository-or-branch-changed result. The existing storageCleanup.test.ts case covers this behavior. The PR also records the upstream-owned patch in FORK.md, as required by the issue context. The PR explains why the other server checks use a different case.

Full details: Out of Scope Changes check

Explanation

The changes are limited to the storage cleanup message match and its FORK.md patch record. Both changes support issue #768: the source change fixes the Git 2.56 classification, and the ledger entry records the upstream-owned edit and its removal condition. No unrelated product, UI, or server behavior change is shown.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@Jacksondr5
Jacksondr5 merged commit ce72737 into j5/main Oct 28, 2026
38 checks passed
@Jacksondr5
Jacksondr5 deleted the j5code/storage-cleanup-git-256 branch October 28, 2026 06:04
bryantderosier added a commit that referenced this pull request Oct 29, 2026
The CI repair in this PR relaxed the invalid-gitfile assertion for a Git-version
difference. origin/j5/main now fixes the source for that (#769), so the test is
back to main's exact version and FORK.md no longer records an upstream-test edit
under case 88. `vp test run src/storageCleanup.test.ts -t "compares the
checked-out branch without a full status"` passes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Jacksondr5 added a commit that referenced this pull request Oct 30, 2026
Brings in from j5/main:
- #773 publish the Windows x64 CLI archive and installer
- #797 a Collaborator on a thread sees its preview tabs
- #662 Fleet: measured ledger and runtime facts
- #767 bump J5 Code to 0.0.51
- #769 storage cleanup reads Git 2.56's broken-gitfile message
- #765 a shared conversation's note stays off the timeline minimap
- #763 a link for one person always names who it is for
- #764 widen a person to a project or the server from their People row

Adapted to v0.1.3: the minimap's shared-note check lives in J5's
minimapMessages.ts; Fleet's keyboard test is a browser test on the
browser userEvent, so @testing-library/user-event is not added; Fleet's
monitor test follows upstream's awaited-only hold rule; the Windows
build pins Node 26.12.1; memo hooks, an em dash, a long comment and an
unbudgeted effect from main are fixed for the branch's lint rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bryantderosier added a commit that referenced this pull request Nov 3, 2026
* feat(j5): configure Crew approval in Agent Setup

* fix(j5): reconcile Agent Setup with the updated Crew proposal

* test(server): restore storageCleanup.test.ts to j5/main's version (#743)

The CI repair in this PR relaxed the invalid-gitfile assertion for a Git-version
difference. origin/j5/main now fixes the source for that (#769), so the test is
back to main's exact version and FORK.md no longer records an upstream-test edit
under case 88. `vp test run src/storageCleanup.test.ts -t "compares the
checked-out branch without a full status"` passes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs(j5): record that automatic Crew staffing can start Full-access members (#743)

A Captain's addition and an auto-approved roster launch without review, and a
custom member defaults to Full access, so a Supervised Captain can start a
Full-access member. The person accepted that; FORK.md case 24, the
j5_request_crew_member pre-approval comment and crews.md now say so. Also
rewrites the text that still described Crew additions as Inbox requests
(inbox.md, shared-conversations.md AC12, crews.md AC23) and FORK's mobile row,
which now names the Agent Setup row.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test: port the Agent Setup links test to the browser runner and mock thread records

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs(j5): name who accepted a Supervised Captain adding a Full-access member

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(j5): keep the Crew approval service lint-clean on j5/main's rules

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(mobile): the settings row seam reads Agent Setup

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — f00e158d Deployed Oct 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 effective changed lines (test files excluded in mixed PRs). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Storage cleanup test fails on Git 2.56: a broken gitfile is reported as failed, not changed

1 participant