INNER CODE UNIT · Python

durable_for_review

yashab-cyber/HackGpt · workbench/server.py:27

def durable_for_review(report):
    """Legacy finalized rows remain reviewable; explicit memory-only results do not."""
    durability = report.get("durability") if isinstance(report, dict) else None
    return not isinstance(durability, dict) or durability.get("status") == "durable"


class Store:
    """SQLite report store with a separate checkpoint table for in-flight work."""

    def __init__(self, directory):
        directory = Path(directory)
        directory.mkdir(parents=True, exist_ok=True, mode=0o700)
        self.path = directory / "reports.sqlite3"
        with closing(sqlite3.connect(self.path)) as connection:
            connection.execute(
                "CREATE TABLE IF NOT EXISTS reports (id TEXT PRIMARY KEY, started TEXT NOT NULL, content TEXT NOT NULL)"
            )
            connection.execute(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…