OpenHands / OpenHands/software-agent-sdk
OpenHands Fork Audit - HIGH: Stale duplicate build/lib/ directories under vendor/ could be shipped
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 539
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 137
Description
FLEET AUDIT FINDING: OpenHands Zentra fork — offline packaging audit
Location: vendor/openhands-sdk/build/lib, vendor/openhands-agent-server/build/lib, vendor/openhands-tools/build/lib
Severity: HIGH (P2) — Maintainability/hygiene; risk of stale code being shipped if packaging is done incorrectly
The Issue:
Each vendored package has a build/ directory with a lib/ subdirectory containing duplicate Python source:
vendor/openhands-sdk/
├── openhands/sdk/... (source)
└── build/lib/openhands/sdk/... (stale copy)
vendor/openhands-agent-server/
├── openhands/agent_server/... (source)
└── build/lib/openhands/agent_server/... (stale copy)
These build/ artifacts should NOT be in the git repo. They are created by setup.py/build during wheel builds and should be cleaned before committing.
Why it matters:
- Duplication → maintenance burden (changes must be mirrored)
- Stale copies → if the build process is wrong, old code could ship
- Confusion → future maintainers might edit the stale copy instead of the source
- Size → unnecessarily inflates the repo and the shipped package
Proof:
find vendor -path "*/build/lib/*" -name "*.py" | wc -l
# Currently ~300+ Python files duplicated
Verify stale-ness:
diff vendor/openhands-sdk/openhands/sdk/_zentra_airgap.py vendor/openhands-sdk/build/lib/openhands/sdk/_zentra_airgap.py
# Will show they differ (build/ is stale from an earlier vendor cycle)
Fix guidance:
- Add vendor/*/build/ to .gitignore (if not already there)
- Clean existing: find vendor -type d -name build -exec rm -rf {} ; 2>/dev/null
- Update the vendoring/build process to clean build/ before final commit
- Verify packaging uses the source trees, not build/lib
This is a hygiene fix, not a functional fix, but it prevents future confusion and shipping accidents.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with vendor/openhands-sdk/build/lib, vendor/openhands-agent-server/build/lib, and vendor/openhands-tools/build/lib, then inspect .gitignore and the vendoring/build process. Use the issue's find and diff commands to identify tracked artifacts and compare copies. Done means existing build/ directories are removed, future vendor builds clean them before commit, and packaging uses the source trees.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100