feat: /api/leaderboard?format=export 语料回流导出通道(治理规则 2 前置) - #1
Merged
Conversation
- 默认榜单视图不变(payload 明文永不出服务端)
- export 视图:payload 明文 + attackSurface 映射(消费方无需读 levels/)+ limit 上限 500
- flag 形状令牌在源头确定性打码(FLAG{REDACTED})——回流管道的脱敏步骤前移,导出文件不可携带真 flag
- 测试 2 条:导出内容与默认视图隔离、空库与 limit 裁剪;99/99 全绿
- export 视图单次可达 500 行 payload 明文,原实现无限流;现按 IP 限流,429 附 retry-after,超限响应不带 payload 数据 - 默认榜单视图不受影响;审计日志记录 rate-limited 事件(route=leaderboard-export) - 测试 +1:第 6 次导出 429、默认视图不受限流影响;100/100 全绿
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更内容
按方案 v2 §九「并行前置工作」与 §5.2 治理规则 2,为语料飞轮「攻 → 审」管道补一条公开导出接口:
GET /api/leaderboard?format=export返回injectarena-export@1格式:破阵 payload 明文 +attackSurface映射(消费方无需读levels/)+ 段位榜,limit上限 500FLAG{…}→FLAG{REDACTED})——回流管道的「脱敏(flag 替换)」步骤前移到导出处,导出文件不可能携带真 flag;人工闸保留data/audit.db测试
export-corpus子命令)消费方与回流闭环
回流脚本(M4)将调用
?format=export→ 人工闸 → prompt-corpus-zh 入库(source: "arena"+verifiedAt,见 RFC-0001)