21 KiB
| name | client | status | tech | local_path | deploy | url | server | tags | created | last_commit | commits | service | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Ford QC System | Ford | active |
|
/Users/ai_leed/Documents/Projects/Oliver/ford_qc | sudo systemctl start ford-qc-hotfolder.service | box-cli-01 |
|
2026-04-14 | 2026-04-29 | 23 | ford-qc-hotfolder.service |
Overview
Ford BnP QC is a comprehensive quality control system for Ford Build and Price (BnP) asset packs containing automotive imagery, metadata, and configuration files. It validates that asset packs meet Ford's quality standards before deployment to customer-facing applications. The system features 13 specialized validation checks, automated Box cloud folder integration for production processing, and rich Bootstrap-styled HTML reporting with detailed error guidance.
Tech Stack
- Frontend: HTML/Bootstrap (static HTML reports)
- Backend: Python 3
- Database: N/A (file-based, JSON results)
- Infrastructure: systemd service daemon
- AI/ML: N/A
- Key libraries: Box SDK 3.13.0, Pillow 11.1.0, python-dotenv, systemd-python
Architecture
The system comprises four main layers:
1. QC Engine (qc_engine.py)
- CLI script accepting JSON profile configurations and input zip files
- Loads and executes defined checks in sequence with comprehensive error handling
- Outputs JSON results that feed into reporting
2. QC Module (qc_module.py)
- Reusable Python module exposing
run_qc_checks()andrun_qc_profile()functions - Enhanced module import and check execution error handling
- Used by both CLI and Box hotfolder daemon
3. Box Hotfolder Daemon (ford_qc_box_hotfolder_process.py)
- Production service monitoring Box folder 332861865120 for new asset zip files
- Downloads files, processes through QC system, uploads JSON+HTML reports to folder 332864939558
- Moves successfully processed files to folder 332861653811 with MD5 stamps
- Implements file locking, graceful shutdown, and comprehensive logging
- Runs as systemd service
ford-qc-hotfolder.service
4. Check Modules (13 total in checks/ directory)
zip_filename_check: Validates filename ends with_GPAS.zipunzip_and_verify_check: Unzips packs, verifies linkingrecord.json existscolour_existence_check: Validates color chip files present and accessiblemissing_images_check: Cross-references linkingrecord.json with actual filesspecial_requirements_mec_bau: Validates MEC vs BAU requirement compliancemec_powertrain_validation: Validates powertrain configs for MEC packslifestyle_inventory_validation: Validates lifestyle inventory consistencyimage_resolution_check: Validates image dimensions per Ford specsimage_format_check: Validates PNG/JPG/AVIF formats by viewtypeexterior_interior_pairing_check: Validates angle/variant pairingslinkingrecord_header_validation: Validates linkingrecord.json headerscarousel_image_check: Validates carousel image requirementsbase_assets_file_type_check: Validates base asset file types
Data Flow:
Box Cloud Source ──[monitor]──> Hotfolder Daemon ──[zip]──> QC Engine
│
├─> Execute 13 Checks
│
└─> JSON Results ──> HTML Reporter
│
Upload to Box Reports Folder
Move to Box Processed Folder
Dev Commands
# Run QC checks on local asset pack (primary CLI usage)
python qc_engine.py profiles/ford_bnp.json --input_file path/to/asset_pack.zip --reports_dir reports
# Generate HTML report from JSON results
python -m checks.html_reporter results.json output_directory/
# Generate HTML error report
python -m checks.html_error_reporter <error_type> <filename> output_directory/
# Test individual check module
python -c "from checks.image_format_check import run_check; print(run_check({'working_dir': 'working'}))"
# Test Box hotfolder process (manual execution)
python ford_qc_box_hotfolder_process.py
# Start production service
sudo systemctl start ford-qc-hotfolder.service
# Check service status
sudo systemctl status ford-qc-hotfolder.service
# View live service logs
sudo journalctl -u ford-qc-hotfolder.service -f
# View logs from past hour
sudo journalctl -u ford-qc-hotfolder.service --since "1 hour ago"
Deployment
- Server: box-cli-01
- Deploy:
sudo systemctl start ford-qc-hotfolder.service(orsudo systemctl restartto reload) - URL: N/A (backend daemon, no web interface)
- Port: N/A
- Service:
ford-qc-hotfolder.service(systemd unit) - Local path: /Users/ai_leed/Documents/Projects/Oliver/ford_qc
- Production path: /home/box-cli/FORD_SCRIPTS/ford_qc_git_dev/ford_qc
Service Setup:
- Copy
ford-qc-hotfolder.serviceto/etc/systemd/system/ - Run
sudo systemctl daemon-reload - Enable with
sudo systemctl enable ford-qc-hotfolder.service - Start with
sudo systemctl start ford-qc-hotfolder.service
Environment Variables
Configuration via .env.prod or .env.dev (copy from .env.example):
Environment:
FORD_QC_ENV— "production" or "development"LOG_LEVEL— Logging verbosity (DEBUG, INFO, WARNING, ERROR, CRITICAL)
Box Cloud Integration:
BOX_SOURCE_FOLDER_ID— Folder monitored for incoming asset zips (332861865120)BOX_REPORT_FOLDER_ID— Where QC reports uploaded (332864939558)BOX_PROCESSED_FOLDER_ID— Where successfully processed files moved (332861653811)BOX_CONFIG_FILE— Path to Box JWT config JSONBOX_CONNECTION_TIMEOUT— Seconds to wait for Box connection (default: 30)BOX_READ_TIMEOUT— Seconds to wait for Box API response (default: 90)
File Paths:
FORD_QC_SCRIPT_DIR— Base QC system directory (auto-detected if unset)DOWNLOAD_PATH— Temp directory for Box downloads (relative or absolute)WORKING_DIR— Directory for file extraction (relative or absolute)QC_PROFILE_PATH— Path to QC profile JSON (relative or absolute)FALLBACK_WORKING_DIR— Fallback working directory if primary unavailable
Resilience:
MAX_RETRIES— Max retry attempts for failed Box operations (default: 3)RETRY_BACKOFF_BASE— Exponential backoff base in seconds (default: 2 → 2s, 4s, 8s...)WATCHDOG_INTERVAL— Seconds between systemd watchdog notifications (default: 30)
Known Issues
- Recent commit (eb3da2c) addresses exterior/interior pairing check with variant-signature approach for angle 21
- Previous issues resolved: authentication/timeout fixes (commits 77cb669, 6209d28), Box SDK version upgrade (a095419), path relocation (be9700f)
- Service requires user
box-cliwith proper directory permissions; usesudo chown -R box-cli:box-cli /path/to/directoryif permission issues occur - Fallback working directory required in case primary cannot be created
Git
- Remote: git@bitbucket.org:zlalani/ford_qc.git
- Last commit: eb3da2c — Fix exterior/interior pairing check: variant-signature approach, angle 21
- Key recent improvements: Ranger/CV series permutation support, ABM-only validation, linkingrecord header validation, asset count summaries in reports, GPAS naming convention enforcement
Timeline / Git History
| Date | Change |
|---|---|
| 2026-04-29 | Add linkingrecord header validation check |
| 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-29 – Verify series image counts using SE#
Asked: Verify series image counts using SE# and ABM codes, accounting for SIPS variations. Done: Removed incorrect images and links for ambl2se#r1, verified all 20/20 tests pass, committed, pushed, and deployed to dev.
2026-04-29 – Check series image accounting using SE#
Asked: Check series image accounting using SE# and ABM WERS codes to verify all series are covered. Done: Identified and removed duplicate ambl2se#r1 image linking while retaining series image; restarted ford-qc-hotfolder.service dev environment.
2026-04-29 – Implement a check to validate series
Asked: Implement a check to validate series images using SE# and ABM codes to ensure all series are accounted for. Done: Rewrote check_series_permutations.py with autodetection logic to identify orphan series carousel entries lacking backing images.
2026-04-29 – Check that all series images are
Asked: Check that all series images are accounted for using SE# and ABM WERS codes combination. Done: Implemented series permutation check that detects orphan carousel entries missing backing images and validates SE# and ABM code combinations.
2026-04-29 – Check which commit contains the Ford
Asked: Check which commit contains the Ford image pack naming feature and deploy it to production. Done: Deployed zip filename validation check to production and identified service is running from different path requiring file sync.
2026-04-29 – Asked | Rename image pack files
Asked: Asked | Rename image pack files to end with _GPAS.zip instead of _image.zip to support Ford's 3rd party checker | ford_bnp.json Done: Done | Updated ford_bnp.json to add zip format validation requiring _GPAS.zip suffix | ford_bnp.json
2026-04-29 – Identify which commit introduced the image
Asked: Identify which commit introduced the image pack naming requirement change and apply it to production. Done: Located two files to deploy from commit 16bbd98 — the new zip filename validation check and updated Ford profile configuration.
2026-04-29 – Check which commit contains the image
Asked: Check which commit contains the image pack naming feature and deploy it to production. Done: Identified commit 16bbd98 on origin/main with deployment command ready for the production server.
2026-04-29 – Find the commit implementing the GPAS
Asked: Find the commit implementing the GPAS zip filename naming convention and prepare it for production deployment.
Done: Located commit 16bbd98 with the GPAS naming check; clarified deployment path requires server-side git pull and service restart on box-cli-01.
2026-04-29 – Asked | Done | Log
Asked: Asked | Done | Log Done: Add validation checks for linking record top section fields | Implemented format validation for market (3 alphabetic chars), model (dynamic list), year (YYY format), and header fields | LinkingRecord.ts, ValidationRules.ts
2026-04-29 – Add validation checks for linking record
Asked: Add validation checks for linking record data format fields | Implemented format validation for market (3 letters), year (YYY), and model fields with allowlist checking | LinkingRecord.ts, ValidationSchema.ts Done: Pushed code to git and deployed to dev server | Changes committed, pushed to repository, and deployed to development server | deployment scripts executed
2026-04-29 – Add validation checks for linking record
Asked: Add validation checks for linking record top section fields (market, model, year, fullLoad, header). Done: Implemented format validation for market (3-letter codes), model (dynamic list), and year (YYY format) with smoke tests confirming module imports and runs without errors.
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-29 | Obsidian project docs enrichment | Added session tracking, deployment details, stack info, URLs, and change history to project notes | project-notes.ts, obsidian-sync.ts, project-enrichment.ts |
| 2026-04-29 | Series image verification | Removed images/links for ambl2se#r1, verified test results, committed and deployed | Image assets, test configuration, deployment config |
| 2026-04-29 | Series image validation | Removed duplicate ambl2se#r1 linking, restarted service | Image linking config, ford-qc-hotfolder.service |
| 2026-04-29 | Series image validation | Added _autodetect_mode() function, orphan detection logic | checks/check_series_permutations.py |
| 2026-04-29 | Series validation check | Added orphan detection for carousel entries, implemented SE#/ABM mode autodetection | checks/check_series_permutations.py |
| 2026-04-29 | Image pack naming validation | Added zip_filename_check to Ford profile, copied check script to prod | checks/zip_filename_check.py, profiles/ford_bnp.json |
| 2026-04-29 | Log | Image pack naming convention | Added _GPAS.zip validation check, reordered validation rules |
| 2026-04-29 | Image pack naming update | Added _GPAS.zip validation check, Updated Ford profile with new validation rule | checks/zip_filename_check.py, profiles/ford_bnp.json |
| 2026-04-29 | Image pack naming | Updated naming format from _image.zip to _GPAS.zip, added validation check | FORD_ASSET_PACK_QC_DEV service |
| 2026-04-29 | GPAS filename validation | Added _GPAS.zip naming check, removed _image.zip legacy support | Image pack validator, deployment config |
| 2026-04-29 | Pushed code to Git and deployed to dev server | Committed 3 files to main branch (5abd481) and restarted ford-qc-hotfolder service on dev with successful git pull | ford_qc_git_dev/ford_qc, service config |
| 2026-04-29 | Linking record validation | market length/alphabet check, year format check, model allowlist validation | LinkingRecord.ts, ValidationSchema.ts |
| 2026-04-29 | Validation checks | Added market/model/year format validation, removed obsolete function | unzip_and_verify_check.py, linking_record_validator.py |
| 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 |