GPT Review — 18b-P2 DOT-119 Script Rewrite Prompt rev4
GPT Review — 18b-P2 DOT-119 Script Rewrite Prompt rev4
Date: 2026-05-05 Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI Reviewed:
knowledge/dev/laws/dieu44-trien-khai/design/dot119-v2-script-content.shrev3knowledge/dev/laws/dieu44-trien-khai/prompts/18b-p2-dot119-script-rewrite-prompt.mdrev5 / Rev 4 content
Verdict
Near PASS. Small rev5 patch required before dispatch.
Rev4 fixes the earlier hardcode and prompt completeness issues:
- prompt is now self-contained;
- script no longer hardcodes
KNOWN_V2_FN_HASH; - synthetic fallback uses capability check;
run_pgusesON_ERROR_STOP=1;--helpexits 0 and no-args exits 1;- legacy function existence is checked;
- no-clobber grep is exact;
- md5/reporting requirements are present;
- hard boundaries remain clear.
However, two small execution risks remain.
Required rev5 patches
B1 — Smoke tests expecting non-zero exits must not abort the shell
The prompt currently uses commands like:
"$DOT119" --collection=$SAMPLE_UNCLASSIFIED --dry-run 2>&1; echo "exit=$?"
If Claude Code runs the smoke block inside a shell with set -e, expected non-zero exits (10, 14, 30) can abort before echo runs.
Patch smoke tests to use a safe wrapper, for example:
run_expect_exit() {
local expected="$1"; shift
set +e
"$@"
local rc=$?
set -e
echo "exit=$rc expected=$expected"
[ "$rc" -eq "$expected" ]
}
Or explicitly use:
set +e
"$DOT119" ...
RC=$?
set -e
echo "exit=$RC"
Apply this to tests expecting exit 1, 10, 14, 30.
B2 — Capability check should produce auditable PASS output
The script performs the capability check internally for synthetic_id, but the dry-run JSON does not explicitly say capability check passed.
Add one of the following:
- in script dry-run JSON/text for
synthetic_id, includesynthetic_capability":"pass"; or - in prompt add a direct external capability-check query/test that proves
fn_birth_registry_autohas the needed markers.
Preferred: add CAPABILITY_STATUS="pass" after successful check and include it in dry-run JSON/text.
This makes the report requirement “Capability check output” concrete.
Optional hardening, not blocker
N1 — JSON escaping for proposed_sql
The JSON output embeds SQL with single quotes only, so it is probably OK. But if future SQL includes double quotes, bash-built JSON can break. Not blocking for current known inputs.
N2 — Capability check remains heuristic
The check is capability-oriented and not a fixed hash. Good. It is still heuristic, but acceptable for P2 because P2 does not create IU trigger; 18c will test actual synthetic dry-run/execute more directly.
Directive to Opus/Ocus
Patch both files minimally:
-
knowledge/dev/laws/dieu44-trien-khai/prompts/18b-p2-dot119-script-rewrite-prompt.md- add safe exit-capture wrapper for smoke tests;
- update smoke table/examples to use it for expected non-zero exits.
-
knowledge/dev/laws/dieu44-trien-khai/design/dot119-v2-script-content.sh- expose capability pass in dry-run output for
synthetic_id, or otherwise make capability evidence explicit.
- expose capability pass in dry-run output for
Do not expand scope.
After rev5, P2 can be approved for dispatch if no new blocker appears.
Hard boundaries remain:
- no
fn_birth_registry_autoedit; - no IU trigger install;
- no IU rows;
- no Pack 2B;
- no seed/DDL changes.