Administrative exchange for unstructured Bucket B rows in
pd_name_cleanup_staging (status = ai_ready AND
bucket = bucket_b). Export writes those rows, with the live
brand, model, and MPN, into JSON files a Grok session can read. Import reads
the completed files, applies a 70-character title guard, and writes the
proposal back onto the same product_id + language_id
row. Export files are grok_batch_001.json and count upward, with
at most 250 records each. Import reads only grok_batch_*_done.json.
A file that is not valid JSON is logged and skipped. A file that commits is
moved into cleanup_scratchpad/archive/. The import sets
status to ai_completed. Titles of 70 characters or
fewer stay unflagged. Longer titles are stored with
is_flagged = 1 and flag_reason = AI_TITLE_EXCEEDS_70_CHARS.
Only ai_ready and ai_completed rows can change.
original_name and original_description are never assigned.
This phase does not change oc_product or oc_product_description.
Work through these five steps in order. You do not need to edit code or open the database.
grok_batch_*.json files locally.
grok_batch_XXX_done.json.
*_done.json files into Module B and click Upload *_done.json Files.
action=export_batches, action=upload_done, and action=import_done run the same engines. CLI still uses --action=export or --action=import.php productNameCleanup_phase3_batch.php --action=export or --action=import from the fsadmin directory. With no --action, the CLI asks for one. JSON clients send format=json or the XMLHttpRequest header. Those callers skip navigation./home/opencart/public_html/fsadmin/cleanup_scratchpad/. The directory is created at mode 0755 when it is missing. Files written by this page, and files received through the upload form, belong to the web server user and are stored at mode 0644. Apache is denied direct access. Download links stream the files through this script.status = ai_ready and bucket = bucket_b, joins oc_product for model and MPN, and left-joins oc_manufacturer for the brand. A missing manufacturer does not drop the row.grok_batch_###.json files are still in the scratchpad. Move them aside, or finish them and save the replies as grok_batch_###_done.json, before exporting again.product_id and language_id. Rows at passed_audit, committed, or any status other than ai_ready or ai_completed are not overwritten.char_count_proposed keeps the real length, up to 65,535, and the row is flagged because it is also over 70 characters.4,100
Waiting for export. bucket_b, status = ai_ready
18
Generated JSON files available for download
0
Uploaded *_done.json files waiting for import
499
bucket_b, status = ai_completed
Writes ai_ready / bucket_b rows into 250-item JSON files. Each file tells Grok 4.7 High that proposed_name must be strictly 70 characters or fewer.
Accepts one or more grok_batch_*_done.json files and stores them in the scratchpad with move_uploaded_file().
Reads every waiting grok_batch_*_done.json file, applies the 70-character shield, and updates pd_name_cleanup_staging inside a transaction. Committed files move to archive/.
| Metric | Value |
|---|---|
| Database | opencart_fsreal_oc3 |
| Batches created | 0 |
| Records written | 0 |
| Done files found | 0 |
| Files processed | 0 |
| Files skipped | 0 |
| Successful DB updates | 0 |
| Flagged over-length records | 0 |
| Flagged titles in bucket_b | 0 |
| Rows left unchanged | 0 |
| Invalid result rows | 0 |
| Files uploaded | 0 |
| Files rejected | 0 |
| Unfinished export files | 18 |
| Completed files waiting | 0 |
| Archived files | 1 |
| Execution time | 0.158 seconds |
| Memory usage | 2.00 MB |
| File | Kind | Bytes | Modified | Download |
|---|---|---|---|---|
| grok_batch_001.json | Export | 747,043 | 2026-10-01 18:24:35 | Download |
| grok_batch_002.json | Export | 436,185 | 2026-10-01 18:24:35 | Download |
| grok_batch_003.json | Export | 273,507 | 2026-10-01 18:24:35 | Download |
| grok_batch_004.json | Export | 322,471 | 2026-10-01 18:24:35 | Download |
| grok_batch_005.json | Export | 287,449 | 2026-10-01 18:24:35 | Download |
| grok_batch_006.json | Export | 264,337 | 2026-10-01 18:24:35 | Download |
| grok_batch_007.json | Export | 277,576 | 2026-10-01 18:24:35 | Download |
| grok_batch_008.json | Export | 275,682 | 2026-10-01 18:24:35 | Download |
| grok_batch_009.json | Export | 273,961 | 2026-10-01 18:24:35 | Download |
| grok_batch_010.json | Export | 279,248 | 2026-10-01 18:24:35 | Download |
| grok_batch_011.json | Export | 262,691 | 2026-10-01 18:24:35 | Download |
| grok_batch_012.json | Export | 266,923 | 2026-10-01 18:24:35 | Download |
| grok_batch_013.json | Export | 279,920 | 2026-10-01 18:24:35 | Download |
| grok_batch_014.json | Export | 274,200 | 2026-10-01 18:24:35 | Download |
| grok_batch_015.json | Export | 275,182 | 2026-10-01 18:24:35 | Download |
| grok_batch_016.json | Export | 252,232 | 2026-10-01 18:24:35 | Download |
| grok_batch_017.json | Export | 194,250 | 2026-10-01 18:24:35 | Download |
| grok_batch_018.json | Export | 173,802 | 2026-10-01 18:24:35 | Download |