MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / create_selfcheck_run

Function create_selfcheck_run

src/core/system_selfcheck.py:647–661  ·  view source on GitHub ↗
(mode: str = "quick", source: str = "manual")

Source from the content-addressed store, hash-verified

645
646
647def create_selfcheck_run(mode: str = "quick", source: str = "manual") -> Dict[str, Any]:
648 mode_text = "full" if str(mode or "").strip().lower() == "full" else "quick"
649 source_text = str(source or "manual").strip().lower() or "manual"
650 with get_db() as db:
651 run = SelfCheckRun(
652 run_uuid=str(uuid.uuid4()),
653 mode=mode_text,
654 source=source_text,
655 status=RUN_STATUS_PENDING,
656 result_data={"checks": [], "repairs": [], "progress": {"completed": 0, "total": 0}},
657 )
658 db.add(run)
659 db.commit()
660 db.refresh(run)
661 return _serialize_run(run)
662
663
664def has_running_selfcheck_run() -> bool:

Callers 3

_execute_onceMethod · 0.85
api_start_selfcheck_runFunction · 0.85

Calls 3

get_dbFunction · 0.85
SelfCheckRunClass · 0.85
_serialize_runFunction · 0.85

Tested by

no test coverage detected