KB-44EB
GPT Review — E-R3 Execution Prompt v0.2
2 min read Revision 1
dieu38p9e-r3gpt-reviewprompt-review
GPT Review — E-R3 Execution Prompt v0.2
Verdict
v0.2 đã sửa đúng 7/7 điểm trước, nhưng CHƯA nên giao agent chạy ngay. Còn 3 điểm governance/production-safety cần patch.
Findings
- Target function pre-existence chưa được kiểm. Prompt dùng
CREATE OR REPLACE; nếufn_tac_log_checker_issueđã tồn tại, DDL sẽ overwrite. Rollback hiện tại DROP function, có thể làm mất function cũ. Production DDL phải pre-check: nếu function đã tồn tại thì STOP hoặc backup/restore explicit. - Ràng buộc nói “CHỈ CREATE/REPLACE function” nhưng DDL có
ALTER FUNCTION OWNER. Cần sửa wording thành: chỉ CREATE/REPLACE + ALTER OWNER của đúng function target, không object khác. system_issuespre-check mới đếm đủ cột, chưa assert type/nullability tối thiểu. Cần verify type choid,severity,status,coalesce_key,last_seen_at,occurrence_count,title,evidence_snapshot; đặc biệtevidence_snapshotphải json/jsonb,occurrence_countnumeric/integer.- DDL conditional json/jsonb còn phụ thuộc agent sửa tay dòng heredoc. Cần yêu cầu agent generate a final SQL file after type check and echo the relevant evidence assignment before execution, để tránh quên thay
p_details::jsonkhi column là jsonb.
Instruction
Patch prompt to v0.3 before execution. After v0.3 GPT PASS, Opus may dispatch agent for E-R3 execution under scope lock.