This document defines the supported production surface, the developer-only surface, and the minimum monitoring and incident expectations for Geno.
Support Matrix
Production-supported surfaces:
- Geno parsing, type checking, and interpretation through
geno.check()andgeno.run() - The deploy-facing monitoring contract in
geno.monitoringandRunConfig(monitoring_hook=...) - Capability gating and host callback installation in
geno/api.py - Geno sandbox enforcement in
geno/sandbox.py - Module resolution through
RunConfig(modules=...) - The release gate
make release-check
Developer-only surfaces:
- Benchmark execution of raw Python solutions in
benchmark/runner.py - Experiment orchestration in
experiment/ - Offline result analysis and report generation in
analysis/ - Utility scripts in
scripts/other than the release gate inputs
Developer-only means useful, tested, and maintained, but not a promised production security boundary or public compatibility target.
Metrics
Hosted execution should emit at least these counters or rates. The supported in-process contract is:
from geno import RunConfig, RuntimeMetricsCollector, run
collector = RuntimeMetricsCollector(service="geno-api", revision="build-sha")
result = run(source, config=RunConfig(monitoring_hook=collector.record))
health_payload = collector.health_report().to_dict()
metrics_payload = collector.snapshot().to_dict()
prometheus_text = collector.snapshot().to_prometheus_text()
The hook receives a normalized RunMetrics payload on every geno.run() exit path, including lex/parse/type failures, timeouts, capability denials, and runtime errors. Monitoring hooks are best-effort: if the hook raises, geno.run() still returns its original result and emits a runtime warning instead of changing execution behavior.
Minimum counters or rates:
- Total runs
- Successful runs
- Syntax/parse error rate
- Type error rate
- Runtime error rate
- Timeout rate
- Capability denied rate
- Host callback missing rate
- Average wall-clock execution time
- Average step count if step budgets are enabled
If benchmark validation is part of a release or nightly job, also track:
- Benchmark validation success/failure
- Canonical benchmark pass rate
- Number of benchmark problems with issues
The built-in collector exposes these names in Prometheus-friendly form:
geno_http_post_requests_totalgeno_http_post_requests_by_endpoint_totalgeno_http_post_requests_by_status_totalgeno_http_post_requests_by_outcome_totalgeno_run_requests_totalgeno_run_success_totalgeno_run_syntax_error_totalgeno_run_type_error_totalgeno_run_runtime_error_totalgeno_run_timeout_totalgeno_run_capability_denied_totalgeno_run_host_callback_missing_totalgeno_run_security_violation_totalgeno_run_resource_limit_totalgeno_run_wall_time_ms_totalgeno_run_wall_time_ms_averagegeno_run_steps_totalgeno_run_steps_averagegeno_constrain_requests_totalgeno_constrain_valid_totalgeno_constrain_invalid_totalgeno_constrain_timeout_totalgeno_constrain_wall_time_ms_totalgeno_constrain_wall_time_ms_averagegeno_benchmark_validation_totalgeno_benchmark_validation_failures_total
When you run the packaged hosted server, the HTTP metrics cover handled /run and /constrain requests, including auth, rate-limit, bad-request, and concurrency rejects. The execution metrics cover geno.run() results plus /constrain evaluations that reach constraint checking. RunConfig(monitoring_hook=...) remains the supported per-run hook for geno.run() itself.
For a minimal stdlib HTTP adapter that exposes /healthz, /metrics, and a sample /run endpoint, see examples/monitoring_http_adapter.py.
The packaged deployment entry point is server.py, which is exposed as python -m geno serve and geno-serve.
Alert Thresholds
Use these minimum thresholds unless a deployment has stricter requirements:
- Timeout rate
> 1%for 15 minutes: warning - Timeout rate
> 5%for 15 minutes: page - Runtime error rate
> 3%for 15 minutes without a known rollout: warning - Runtime error rate
> 10%for 15 minutes: page - Host callback missing count
> 0after a release: page - Capability denied spikes that exceed the trailing 7-day baseline by
3x: investigate - Benchmark validation failure on
main: block release - Canonical benchmark pass rate below
100%on the release gate: block release
Incident Severity
P0: sandbox escape, capability bypass, or confirmed arbitrary host accessP1: release gate broken onmain, widespread timeout spike, or host callback failures in productionP2: elevated runtime/type/parse failures with a workaround availableP3: documentation drift or developer-only tooling regressions
Triage Procedure
- Record the failing commit SHA, environment, and first observed time.
- Classify the incident severity.
- Decide between rollback and hotfix using
docs/operations/release-runbook.md. - Preserve failing inputs, diagnostics, and benchmark reports.
- Add a regression test before closing the incident when the failure was code-related.
Ownership Expectations
- Every release has one explicit release owner.
- Every production incident has one explicit incident owner.
- Security-sensitive findings are tracked against the runtime owners, not deferred to benchmark or analysis tooling owners.
Benchmark Failure Expectations
Treat a failing scripts/validate_benchmark.py run as a release-blocking correctness issue. A failure means at least one of the following is true:
- a benchmark spec is malformed
- a canonical solution no longer matches the runtime or typechecker
- a runtime or builtin regression broke benchmark execution
- the benchmark schema and evaluator disagree about value encoding
Do not publish benchmark-derived claims from a commit that fails validation.
Rendered from docs/operations/monitoring-and-support.md in the Geno repository.