build_worker.py
Source file: wordpress/hslg-presentation/worker/build_worker.py
Module: wordpress-hslg-presentation
Size: 268 lines
SHA-256: a2ecd65b5e39d6fadc2ad973f53b851cc20b9edbd98a2f96efe453c5eef3dbcc
Responsibility
Embeds a browser-only demonstration of the shared UI. Never belongs to a native APK.
Declared entry points
stamp— source line 33.sha— source line 34.jsonfile— source line 41.wp— source line 52.env_from_setup— source line 62.safe_unzip— source line 81.fix_android_manifest— source line 105.make_debug_zip— source line 129.run_job— source line 145.say— source line 156.phase— source line 158.command— source line 162.main— source line 249.
Imports and dependencies
- Line 8:
import hashlib - Line 9:
import json - Line 10:
import os - Line 11:
import pathlib - Line 12:
import pwd - Line 13:
import re - Line 14:
import shutil - Line 15:
import subprocess - Line 16:
import sys - Line 17:
import time - Line 18:
import traceback - Line 19:
import zipfile - Line 20:
import fcntl - Line 115:
import copy - Line 120:
import copy
Behaviour and audit locations
- Line 30:
TIMEOUTS = {'install': 900, 'stage': 240, 'vite': 240, 'capacitor': 180, 'gradle': 1200} - Line 112:
if child.tag in ('uses-permission', 'uses-feature'): - Line 190:
phase('Installing pinned Capacitor and Vite dependencies', 20) - Line 194:
phase('Bundling the real Capacitor mobile entry', 55) - Line 205:
command(['pnpm','exec','cap','add','android'], mobile, env, TIMEOUTS['capacitor']) - Line 207:
if not varsfile.is_file(): raise RuntimeError('Capacitor did not create variables.gradle') - Line 213:
command(['pnpm','exec','cap','sync','android'],mobile,env,TIMEOUTS['capacitor'])
Relationship to the system
This page is the file-level source reference, not the architecture rationale. Read the module explanation, the corresponding architecture decision and user guide before changing behaviour. Names and line locations above are extracted from this exact source version; they are reference points, not proof that an external service or a phone feature works.
Change verification
Review the entry points and errors in this file, then run the module’s associated tests, source dependency gate, history gate and documentation coverage check. If the file changes an API response, user interaction, data model, deployment or third-party dependency, revise those human explanations and disaster recovery/licensing when relevant. Do not infer actual native or external API operation from source presence.