Zap·후원 FPI 귀속 · 이클립스 방어 Shake 전용 · 가입 팬덤만 방어
This commit is contained in:
@@ -9,7 +9,7 @@ import { callerUid, num, str } from '../core/callable.js';
|
||||
import { ERR, fail, positiveInt } from '../core/errors.js';
|
||||
import { FPI_AXES, loadPolicy, weightsAreUsable, type FpiAxis } from '../core/config.js';
|
||||
import { spendPop } from '../ledger/ledger.js';
|
||||
import { rankWithTies } from '../ledger/fpi.js';
|
||||
import { isMemberOf, rankWithTies } from '../ledger/fpi.js';
|
||||
import { txIdOf } from '../core/ids.js';
|
||||
import { dayKey } from '../core/time.js';
|
||||
import { notifyEclipseWarning } from '../notify/push.js';
|
||||
@@ -106,6 +106,10 @@ export async function defendEclipse(input: {
|
||||
db.doc(`users/${uid}`).get(),
|
||||
loadEclipseSettings(),
|
||||
]);
|
||||
// 방어는 그 팬덤의 활동이다 — 가입하지 않은 행성의 이클립스는 막을 수 없다(10/3 회신 #10).
|
||||
if (!isMemberOf(user, fandomId)) {
|
||||
fail(ERR.permissionDenied, '가입한 팬덤의 이클립스에만 참여할 수 있습니다.');
|
||||
}
|
||||
|
||||
const idempotencyKey = `defend:${uid}:${eclipseId}:${clientSeq}`;
|
||||
const logRef = eclipseRef.collection('defenseLogs').doc(txIdOf(idempotencyKey));
|
||||
@@ -327,6 +331,8 @@ export const DEFAULT_ECLIPSE: EclipseSettings = {
|
||||
dauWindowDays: 7,
|
||||
windowSec: 60,
|
||||
qualifyShakes: 60,
|
||||
// 🟡 임시값 — 회신 대기(해석 확인 요청 2026-10-07 영역A Q-A10). 아래 세 값은 자료 근거가 없다
|
||||
// (9/16 회신 3절 4항 「센서 판정 수치는 근거 없이 추가 확정하지 않음」). `config/eclipse` 운영값이 덮는다.
|
||||
perCallMaxShakes: 50,
|
||||
perUserMaxDefense: 500,
|
||||
minIntervalMs: 300,
|
||||
|
||||
Reference in New Issue
Block a user