KB-71C5

GPT Review — G6 Run #1 Hard-Stop / Credential Wiring

4 min read Revision 1
gptgovernancedieu38p9g6codexhard-stopcredential-wiring

GPT Review — G6 Run #1 Hard-Stop / Credential Wiring

Date: 2026-04-27
Scope: Review Opus/Codex G6 first execution attempt and PF-Pre.2 failure.

Verdict

PASS for Codex behavior. G6 run #1 correctly hard-stopped at pre-flight before any DDL/DML.

This is not a failed dry-run of the schema itself. It is a pre-flight credential-wiring blocker. No schema was created, no production business objects were touched, and no rollback was required.

Evidence checked

  • knowledge/dev/laws/dieu38-trien-khai/reports/p9-g6-execution-log-2026-04-27.md rev 1 — FAIL/HARD STOP at PF-Pre.2.
  • knowledge/dev/laws/dieu38-trien-khai/P9-G6-execution-prompt.md OFFICIAL v0.2.
  • knowledge/dev/laws/dieu38-trien-khai/P9-G6-precedence-errata.md.
  • knowledge/dev/reports/gpt-review-g6-codex-executor-readiness-2026-04-27.md.

Findings

  • PF-Pre.1 passed: required tools were available.
  • PF-Pre.2 failed: discovered .env did not contain DB_HOST/DB_PORT/DB_USER/DB_NAME/DB_PASSWORD; it only contained GH_PAT.
  • Codex stopped correctly and did not attempt to guess credentials.
  • No CREATE SCHEMA, no DDL/DML, no seed, no Directus mutation, no production business mutation.
  • Action log was uploaded to the expected KB path.
  • G8/G11/P9 were not opened.
  • Local artifacts prepared by Codex are acceptable as pre-execution artifacts; they are not production mutation.

Law / constitutional check

Rule Result Finding
Hiến pháp / Zero Trust PASS Unknown credential state caused STOP rather than guessing/bypassing.
Đ33 DB governance PASS No DB DDL/DML executed.
Đ35 DOT governance PASS No dot_tools/dot_action_log mutation.
Đ32 gate discipline PASS Retry requires explicit credential-wiring errata + authorization.
Đ24 PASS No taxonomy/entity label mutation.
100% DOT/AI principle PASS User is not asked to manually fetch secrets; agent/Opus should verify governed secret source.

Use Option C + B combined:

  • Add a small credential-source errata/patch to the prompt/wrapper: DB credentials are sourced from GSM, not from .env.
  • Update the runner script to read DB credentials directly from GSM via the authorized VPS service account/gcloud CLI at runtime.
  • Keep .env only as optional fallback, not as the assumed primary source.

Do not ask the User to look up or paste secret names/tokens manually. Opus/Codex should discover and verify the available GSM secret names and service-account access read-only without printing secret values.

Required retry-prep block

Before retrying G6, Opus should perform one bundled credential-wiring remediation:

  1. Update/create a G6 credential errata document specifying the precedence:
    • Primary DB credential source: GSM via authorized service account/gcloud on VPS.
    • Optional fallback: .env only if it contains the required DB variables.
    • Secrets must never be printed, committed, or written to KB/action logs.
  2. Patch run_g6.sh/dispatch wrapper to fetch/export DB variables from GSM at runtime without echoing values.
  3. Add read-only verification:
    • gcloud auth list / active identity summary without secret values.
    • gcloud secrets list filtered only by candidate names/labels, no secret payloads.
    • gcloud secrets versions access only inside runtime export, with masked logging.
  4. Update P9-G6-execution-prompt.md or an execution errata to point to the credential-source errata.
  5. Preserve all existing hard exclusions and pre-flight STOP rules.
  6. Then present a concise retry authorization request.

No G6 retry is authorized by this review alone.