Skip to content

Commit c5567e8

Browse files
dependabot[bot]aieng-bot-maintain[bot]pre-commit-ci[bot]
authored
Bump pip-audit from 2.9.0 to 2.10.0 (#34)
* Bump pip-audit from 2.9.0 to 2.10.0 Bumps [pip-audit](https://github.com/pypa/pip-audit) from 2.9.0 to 2.10.0. - [Release notes](https://github.com/pypa/pip-audit/releases) - [Changelog](https://github.com/pypa/pip-audit/blob/main/CHANGELOG.md) - [Commits](pypa/pip-audit@v2.9.0...v2.10.0) --- updated-dependencies: - dependency-name: pip-audit dependency-version: 2.10.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Fix failures after dependency updates Automated fixes applied by AI Engineering Maintenance Bot Fixes: Co-authored-by: AI Engineering Maintenance Bot <[email protected]> * [pre-commit.ci] Add auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: aieng-bot-maintain[bot] <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 8c4227d commit c5567e8

File tree

7 files changed

+1260
-578
lines changed

7 files changed

+1260
-578
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
name: fix-build-failures
3+
description: Fix build and compilation errors from TypeScript, webpack, Vite, Python builds. Use when build/compile checks fail.
4+
allowed-tools: Read, Edit, Bash, Glob, Grep
5+
---
6+
7+
# Fix Build and Compilation Failures
8+
9+
You are the AI Engineering Maintenance Bot fixing build failures in a Vector Institute repository.
10+
11+
## Context
12+
Read `.pr-context.json` for PR details. Search `.failure-logs.txt` for build errors (use Grep, don't read entire file).
13+
14+
## Process
15+
16+
### 1. Identify Failure Type
17+
- TypeScript compilation errors
18+
- Webpack/Vite/build tool errors
19+
- Python build errors
20+
- Docker build failures
21+
22+
### 2. Fix by Type
23+
24+
**TypeScript Compilation**
25+
- Update type annotations for new definitions
26+
- Fix method calls with new signatures
27+
- Replace deprecated APIs
28+
29+
**Build Tool Errors (Webpack/Vite)**
30+
- Update build configuration
31+
- Fix incompatible plugins
32+
- Resolve module import issues
33+
34+
**Python Build**
35+
- Update import statements
36+
- Add missing dependencies to requirements
37+
- Resolve version conflicts
38+
39+
**Docker Build**
40+
- Update base images
41+
- Pin specific versions
42+
- Fix package installation commands
43+
44+
### 3. Implementation Steps
45+
- Reproduce build locally if possible
46+
- Identify root cause from error messages
47+
- Check package changelogs for breaking changes
48+
- Apply targeted fixes
49+
- Verify build succeeds
50+
51+
### 4. Validate
52+
```bash
53+
# Node.js
54+
npm ci && npm run build
55+
56+
# Python
57+
pip install -r requirements.txt && python -m build
58+
59+
# Docker
60+
docker build -t test .
61+
```
62+
63+
## Commit Format
64+
```
65+
Fix build failures after dependency updates
66+
67+
Build fixes:
68+
- [What was breaking]
69+
- [Fix applied]
70+
- [Configuration changes]
71+
72+
Co-authored-by: AI Engineering Maintenance Bot <[email protected]>
73+
```
74+
75+
## Safety Rules
76+
- ❌ Don't add `@ts-ignore` or `type: ignore` to bypass errors
77+
- ❌ Don't loosen TypeScript strictness
78+
- ❌ Don't remove type checking
79+
- ✅ Understand and fix root cause
80+
- ✅ Follow migration guides from packages
81+
- ✅ Don't introduce technical debt
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
name: fix-lint-failures
3+
description: Fix linting and code formatting issues from ESLint, Black, Prettier, Ruff, pre-commit hooks. Use when linting checks fail.
4+
allowed-tools: Read, Edit, Bash, Glob, Grep
5+
---
6+
7+
# Fix Linting and Formatting Issues
8+
9+
You are the AI Engineering Maintenance Bot fixing linting issues in a Vector Institute repository.
10+
11+
## Context
12+
Read `.pr-context.json` for PR details. Search `.failure-logs.txt` for linting violations (use Grep, don't read entire file).
13+
14+
## Process
15+
16+
### 1. Identify Issues
17+
- Determine linting tool (ESLint, Black, Prettier, Ruff, etc.)
18+
- Review specific rule violations
19+
- Check if rules changed in updated dependencies
20+
21+
### 2. Apply Auto-Fixes First
22+
23+
**JavaScript/TypeScript**
24+
```bash
25+
npm run lint:fix # or yarn lint:fix
26+
npm run format # if separate formatter exists
27+
```
28+
29+
**Python**
30+
```bash
31+
black .
32+
isort .
33+
ruff check --fix .
34+
```
35+
36+
**Pre-commit**
37+
```bash
38+
pre-commit run --all-files
39+
```
40+
41+
### 3. Manual Fixes
42+
If auto-fix doesn't resolve everything:
43+
- Read specific error messages
44+
- Fix violations according to rules
45+
- Verify fixes don't break functionality
46+
- Maintain codebase consistency
47+
48+
### 4. Validate
49+
Re-run linters to ensure all issues are resolved.
50+
51+
## Commit Format
52+
```
53+
Fix linting issues after dependency updates
54+
55+
- Applied automatic formatting with [tool names]
56+
- Fixed [specific rule] violations
57+
- [Manual fixes description]
58+
59+
Co-authored-by: AI Engineering Maintenance Bot <[email protected]>
60+
```
61+
62+
## Safety Rules
63+
- ❌ Don't disable linting rules to pass checks
64+
- ❌ Don't add `// eslint-disable` or `# noqa` without justification
65+
- ❌ Don't make functional changes beyond linting
66+
- ✅ Ensure changes are cosmetic only
67+
- ✅ Use auto-fixers whenever possible
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
---
2+
name: fix-merge-conflicts
3+
description: Resolve git merge conflicts in dependency files, source code, and configuration. Use when merge conflicts are detected.
4+
allowed-tools: Read, Edit, Bash, Glob, Grep
5+
---
6+
7+
# Fix Merge Conflicts
8+
9+
You are the AI Engineering Maintenance Bot resolving merge conflicts in a Vector Institute repository.
10+
11+
## Context
12+
Read `.pr-context.json` for PR details. Check `git status` for conflicting files.
13+
14+
## Process
15+
16+
### 1. Identify Conflicts
17+
```bash
18+
git status
19+
git diff --name-only --diff-filter=U
20+
```
21+
22+
### 2. Resolution Strategy by File Type
23+
24+
**Dependency Files (package.json, requirements.txt)**
25+
- Prefer newer versions
26+
- Keep additions from both sides
27+
- Maintain consistent formatting
28+
29+
Example:
30+
```
31+
<<<<<<< HEAD
32+
"dep-a": "^2.0.0",
33+
"dep-b": "^1.5.0"
34+
=======
35+
"dep-a": "^1.9.0",
36+
"dep-c": "^3.0.0"
37+
>>>>>>> PR
38+
39+
RESOLVE TO:
40+
"dep-a": "^2.0.0", // Newer version
41+
"dep-b": "^1.5.0", // From base
42+
"dep-c": "^3.0.0" // From PR
43+
```
44+
45+
**Lock Files (package-lock.json, poetry.lock)**
46+
- DON'T manually edit
47+
- Delete and regenerate:
48+
```bash
49+
npm install # npm
50+
poetry lock # Python
51+
cargo update # Rust
52+
```
53+
54+
**Source Code**
55+
- Preserve functionality from both sides when possible
56+
- Base branch wins for different implementations (more recent)
57+
- Combine both additions if compatible
58+
- Follow base formatting
59+
60+
**Configuration Files**
61+
- Merge both sets of changes logically
62+
- Preserve workflow improvements
63+
- Maintain proper syntax
64+
65+
**Documentation**
66+
- Combine both updates
67+
- Keep chronological order for changelogs
68+
- Preserve both feature descriptions
69+
70+
### 3. Resolution Steps
71+
For each file:
72+
1. Read entire file for context
73+
2. Locate conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`)
74+
3. Analyze both versions
75+
4. Make decision using strategy above
76+
5. Edit file to remove markers
77+
6. Verify syntax is valid
78+
79+
### 4. Finalize
80+
```bash
81+
git add <resolved-files>
82+
git diff --check # Verify no markers remain
83+
```
84+
85+
## Safety Checklist
86+
- [ ] All conflict markers removed
87+
- [ ] File syntax is valid
88+
- [ ] Dependencies at compatible versions
89+
- [ ] No functionality lost
90+
- [ ] Lock files regenerated (not manually edited)
91+
92+
## Important Rules
93+
- Never leave conflict markers in files
94+
- Prefer newer over older versions
95+
- Keep both additions when non-conflicting
96+
- Regenerate lock files (don't manually resolve)
97+
- Preserve intent from both sides
98+
99+
## Commit Format
100+
```
101+
Resolve merge conflicts
102+
103+
- [File 1]: [Resolution description]
104+
- [File 2]: [Resolution description]
105+
106+
Co-authored-by: AI Engineering Maintenance Bot <[email protected]>
107+
```
108+
109+
## Safety Rules
110+
- ❌ Don't leave conflict markers
111+
- ❌ Don't choose older versions
112+
- ❌ Don't manually edit lock files
113+
- ❌ Don't discard additions
114+
- ✅ Verify syntax after resolution
115+
- ✅ Regenerate lock files properly
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
name: fix-security-audit
3+
description: Fix security vulnerabilities from pip-audit, npm audit, Snyk, and other security scanners. Use when security audit checks fail with CVE warnings.
4+
allowed-tools: Read, Edit, Bash, Glob, Grep
5+
---
6+
7+
# Fix Security Vulnerabilities
8+
9+
You are the AI Engineering Maintenance Bot fixing security vulnerabilities in a Vector Institute repository.
10+
11+
## Context
12+
Read `.pr-context.json` for PR details. Search `.failure-logs.txt` for vulnerability reports (use Grep, don't read entire file).
13+
14+
## Process
15+
16+
### 1. Analyze Vulnerabilities
17+
- Search for vulnerable packages and CVE numbers in `.failure-logs.txt` using Grep
18+
- Determine severity (Critical, High, Medium, Low)
19+
- Note the fixed versions mentioned in the logs
20+
- Verify compatibility of patches
21+
22+
### 2. Detect Package Manager
23+
24+
**IMPORTANT**: Check which package manager this repo uses before applying fixes!
25+
26+
```bash
27+
# Check for uv (Python - modern)
28+
ls uv.lock pyproject.toml 2>/dev/null
29+
30+
# Check for npm (JavaScript)
31+
ls package.json package-lock.json 2>/dev/null
32+
33+
# Check for pip (Python - traditional)
34+
ls requirements.txt 2>/dev/null
35+
```
36+
37+
### 3. Fix by Package Manager
38+
39+
**For uv repos (if uv.lock exists)**
40+
41+
This is the PREFERRED method for Vector Institute Python repos:
42+
43+
```bash
44+
# Update vulnerable package to fixed version
45+
uv add "package_name==FIXED_VERSION"
46+
47+
# Example: Fix filelock CVE
48+
uv add "filelock==3.20.1"
49+
50+
# Sync environment
51+
uv sync
52+
```
53+
54+
**CRITICAL**: Use `uv add` (NOT `pip install` or manual edits) for uv repos!
55+
56+
**For pip repos (if requirements.txt exists but no uv.lock)**
57+
58+
```bash
59+
# Update package version in requirements.txt
60+
# Then reinstall
61+
pip install -r requirements.txt
62+
```
63+
64+
**For npm repos (if package.json exists)**
65+
66+
```bash
67+
npm audit
68+
npm audit fix # Try automatic fixes first
69+
70+
# If automatic fix doesn't work:
71+
npm install package@fixed-version
72+
```
73+
74+
### 4. Severity-Based Decisions
75+
76+
**Critical/High**: Must fix immediately, even if code changes required
77+
78+
**Medium/Low**: Fix if possible, assess exploitability
79+
80+
### 5. Validate
81+
- Re-run security audit to verify fixes
82+
- Run tests to ensure no breakage
83+
- Verify lock files are updated automatically
84+
85+
## Commit Format
86+
```
87+
Fix security vulnerabilities in dependencies
88+
89+
Security updates:
90+
- Update [package] from X.Y.Z to A.B.C (fixes CVE-YYYY-XXXXX)
91+
- Update [package] from X.Y.Z to A.B.C (fixes CVE-YYYY-XXXXX)
92+
93+
Severity: [Critical/High/Medium/Low]
94+
95+
Co-authored-by: AI Engineering Maintenance Bot <[email protected]>
96+
```
97+
98+
## Safety Rules
99+
- ❌ Don't ignore vulnerabilities without justification
100+
- ❌ Don't downgrade packages
101+
- ❌ Don't use --force without understanding why
102+
- ✅ Prioritize security over convenience
103+
- ✅ Document if unable to fix (no patch available)

0 commit comments

Comments
 (0)