fix(packaging): include pywin32 timezone and verify frozen batch supervisor

This commit is contained in:
阿白叔 committed 2026-10-23 13:57:28 +08:00
1 parent 46bcafd7a3
commit 9c4ccc5bf5
10 files changed
+141 -9

No files matched your search

@@ -117,6 +117,24 @@ def _flush(context: LoggingContext) -> None:
handler.flush()
def _smoke_batch_runtime(data_root: Path, context: LoggingContext) -> None:
"""Exercise process tracking inside the frozen supervisor before releasing."""
from dx_productivity.trial_task_center.batch_runtime import BatchCadRuntime
with BatchCadRuntime(data_root, 'packaged_runtime_smoke') as runtime:
runtime.bind_logs(context, ())
with runtime.native_scope(data_root / 'runtime-smoke') as lease:
command = str(Path(os.environ['SystemRoot']) / 'System32/cmd.exe')
process = lease.start_process((command, '/d', '/c', 'exit', '0'))
if not runtime.record['processes'][0]['creation_time']:
raise RuntimeError('Smoke process identity has no creation time')
if process.wait(timeout=15) != 0:
raise RuntimeError('Smoke worker did not exit successfully')
if runtime.record['state'] != 'released':
raise RuntimeError('Smoke resources were not released')
context.logger.info('packaged_runtime_smoke_passed batch_id=%s', runtime.session_id)
def main(argv: Sequence[str] | None = None) -> int:
"""Run the Qt shell, returning a conventional process status code."""
arguments = _parse_arguments(argv)
@@ -149,6 +167,8 @@ def main(argv: Sequence[str] | None = None) -> int:
try:
database_path = data_root / "task-center.db"
_log_startup(logging_context, data_root, database_path)
if arguments.smoke_test and bool(getattr(sys, 'frozen', False)):
_smoke_batch_runtime(data_root, logging_context)
store = TaskStore(database_path)
service = TaskCenterService(store, logging_context)
qt_application = QApplication([sys.executable, *(argv or ())])
@@ -1 +1 @@
VERSION = "1.1.4-beta.1"
VERSION = "1.1.4-beta.2"