rohitg00/ai-engineering-from-scratch · error · RuntimeError
refused to start: VERIFY_OVERRIDE_SECRET is unset. Set the e
Error message
refused to start: VERIFY_OVERRIDE_SECRET is unset. Set the env var, or pass VERIFY_DEMO_MODE=1 to run the lesson demo only.
What it means
Error "refused to start: VERIFY_OVERRIDE_SECRET is unset. Set the env var, or pass VERIFY_DEMO_MODE=1 to run the lesson demo only." thrown in rohitg00/ai-engineering-from-scratch.
Source
Thrown at phases/14-agent-engineering/38-verification-gates/code/main.py:47
# Audit secret used to sign override entries. In production read from a secrets
# manager. Fail closed: only fall back to a demo secret when VERIFY_DEMO_MODE=1
# is set explicitly, and shout about it so it cannot land in CI by accident.
_OVERRIDE_SECRET_ENV = "VERIFY_OVERRIDE_SECRET"
_DEMO_MODE_ENV = "VERIFY_DEMO_MODE"
def _load_override_secret() -> str:
secret = os.environ.get(_OVERRIDE_SECRET_ENV)
if secret:
return secret
if os.environ.get(_DEMO_MODE_ENV) == "1":
print(
f"WARNING: {_OVERRIDE_SECRET_ENV} unset and {_DEMO_MODE_ENV}=1; "
"using insecure demo secret. Do not record real overrides in this mode.",
file=sys.stderr,
)
return "demo-override-secret-do-not-ship"
raise RuntimeError(
f"refused to start: {_OVERRIDE_SECRET_ENV} is unset. "
f"Set the env var, or pass {_DEMO_MODE_ENV}=1 to run the lesson demo only."
)
@dataclass
class Finding:
code: str
severity: str
detail: str
@dataclass
class Artifacts:
task_id: str
acceptance_commands: list[str]
feedback: list[dict[str, object]]
scope_report: dict[str, object]View on GitHub (pinned to 39ea8a1c6d)
When it happens
Trigger: Thrown at phases/14-agent-engineering/38-verification-gates/code/main.py:47 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of rohitg00/ai-engineering-from-scratch@39ea8a1c6d (2026-08-26).
Data as JSON: /api/errors/0f2442eb7d0c8f8b.
Report an issue: GitHub.