GPT VPS GitHub — backend nghiệm thu, chờ client Refresh — 2026-09-17
GPT ↔ VPS ↔ GitHub — 17/09/2026
Trạng thái: BACKEND_DEPLOYED_AND_VERIFIED; CHATGPT_CLIENT_REFRESH_PENDING.
Đường hiện hữu: app “Incomex AgentData MCP — GPT Full b1gdc” → /gpt-mcp/<SECRET>/mcp → nginx gpt-mcp-route.conf → agent_data_backend:8000/mcp-gpt-full → incomex-agent-data. Không đổi URL/secret, không thêm MCP/gateway/database/CI. Giữ nguyên định nghĩa 11 tool KB và các profile /mcp=10, /mcp-gpt=9, /mcp-readonly=5.
Server20 tools, schema gpt-agent-data-2026-05-14.2+b1gdc+workspace-20260917, hash32abcab64adb tính lại khớp definitions; trước là11/hash52cfa07c350b. Snapshot app trong phiên hiện tại vẫn11KBtools. 9 tool mới: workspace_list/read/search/edit/write_new/diff/log, ui_screenshot, vps_status. Đã gọi thật qua public MCP; chưa được client bind trong snapshot hiện tại.
Root workspace = clone riêng main của Huyen1974/incomex-workspace; ui = /opt/incomex/docs/mcp-writes; docs = /opt/incomex/docs read-only. KB vẫn dùng tool KB. Reuse single-repo deploy key của host-helper/GSM, private cache0600 ngoài repo; không mount personal token. Khi rotate key cần refresh cache.
GitHub native KEEP_AS_IS: connector Huyen1974, installation73081538, all repositories, thấy13repo gồm workspace private có pull/push. Native create a535d45ea6baa2cf4fd0a449180ca3e5b2ae0e2f; update d7b1aac93486110deb2e8dc7a549e8e9a08682ad; SHA cũ bị409 và bản mới còn nguyên. Read314KB theo dòng được; fetch file một dòng2.214.568byte trả SHA đúng nhưng content rỗng. Native update cần toàn replacement content; dùng workspace_read theo ký tự + exact edit cho file lớn. PR/comment tool có trong schema, chưa thử ghi riêng; không tạo comment/PR không cần thiết.
Nghiệm thu thật:
- KB search/list/batch/chunk/upload/patch/readback đạt; báo cáo này update qua app. KB_PATCH_PROBE_PASS_20260917.
- 17 test local filesystem/Git PASS: path/symlink/hardlink/readonly/sensitive-content, bounded UTF8, atomic batch, stale content/HEAD, lock, real commit/push, hook-rejected push rollback, fetched attributes reject.
- Public MCP: 16 + 11 + 6 screenshot + 13 GitHub + 2 GitHub 2 MB calls PASS.
- Copy314KB: commit037861672b8fcefeb4e24f846a0fbf9e5a007ce8 chỉ BEFORE→AFTER, blob SHA đối chiếu qua native connector khớp.
- Commit chen ngang1de78781ca8eb58a96197a4e12fd6794410ac690 được giữ; expected_version cũ → VERSION_CONFLICT.
- File2.214.568byte một dòng: sửa/push bằng371byte args, commit72015c4ab208304e83494e05bafa5a93a02e2be4, tác giả AI via Incomex Workspace. Thời gian khoảng6,3giây. UI2,21MB tương tự chỉ319byte args; không gửi toàn file.
- Ảnh trước/sau đã nhìn: bản sao UI có banner xanh dương→xanh lá. Tái dùng Chromium1223 hiện có.
- Guard3/3pass; statusfresh; injection/shellstrings bị từ chối. Container healthy sau restart. Nạp KB cũ làm restart mất khoảng3phút; disk85%, còn15,4GB, failedunits cũ được ghi nhận.
An toàn và giới hạn: unique exact replace, all-or-nothing, expected_version gồm HEAD+hash, root lock, backup, atomic rename; fetch/ff-only cả lúc đọc Git; refuse dirtytree/wrongorigin/branch/attributes; noforce. Push không rõ kết quả giữ pending/freeze để operator kiểm tra. Không có OS-wide CAS với writer bên ngoài không hợp tác giữa kiểm cuối và rename. Status lấy mẫu1phút, log chỉ metadata an toàn; screenshot public allowlist/context không cookie. Không thêm filesystem-delete hoặc shelltool; deleteKB cũ giữ nguyên. File32MiB max, newfile20KB max, read6000chars/response<48KB.
Source chuẩn VPS /opt/incomex/docker/agent-data-repo: commits3f6eaa7d33f6d8ed49855b60845f3f605e62d6b1 và 558c35a7fa67fe416c64a67dd92c35892789243e; hướng dẫn cuối a42f94f47a4d7a3e7875b7915d240778dc3fcd34. README workspace đã cập nhật bằng commit 68018c61ca41b8d9c865a7fa74e3ada40ceae1c6. Infra4a8dcd16b9d5d573ec044ecaf147a6982bdb2247 vàe2d08e43c81db5f54f5b005ec488bc9d7165c04c. GitHub origin mã agent-data-test main cũ hơn VPS; không deploy/push đè. Repo workspace dữ liệu là repo khác, xuất hiện trong lúc audit.
Backup0700: /opt/incomex/backups/gpt-workspace-20260917T101543Z. Image cuối: agent-data-workspace:20260917-git. Rollback operator: python3 /opt/incomex/staging/gpt-workspace-20260917/rollback_workspace.py. Có guard hashCompose; giữ dữ liệu/backup, không reset toàn workspace. Hồ sơ chính: /Users/nmhuyen/Desktop/quy trình/ket-noi-gpt/audit.md, được link từ file cấu trúc hệ thống chính. Bằng chứng VPS /opt/incomex/staging/gpt-workspace-20260917/acceptance*.json, docs operator tại repo/docs/WORKSPACE_TOOLS.md.
Còn mở bắt buộc: account ChatGPT đã đăng nhập → kết nối hiện hữu → Refresh → thấy20tools → cuộc trò chuyện mới → workspace_read/vps_status/editfixture. Browser hiện có chưa login; serverhash đổi không đủ bằng chứng clientrefresh. Hướng dẫn chính thức https://developers.openai.com/apps-sdk/deploy/connect-chatgpt/.
Đề xuất chưa triển khai, ghi riêng tracker: giảm coldstart KB, retention backup, cache-key rotation sync, giải quyết divergence source bằng nhiệm vụ riêng.
Sự cố audit: outputnginx đầu phiên che GPT route nhưng chưa che một số path-secret connector khác. Không chép lại giá trị; các lần sau chỉ xuất allowlist. Chưa rotate; cần điều phối connector nếu xử lý rotation, không làm âm thầm. Không đánh dấu yêu cầu không-in-secret đạt tuyệt đối.