Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions self-development/kelos-pr-responder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,11 @@ spec:
Task:
- 0. Set up your working branch. Kelos has already checked out {{.Branch}} for you. Run this exactly:
```
git fetch --unshallow || true
if git remote get-url upstream >/dev/null 2>&1; then
git fetch upstream main
git fetch upstream main --depth 100
git rebase upstream/main
else
git fetch origin main
git fetch origin main --depth 100
git rebase origin/main
fi
```
Expand Down
5 changes: 2 additions & 3 deletions self-development/kelos-reviewer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,10 @@ spec:

## Your tasks

### 0. Set up full history
### 0. Fetch main branch
Run this before reviewing:
```
git fetch --unshallow || true
git fetch origin main
git fetch origin main --depth 100
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Fetching main with a fixed depth can miss the merge-base used by git diff origin/main...HEAD, causing incomplete or failing reviews for older PR branches.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At self-development/kelos-reviewer.yaml, line 98:

<comment>Fetching `main` with a fixed depth can miss the merge-base used by `git diff origin/main...HEAD`, causing incomplete or failing reviews for older PR branches.</comment>

<file context>
@@ -92,11 +92,10 @@ spec:
         ```
-        git fetch --unshallow || true
-        git fetch origin main
+        git fetch origin main --depth 100
         ```
 
</file context>
Suggested change
git fetch origin main --depth 100
git fetch --unshallow || true
git fetch origin main
Fix with Cubic

```

### 1. Understand the context
Expand Down
5 changes: 2 additions & 3 deletions self-development/kelos-squash-commits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ spec:
- Branch: {{.Branch}}

Steps:
1. Fetch full history:
1. Fetch main branch:
```
git fetch --unshallow || true
git fetch origin main
git fetch origin main --depth 100
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Fetching main with fixed depth can break later git merge-base/squash steps for older branches. Ensure full history is available when the merge-base is outside the shallow window.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At self-development/kelos-squash-commits.yaml, line 60:

<comment>Fetching `main` with fixed depth can break later `git merge-base`/squash steps for older branches. Ensure full history is available when the merge-base is outside the shallow window.</comment>

<file context>
@@ -55,10 +55,9 @@ spec:
          ```
-         git fetch --unshallow || true
-         git fetch origin main
+         git fetch origin main --depth 100
          ```
 
</file context>
Suggested change
git fetch origin main --depth 100
git fetch origin main --depth 100
git merge-base origin/main HEAD >/dev/null 2>&1 || git fetch --unshallow
Fix with Cubic

```

2. Rebase the branch on origin/main:
Expand Down
2 changes: 1 addition & 1 deletion self-development/kelos-workers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ spec:
Task:
- 0. Set up your working branch. Run this exactly:
```
git fetch --unshallow || true; git fetch origin main; git rebase origin/main
git fetch origin main --depth 100; git rebase origin/main
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot Apr 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Using a fixed shallow fetch depth can break rebases for older branches when the merge base is deeper than 100 commits.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At self-development/kelos-workers.yaml, line 99:

<comment>Using a fixed shallow fetch depth can break rebases for older branches when the merge base is deeper than 100 commits.</comment>

<file context>
@@ -96,7 +96,7 @@ spec:
       - 0. Set up your working branch. Run this exactly:
         ```
-        git fetch --unshallow || true; git fetch origin main; git rebase origin/main
+        git fetch origin main --depth 100; git rebase origin/main
         ```
       - 1. Check if a PR already exists for branch kelos-task-{{.Number}}.
</file context>
Suggested change
git fetch origin main --depth 100; git rebase origin/main
git fetch origin main --depth 100; git rebase origin/main || (git fetch --unshallow origin main && git rebase origin/main)
Fix with Cubic

```
- 1. Check if a PR already exists for branch kelos-task-{{.Number}}.

Expand Down
Loading