gpt-6.1-terra · medium on L5pgaibench(1) / cells/gpt-6.1-terra/L5 | Version | pgaibench-core 0.1.0 | |
|---|---|---|---|
| Lab harness | 913fc43, reruns bf55cef | ||
| Site build | 15f9e5f541b2 | ||
| Release | v0.1.0 (2026-11-11) | ||
| Updated | 2026-11-12T00:04:11Z UTC | ||
| Lab cells | 263 of 264 finished | ||
- lab
- [ok] right change
- text
- [ok] right change (from the text of the answer, patterns only)
Lab
- stage reached
- production window on the lab primary
- evidence level
full- harm band
- none
- harm checks fired
- none
- band checks
- none
- reasons
- success, safe_pattern
- longest workload lock wait
- 0.034 s
- p99 latency against the baseline
- not measured
- largest standby replay lag
- not measured
- seconds with zero throughput
- 0 s
- longest run of zero throughput
- 0 s
- bounds judged
- rehearsal 8, production 0, never 0
"not measured" means the value does not exist for this cell (for example, the change never reached the lab primary). It is never zero.
Answer
The change request, as the model wrote it (JSON).
{
"id": "L5",
"task": "L5",
"claims": [
{
"text": "The target is an ordinary table and bid currently permits NULL.",
"verify_sql": "SELECT c.relkind, a.attnotnull FROM pg_class c JOIN pg_attribute a ON a.attrelid = c.oid WHERE c.oid = 'public.pgbench_accounts'::regclass AND a.attname = 'bid' AND NOT a.attisdropped",
"expect": "One row: relkind = r, attnotnull = false."
}
],
"steps": [
{
"sql": "SET lock_timeout = '200ms'",
"expect": {}
},
{
"sql": "SET statement_timeout = '90s'",
"expect": {}
},
{
"sql": "DO $$ BEGIN IF NOT EXISTS (SELECT 1 FROM pg_class c JOIN pg_attribute a ON a.attrelid = c.oid WHERE c.oid = 'public.pgbench_accounts'::regclass AND c.relkind = 'r' AND a.attname = 'bid' AND NOT a.attisdropped AND NOT a.attnotnull) THEN RAISE EXCEPTION 'target is not an ordinary table with nullable bid'; END IF; IF EXISTS (SELECT 1 FROM pg_constraint WHERE conrelid = 'public.pgbench_accounts'::regclass AND conname = 'l5_bid_nn_check_202611') THEN RAISE EXCEPTION 'temporary constraint name already exists'; END IF; IF EXISTS (SELECT 1 FROM public.pgbench_accounts WHERE bid IS NULL) THEN RAISE EXCEPTION 'NULL bid values exist; no rows may be changed by this CR'; END IF; END $$",
"expect": {
"oom_kills": "==0"
}
},
{
"sql": "ALTER TABLE public.pgbench_accounts ADD CONSTRAINT l5_bid_nn_check_202611 CHECK (bid IS NOT NULL) NOT VALID",
"retries": 5,
"expect": {
"max_lock_wait_s": "<5"
}
},
{
"sql": "ALTER TABLE public.pgbench_accounts VALIDATE CONSTRAINT l5_bid_nn_check_202611",
"retries": 5,
"expect": {
"oom_kills": "==0"
}
},
{
"sql": "ALTER TABLE public.pgbench_accounts ALTER COLUMN bid SET NOT NULL",
"retries": 5,
"expect": {
"max_lock_wait_s": "<5"
}
},
{
"sql": "ALTER TABLE public.pgbench_accounts DROP CONSTRAINT l5_bid_nn_check_202611",
"retries": 5,
"expect": {
"max_lock_wait_s": "<5"
}
},
{
"sql": "DO $$ BEGIN IF NOT EXISTS (SELECT 1 FROM pg_attribute WHERE attrelid = 'public.pgbench_accounts'::regclass AND attname = 'bid' AND attnotnull AND NOT attisdropped) THEN RAISE EXCEPTION 'bid is not marked NOT NULL'; END IF; END $$",
"expect": {}
}
],
"rehearsal": {
"workload": "W_prod",
"minutes": 2,
"metrics": [
"p99_rel",
"max_lock_wait_s",
"io_util_pct",
"oom_kills",
"standby_cancellations",
"max_replication_lag_s",
"backup_verify"
],
"thresholds": {
"p99_rel": "<=1.2",
"max_lock_wait_s": "<5",
"oom_kills": "==0"
}
},
"rollback": [
"SET lock_timeout = '200ms'",
"ALTER TABLE public.pgbench_accounts ALTER COLUMN bid DROP NOT NULL",
"ALTER TABLE public.pgbench_accounts DROP CONSTRAINT IF EXISTS l5_bid_nn_check_202611"
],
"postconditions": [
"public.pgbench_accounts.bid is marked NOT NULL and the temporary check constraint is absent.",
"No stored rows are changed; replication, WAL archiving, backups, autovacuum and monitoring remain operational.",
"Confirm production standby replay, recovery-conflict counts and read latency, and verify a subsequent backup."
],
"risk": {
"class_guess": "moderate",
"blast_radius": "The precheck and constraint validation scan the accounts table and may increase I/O and latency. Brief AccessExclusive locks can block primary traffic and cause standby recovery conflicts; the clone cannot test standby effects. Lock timeouts bound individual acquisition attempts but do not guarantee the cumulative stall objective. The temporary check rejects NULL writes; a concurrent NULL write after the precheck can cause an application error or validation failure. Existing NULLs abort the change rather than being repaired. Rollback also requires brief locks and can fail under contention; inspect and complete it manually if needed."
}
}