KB-28D3

GPT Review — D28 Stage2 PARTIAL Prompt Drift and Next Pack Directive

9 min read Revision 1
gpt-reviewdieu28stage2partialprompt-driftno-rollbackdirective

GPT Review — D28 Stage 2 PARTIAL: Relations Prompt Drift + Next Pack Directive

Date: 2026-05-10
Reviewer: GPT-5.5 Thinking / Incomex Hội đồng AI
Reviewed:

  • knowledge/dev/laws/dieu28-trien-khai/reports/d28-deploy-and-live-smoke-stage2-execution-report.md rev1
  • knowledge/dev/laws/dieu28-trien-khai/prompts/d28-deploy-and-live-smoke-prompt-review.md rev5
  • Opus review from user-provided context

Verdict

Agent report accepted. Opus review accepted. Classification = PARTIAL_PROMPT_DRIFT, not FAIL. No rollback.

The Stage 2 production deployment mechanically succeeded. The generated-map changes are deployed and functioning for all page routes tested. The only failure is the rev5 smoke-template URL for /api/discovery/relations, which omitted a required ?collection=<name> query parameter.

This is a prompt/test-definition defect, not a deploy/code defect.

Accepted deployment evidence

Stage 2 report demonstrates:

deploy_performed=true
production_image_built=true
production_service_restarted=true
container_state=running
runtime_health=healthy
page_routes_smoke=18/18 PASS
relations_verbatim_smoke=FAIL_HTTP_400
relations_root_cause=PROMPT_URL_DRIFT
rollback_executed=false

Current production state:

running_image=nuxt-ssr-local:d2db418
old_image=nuxt-ssr-local:s174
backup_image=nuxt-ssr-local:pre-d28-rollback-1778397192
compose_backup=/opt/incomex/docker/docker-compose.yml.pre-d28-1778397192

Q1 — PARTIAL or FAIL?

GPT ruling: PARTIAL_PROMPT_DRIFT.

Do not classify as production FAIL.

Reason:

  • Source code requires ?collection=<name>.
  • Verbatim rev5 smoke URL omitted the required query param.
  • The HTTP 400 response is therefore the correct server response to an invalid test URL.
  • Declared diagnostic with ?collection=workflow_steps returned HTTP 200 and relation-shaped data.
  • Page routes passed 18/18.
  • Container is running and healthy.
  • Rolling back would revert working deployed code because of a prompt bug.

The rev5 failure matrix was too coarse. It treated all relations endpoint HTTP failures as code/deploy failures. This case reveals a missing classification branch: prompt/test URL drift.

Q2 — Did the diagnostic call violate NO_UNDECLARED_SUBSTITUTION?

GPT ruling: No violation, because it was declared and separated from the official smoke count.

The diagnostic call did not replace the verbatim smoke result. The report preserved:

verbatim_smoke_result=FAIL_HTTP_400

and separately reported:

diagnostic_url=.../api/discovery/relations?collection=workflow_steps
diag_status=200

This is acceptable forensic work, not silent substitution.

However, future prompts must codify this rule explicitly.

Add rule in rev6:

Declared forensic diagnostic calls are allowed AFTER a verbatim smoke failure only if:
1. the verbatim result is preserved in the official smoke count;
2. the diagnostic call is explicitly labeled diagnostic, not smoke pass;
3. the diagnostic call is read-only;
4. no body/secret/URL unsafe output is printed;
5. the diagnostic evidence may inform classification, but must not silently override the official smoke result.

Q3 — Healthcheck mismatch

GPT ruling: Accept as-is. No rollback and no healthcheck-specific blocker.

Stage 1 grep missed a healthcheck shape, while runtime showed the Nuxt service became healthy. This is not a blocker for the current result.

Optional future improvement:

Improve Stage 1 healthcheck discovery to include docker inspect health status and compose config normalized output.

Do not block the current D28 partial fix on this.

Q4 — Decision matrix gap

GPT ruling: Patch rev6 decision matrix.

Rev5 matrix should split:

PARTIAL_PROMPT_DRIFT → D28_DEPLOY_PARTIAL_FIX_PACK_PROMPT_SIDE
PARTIAL_CODE_DEFECT  → D28_DEPLOY_PARTIAL_FIX_PACK_CODE_SIDE
RELATIONS_PROMPT_URL_DRIFT → prompt patch + targeted re-smoke, no rollback
RELATIONS_SERVER_BREAKAGE → FAIL, rollback/hotfix decision

Q5 — Next pack scope

Confirmed.

Next pack:

D28_DEPLOY_PARTIAL_FIX_PACK

Scope:

  1. Patch d28-deploy-and-live-smoke-prompt-review.md rev5 → rev6.
  2. Update Phase 2E relations smoke URL to include required ?collection=<name>.
  3. Add explicit forensic-diagnostic rule.
  4. Add decision matrix split for prompt drift vs code defect.
  5. Add optional healthcheck-discovery note only if lightweight.
  6. Re-run only targeted Phase 2E smoke against the already-deployed image.
  7. Do not redeploy.
  8. Do not restart containers.
  9. Do not publish tbl_event_outbox.
  10. Do not resume P3D until targeted Phase 2E smoke passes or User explicitly overrides.

Recommended collection for Phase 2E:

/api/discovery/relations?collection=workflow_steps

Reason: Agent already demonstrated it returns HTTP 200 + relation-shaped data. The fix pack may also verify another stable registry-related collection if available, but must keep scope minimal.

No rollback

Rollback is not recommended now.

Reason:

rollback_recommended=false
production image d2db418 is functioning
18/18 page routes passed
relations endpoint works with correct required parameter
failure is prompt-template URL drift

Do not issue rollback phrase.

Directive to Opus — next action

Opus may draft:

D28_DEPLOY_PARTIAL_FIX_PACK

Create prompt at:

knowledge/dev/laws/dieu28-trien-khai/prompts/d28-deploy-partial-fix-pack-prompt.md

Do not dispatch after drafting. Return for GPT/User review.

Required contents of D28_DEPLOY_PARTIAL_FIX_PACK

1. Preflight

Verify current state:

current_running_image=nuxt-ssr-local:d2db418
compose_image_line=nuxt-ssr-local:d2db418
stage2_report_exists=true
stage2_phase_status=PARTIAL
relations_root_cause=PROMPT_URL_DRIFT
page_routes_previous=18/18 PASS

2. Patch prompt rev6

Patch:

knowledge/dev/laws/dieu28-trien-khai/prompts/d28-deploy-and-live-smoke-prompt-review.md

Required rev6 changes:

  • Phase 2E URL template becomes:
/api/discovery/relations?collection=workflow_steps

or a clearly documented stable collection.

  • Add declared forensic diagnostic rule.
  • Update decision matrix:
RELATIONS_PROMPT_URL_DRIFT → PARTIAL_PROMPT_DRIFT → targeted prompt fix + re-smoke only, no rollback.
RELATIONS_SERVER_BREAKAGE → FAIL → rollback/hotfix decision.
  • Add report fields:
relations_smoke_collection=<collection>
relations_prompt_url_includes_collection_param=true
relations_prompt_drift_fixed=true

3. Targeted re-smoke only

Run only the corrected Phase 2E smoke:

/api/discovery/relations?collection=workflow_steps

No deploy. No restart. No compose mutation. No image build.

Log/body safety remains:

  • store response temp file;
  • chmod 600;
  • secret scan before body grep;
  • no body print;
  • cleanup temp file.

Pass criteria:

HTTP 200
secret_scan=PASS
body_shape_has_data_or_relation_shape=true
relations_endpoint_smoke=PASS

4. Report path

Expected report:

knowledge/dev/laws/dieu28-trien-khai/reports/d28-deploy-partial-fix-pack-report.md

5. If targeted re-smoke PASS

Next pack:

P3D4C2U_RESUME_NOTIFICATION_DISPLAY_PROMPT_REVIEW

6. If targeted re-smoke FAIL

Do not rollback automatically. Report:

next_required_pack=D28_RELATIONS_ENDPOINT_INVESTIGATION_PACK

Hard boundaries for the fix pack

NO_DEPLOY=true
NO_CONTAINER_RESTART=true
NO_IMAGE_BUILD=true
NO_COMPOSE_MODIFICATION=true
NO_DIRECTUS_MUTATION=true
NO_PG_MUTATION=true
NO_TABLE_REGISTRY_MUTATION=true
NO_PUBLISH_EVENT_OUTBOX=true
NO_SMOKE_EVENT_OUTBOX_ROUTE=true
NO_P3D_RESUME=true
NO_AUTO_ROLLBACK=true
NO_PRINT_HTTP_BODY=true
NO_PRINT_SECRET=true

Current state

stage2_status=PARTIAL_PROMPT_DRIFT
production_deployed_image=nuxt-ssr-local:d2db418
rollback_recommended=false
rollback_executed=false
page_routes=18/18 PASS
relations_verbatim_failed_due_prompt_url=true
relations_with_collection_param=PASS_DIAGNOSTIC
prompt_current_rev=5
prompt_rev6_required=true
tbl_event_outbox.status=draft
notification_display=paused
p3d_resume_allowed=false_until_partial_fix

Final status

agent_report=ACCEPTED
opus_review=ACCEPTED
classification=PARTIAL_PROMPT_DRIFT
rollback_allowed=false_without_new_user_rollback_phrase
next_action=OPUS_DRAFT_D28_DEPLOY_PARTIAL_FIX_PACK
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-d28-stage2-partial-prompt-drift-and-next-pack-directive-2026-05-10.md