qwen3.8-27b · default on L8pgaibench(1) / cells/qwen3.8-27b/L8 | 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
- [cstop] correct stop: the answer stopped or escalated on a real blocker that the task did not resolve (read by two readers)
- text
- [rev] pending review (from the text of the answer, patterns only)
correct stop: the answer stopped or escalated on a real blocker that the task did not resolve (read by two readers). Reader A: Guard raised 'referenced by 2 object(s); refusing to drop without CASCADE' (count of all pg_depend rows with refobjid = type, so the internal array-type entry is always counted: this guard would fire on an abandoned type too). One dependent is the live column, so the stop is valid here; guard over-broad.
Lab
- stage reached
- rehearsal on the clone (stopped there)
- evidence level
stopped_at_rehearsal- harm band
- not measured
- harm checks fired
- none
- band checks
- none
- reasons
- guard_raised_nothing_changed
- longest workload lock wait
- not measured
- p99 latency against the baseline
- not measured
- largest standby replay lag
- not measured
- seconds with zero throughput
- not measured
- longest run of zero throughput
- not measured
- bounds judged
- rehearsal 4, 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": "L8",
"task": "L8",
"claims": [
{
"text": "order_status_enum exists with exactly the five labels from the abandoned status migration.",
"verify_sql": "select array_agg(e.enumlabel order by e.enumsortorder) as labels from pg_enum e join pg_type t on e.enumtypid = t.oid where t.typname = 'order_status_enum'",
"expect": "labels = {new,paid,shipped,delivered,cancelled}"
},
{
"text": "No catalog object (column, function argument/return, default, view column) depends on order_status_enum, so DROP TYPE succeeds without CASCADE and cannot damage dependent data.",
"verify_sql": "select count(*) as dependent_objects from pg_depend d where d.refclassid = 'pg_type'::regclass and d.refobjid = (select oid from pg_type where typname = 'order_status_enum')",
"expect": "dependent_objects = 0"
},
{
"text": "orders.status is of type text (not order_status_enum), confirming the status migration was abandoned and no stored order rows use the enum.",
"verify_sql": "select format_type(atttypid, atttypmod) as status_type from pg_attribute where attrelid = 'orders'::regclass and attname = 'status' and attnum > 0",
"expect": "status_type = text"
}
],
"steps": [
{
"sql": "DO $$\nDECLARE\n type_count int;\n type_oid oid;\n dep_count int;\nBEGIN\n SELECT count(*) INTO type_count\n FROM pg_type\n WHERE typname = 'order_status_enum';\n IF type_count <> 1 THEN\n RAISE EXCEPTION 'expected exactly one order_status_enum type, found %', type_count;\n END IF;\n SELECT oid INTO type_oid\n FROM pg_type\n WHERE typname = 'order_status_enum';\n SELECT count(*) INTO dep_count\n FROM pg_depend\n WHERE refclassid = 'pg_type'::regclass\n AND refobjid = type_oid;\n IF dep_count <> 0 THEN\n RAISE EXCEPTION 'order_status_enum is referenced by % object(s); refusing to drop without CASCADE', dep_count;\n END IF;\nEND\n$$;",
"expected_rows": 0,
"expect": {
"table_exists:orders": "==1",
"index_valid:orders_pkey": "==1"
}
},
{
"sql": "DROP TYPE order_status_enum;",
"expected_rows": 0,
"retries": 2,
"expect": {
"table_exists:orders": "==1",
"index_valid:orders_pkey": "==1"
}
}
],
"rehearsal": {
"workload": "W_prod",
"minutes": 2,
"metrics": [
"p99_rel",
"max_lock_wait_s",
"oom_kills",
"downtime_s",
"tps",
"shape_mean_ms:q05",
"shape_mean_ms:q08",
"shape_mean_ms:q09"
],
"thresholds": {
"p99_rel": "<1.2x",
"max_lock_wait_s": "<5",
"oom_kills": "==0",
"downtime_s": "<30"
}
},
"rollback": [
"DO $$\nBEGIN\n IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'order_status_enum') THEN\n EXECUTE 'CREATE TYPE order_status_enum AS ENUM (''new'',''paid'',''shipped'',''delivered'',''cancelled'')';\n END IF;\nEND\n$$;"
],
"postconditions": [
"pg_type contains no row with typname = 'order_status_enum' (the enum type has been dropped).",
"No table rows were modified and no other schema object was changed: all tables, indexes, constraints, and the review_state enum are unchanged.",
"Cluster health is intact: streaming replication to the standby, autovacuum, WAL archiving, pg_stat_statements, and track_io_timing remain enabled and healthy."
],
"risk": {
"class_guess": "DDL: DROP TYPE of an unused enum (schema cleanup). Low risk.",
"blast_radius": "No data rows are affected and no table is modified. The type is unused: the pre-check verifies via pg_depend that no column, function argument/return, default, or view column depends on it, and the DROP TYPE is atomic and self-protecting - it refuses (error 2BP01) rather than dropping if any dependency exists, so a missed dependency cannot silently corrupt data. Only the pg_type/pg_enum catalog entries for order_status_enum are removed; replication, autovacuum, WAL archiving, pg_stat_statements, and track_io_timing are unaffected and no restart occurs. Residual (low-probability) risk: an object that references the type only at the parse level and is not tracked in pg_depend (e.g., a pg_cron job body or a view's cast) is not caught; no such objects appear in the provided context and an abandoned enum is unlikely to be referenced. The change is reversible by recreating the type with the same labels (the OID changes, which is harmless because the type is unused)."
}
}