oc_chat
Loading...
Searching...
No Matches
session_postmortem.py File Reference

Go to the source code of this file.

Classes

class  oc_chat.scripts.session_postmortem._UserError
class  oc_chat.scripts.session_postmortem.Finding
class  oc_chat.scripts.session_postmortem.SessionRecord
class  oc_chat.scripts.session_postmortem.Discovery

Namespaces

namespace  oc_chat
namespace  oc_chat.scripts
namespace  oc_chat.scripts.session_postmortem

Functions

str oc_chat.scripts.session_postmortem._excerpt (Any value)
Optional[Any] oc_chat.scripts.session_postmortem._read_json (Path path)
str oc_chat.scripts.session_postmortem._sha256 (Path path)
Optional[Path] oc_chat.scripts.session_postmortem._latest_kind (Path session_dir, str kind)
str oc_chat.scripts.session_postmortem._canonical_args (Any value)
Optional[datetime] oc_chat.scripts.session_postmortem._parse_ts (Any value)
Optional[str] oc_chat.scripts.session_postmortem._first_marker (str text, Sequence[str] markers)
tuple[str,...] oc_chat.scripts.session_postmortem._plan_tokens (str plan_id)
bool oc_chat.scripts.session_postmortem._name_references_plan (str name, str plan_id)
Optional[str] oc_chat.scripts.session_postmortem._match_reason (str plan_id, str dir_name, Optional[dict] meta)
tuple[Path,...] oc_chat.scripts.session_postmortem._event_dirs_for (str name, Optional[dict] meta, Path event_root)
SessionRecord oc_chat.scripts.session_postmortem._record_for_dir (Path session_dir, str reason, Path event_root, Any meta=None, Optional[Path] meta_path=None)
Path oc_chat.scripts.session_postmortem._resolve_explicit (str raw)
Discovery oc_chat.scripts.session_postmortem.discover_sessions (str plan_id, Path sessions_dir, Path event_root, Sequence[str] explicit=())
Optional[dict] oc_chat.scripts.session_postmortem._tool_payload (dict message)
Optional[Finding] oc_chat.scripts.session_postmortem._outcome_finding (str session, str locus, str tool_name, dict payload, str raw)
list[Finding] oc_chat.scripts.session_postmortem._warning_findings (str session, str locus, str tool_name, dict payload)
Optional[str] oc_chat.scripts.session_postmortem._shell_workaround (str tool_name, Any arguments)
list[Finding] oc_chat.scripts.session_postmortem._mine_chat_log (SessionRecord record, list messages)
list[Finding] oc_chat.scripts.session_postmortem._retry_findings (str session, list[tuple[str, str, int]] sequence, str substrate)
str oc_chat.scripts.session_postmortem._event_locus (Any event)
list[Finding] oc_chat.scripts.session_postmortem._mine_events (SessionRecord record, list events, float gap_seconds)
list[Finding] oc_chat.scripts.session_postmortem._gap_findings (str session, list events, float gap_seconds)
list[Finding] oc_chat.scripts.session_postmortem.mine_session (SessionRecord record, float gap_seconds=DEFAULT_GAP_SECONDS)
dict oc_chat.scripts.session_postmortem.build_report (str plan_id, Discovery discovery, float gap_seconds=DEFAULT_GAP_SECONDS)
str oc_chat.scripts.session_postmortem.render_json (dict report)
str oc_chat.scripts.session_postmortem.render_markdown (dict report)
None oc_chat.scripts.session_postmortem._write_atomic (Path path, str text)
tuple[Path, Path] oc_chat.scripts.session_postmortem.emit (dict report, Path out_dir)
Path oc_chat.scripts.session_postmortem.default_out_dir ()
argparse.ArgumentParser oc_chat.scripts.session_postmortem._build_parser ()
Path oc_chat.scripts.session_postmortem._resolve_event_root (Optional[str] raw)
int oc_chat.scripts.session_postmortem.main (Optional[Sequence[str]] argv=None)

Variables

str oc_chat.scripts.session_postmortem.SCHEMA_VERSION = "postmortem/v1"
tuple oc_chat.scripts.session_postmortem.CATEGORIES
dict oc_chat.scripts.session_postmortem.CATEGORY_TITLES
 oc_chat.scripts.session_postmortem.PLAN_ID_RE = re.compile(r"^[0-9]{1,4}[a-z]?$")
int oc_chat.scripts.session_postmortem.EXCERPT_MAX_CHARS = 200
float oc_chat.scripts.session_postmortem.DEFAULT_GAP_SECONDS = 600.0
int oc_chat.scripts.session_postmortem._RETRY_RUN_MIN = 2
 oc_chat.scripts.session_postmortem._OK_OUTCOMES = frozenset({"ok", "success"})
 oc_chat.scripts.session_postmortem._DENY_DECISIONS = frozenset({"deny", "denied", "reject", "rejected"})
tuple oc_chat.scripts.session_postmortem._TRUNCATION_MARKERS
tuple oc_chat.scripts.session_postmortem._DRIFT_MARKERS
tuple oc_chat.scripts.session_postmortem._MISSING_TOOL_MARKERS
dict oc_chat.scripts.session_postmortem._SHELL_WORKAROUND_COMMANDS