Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
3a6d321
fix(security): prevent information exposure through exception
d-ulker Sep 14, 2025
2702b33
feat: Add minimal code quality infrastructure
d-ulker Sep 19, 2025
f6d3eb9
feat: Add comprehensive monster PR prevention system
d-ulker Sep 19, 2025
4048a0b
feat: Adjust PR size limits for ML/AI project flexibility
d-ulker Sep 19, 2025
a66762a
fix: Correct indentation in PR scope checker script
d-ulker Sep 19, 2025
6594ad6
fix: revert fastapi-to-flask migration, keep only code quality tooling
d-ulker Sep 19, 2025
5c0342d
feat: Implement Complete Automated Code Quality Enforcement System
deepsource-autofix[bot] Sep 20, 2025
dbede7b
fix console script entry points
d-ulker Sep 20, 2025
bbe861a
Merge branch 'feat/dl-minimal-code-quality' of github.com:uelkerd/SAM…
d-ulker Sep 20, 2025
1c4153f
fix: update setup.cfg and pr scope checker for ranges
d-ulker Sep 20, 2025
943567c
fix: add explicit permissions to pr-scope-check workflow
d-ulker Sep 20, 2025
c0d6f87
perf: add ruff linter alongside flake8 for better performance and cov…
d-ulker Sep 20, 2025
cedb9bb
fix: secure subprocess call and remove unused import
d-ulker Sep 20, 2025
b134ce9
fix: add missing __init__.py for training module
d-ulker Sep 20, 2025
dfe7029
fix: correct console script entry points for src layout package
d-ulker Sep 20, 2025
0351335
refactor: replace FastAPI dependencies with Flask in pyproject.toml
d-ulker Sep 20, 2025
44203b6
Revert "refactor: replace FastAPI dependencies with Flask in pyprojec…
d-ulker Sep 20, 2025
1168e53
docs: update PR description to reflect actual code quality and securi…
d-ulker Sep 20, 2025
6a01c88
feat: Implement Complete Automated Code Quality Enforcement System
deepsource-autofix[bot] Sep 20, 2025
4ce874b
fix: resolve ReDoS vulnerability in branch name regex validation
d-ulker Sep 20, 2025
32be992
fix: address Copilot code review comments
d-ulker Sep 20, 2025
6c44ff2
fix: address code review comments - code quality only
d-ulker Sep 20, 2025
01577c4
fix: address critical packaging and tooling configuration issues
d-ulker Sep 20, 2025
ca5e190
fix: replace Path.is_relative_to with Python 3.8 compatible helper
d-ulker Sep 20, 2025
86d98d5
fix: restore critical tool configs in pyproject.toml
d-ulker Sep 20, 2025
a627a96
fix: remove sys.path manipulation anti-pattern from cli.py
d-ulker Sep 20, 2025
73767b4
fix: clarify bandit test skipping in Makefile
d-ulker Sep 20, 2025
3ba09ee
fix: eliminate unreachable code in run_command function
d-ulker Sep 20, 2025
1ff282a
fix: remove redundant setup.cfg for single source of truth
d-ulker Sep 20, 2025
473e911
fix: enable duplicate code detection in pylint config
d-ulker Sep 20, 2025
3fd5519
Fix mypy syntax errors and package structure
d-ulker Sep 20, 2025
a1c1c84
feat: Comprehensive mypy error resolution - Phase 2
d-ulker Sep 20, 2025
776890c
feat: Surgical mypy architecture recovery - Phase 3
d-ulker Sep 21, 2025
8c0ca3a
fix: Strategic pre-commit configuration for focused mypy checks
d-ulker Sep 21, 2025
27f9016
fix: Critical mypy error resolution in core business logic
d-ulker Sep 21, 2025
0785361
refactor: Automated linter improvements in core business logic
d-ulker Sep 21, 2025
3da7933
refactor: Automated formatting improvements in deployment infrastructure
d-ulker Sep 21, 2025
cd135c0
docs: Automated formatting improvements across documentation
d-ulker Sep 21, 2025
c3dc29b
config: Automated formatting improvements in configuration files
d-ulker Sep 21, 2025
9a33ff8
ci: Automated formatting improvements in CI and validation scripts
d-ulker Sep 21, 2025
caf4cac
test: Automated formatting improvements in test suites
d-ulker Sep 21, 2025
a92d459
notebooks: Automated formatting improvements in Jupyter notebooks
d-ulker Sep 21, 2025
3425873
deploy: Automated formatting improvements in deployment scripts
d-ulker Sep 21, 2025
ae43182
train: Automated formatting improvements in training scripts
d-ulker Sep 21, 2025
984d91f
test: Automated formatting improvements in testing scripts
d-ulker Sep 21, 2025
30ce9b2
refactor: Automated formatting improvements in legacy and maintenance…
d-ulker Sep 21, 2025
efd3fef
assets: Automated formatting improvements in artifacts and website
d-ulker Sep 21, 2025
6cf18ec
feat: Comprehensive Code Quality System Enhancement
d-ulker Sep 21, 2025
ac80328
feat: Mass Code Quality Auto-fixes and Pre-commit Validation
d-ulker Sep 21, 2025
ce667db
refactor: Remove 62 obsolete Jupyter notebook-style training files
d-ulker Sep 21, 2025
fe2ffa1
fix: Improve critical exception handler patterns in unified API
d-ulker Sep 21, 2025
3e8d655
style: Add @staticmethod decorators to test methods not using self
d-ulker Sep 21, 2025
56b3bac
fix: comprehensive code quality improvements and import fixes
d-ulker Sep 21, 2025
c3946ed
feat: Remove all training code - moved to separate repository
d-ulker Sep 21, 2025
6837ab1
docs: Add comprehensive module docstrings to data layer
d-ulker Sep 21, 2025
4427318
feat: Implement Complete Automated Code Quality Enforcement System
deepsource-autofix[bot] Sep 21, 2025
18863b6
fix: resolve all 18 information exposure through exception vulnerabil…
d-ulker Sep 21, 2025
bd7be4c
Merge branch 'feat/dl-minimal-code-quality' of github.com:uelkerd/SAM…
d-ulker Sep 21, 2025
509d1bf
fix: resolve final information exposure vulnerability in audio valida…
d-ulker Sep 21, 2025
26f8107
fix: resolve CodeQL URL substring sanitization vulnerabilities
d-ulker Sep 21, 2025
2cd43f7
feat: Refactor unified_ai_api.py to eliminate import-time dependencies
d-ulker Sep 21, 2025
b0a3a66
Fix security: replace substring check with exact match for service va…
d-ulker Sep 21, 2025
650f12a
Fix import-time side effects: move env vars to main block with setdef…
d-ulker Sep 21, 2025
f57ba64
Fix multiple security and reliability issues across deployment files
d-ulker Sep 21, 2025
e83a690
Fix fp16 configuration to prevent CPU dtype errors
d-ulker Sep 21, 2025
cd05a55
Complete security and compatibility fixes
d-ulker Sep 21, 2025
aaefbc2
Fix code review issues: health check safety, metrics format, batch ke…
d-ulker Sep 21, 2025
25c32ac
fix: console script import and development status
d-ulker Sep 21, 2025
e814ef0
Fix undefined name errors (PYL-E0602) across codebase
d-ulker Sep 21, 2025
35f7ff6
Fix line length issues (FLK-E501) in API files
d-ulker Sep 21, 2025
43b367d
fix: prevent clear-text logging of sensitive information
d-ulker Sep 21, 2025
d315029
Fix remaining line length violations
d-ulker Sep 21, 2025
a9db811
Fix additional line length violations in testing scripts
d-ulker Sep 21, 2025
371595e
Fix more line length violations in maintenance and testing scripts
d-ulker Sep 21, 2025
ef60116
Fix line length violations in legacy scripts
d-ulker Sep 21, 2025
020e08e
Fix final line length violations in core files
d-ulker Sep 21, 2025
c2ed567
Fix final long line in mega_comprehensive_model_test.py
d-ulker Sep 21, 2025
a736dc0
Fix remaining long lines in confidence statistics
d-ulker Sep 21, 2025
cc19d14
Fix final stress test results line length violation
d-ulker Sep 21, 2025
9405e64
enhance: add comprehensive sensitive data protection to logging
d-ulker Sep 21, 2025
7f63b59
fix: completely isolate sensitive data from logging path
d-ulker Sep 21, 2025
377e8de
remove: delete obsolete security deployment fix scripts
d-ulker Sep 21, 2025
678897d
feat: optimize code quality configuration for consistency and perform…
d-ulker Sep 21, 2025
2c1e88f
Resolve merge conflict in deployment/secure_api_server.py
d-ulker Sep 21, 2025
c597eec
fix: apply automatic linting fixes to secure_api_server.py
d-ulker Sep 21, 2025
eadb4f2
Test bad code to verify pre-commit hooks
d-ulker Sep 22, 2025
254fc24
clean: remove test file after verifying quality enforcement works
d-ulker Sep 22, 2025
0e2b140
docs: update PR description for minimal code quality enforcement
d-ulker Sep 22, 2025
1a759e5
fix: complete CI blocker resolution
d-ulker Sep 22, 2025
8118b20
docs: update PR description to acknowledge monster PR scope creep
d-ulker Sep 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ LICENSE
dist
build
artifacts
notebooks
notebooks
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

34 changes: 17 additions & 17 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
permissions:
pages: write
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Debug - Check current directory structure
run: |
echo "=== Current Directory Structure ==="
Expand All @@ -31,12 +31,12 @@ jobs:
ls -la website/ || echo "Website directory not found"
echo "=== Root HTML Files ==="
ls -la *.html 2>/dev/null || echo "No HTML files in root"

- name: Create clean website directory
run: |
# Create a completely clean directory with only website files
mkdir -p website-deploy

# Copy website files from the website/ directory (primary source)
if [ -d "website" ]; then
cp -r website/* website-deploy/ 2>/dev/null || true
Expand All @@ -45,67 +45,67 @@ jobs:
echo "ERROR: website/ directory not found!"
exit 1
fi

# Copy essential files from root if they don't exist in website/
if [ ! -f "website-deploy/index.html" ]; then
cp index.html website-deploy/ 2>/dev/null || true
fi
if [ ! -f "website-deploy/README.md" ]; then
cp README.md website-deploy/ 2>/dev/null || true
fi

# Copy .nojekyll file
cp .nojekyll website-deploy/ 2>/dev/null || true

# Remove any problematic directories that might have been copied
rm -rf website-deploy/data/
rm -rf website-deploy/models/
rm -rf website-deploy/deployment/
rm -rf website-deploy/test_checkpoints/
rm -rf website-deploy/__pycache__/
rm -rf website-deploy/*/__pycache__/

# Remove any lock files
find website-deploy -name "*.lock" -delete 2>/dev/null || true
find website-deploy -name "*.incomplete_info.lock" -delete 2>/dev/null || true

# Remove large files
find website-deploy -name "*.pt" -delete 2>/dev/null || true
find website-deploy -name "*.pth" -delete 2>/dev/null || true
find website-deploy -name "*.safetensors" -delete 2>/dev/null || true
find website-deploy -name "*.bin" -delete 2>/dev/null || true
find website-deploy -name "*.onnx" -delete 2>/dev/null || true

echo "=== Clean website directory created ==="
ls -la website-deploy/
echo "=== HTML files in website-deploy ==="
ls -la website-deploy/*.html 2>/dev/null || echo "No HTML files found"

# Validate that we have the required files
if [ ! -f "website-deploy/index.html" ]; then
echo "ERROR: index.html not found in website-deploy!"
exit 1
fi

echo "βœ… Deployment files ready"

- name: Check GitHub Pages settings
run: |
echo "=== GitHub Pages Configuration ==="
echo "Branch: ${{ github.ref }}"
echo "Event: ${{ github.event_name }}"
echo "Actor: ${{ github.actor }}"
echo "Repository: ${{ github.repository }}"

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'website-deploy'
retention-days: 1

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4
91 changes: 91 additions & 0 deletions .github/workflows/pr-scope-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: PR Scope Check

permissions:
contents: read
pull-requests: read

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
scope-check:
runs-on: ubuntu-latest
steps:
Comment thread
coderabbitai[bot] marked this conversation as resolved.
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Get full history for proper diff

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'

- name: Install dependencies
run: |
python -m pip install --upgrade pip

- name: Run PR Scope Check
run: |
python scripts/check_pr_scope.py --strict
continue-on-error: false

- name: Check branch naming (secure)
env:
BRANCH_NAME: ${{ github.head_ref }}
run: |
# Validate branch name using environment variable (safer than direct interpolation)
if [[ ! "$BRANCH_NAME" =~ ^(feat|fix|chore|refactor|docs|test)/[a-z]+(-[a-z]+)*$ ]]; then
echo "❌ Branch name must follow pattern: type/short-description"
echo " Current: $BRANCH_NAME"
echo " Examples: feat/add-user-auth, fix/validate-input, chore/update-deps"
exit 1
fi
echo "βœ… Branch name follows convention: $BRANCH_NAME"

- name: Check PR size limits (secure)
env:
BASE_BRANCH: ${{ github.base_ref }}
HEAD_REF: ${{ github.head_ref }}
run: |
# Validate input parameters
if [[ -z "$BASE_BRANCH" || -z "$HEAD_REF" ]]; then
echo "❌ Missing required branch information"
exit 1
fi

# Ensure base branch exists in origin
if ! git show-ref --verify --quiet "refs/remotes/origin/$BASE_BRANCH"; then
echo "❌ Base branch origin/$BASE_BRANCH not found"
exit 1
fi

# Count files changed using safe git commands
FILES_CHANGED=$(git diff --name-only "origin/$BASE_BRANCH" | wc -l)
echo "Files changed: $FILES_CHANGED"

# Count lines changed using shortstat (more reliable)
SHORTSTAT=$(git diff --shortstat "origin/$BASE_BRANCH")
LINES_CHANGED=0

if [[ -n "$SHORTSTAT" ]]; then
# Extract insertions and deletions from shortstat
INSERTIONS=$(echo "$SHORTSTAT" | grep -o '[0-9]\+ insertion' | head -1 | grep -o '[0-9]\+' || echo "0")
DELETIONS=$(echo "$SHORTSTAT" | grep -o '[0-9]\+ deletion' | head -1 | grep -o '[0-9]\+' || echo "0")
LINES_CHANGED=$((INSERTIONS + DELETIONS))
fi

echo "Lines changed: $LINES_CHANGED"

# Check limits with proper error handling
if [[ "$FILES_CHANGED" -gt 50 ]]; then
echo "❌ Too many files changed: $FILES_CHANGED (max 50)"
exit 1
fi

if [[ "$LINES_CHANGED" -gt 1500 ]]; then
echo "❌ Too many lines changed: $LINES_CHANGED (max 1500)"
exit 1
fi

echo "βœ… PR size within limits: $FILES_CHANGED files, $LINES_CHANGED lines"
Comment thread Fixed
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -384,5 +384,4 @@ coverage.xml
# Large generated reports
bandit-report.json
ci_pipeline.log


notebooks/
25 changes: 25 additions & 0 deletions .gitmessage.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SAMO-DL Commit Message Template
#
# Format: <type>(<scope>): <subject>
#
# Types:
# feat: A new feature
# fix: A bug fix
# chore: Changes to the build process or auxiliary tools/libraries
# refactor: A code change that neither fixes a bug nor adds a feature
# docs: Documentation only changes
# test: Adding missing tests or correcting existing tests
#
# Rules:
# - ONE purpose per commit (no "and", "also", "plus")
# - Subject line < 50 characters
# - Use imperative mood ("Add" not "Added")
# - No period at end of subject line
#
# Examples:
# feat: add user authentication system
# fix: resolve memory leak in model loading
# chore: update dependency versions
# refactor: simplify rate limiter logic
# docs: update API documentation
# test: add unit tests for validation functions
3 changes: 1 addition & 2 deletions .logs/code_quality_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Generated: 2025-07-22 20:21:52 UTC

## Pre-commit Hook Status
βœ… Successfully implemented Ruff linting and formatting
βœ… Security scanning with Bandit configured
βœ… Security scanning with Bandit configured
βœ… Secret detection active
βœ… File quality checks working
βœ… Automatic code formatting enabled
Expand All @@ -22,4 +22,3 @@ Generated: 2025-07-22 20:21:52 UTC
πŸ“Š **Comprehensive file validation**

The pre-commit hooks are working perfectly!

2 changes: 1 addition & 1 deletion .logs/repo_inventory.json
Original file line number Diff line number Diff line change
Expand Up @@ -4995,4 +4995,4 @@
"bandit-report.json": [],
"ci_pipeline.log": []
}
}
}
Loading
Loading