---
name: "Ford QC System"
client: Ford
status: active
tech: [Python, Box API, HTML, systemd]
local_path: /Users/ai_leed/Documents/Projects/Oliver/ford_qc
deploy: systemd service (ford-qc-hotfolder.service) / python qc_engine.py
url: 
server: Production server with systemd
tags: [ford, qc, quality-control, box, bnp, systemd, hotfolder]
created: 2026-04-14
last_commit: 2026-04-17
commits: 20
---

## Overview
QC system for Ford Build and Price (BnP) asset packs. Two modes:
- **Hotfolder daemon** — monitors Box folder 332861865120, auto-processes new ZIPs
- **CLI** — manual QC run on specific file

13 QC check modules covering image resolution, format, file size, layer depth, colour existence, linking validation, MEC/BAU compliance, powertrain validation, lifestyle inventory.

## Tech Stack
- **Backend:** Python
- **Storage:** Box API (JWT auth via `ford_box_config.json`)
- **HTML Reports:** `checks/html_reporter.py`, `html_error_reporter.py`
- **Infrastructure:** systemd service (production)

## Architecture
```
qc_engine.py (CLI)  /  ford_qc_box_hotfolder_process.py (daemon)
    ↓ QC profile (JSON config)
qc_module.py → 13 check modules in checks/
    ↓
JSON results → HTML report
    ↓
Box: upload reports to 332864939558, archive to 332861653811
```

## Box Folder IDs
| Folder | ID |
|--------|-----|
| Input (hotfolder) | 332861865120 |
| Reports output | 332864939558 |
| Archive (processed) | 332861653811 |

## Dev Commands
```bash
# Run QC checks
python qc_engine.py profiles/ford_bnp.json --input_file <zip> --reports_dir reports

# Box hotfolder daemon
python ford_qc_box_hotfolder_process.py

# Generate HTML report from JSON
python -m checks.html_reporter <input_json> <output_dir>

# Systemd service
sudo systemctl start ford-qc-hotfolder.service
sudo systemctl status ford-qc-hotfolder.service
```

## Deployment
- **Daemon:** `sudo systemctl start ford-qc-hotfolder.service`
- **CLI:** `python qc_engine.py`
- **Local path:** `/Users/ai_leed/Documents/Projects/Oliver/ford_qc`

## Timeline / Git History
| Date | Change |
|------|--------|
| 2026-04-17 | Add asset count summary to QC HTML reports |
| 2026-04-16 | Add zip filename check for GPAS naming convention |
| 2026-03-16 | Make Ranger ptvl pattern configurable via profile |

## Sessions
### 2026-04-17 – Where can we find the report
**Asked:** Where can we find the report and why isn't the previously done task working?
**Done:** Generated report opened in browser using linkingrecord.json and QC results, added Asset Count card showing link and asset counts by section.

### 2026-04-17 – Asked | Done | Log
**Asked:** Asked | Done | Log
**Done:** Feature deployment | Pushed changes and restarted dev service | ford-qc-hotfolder.service

### 2026-04-17 – Where is the report and why
**Asked:** Where is the report and why isn't the implementation working?
**Done:** Updated implementation to display total linking records and unique assets for overall and per-section views by modifying the call site to pass four values.

### 2026-04-17 – Asked | Where can the new
**Asked:** Asked | Where can the new report be found after implementation? | Completed
**Done:** Done | Added two new static methods before `_build_head` and verified changes | Code updated with new static methods

### 2026-04-16 – Changed zip file naming convention from
**Asked:** Changed zip file naming convention from "_image.zip" to "_GPAS.zip" for image pack validation.
**Done:** Updated image pack naming format and added validation check to ensure all packs end with "_GPAS.zip" suffix.

### 2026-04-16 – Update zip file naming convention from
**Asked:** Update zip file naming convention from "_image.zip" to "_GPAS.zip" for image pack validation.
**Done:** Implemented zip filename check to enforce "_GPAS.zip" suffix and deployed to production with proper validation messaging.

### 2026-04-16 – Change image pack naming convention from
**Asked:** Change image pack naming convention from "_image.zip" to "_GPAS.zip" suffix.
**Done:** Updated naming validation logic and pushed changes to git, resolved merge conflict with .gitignore and .env configuration.

### 2026-04-16 – Update image pack naming convention from
**Asked:** Update image pack naming convention from "_image.zip" to "_GPAS.zip" suffix.
**Done:** Modified naming validation logic to enforce "_GPAS.zip" format for image pack files.

### 2026-04-16 – Change image pack naming convention from
**Asked:** Change image pack naming convention from "_image.zip" to "_GPAS.zip" suffix.
**Done:** Updated naming validation to enforce _GPAS.zip suffix for all image packs and committed changes to git.

### 2026-04-16 – Update image pack naming from "_image.zip"
**Asked:** Update image pack naming from "_image.zip" to "_GPAS.zip" suffix for Ford third-party checker compatibility.
**Done:** Modified image pack validation logic and pushed changes to git, but encountered merge conflict in .gitignore during pull.

### 2026-04-16 – Update image pack naming from "_image.zip"
**Asked:** Update image pack naming from "_image.zip" to "_GPAS.zip" suffix requirement.
**Done:** Modified validation logic to enforce _GPAS.zip naming convention and deployed changes via git pull with service restart.

### 2026-04-16 – Update image pack naming from "_image.zip"
**Asked:** Update image pack naming from "_image.zip" to "_GPAS.zip" suffix with validation check.
**Done:** Modified naming convention and validation logic, pushed to Git and restarted the ford-qc-hotfolder service.

### 2026-04-16 – Change image pack naming from "_image.zip"
**Asked:** Change image pack naming from "_image.zip" to "_GPAS.zip" suffix in the validation check.
**Done:** Updated zip file naming validation logic to require "_GPAS.zip" suffix instead of "_image.zip", and pushed changes to git after resolving merge conflicts.

### 2026-04-16 – Change image pack naming from "_image.zip"
**Asked:** Change image pack naming from "_image.zip" to "_GPAS.zip" suffix for Ford QC validation.
**Done:** Updated naming convention and resolved git merge conflict by stashing local changes before pulling updates.

### 2026-04-16 – Update image pack naming convention from
**Asked:** Update image pack naming convention from _image.zip to _GPAS.zip | Changed zip file naming pattern validation and .gitignore file | .gitignore, image_pack_validator.py
**Done:** —

### 2026-04-16 – Update image pack naming validation to
**Asked:** Update image pack naming validation to require "_GPAS.zip" suffix instead of "_image.zip"
**Done:** Created zip filename check module and integrated it into Ford QC validation pipeline

### 2026-04-16 – Update zip file naming requirement from
**Asked:** Update zip file naming requirement from "_image.zip" to "_GPAS.zip" suffix.
**Done:** Created filename validation check, integrated into Ford BNP profile, and verified all test scenarios pass.

### 2026-04-16 – Update image pack naming convention to
**Asked:** Update image pack naming convention to use "_GPAS.zip" suffix instead of "_image.zip".
**Done:** Modified naming validation logic and updated all image pack references to enforce the new "_GPAS.zip" suffix format.

### 2026-04-14 – Project catalogued
**Done:** Added to Obsidian second brain with full details.

---
## Change Log
| Date | Requested | Changed | Files |
|------|-----------|---------|-------|
| 2026-04-17 | Report generation and deployment | Generated report with Asset Count card, linked QC results to summary | linkingrecord.json, test_reports, box-cli dev deployment |
| 2026-04-17 | Report location | Code pushed to git and deployed to box-cli dev folder | dev deployment |
| 2026-04-17 | Report display implementation | Import validation, function signature updated to accept four parameters | call site, implementation file |
| 2026-04-17 | New static methods | Added two static methods before _build_head, verified implementation | Source file |
| 2026-04-16 | Image pack naming | Zip suffix changed from _image to _GPAS, validation check added | .gitignore, validation script |
| 2026-04-16 | Zip naming validation | zip_filename_check implementation, validation logic, error messaging | .gitignore, validation module files |
| 2026-04-16 | Zip naming update | Validation logic for _GPAS.zip suffix, .env configuration setup | .gitignore, utils/config.py, .env.example |
| 2026-04-16 | Zip naming convention | Filename suffix validation logic, file pattern matching | validation.py, config.py |
| 2026-04-16 | Zip naming convention | Updated suffix validation from _image.zip to _GPAS.zip | .gitignore, image pack validator |
| 2026-04-16 | Image pack naming | Suffix pattern changed from _image.zip to _GPAS.zip, validation logic updated | .gitignore, validation module files |
| 2026-04-16 | Image pack naming validation | Suffix check from _image.zip to _GPAS.zip | .gitignore, ford_qc validation module |
| 2026-04-16 | Image pack naming | Zip suffix changed from _image.zip to _GPAS.zip, validation check added | .gitignore, ford_qc service configuration |
| 2026-04-16 | Zip naming validation | Suffix changed from _image.zip to _GPAS.zip | Image pack validator, .gitignore, ford_box_config.json |
| 2026-04-16 | Zip naming convention | Suffix changed from _image.zip to _GPAS.zip | .gitignore, ford_box_config.json |
| 2026-04-16 | zip naming validation | New check module creation, profile integration, documentation | checks/zip_filename_check.py, profiles/ford_bnp.json, CLAUDE.md |
| 2026-04-16 | Zip naming validation | New check module creation, profile integration, test validation | checks/zip_filename_check.py, profiles/ford_bnp.json, CLAUDE.md |
| 2026-04-16 | Image pack naming | Zip suffix validation, pack name references | validation.ts, config.ts, constants.ts |
| 2026-03-16 | Configurable pattern | Ranger ptvl pattern via profile JSON | qc_engine.py |

## Related
- [[ford-gechub-sftp/Ford SFTP Transfer]]
