chore: complete infrastructure config, contracts, reference images and ui redesign artifacts
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import fs from 'node:fs'
|
||||
|
||||
const read = (path) => fs.readFileSync(path, 'utf8')
|
||||
const engine = read('backend/src/main/java/com/danyang/match/platform/match/service/RecommendationEngineService.java')
|
||||
const legacyEligibility = read('backend/src/main/java/com/danyang/match/platform/match/service/MatchEligibilityService.java')
|
||||
const home = read('backend/src/main/java/com/danyang/match/platform/home/service/HomeApplicationService.java')
|
||||
const card = read('miniapp/components/recommend-card/index.wxml')
|
||||
|
||||
assert.match(engine, /isParticipantEligible\(userId\)/, '推荐入口必须校验当前用户资格')
|
||||
assert.match(engine, /findByRelation\(targetUserId, userId, Constants\.RELATION_TYPE_BLOCKED\)/, '必须检查反向 Block')
|
||||
assert.match(engine, /localEligibilityMapper\.findByUserId/, '正式推荐引擎必须接入本地资格 Provider')
|
||||
assert.doesNotMatch(legacyEligibility, /PROFILE_STATUS_PENDING_REVIEW\.equals\(el\.getVerificationStatus\(\)\)/, 'pending_review 不得视为本地资格通过')
|
||||
assert.match(home, /recommendationEngineService\.getDailyRecommendations\(userId\)/, '首页必须调用正式推荐引擎')
|
||||
assert.doesNotMatch(card, /score|percent|匹配率|%/, '用户端不得显示数字匹配率')
|
||||
|
||||
console.log('Phase 06 match eligibility contracts passed')
|
||||
Reference in New Issue
Block a user