For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task.
Goal: Fix remaining API issues from v10 test report, update API test coverage for newly added features, and document E2E test deployment path.
Architecture: Backend fixes in existing controllers (ProductSkuController, AdminGuideController) targeting NPE and 500 errors. Add API test cases for recent features to v9_test.js. Document uni-app H5 deployment config for E2E test execution.
Tech Stack: Spring Boot 2.7.18 (backend), Node.js (API tests), Playwright (E2E tests)
| File | Action | Reason |
|---|---|---|
cfc-backend/src/main/java/com/etotem/cfc/controller/admin/ProductSkuController.java |
Modify | Fix NPE in listByProduct (NEW-02) |
cfc-backend/.../controller/guide/AdminGuideController.java |
Modify | Fix 500 in activity list (INFO-GA) |
tests/v9_test.js |
Modify | Add test cases for food/seasonal-months/nutrition endpoints |
tests/ISSUE-TRACKING.md |
Modify | Update issue statuses |
tests/TEST-RESULTS-v10.md |
Modify | Add v10.5 results |
cfc-backend/src/main/resources/application.yml |
Check | Verify guide activity test config |
Files:
cfc-backend/.../controller/admin/AdminArticleController.javacfc-backend/.../controller/admin/AdminFoodController.javacfc-backend/.../service/ArticleService.javacfc-backend/.../service/FoodService.javacfc-web/src/api/admin.jsCommit: cfc-web/src/views/admin/Foods.vue
[ ] Step 1: Stage and commit the current session's work
cd /sc-data/cfc
git add cfc-backend/src/main/java/com/etotem/cfc/controller/admin/AdminArticleController.java
git add cfc-backend/src/main/java/com/etotem/cfc/controller/admin/AdminFoodController.java
git add cfc-backend/src/main/java/com/etotem/cfc/service/ArticleService.java
git add cfc-backend/src/main/java/com/etotem/cfc/service/FoodService.java
git add cfc-backend/src/main/java/com/etotem/cfc/service/ArticleService.java
git add cfc-web/src/api/admin.js
git add cfc-web/src/views/admin/Foods.vue
git commit -m "feat: article AI auto-tagging + food seasonal months management"
Expected: 7 files committed.
Files:
cfc-backend/src/main/java/com/etotem/cfc/controller/admin/ProductSkuController.javaBackground: POST /api/admin/product/sku/list crashes with 500 when productIdObj is null. The params.get("productId") returns null, then .toString() on null throws NPE before the guard.
Read the file:
cfc-backend/src/main/java/com/etotem/cfc/controller/admin/ProductSkuController.java
Locate the listByProduct method. Find the problematic code:
Object productIdObj = params.get("productId");
if (productIdObj == null) return Result.error("productId不能为空");
Long productId = Long.parseLong(productIdObj.toString()); // NPE if null
Fix: The issue is that Long.parseLong(productIdObj.toString()) can NPE because productIdObj is checked for null, but toString() could be called on a differently typed null. Actually the real NPE is likely that productIdObj is not null but is an Integer (not Long), so Long.parseLong() fails on something else. But the guard seems correct. Let me re-read the issue:
From NEW-ISSUES-20260702.md:
Object productIdObj = params.get("productId");
if (productIdObj == null) return Result.error("productId不能为空");
Long productId = Long.parseLong(productIdObj.toString());
Wait, this actually looks fine for NPE (productIdObj is checked before calling toString). The issue might be that Long.parseLong fails because productIdObj might be an Integer, and Integer.toString() returns the number as a string, so Long.parseLong("123") works fine.
Actually, let me re-read the v10 test result: "SKU list | ✅ PASS | SKU列表查询正常(NPE已修复)" - NEW-02 shows it's already fixed in the test! Let me check the git log for this fix.
Wait, looking at the test results again:
| NEW-02 | SKU list | ✅ PASS | SKU列表查询正常(NPE已修复) |
But in NEW-ISSUES-20260702.md:
## NEW-02:SKU列表接口返回 500 ❌ 仍有Bug
The test result says PASS but the issue doc says FAIL. The test was from v10 (2026-07-04) and the issue doc is from 2026-07-02. So the fix was likely applied between those dates.
Let me check if there's a recent fix for this.
Search for the listByProduct method:
grep -n "listByProduct" cfc-backend/src/main/java/com/etotem/cfc/controller/admin/ProductSkuController.java
Read the method to confirm the fix is already in place. If Long.parseLong is used with a try-catch or the input validation uses instanceof, the fix is done.
If the fix IS already in place:
If the fix is NOT in place:
Apply the fix:
Object productIdObj = params.get("productId");
if (productIdObj == null) return Result.error("productId不能为空");
Long productId;
try {
productId = Long.parseLong(productIdObj.toString());
} catch (NumberFormatException e) {
return Result.error("productId格式错误");
}
Files:
cfc-backend/.../controller/guide/AdminGuideController.java (or wherever the guide activities list endpoint lives)Background: POST /api/guide/activities/list returns 500. Test report marks it as INFO-GA ("可能是数据问题"). This might be an endpoint that requires a specific data state.
Search:
grep -rn "activities/list" cfc-backend/src/main/java/com/etotem/cfc/controller/
Read the controller method handling this endpoint to determine if it's a code bug or a data issue.
Check if the method:
If code bug: Apply minimal fix (add null checks, try-catch, or default values).
If data issue: Update ISSUE-TRACKING.md to note it's a data dependency, not a code bug.
Files:
cfc-backend/.../controller/auth/AuthController.javacfc-backend/.../config/JwtInterceptor.javaBackground: Vendor login (POST /api/auth/phone-login) returns non-token response. The test vendor (userId=81069) has vendor_status=pending in the test data.
Check if the phone login method has any role-based filtering that might block pending vendors.
Check if there are any JWT rules that might affect vendor token generation.
Try:
curl -X POST http://cfc.iwintrue.com/api/auth/phone-login \
-H "Content-Type: application/json" \
-d '{"phone":"13800138001","code":"123456"}'
Check the response. If it returns a proper token, the issue is the test data (vendor not approved). If it returns an error, it's a code bug.
If vendor_status=pending is blocking login → Mark as test data issue, document in ISSUE-TRACKING.md.
If code bug → Fix the login flow to allow pending vendors to log in (they just can't use vendor-only features until approved).
Files:
tests/v9_test.jsBackground: The current API test script doesn't cover:
[ ] Step 1: Read existing v9_test.js structure
less tests/v9_test.js
Understand the test structure: how tests are grouped, how tokens are obtained, how results are reported.
Add tests for:
NEW-FOOD-01: Food list (list all foods)
NEW-FOOD-02: Food create (create a new food item)
NEW-FOOD-03: Food detail with months (verify months field present)
NEW-FOOD-04: Save seasonal months (set months 6,7,8 for a food)
NEW-FOOD-05: Food delete (cleanup)
Each test should use the same admin token mechanism as existing tests.
Check if these endpoints exist:
POST /api/health/foods/by-family
POST /api/meal/recommend
If they exist, add basic health-check tests.
[ ] Step 4: Run the updated test script
node tests/v9_test.js 2>&1 | tee tests/v10.5_result.txt
Verify all existing tests still PASS and new tests PASS.
Files:
tests/TEST-RESULTS-v10.md (or create v11)tests/ISSUE-TRACKING.mdModify: docs/系统测试/issue-tracking/NEW-ISSUES-20260702.md
[ ] Step 1: Update test results
Create tests/TEST-RESULTS-v11.md with the new test run results. Include:
Regression test results
[ ] Step 2: Update issue tracking
In tests/ISSUE-TRACKING.md:
In docs/系统测试/issue-tracking/NEW-ISSUES-20260702.md:
Files:
docs/E2E-DEPLOYMENT-GUIDE.md (optional — only if user wants it)Background: All 17 Playwright E2E test files (100+ scenarios) are blocked because the uni-app H5 frontend isn't deployed to a browser-accessible URL. The tests use hash-based routing (/#/pages/...) which requires uni-app's H5 build.
Update tests/E2E-TEST-STATUS.md to include:
playwright.config.jsThe deployment command would be:
cd cfc-frontend
npm install
npm run build:h5 # produces dist/build/h5/
# Then rsync to web server (same nginx that serves cfc-web)
The playwright.config.js baseURL would need to change to wherever the H5 build is deployed.
Read tests/playwright.config.js to confirm the baseURL config, document how to switch between environments.
| Requirement | Task | Status |
|---|---|---|
| Commit current work | Task 1 | ✅ |
| Fix SKU NPE (NEW-02) | Task 2 | ✅ — verify first, fix if needed |
| Investigate INFO-GA (guide 500) | Task 3 | ✅ — analyze, fix or classify |
| Investigate ISSUE-001 (vendor login) | Task 4 | ✅ — analyze, fix or classify |
| Update API tests | Task 5 | ✅ — add food/seasonal coverage |
| Update issue tracking | Task 6 | ✅ |
| Document E2E deployment | Task 7 | ✅ |
No TBD/TODO/fill-in patterns found — all steps have concrete action descriptions.
@PostMapping convention (verified in codebase)v9_test.js structure