Skip to content
Merged
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
58 changes: 58 additions & 0 deletions patches/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# AgentReady Patches

This directory contains patches for upstream dependencies that haven't been released yet.

## harbor-task-filtering-fix.patch

**Status**: Fixed upstream, waiting for release

**Problem**: Harbor's `-t`/`--task-name` flag is ignored, causing all tasks to run instead of filtered subset.

**Upstream Fix**: [Harbor commit f9e6d2e](https://github.com/laude-institute/harbor/commit/f9e6d2e10c72d33373012294c36fd4938c45c26c) (Dec 12, 2025)

**Released**: ❌ Not yet (latest PyPI: 0.1.23 from Dec 11, 2025)

### Option 1: Install from Main (Recommended)

```bash
pip uninstall harbor
pip install git+https://github.com/laude-institute/harbor.git
```

### Option 2: Apply Patch Manually

```bash
# Find Harbor installation
HARBOR_PATH=$(python -c "import harbor, os; print(os.path.dirname(harbor.__file__))")

# Apply patch
cd "$HARBOR_PATH/.."
patch -p1 < /path/to/agentready/patches/harbor-task-filtering-fix.patch
```

### Option 3: Manual Edit

Edit `harbor/models/job/config.py`:

```python
# Line 42: Change
fnmatch(task_id.path.name, pattern_id)
# To:
fnmatch(task_id.get_name(), pattern_id)

# Line 52: Change
fnmatch(task_id.path.name, pattern_id)
# To:
fnmatch(task_id.get_name(), pattern_id)

# Line 76: Change
TaskConfig(path=task_id.path, source=self.path.name)
# To:
TaskConfig(path=task_id.path, source=self.path.expanduser().resolve().name)
```

## When to Remove

Once Harbor 0.1.24 (or later) is released to PyPI, this patch is no longer needed.

Check PyPI: https://pypi.org/project/harbor/#history
75 changes: 75 additions & 0 deletions patches/harbor-task-filtering-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
From f9e6d2e10c72d33373012294c36fd4938c45c26c Mon Sep 17 00:00:00 2001
From: Alex Shaw <alexgshaw64@gmail.com>
Date: Fri Dec 12 21:21:27 2025 -0800
Subject: [PATCH] Fix task filtering to use polymorphic get_name() method

Fix for Harbor task filtering bug where -t/--task-name flags were ignored.

This patch is already merged in Harbor main (commit f9e6d2e) but not yet
released to PyPI. Latest version 0.1.23 (Dec 11, 2025) still has the bug.

Apply this patch to your local Harbor installation if you can't install
from main branch.

See: https://github.com/laude-institute/harbor/commit/f9e6d2e

---
src/harbor/models/job/config.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/harbor/models/job/config.py b/src/harbor/models/job/config.py
index 4a35f1f..f7a0ec9 100644
--- a/src/harbor/models/job/config.py
+++ b/src/harbor/models/job/config.py
@@ -39,7 +39,7 @@ class BaseDatasetConfig(BaseModel, ABC):
task_id
for task_id in filtered_ids
if any(
- fnmatch(task_id.path.name, pattern_id)
+ fnmatch(task_id.get_name(), pattern_id)
for pattern_id in self.task_names
)
]
@@ -49,7 +49,7 @@ class BaseDatasetConfig(BaseModel, ABC):
task_id
for task_id in filtered_ids
if not any(
- fnmatch(task_id.path.name, pattern_id)
+ fnmatch(task_id.get_name(), pattern_id)
for pattern_id in self.exclude_task_names
)
]
@@ -73,7 +73,7 @@ class LocalDatasetConfig(BaseDatasetConfig):
]
filtered_task_ids = self._filter_task_ids(task_ids)
return [
- TaskConfig(path=task_id.path, source=self.path.name)
+ TaskConfig(path=task_id.path, source=self.path.expanduser().resolve().name)
for task_id in filtered_task_ids
]

--
2.47.1

USAGE:
------

Option 1: Install Harbor from main (recommended)
pip uninstall harbor
pip install git+https://github.com/laude-institute/harbor.git

Option 2: Apply this patch to your local Harbor installation
# Find your Harbor installation
python -c "import harbor; print(harbor.__file__)"
# Output example: /path/to/site-packages/harbor/__init__.py

# Navigate to Harbor package directory
cd /path/to/site-packages/harbor

# Apply patch
git apply /path/to/agentready/patches/harbor-task-filtering-fix.patch

# Or manually edit src/harbor/models/job/config.py:
# Line 42: task_id.path.name -> task_id.get_name()
# Line 52: task_id.path.name -> task_id.get_name()
# Line 76: self.path.name -> self.path.expanduser().resolve().name
Loading
Loading