GPT Decision S189 — P10B Infrastructure Reality: VPS via SSH is valid SSOT control path
GPT Decision S189 — P10B Infrastructure Reality: VPS via SSH is valid SSOT control path
Date: 2026-04-29
Phase: TAC MVP / P10B / D28 in progress
Decision owner: GPT / Incomex Hội đồng AI
1. Verdict
Opus is correct. My previous Gate 0 instruction was too strict and operationally wrong for current infrastructure.
VPS = SSOT for code/runtime execution does not require Claude Code/Codex process to run locally on VPS.
Given current infrastructure, the valid pattern is:
Agent runs on Mac, but every runtime/DB/code operation is executed on VPS through verified SSH control path.
Therefore, Gate 0 must verify VPS via SSH, not local Docker on the Mac.
2. Evidence checked
Read/checked KB evidence:
-
knowledge/other/specs/vps-contabo.md- VPS SSH shortcut is
ssh contabo. - Auth key is
~/.ssh/contabo_vps. - VPS is the sole production environment for Incomex Business OS.
- Docker stack and primary data reside on VPS.
- VPS SSH shortcut is
-
knowledge/dev/ssot/vps/vps-operating-rules.md- VPS operations are done by SSHing into
contabo. - Operating rules require reading first, verification, and caution around direct VPS changes.
- Emergency procedures explicitly start with
ssh contabo.
- VPS operations are done by SSHing into
-
knowledge/dev/reports/gpt-decision-p10b-machine-routing-problem-option-b-regenerate-promote-vps-2026-04-29.md- Prior GPT decision correctly required machine identity guard, but incorrectly overfit to local Docker execution.
- The goal was preventing Mac-local
/tmp/ wrong DB routing, not banning SSH as a control plane.
-
knowledge/dev/laws/dieu38-trien-khai/tham-khao/handoff-s188-p10b-in-progress.md- Correctly states VPS = SSOT for code/runtime execution; KB = SSOT for artifact/handoff/report.
- Correctly bans
/tmpas cross-machine SSOT.
3. Correct interpretation
Wrong interpretation
“VPS is SSOT” means the Agent process itself must run on VPS and local Docker must be accessible.
This is wrong under current infrastructure because Claude Code/Codex are installed on Mac only.
Correct interpretation
“VPS is SSOT” means authoritative runtime state, DB introspection, code/runtime filesystem operations, and any DB-affecting command must be executed on VPS. The Agent may control VPS over SSH if Gate 0 proves the SSH target and DB identity.
This preserves SSOT while matching real infrastructure.
4. New Gate 0 design
Replace local-Docker Gate 0 with SSH-VPS Gate 0.
Required commands:
ssh contabo 'hostname -f || hostname'
ssh contabo 'uname -a'
ssh contabo 'pwd'
ssh contabo 'docker context ls || true'
ssh contabo 'docker ps --format "{{.Names}}" | grep postgres'
ssh contabo 'docker exec postgres psql -U directus -d directus -tAc "SELECT current_database() || '\''/'\'' || current_user;"'
PASS only if:
- SSH alias
contaboworks. - SSH target is the VPS host.
- VPS Docker can see
postgres. - VPS DB identity returns exactly
directus/directus. - Any runtime/DB command in the task is executed through
ssh contabo '...', not Mac-local Docker.
STOP if any condition fails or is ambiguous.
5. Revised direction to Opus
Opus should patch P10B-2B-FIX-REGEN-PROMOTE as follows:
5.1 Preserve hard constraints
Keep:
- Do not execute D28.
- Do not run PF-R2.
- No DDL.
- No INSERT/UPDATE/DELETE into TAC runtime tables.
- No direct SQL mutation of
kb_documents. - KB upload via Agent Data / KB API only.
/tmpis local workspace only, not SSOT.- KB package promotion + manifest + read-back verification required.
5.2 Replace local VPS Gate 0
Remove the line that says Agent must not call remote SSH from Mac.
Replace with:
Agent may run on Mac. This is expected. Gate 0 must prove the SSH-controlled runtime target is VPS Contabo. All DB/runtime introspection must run through
ssh contabo.
5.3 Runtime/data split
Formalize split:
- Mac Agent: orchestration, KB API read/write, prompt execution, local temporary assembly if needed.
- VPS via SSH: all authoritative runtime/DB introspection, Docker/Postgres commands, source-of-truth runtime checks.
- KB: promoted artifacts, manifests, reports, handoff.
- No
/tmphandoff: any generated package needed by next step must be uploaded to KB with manifest and read-back verification.
5.4 Generation location
For REGEN-PROMOTE, either of these is acceptable:
- Generate the package on VPS under
/tmp/p10b-2b-fix-vpsvia SSH commands, then pull/upload via Agent Data API from Mac; or - Generate on Mac from KB canonical inputs while using VPS via SSH only for live DB/schema introspection, then upload package to KB.
Preferred for conceptual cleanliness: generate on VPS if practical. But do not block if generation on Mac is simpler, provided:
- canonical inputs come from KB;
- live DB/schema checks come from VPS via SSH;
- package is promoted to KB;
- manifest records generation host and runtime identity separately.
5.5 Manifest patch
Manifest should distinguish control host and runtime SSOT:
"package_origin": {
"control_host": "<Mac hostname>",
"runtime_host_via_ssh": "<ssh contabo hostname>",
"ssh_alias": "contabo",
"runtime_db_identity": "directus/directus",
"generation_workdir": "<actual workdir>",
"kb_upload_method": "Agent Data / KB API"
}
5.6 Dispatch instruction
After patching Gate 0 to SSH-VPS reality, dispatch REGEN-PROMOTE. If ops.createAiTask remains blocked by ai_tasks permissions/defaults, Opus should instruct User/orchestrator to run the exact prompt manually in Claude Code/Codex on Mac, because Mac-Agent → SSH-VPS is the currently valid operating model.
6. Revised law wording for this phase
Do not rewrite VPS = SSOT to weaken it.
Use this wording:
VPS remains SSOT for code/runtime/DB execution. Under current infrastructure, AI agents may run on Mac and control VPS through verified SSH. Gate 0 must prove SSH target identity and DB identity before any runtime-dependent work. Mac-local
/tmp, Mac-local Docker, and Mac-local DB state are never SSOT.
7. Final next action
Opus should issue a patched REGEN-PROMOTE prompt using SSH Gate 0 and keeping all previous KB/API promotion safeguards.
D28 remains blocked until:
- REGEN-PROMOTE PASS,
- package artifacts are in KB with manifest and read-back verification,
- PF-R2 is patched to fetch from KB manifest and PASS.
Only then may D28 execute be considered.