← Về thư mục
openai4s/server/scientific_review.py
- scoped_finding_id · function · L47-L70 — def scoped_finding_id(review_run_id: str, fingerprint: str) -> str
- _storage_digest · function · L94-L102 — def _storage_digest(value: Any) -> str
- _durable_snapshot_payload · function · L105-L114 — def _durable_snapshot_payload(snapshot: Mapping[str, Any]) -> dict[str, Any]
- candidate_snapshot_digest · function · L117-L126 — def candidate_snapshot_digest(snapshot: Mapping[str, Any]) -> str
- durable_review_matches · function · L129-L197 — def durable_review_matches( result: Mapping[str, Any], *, candidate_answer: str, root_frame_id: str, branch_id: str, turn_id: str, execution_id: str, gates_completion: bool = True, ) -> bool
- ScientificReviewService · class · L200-L1841 — class ScientificReviewService
- init · method · L203-L216 — def init( self, *, store: Any, config: Any, auto_mode: Any | None = None, chat_call: ChatCall | None = None, owner_instance_id: str = "daemon", ) -> None
- feature_enabled · method · L219-L221 — def feature_enabled(self) -> bool
- storage_enabled · method · L224-L226 — def storage_enabled(self) -> bool
- begin_turn_run · method · L228-L281 — def begin_turn_run( self, *, root_frame_id: str, branch_id: str, turn_id: str, execution_id: str, mode_override: str | None = None, ) -> dict[str, Any] | None
- _start_auto_mode_run · method · L283-L310 — def _start_auto_mode_run( self, *, run_id: str, idempotency_key: str, root_frame_id: str, branch_id: str, turn_id: str, execution_id: str, mode: str, selection: Mapping[str, Any], ) -> dict[str, Any]
- freeze_reviewer_identity · method · L312-L352 — def freeze_reviewer_identity( self, *, agent_cfg: Any, reviewer_cfg: Any, profile: Mapping[str, Any] | None = None, ) -> dict[str, Any]
- inspect_snapshot · method · L354-L598 — def inspect_snapshot(self, snapshot: Mapping[str, Any]) -> list[dict[str, Any]]
- bind_finding_refs · method · L600-L653 — def bind_finding_refs( self, snapshot: Mapping[str, Any], findings: list[dict[str, Any]], ) -> tuple[list[dict[str, Any]], list[dict[str, Any]]]
- evaluate · method · L655-L902 — def evaluate( self, snapshot: Mapping[str, Any], *, result_review_mode: str, agent_cfg: Any, reviewer_cfg: Any, reviewer_profile: Mapping[str, Any] | None = None, chat_call: ChatCall | None = None, allow_same_model: bool = False, cancel: Callable[[], bool] | None = None, run_id: str | None = None, action_group_id: str | None = None, ) -> dict[str, Any]
- _auto_budget · method · L904-L911 — def _auto_budget(self) -> AutoBudgetAdmission | None
- _budget_terminal · method · L913-L936 — def _budget_terminal( self, frozen: Mapping[str, Any], identity: Mapping[str, Any], findings: list[dict[str, Any]], reason: str, *, attempts: int, ) -> dict[str, Any]
- shadow_after_turn · method · L938-L1106 — def shadow_after_turn( self, *, root_frame_id: str, project_id: str, branch_id: str, turn_id: str, execution_id: str, user_request: str, candidate_answer: str, structured_completion: Any = None, artifact_versions_before: Mapping[str, Any] | None = None, produced_artifacts: list[Mapping[str, Any]] | None = None, cell_count_before: int = 0, step_count_before: int = 0, agent_cfg: Any, reviewer_cfg: Any, emit: EventSink | None = None, workspace: str | None = None, artifact_paths: Mapping[str, str] | None = None, mode_override: str | None = None, gates_completion: bool = False, round_index: int = 0, cancel: Callable[[], bool] | None = None, ) -> dict[str, Any] | None
- _cancel_requested · method · L1109-L1115 — def _cancel_requested(cancel: Callable[[], bool] | None) -> bool
- persist_review_result · method · L1117-L1233 — def persist_review_result( self, *, root_frame_id: str, project_id: str, branch_id: str, turn_id: str, execution_id: str, mode_override: str, result: Mapping[str, Any], round_index: int, gates_completion: bool = True, emit: EventSink | None = None, ) -> dict[str, Any]
- _selection_for_review · method · L1235-L1277 — def _selection_for_review( self, root_frame_id: str, *, mode_override: str | None, fail_closed: bool = False, ) -> tuple[str, dict[str, Any]]
- _reviewer_profile · method · L1279-L1293 — def _reviewer_profile(self, reviewer_cfg: Any) -> Mapping[str, Any] | None
- _unavailable_result · method · L1296-L1316 — def _unavailable_result( snapshot: Mapping[str, Any], reviewer: Mapping[str, Any], *, reason: str, summary: str, gates_completion: bool, ) -> dict[str, Any]
- _optional_scratch_recheck · method · L1318-L1345 — def _optional_scratch_recheck( self, result: dict[str, Any], *, workspace: str | None, artifact_paths: Mapping[str, str] | None, ) -> None
- _persist_review_step_safely · method · L1347-L1363 — def _persist_review_step_safely( self, root_frame_id: str, result: Mapping[str, Any], *, emit: EventSink | None, gates_completion: bool, ) -> None
- _persist_review_step · method · L1365-L1424 — def _persist_review_step( self, root_frame_id: str, result: Mapping[str, Any], *, emit: EventSink | None, gates_completion: bool, ) -> None
- open_review_run · method · L1426-L1544 — def open_review_run( self, *, root_frame_id: str, project_id: str, branch_id: str, turn_id: str, execution_id: str, mode: str, selection: Mapping[str, Any], snapshot: Mapping[str, Any], reviewer: Mapping[str, Any], gates_completion: bool = False, round_index: int = 0, ) -> dict[str, Any]
- _review_binding · method · L1546-L1597 — def _review_binding( self, *, root_frame_id: str, branch_id: str, turn_id: str, execution_id: str, mode: str, snapshot: Mapping[str, Any], gates_completion: bool, round_index: int, ) -> dict[str, Any]
- _empty_durable_proof · method · L1599-L1621 — def _empty_durable_proof( self, *, root_frame_id: str, branch_id: str, turn_id: str, execution_id: str, mode: str, snapshot: Mapping[str, Any], gates_completion: bool, round_index: int, ) -> dict[str, Any]
- _proof_from_handle · method · L1624-L1659 — def _proof_from_handle( handle: Mapping[str, Any], *, opened: bool, closed: bool, close_transition: Mapping[str, Any] | None = None, ) -> dict[str, Any]
- _bind_finding_identities · method · L1661-L1699 — def _bind_finding_identities( self, review_run_id: str, result: Mapping[str, Any] ) -> list[dict[str, Any]]
- close_review_run · method · L1701-L1746 — def close_review_run( self, handle: Mapping[str, Any], result: Mapping[str, Any], *, gates_completion: bool = False, ) -> dict[str, Any]
- _close_review_safely · method · L1748-L1808 — def _close_review_safely( self, handle: Mapping[str, Any], result: Mapping[str, Any], *, gates_completion: bool, ) -> tuple[dict[str, Any], dict[str, Any]]
- _finding · method · L1811-L1841 — def _finding( *, severity: str, category: str, claim_ref: str, evidence_refs: list[str], reproduction: str, suggested_fix: str = "", confidence: float = 1.0, ) -> dict[str, Any]: # Severity is part of the identity. Without it two findings that share # a category and claim collapse to one, and the first-wins dedup then # keeps whichever arrived first -- so a
low nit could evict the high # finding about the same claim, taking it out of material and out of # repair entirely.