diff --git a/.agent/workflows/deploy_to_production.md b/.agent/workflows/deploy_to_production.md index 8a7a149..d6af457 100644 --- a/.agent/workflows/deploy_to_production.md +++ b/.agent/workflows/deploy_to_production.md @@ -21,7 +21,7 @@ - `ai-hub/app/core/grpc/core/mirror.py` - `ai-hub/app/protos/agent.proto` -**Run small file tests (Cases 1–4, ~60s) — the minimum bar before any commit:** +**Run small file tests (Cases 1–4 and 9, ~5s) — the minimum bar before any commit:** // turbo ```bash @@ -35,7 +35,7 @@ > The test file is deployed automatically by `remote_deploy.sh`. If you need to refresh it without a full deploy, see `/file_sync_tests` workflow. -All 4 small-file cases must show `PASSED`. If any fail, **do not deploy** — diagnose the regression first (see `/file_sync_tests` for troubleshooting). +All 5 small-file cases must show `PASSED`. If any fail, **do not deploy** — diagnose the regression first (see `/file_sync_tests` for troubleshooting). --- @@ -90,7 +90,7 @@ ai_hub_service \ python3 -m pytest /tmp/test_file_sync.py::TestSmallFileSync -v -p no:warnings 2>&1" ``` -All 4 must pass. If any fail post-deploy, **rollback immediately** using `git revert` and re-deploy. +All 5 must pass. If any fail post-deploy, **rollback immediately** using `git revert` and re-deploy. ### Visual Verification (Worst Case) If the backend check passes but UI behaviors are suspect or need deeper frontend validation, use the `/frontend_tester` workflow: diff --git a/.agent/workflows/file_sync_tests.md b/.agent/workflows/file_sync_tests.md index b79168e..aa21b3a 100644 --- a/.agent/workflows/file_sync_tests.md +++ b/.agent/workflows/file_sync_tests.md @@ -41,7 +41,7 @@ --- -## Step 2 — Run all 8 tests (all-in-one) +## Step 2 — Run all 10 tests (all-in-one) // turbo ```bash @@ -57,7 +57,7 @@ --- -## Run only small file tests (faster, ~60s) +## Run only small file tests (Cases 1-4, 9) (very fast, ~5s) // turbo ```bash @@ -71,6 +71,18 @@ --- +## Run Node Resync test (Case 10) (must run external to container) + +This test restarts the remote Docker container via SSH and verifies the manifest reconciliation. It **must** be run from a host with `sshpass` (e.g., your dev container), *not* inside `ai_hub_service`: + +```bash +SYNC_TEST_BASE_URL=http://192.168.68.113:8002 \ +SYNC_TEST_USER_ID=9a333ccd-9c3f-432f-a030-7b1e1284a436 \ +python3 -m pytest ai-hub/integration_tests/test_file_sync.py::TestNodeResync -v -s -p no:warnings +``` + +--- + ## What the tests cover | Case | Scenario | File Size | @@ -83,6 +95,8 @@ | 6 | Write 20 MB from server → all client nodes receive it | 20 MB | | 7 | Delete large file from server → all nodes purged | 20 MB | | 8 | Delete large file from `test-node-2` → Hub mirror + `test-node-1` purged | 20 MB | +| 9 | Verify reading a deleted file returns immediately (0s) instead of timing out | Small | +| 10 | Node Resync: Restarts a node container and verifies Hub re-pushes missing workspace files automatically | Small | ---