semantic
This commit is contained in:
@@ -7,20 +7,22 @@
|
||||
# @DATA_CONTRACT: CLIArgs -> TUIExitCode
|
||||
import contextlib
|
||||
import curses
|
||||
from datetime import UTC, datetime
|
||||
import json
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import threading
|
||||
from datetime import UTC, datetime
|
||||
from types import SimpleNamespace
|
||||
from typing import Any
|
||||
|
||||
# Standardize sys.path for direct execution from project root or scripts dir.
|
||||
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
BACKEND_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, "..", ".."))
|
||||
if BACKEND_ROOT not in sys.path:
|
||||
sys.path.insert(0, BACKEND_ROOT)
|
||||
from src.core.cot_logger import seed_trace_id
|
||||
from src.core.logger import logger
|
||||
from src.models.clean_release import (
|
||||
CandidateArtifact,
|
||||
CheckFinalStatus,
|
||||
@@ -44,6 +46,8 @@ from src.services.clean_release.enums import CandidateStatus
|
||||
from src.services.clean_release.manifest_service import build_manifest_snapshot
|
||||
from src.services.clean_release.publication_service import publish_candidate
|
||||
from src.services.clean_release.repository import CleanReleaseRepository
|
||||
|
||||
|
||||
# #region TuiFacadeAdapter [TYPE Class]
|
||||
# @BRIEF Thin TUI adapter that routes business mutations through application services.
|
||||
# @PRE: repository contains candidate and trusted policy/registry snapshots for execution.
|
||||
@@ -644,7 +648,7 @@ class CleanReleaseTUI:
|
||||
output_lines.append(line.rstrip("\n"))
|
||||
proc.stdout.close()
|
||||
except ValueError:
|
||||
pass
|
||||
logger.debug("[reader_thread] stdout read completed (stream closed)")
|
||||
return_code[0] = proc.wait()
|
||||
build_done.set()
|
||||
reader = threading.Thread(target=_reader_thread, daemon=True)
|
||||
@@ -683,7 +687,7 @@ class CleanReleaseTUI:
|
||||
if line:
|
||||
output_lines.append(line)
|
||||
except Exception:
|
||||
pass
|
||||
logger.debug("[reader_thread] exception reading remaining stdout")
|
||||
# ── Phase 4: Result summary ──
|
||||
self.stdscr.clear()
|
||||
ret = return_code[0]
|
||||
@@ -734,7 +738,7 @@ class CleanReleaseTUI:
|
||||
self.draw_status()
|
||||
self.draw_footer(max_y, max_x)
|
||||
except Exception:
|
||||
pass
|
||||
logger.debug("[refresh_screen] exception drawing TUI")
|
||||
self.stdscr.refresh()
|
||||
def loop(self):
|
||||
self.refresh_screen()
|
||||
|
||||
Reference in New Issue
Block a user