GPT Decision — P10B Machine Routing Problem: Option B Regenerate + Promote on VPS
GPT Decision — P10B Machine Routing Problem: Option B Regenerate + Promote on VPS
Date: 2026-04-29
Decision
Choose Option B — Regenerate SQL package on VPS, then promote to KB in the same step.
Do not ask User to manually SSH and inspect /tmp.
Do not choose Option C. Do not combine PF + execute.
Rationale
This is the third cross-machine/routing failure. The prompt saying “run on VPS” is not enforceable by itself. The process must include a machine identity guard.
Option A is too dependent on ephemeral /tmp state. Even if files exist now, it does not fix the operating pattern.
Option C combines too many steps after a recent mutation failure. It would reduce reviewability.
Option B gives a clean recovery:
- Establish machine identity = VPS.
- Rebuild package from canonical KB inputs + live DB introspection.
- Promote the rebuilt package to KB with manifest + read-back verification.
- Resume PF-R2 from KB, machine-agnostic.
Direction to Opus
Draft a new prompt:
P10B-2B-FIX-REGEN-PROMOTE — Regenerate D28 FIX Package on VPS + Promote to KB
Scope: READ-ONLY package regeneration and KB upload. No INSERT/UPDATE/DELETE/DDL. No execute.
Mandatory structure
Gate 0 — Machine identity guard
Agent must prove it is operating on VPS before proceeding:
hostnamepwddocker psor equivalent check showing local PostgreSQL container accessdocker exec postgres psql -U directus -d directus -c "SELECT current_database(), current_user;"
If DB container is not accessible locally, STOP. Do not attempt local Mac regeneration.
Inputs
Fetch from KB canonical inputs:
knowledge/dev/laws/dieu38-trien-khai/data/p10b-d28-candidate-units-r2.jsonknowledge/dev/laws/dieu28-display-technology-law.md- prior FIX report for expected requirements if needed.
Verify:
- candidate JSON SHA =
e47775e33cc752656468edb287cca7b58539804678443b6c1b1dd03b165de8ad - source SHA =
fa5ed5c1f6a6ab70f69f48e0bd3a2e4d822eb6b672a1c2b2313edd23f3277d7b
Regeneration requirements
Regenerate package under a stable run dir, e.g. /tmp/p10b-2b-fix-vps/:
insert-candidate.sqlrender.sqlrollback.sqlverify-counts.sqlbirth-gate-requirements.jsoncandidate-units-r2.jsongen.pybuild_matrix.pymanifest.json
The package must include the BG-UV-02 fix:
- UV INSERT includes
descriptioncolumn. - 20 description_required rows have non-null title-stub description.
- 7 exempt rows documented.
Promote to KB
Upload all package artifacts to:
knowledge/dev/laws/dieu38-trien-khai/data/p10b-d28-fix-package/
Manifest must contain file names, KB paths, SHA256, byte size, source path, generated_at, expected rows, package version, and next step.
Read-back verification
Fetch every uploaded file from KB and verify exact equality or SHA/length match.
Any mismatch = FAIL.
STOP
After promotion report, STOP. Do not run PF. Do not execute SQL.
Next step
After REGEN-PROMOTE PASS, patch PF-R2 to fetch files from KB manifest and inspect locally.
Permanent operating rule
Prompts that depend on a specific machine must include an explicit machine identity guard and STOP if the wrong machine is detected.