3 Commits
Author SHA1 Message Date
Brett Williams f73a5bbb2f Fix disappearing artifacts and guard against empty builds
The agent's background build threads called jsonify()/send_file() with no
Flask app context, so after a successful build they crashed with
'Working outside of application context', which triggered the error
handler that rmtree'd the whole build dir before the controller could
download the artifact. Wrap both runners in app.app_context().

Also guard all three layers against empty results: the agent refuses to
report success or serve a zip when dist/ has no files, and the scheduler
flags a downloaded empty zip as a failure rather than marking the job
done.
2026-08-31 10:07:04 -05:00
Brett Williams 1faa544ead Make async git checkout return immediately
Once the job is dispatched the agent cloned synchronously even with
async=1, so a slow clone blew past the controller's 5s dispatch timeout
and the job was marked failed while the worker kept building. Run the
clone in the background thread and return 202 + job id right away.
2026-08-31 00:46:36 -05:00
Brett Williams 59fb7739e4 Rename worker package cross_py_builder -> agent
The nested cross_py_builder package only contains the worker agent. Rename
it to agent/ to match its role and distinguish it from the ctrl package and
the PyPI distribution name. Internal imports are relative, so build_agent.py
and zeroconf_server.py are unaffected except for the cosmetic APP_NAME banner.
2026-08-30 22:01:54 -05:00