Files
group_xinghuo_jinrong/docs/course/jinrong-overview/modules/05-status.html
T
zhanghongyu_0626 793c0307f8 feat(risk): Enhance risk management functionality and access control
- Updated `RiskListAccess` and `ThresholdWriteAccess` to enforce access control in the risk repository and threshold repository, ensuring only authorized roles can perform sensitive operations.
- Introduced new methods in `RiskRepository` for counting pending alerts and listing alerts with access checks, improving data security and compliance.
- Enhanced the `chat.py` and `deps.py` files to integrate compliance roles into the risk management matrix, allowing for more granular access control.
- Updated documentation to reflect the new testing baseline of 825 passed tests, indicating improved stability and functionality across the application.

This update significantly strengthens the risk management capabilities, ensuring robust access control and compliance with organizational policies.
2026-09-11 17:07:22 +08:00

78 lines
4.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<section class="module" id="module-5">
<div class="module-inner">
<p class="eyebrow animate-in">模块 5 · 现状与下一步</p>
<h1 class="module-title animate-in">现在做到哪?<br>怎么本地跑起来</h1>
<p class="module-lead animate-in">
分支 <code>merger</code> · 测试基线 <strong>825 pytest</strong> · 前端 <strong>22 Vitest</strong> · Redis Docker <strong>6380</strong>。
文档入口:<code>docs/memory/MEMORY.md</code> §0 · 答辩提纲 <code>docs/答辩/答辩知识点清单.md</code> · 滚动版见<strong>模块 8</strong>。
</p>
<div class="screen animate-in">
<h2>已完成(2026-09-10 快照)</h2>
<div class="pattern-cards">
<div class="pattern-card"><h3>✓ 平台 API v0.1</h3><p>客户/产品/顾问/合规只读 REST</p></div>
<div class="pattern-card"><h3>✓ 四 Agent 对话 + SSE</h3><p>客服 Wave3 · 游客 1B · customer 14 节点</p></div>
<div class="pattern-card"><h3>✓ 问数 S3 + D-06</h3><p>模板填参 · 结果缓存 + 写侧 bump · 问数 UI 标签</p></div>
<div class="pattern-card"><h3>✓ 风控 + 前端 P0</h3><p>台账/模拟/AML 页 · <code>prepare_all.ps1</code> 灌库</p></div>
</div>
</div>
<div class="screen animate-in">
<h2>仍开放(指挥 AI 前先心里有数)</h2>
<ul>
<li>接口契约发群(稿在 <code>docs/项目管理/接口契约发群-2026-09-09.md</code>)</li>
<li>风控演示种子 / cron 脚本(运维向,见 TODO)</li>
<li>画像 Redis L1/L2 热缓存未全接</li>
<li>口径字典种子 SQL 需本机执行一次</li>
</ul>
</div>
<div class="screen animate-in">
<h2>本地启动(最小路径)</h2>
<div class="step-cards">
<div class="step-card"><span class="step-num">1</span><p><code>pip install -r requirements.txt</code></p></div>
<div class="step-card"><span class="step-num">2</span><p><code>.\scripts\demo\prepare_all.ps1</code> 或 <code>.\scripts\core\reset.ps1</code></p></div>
<div class="step-card"><span class="step-num">3</span><p><code>.\scripts\dev\start-redis.ps1</code> → 6380</p></div>
<div class="step-card"><span class="step-num">4</span><p><code>uvicorn app.main:app --reload</code> :8000</p></div>
<div class="step-card"><span class="step-num">5</span><p><code>cd web && npm run dev</code> → :5173 代理 API</p></div>
<div class="step-card"><span class="step-num">6</span><p><code>python -m pytest</code> 验收 825 绿</p></div>
</div>
<div class="callout callout-accent">
<strong>改后端后:</strong> 若浏览器问数 404,多半是 :8000 的 uvicorn 没重启,OpenAPI 里还缺新路由。
</div>
</div>
<div class="screen animate-in">
<h2>情景题:AI 说「问数和 Chat 用同一套鉴权」</h2>
<div class="quiz-container" id="quiz-module5">
<div class="quiz-question-block"
data-correct="option-c"
data-explanation-right="应纠正 AI:问数走 get_platform_auth_context,Chat 走 get_auth_context + X-Agent-Type。两套不能混。"
data-explanation-wrong="这是本项目的核心接缝设计,写错会导致 401 或越权。">
<h3 class="quiz-question">你怎么回复?</h3>
<div class="quiz-options">
<button class="quiz-option" data-value="option-a" onclick="selectOption(this)">
<div class="quiz-option-radio"></div><span>好的,都加 X-Agent-Type: analyst</span>
</button>
<button class="quiz-option" data-value="option-b" onclick="selectOption(this)">
<div class="quiz-option-radio"></div><span>都去掉 JWT,用 debug 头</span>
</button>
<button class="quiz-option" data-value="option-c" onclick="selectOption(this)">
<div class="quiz-option-radio"></div><span>不对,对照 MEMORY/发群稿里两套鉴权表</span>
</button>
</div>
<div class="quiz-feedback"></div>
</div>
<button class="quiz-check-btn" onclick="checkQuiz('quiz-module5')">检查答案</button>
<button class="quiz-reset-btn" onclick="resetQuiz('quiz-module5')">重做</button>
</div>
<div class="callout">
<strong>想继续深入?</strong> 模块 8 有<strong>答辩 5~8 分钟动线</strong>;或打开 <a href="../index.html" style="color:var(--accent)">课程中心</a> 按角色深潜。
</div>
<p class="module-footer-note">课程更新 2026-09-10 · 对照 <code>docs/memory/MEMORY.md</code> 与 <code>docs/答辩/答辩知识点清单.md</code></p>
</div>
</div>
</section>