KB-778C

GPT Review — D28 Phase1B BLOCKED and Rev6 Container-Exec Directive

8 min read Revision 1
gpt-reviewdieu28phase1bblockedcontainer-execrev6-directive

GPT Review — D28 Phase 1B BLOCKED and Rev6 Container-Exec Directive

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

  • knowledge/dev/laws/dieu28-trien-khai/reports/d28-generated-table-map-implementation-report.md
  • knowledge/dev/laws/dieu28-trien-khai/reviews/opus-review-d28-phase1b-blocked-rev6-recommendation-2026-05-10.md
  • knowledge/dev/laws/dieu28-trien-khai/prompts/d28-generated-table-map-implementation-prompt.md rev5

Verdict

Agent BLOCKED report accepted. Opus review accepted.

Agent behavior was correct and safe. This is not an execution failure by the Agent; it is a prompt/environment-model mismatch discovered at preflight.

Approve Opus to write prompt rev6 using F3 container-exec pattern.

Do not dispatch rev6 after writing. Return for GPT/User review.

Agent report assessment

Agent complied with rev5:

  • stopped at preflight failure;
  • did not create files;
  • did not modify repo;
  • did not call Directus API;
  • did not mutate PG/Directus;
  • did not deploy;
  • did not publish tbl_event_outbox;
  • did not print secrets;
  • uploaded report with root cause and fix options.

This is exactly the correct behavior under the prompt.

Root cause accepted

Rev5 assumed host-side execution:

/opt/incomex/docker/nuxt-repo/.env
/opt/incomex/docker/nuxt-repo/web/node_modules/.bin/tsx

But actual VPS model is container-based:

/opt/incomex/docker/.env = SSOT env source
DIRECTUS_ADMIN_TOKEN → injected into container as NUXT_DIRECTUS_SERVICE_TOKEN
DIRECTUS_PUBLIC_URL → injected into container as NUXT_PUBLIC_DIRECTUS_URL
web/node_modules exists in container, not host

Therefore rev5 preflight failed correctly:

0B tsx_binary=FAIL
0C directus_url_source=FAIL
0D token_in_env=FAIL

F1 vs F3 decision

Agent recommended F1. Opus recommends F3.

GPT agrees with Opus:

Use F3: docker compose exec into Nuxt container.

Reason:

  • F1 only fixes env aliasing and still leaves host tsx missing.
  • Fixing host tsx would require npm/pnpm install on host, violating NO_PACKAGE_INSTALL unless separately approved.
  • F3 uses the real runtime environment where env and dependencies already exist.
  • F3 avoids duplicating .env or creating a host-level Nuxt .env file.
  • F3 is closer to production and respects SSOT/container deployment model.

Rev6 direction

Opus should patch the implementation prompt to rev6 using container-exec pattern.

Required core pattern

Instead of host-side:

cd /opt/incomex/docker/nuxt-repo/web && <command>

Use container-side execution, after verifying service name and working directory:

cd /opt/incomex/docker && docker compose exec -T <nuxt_service> sh -c 'cd <container_web_dir> && <command>'

Likely values may be nuxt and /app, but rev6 must require Agent to verify from docker-compose before assuming.

Required rev6 additions

1. Infrastructure preflight

Before implementation, Agent must verify read-only:

  • docker compose service name for Nuxt;
  • container working directory;
  • bind mount between host repo and container app directory;
  • whether created files in container persist on host;
  • env vars exist inside container without printing values;
  • tsx and nuxt binaries exist inside container;
  • host git repo clean.

2. Mount-through verification

Before writing real files, Agent must prove the bind mount works safely.

Preferred method:

  • create a temporary test file under a safe temp path inside mounted project only if allowed; or
  • if no temp write allowed before implementation, inspect docker-compose mounts and report.

Because Phase 1B is an implementation pack, a temporary mount-through test file is acceptable only if:

  • path is explicitly temporary;
  • file content contains no secret;
  • file is deleted immediately;
  • report attests cleanup;
  • no git tracked file is touched.

Alternative: if Opus wants stricter no-test-write preflight, require compose mount inspection only.

3. Keep git operations host-side

Git status, diff, add, commit remain on host:

/opt/incomex/docker/nuxt-repo

File edits can be performed in container if bind mount is confirmed; host git must see them.

4. No package install remains

Container exec must not run install commands.

Allowed:

  • use existing container node_modules;
  • use existing package scripts;
  • use existing tsx/nuxt binaries inside container.

Forbidden:

  • npm install;
  • pnpm install;
  • yarn install;
  • package manager mutations;
  • lockfile changes.

5. Env/secret safety in container

Agent may check inside container:

TOKEN_PRESENT=true|false
URL_PRESENT=true|false

Do not print env values.

No .env contents in report.

6. Revise command examples

All generator/check/build/typecheck commands should run via container exec.

Examples:

docker compose exec -T <nuxt_service> sh -c 'cd <container_web_dir> && ./node_modules/.bin/tsx scripts/generate-table-maps.ts --check'

and:

docker compose exec -T <nuxt_service> sh -c 'cd <container_web_dir> && npm run build > /tmp/d28-table-map-build.log 2>&1; CODE=$?; ...'

7. Preserve rev5 safety patches

Rev6 must retain:

  • no deploy;
  • no live route smoke;
  • no Directus mutation;
  • no PG mutation;
  • no publish tbl_event_outbox;
  • no table_registry mutation;
  • no print env/token/URL;
  • no package install;
  • boolean-only secret scan;
  • single build + log scan;
  • expected file whitelist;
  • no lockfile changes;
  • controlled commit.

8. Report fields to add

Rev6 report must include:

execution_model=CONTAINER_EXEC
nuxt_service_name=<name>
container_web_dir=<path>
bind_mount_verified=true|false
mount_test_used=true|false
mount_test_cleaned=true|false|N/A
container_env_token_present=true|false
container_env_url_present=true|false
container_tsx_available=true|false
container_nuxt_available=true|false
host_node_modules_required=false
package_install_used=false

Directive to Opus

Patch prompt rev6 at:

knowledge/dev/laws/dieu28-trien-khai/prompts/d28-generated-table-map-implementation-prompt.md

Use F3 container-exec direction.

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

Hard boundaries remain

NO_DEPLOY=true
NO_LIVE_ROUTE_SMOKE=true
NO_DIRECTUS_MUTATION=true
NO_PG_MUTATION=true
NO_PUBLISH_EVENT_OUTBOX=true
NO_CHANGE_TABLE_REGISTRY=true
NO_SECRET_IN_CODE_OR_LOG=true
NO_PRINT_ENV_TOKEN_URL=true
NO_PACKAGE_INSTALL=true
NO_NPX_AUTO_INSTALL=true
NO_LOCKFILE_CHANGE=true

Current status

phase1b_status=BLOCKED_AT_PREFLIGHT
agent_compliance=PASS
root_cause=HOST_SIDE_PROMPT_MISMATCH_WITH_CONTAINER_RUNTIME
rev6_direction=F3_CONTAINER_EXEC
implementation_dispatch_allowed=false_until_rev6_review
p3d_resume_allowed=false

Next sequence

  1. Opus patches prompt rev6 with container-exec pattern.
  2. GPT/User review rev6.
  3. If approved, Agent re-runs Phase 1B implementation.
  4. After implementation report, decide deploy/smoke pack.
  5. Only after deploy/smoke, resume P3D notification display/publish flow.
Back to Knowledge Hub knowledge/dev/laws/dieu44-trien-khai/reviews/gpt-review-d28-phase1b-blocked-and-rev6-container-exec-directive-2026-05-10.md