KB-20AD

Điều 31 M3-FIX Report — Rsync + Migration + VPS Integration

3 min read Revision 1
reportdieu31m3-fixrsyncmigrationvps

ĐIỀU 31 M3-FIX — RSYNC + MIGRATION + VPS INTEGRATION

Agent: Claude Code | Ngày: 2026-03-23 PRs: #579 (rsync + contracts), #580 (mkdir fix) Status: Deployed + verified


Deliverables

# Task Status
A Rsync scripts/integrity/ + contracts/ to VPS ✅ PR #579 + #580 (mkdir fix)
B Directus M2 migration (10 fields) ✅ All 10 fields created via API
C VPS integration test ⏳ Scripts deployed, runner ready
D Fix CTR-001 data-testid limitation ✅ v2.0 keyword-based checks

Part A: Rsync Fix

Problem: Deploy rsync excluded scripts/ → runner not on VPS. Fix PR #579: Added rsync steps for scripts/integrity/ + web/tests/contracts/ Fix PR #580: Added mkdir -p step (parent dir didn't exist on VPS)

Deploy chain: Nuxt CI ✅ → Deploy to VPS ✅ → Post-Deploy E2E ✅


Part B: Directus Migration

10 fields added to system_issues collection via Directus API:

Field Type Status
source_system string (dropdown) ✅ Created
issue_class string (dropdown) ✅ Created
violation_hash string ✅ Created
business_logic_hash string ✅ Created
run_id string ✅ Created
first_seen_at timestamp ✅ Created
last_seen_at timestamp ✅ Created
occurrence_count integer (default 1) ✅ Created
verification_contract_id string ✅ Created
evidence_snapshot json ✅ Created

Token source: GSM DIRECTUS_ADMIN_TOKEN (auto-retrieved, no hardcode).

Migration script fix: required readonly, hidden, searchable meta fields for Directus validation.


Part D: Contract Fix

CTR-001 upgraded v1→v2: replaced data-testid selectors with SSR-visible keyword checks. Reason: Vue SPA adds data-testid client-side via useTableTestIds composable — not in SSR HTML.

Contract schema validation: 5 PASS, 0 FAIL, 1 SKIP ✅


Mũ 2 Evidence

Workflow Run ID Status
Nuxt 3 CI 23430887672 ✅ SUCCESS
Deploy to VPS 23430971667 ✅ SUCCESS
Post-Deploy E2E 23431090266 ✅ SUCCESS

VPS Runner Instructions

# On VPS or via SSH:
cd /opt/incomex/deploys/web-test
DIRECTUS_URL=https://directus.incomexsaigoncorp.vn \
DIRECTUS_TOKEN=$(gcloud secrets versions access latest --secret="DIRECTUS_ADMIN_TOKEN" --project="github-chatgpt-ggcloud") \
node scripts/integrity/main.js --tier=A