Repository navigation
feat(finance): publish complete quantity research through existing review surfaces - #6436
Conversation
…view surfaces Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=xhigh.
Request changes conclusion (author-owned PR; GitHub blocks formal self-review)
Exact head: f5fb7f8.
动机
当前完整行为边界是数量输入到既有成果页和飞书草稿的同一份受验证展示;仍需修复新夹具的公开边界失败,之后重跑同一必需检查。
数量核对的使用者需要在已有研究成果页复核原始声明、计算结果和缺证原因。之前只能得到数量计算 JSON,研究成果页没有这类完整材料;现在显式发布后可在同一 Goal 的成果页阅读完整声明,修改缺失值后显示未知,旧引用失效,禁用后隐藏并可恢复。真实发布、打包成果页、精确引用的飞书卡片草稿及修改和恢复路径已通过;新夹具引入的必需公开边界扫描失败仍需修复。范围是可选 Finance provider 的数量研究展示,不宣称来源认证、现金推导、金融效用、投资或交易许可,也不代表全套冻结研究验收或已安装版本升级。 原有数学接口已经能区分算术一致、缺失、来源不合格与冲突;问题是这些原始声明尚未进入用户已有的研究阅读路径,使用者要另外解读 JSON。这次不应把“数字恰好相等”升级成已认证的金融结论。
改动思路
复用现有数量计算、研究视图、Core 发布与引用读取,Python 只承担已归属 provider 的领域计算和展示,不另建通用控制面决策源。当前完整行为边界是数量输入到既有成果页和飞书草稿的同一份受验证展示;仍需修复新夹具的公开边界失败,之后重跑同一必需检查。 这里新增的是领域展示 producer,不是新的通用 capability 或权限开关。原输入是调用者声明;数量计算仍只有既有 owner,展示层由计算结果派生,Core 的当前启用状态、版本、doctor 和哈希继续控制读取。使用者从已有 Goal 成果页阅读,不需要再填同一份已知材料或新增确认步骤。飞书沿用同一份 view 和精确发布引用,仅生成卡片草稿。
| 路径 | 本 head 的行为 |
|---|---|
| 原有数量、资金费率和研究输入 | 实际 stdin 的完整输出、错误信息及 exit 与基线相同 |
| 新数量研究 wrapper | 一次计算,完整原始声明、缺证和时间戳进入既有成果页 |
| 缺失、旧引用、禁用 | 显示未知而非零;旧哈希拒绝;禁用隐藏,显式恢复后读回当前结果 |
表格概括源代码与已执行的路径,没有把展示当成来源认证。Python 的归属合理:这是已有可选 provider 的稳定领域计算/呈现,未在 Python 新建 TS 控制面的决策源。相邻重构已应用:资金费率的私有引用遍历迁入现有 presentation_validation,两个 caller 共用一个安全规则;两种领域的独立计算不应为了相似函数形状强行抽象。
具体改动
完整差异是十条路径 +630/-22:新增 265 行数量研究 builder、106 行合成例子和 182 行聚焦测试;扩展原 CLI/stdin 与 dashboard dispatch;移动既有资金费率引用遍历;更新 README 与 provider 版本 0.8.15→0.8.16。Core 发布格式、成果页和飞书 renderer 没有再复制实现。
先读的是 b4603d8255de19d34a0b291b0f8cde106cbbbc6f 的既有 provider README,不是新增说明。规范映射:数量存量与变动 implemented,保留同 class/pool/unit/precision 与未知值规则;研究展示 implemented,完整原始操作数、来源/时点限制沿现有 Core view 和两类 reader 执行;公开与私有边界 not_met,新增测试字面量引入当前必需公开扫描失败。更大的冻结研究/金融效用验收不属于这次展示增量。
关键代码讲解
- build_quantity_research_packet L45 先调用原计算,按原 opening/closing/flows 写完整声明。
None在 assessment 中仍是 null,指标明确显示 unknown (not zero)。同一合成输入的 100+25−8=117 能完整展示;改成缺失 opening 后,候选和核对期末不再冒充 117。原 capture、cutoff、review_due 保留,没有拿当前评审时间刷新来源。 - MAX_DISPLAY_FLOWS 与分支 L77 对既有十二层展示明确限制八个 flow;独立测试八个产生十二层,第九个拒绝,未截断或发布。数学接口的 256 flow 上限没有改变。长数字移到完整 layer 而非四舍五入;全部 reason codes 分组保留。
- build_finance_research_dashboard_packet L713 只为新的 provider-local schema 分流,再交原 view validator。实际原五类合法输入及既有资金费率非法引用的 stdout/stderr/exit 在不可变 base/head 完全相同;新 wrapper 在基线 exit 1、不支持,在当前 head exit 0、产生完整 view,是明确披露的扩展。
- public_reference_tree L188 复用原引用/URL 边界,原 funding diagnostic context 保留。新输入 schema 仅本 provider 使用;QuantityFlowDirection、QuantityMeasure、QuantityReconciliationState 和 decision_research_dashboard_v0 复用原 owner,未新增共享状态词表。
对主干的风险
[P2] 新合成负面夹具使必需公开边界扫描失败。 test_quantity_presentation.py L126 新增了带凭据型查询参数的 URL 字面量。它确实是合成输入,不是实际秘密泄露;问题是同一未修改的必需 scanner 将它判为 credential,当前 canary 因此红。基线六个已存在的候选路径扫描通过,head 十路径仅此新增行命中,已经完成当前提交的因果归因,不能归为远端 CI 或无关历史失败。
最小修复是沿仓库负面夹具惯例,在运行时构造相同的合成非法输入,保留所有拒绝断言。已在一次性文件中验证:同样运行值不变,原生同文件扫描通过;未修改 tracked head,因此这只是可行修复证据,不能说本 PR 已转绿。不要改 scanner、预算、扫描根或白名单来抹掉结果。作者修复后须重跑 loopx canary premerge --from-git-diff --git-diff-base b4603d8255de19d34a0b291b0f8cde106cbbbc6f。
语义与 CI 对齐
源 checkout 的 provider 全套及三类现有 extension/presentation 相关测试 353 passed / 0 skipped;重新构建并验证当前 Chat bundle。真实隔离 synthetic Goal 走原生 install/doctor/publish/read 后,在当前打包成果页的桌面与 390px 手机阅读完整声明;键盘刷新可用,过期历史 review deadline 诚实显示 Review due。修改缺失值、旧哈希拒绝、错误 Goal 卡片拒绝、禁用后的空结果及显式 enable/doctor 后恢复均通过,没有模拟 UI 的后置结果或使用活动 Goal 当测试夹具。
飞书只生成并核对正确精确引用的卡片草稿,未发送。原始来源时间不变,current adjudication 一直是 insufficient_evidence,validated alpha 为 0、method unchanged,来源认证/现金/金融/交易仍无许可。当前全 diff canary 4 direct / 17 selected / 1 required failure:其余选定检查通过,唯一失败即上面的新夹具。开发 advisory 在全树 semantic 之前执行;未降低任何断言或预算。
初次测试路径、局部依赖准备及评审探针的签名/字段/selector 错误均已按实际入口修正,当前决定性结果如上;这些不冒充产品缺陷或通过证据。未查询、轮询、等待或触发 GitHub CI。没有新增 generic control-plane 的领域文案、substring 状态分类或 must_attempt_work 义务;既有安全输入拒绝是机器校验,不是“建议”。
我的整体评价
REQUEST_CHANGES,只绑定 f5fb7f8。问题、归属与机制规模合适,实际用户 journey 已完整补证,long_horizon 与 user_experience 均 improved;当前是 justified_increment,仍必须修复夹具造成的公开扫描红项后才能交付这个 reviewable batch。兼容性保留是有实际 CLI/持久 view reader 的依据,共享引用 owner 重构已在本 PR 应用;不需要新 capability 或仪式性后续任务。修复原行并重跑原检查即可复审,不需要改变数学合同、扩大前端表单或证明整个金融研究路线图。审批、合并 readiness 和授权仍分别判断。
English verdict: REQUEST_CHANGES — f5fb7f8. The complete optional quantity review works through the real provider/Core publication, packaged Goal Results and exact-reference Lark draft, including missing-value, stale/wrong-scope, disable and recovery cases. All 353 focused tests pass and legacy CLI output/diagnostics match the immutable base. The newly added synthetic credential-shaped URL at test_quantity_presentation.py:126 nevertheless fails the unchanged required public-boundary scan. Preserve the negative input using the repository-safe fixture construction, then rerun the same full canary; this is a fixture validation blocker, not an actual secret leak.
…oundary Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=xhigh.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Exact head: 75abf85.
动机
需要在现有 Goal 成果页复核数量存量和交易变动的研究使用者。 过去拿到数量计算 JSON 后仍需另行整理原始声明;现在显式发布一次后,可从同一 Goal 成果页复核 100+25−8=117、缺证、冲突和原始时钟。 数量输入、完整 assessment、App 读回及精确引用的飞书草稿使用同一 Finance 结果,缺失不补零、旧引用不替换。 本 PR 不认证来源、推导现金、证明投资效用、授予交易许可或发送卡片。 来源适配的生产采用、金融效用和实际消息送达仍分别验收;本评审不宣称本机已升级。
这是有实际读取者的完整展示增量(justified_increment)。原计算本身已能区分一致、缺失、不合格与冲突;使用者此前仍要把 JSON 手工转换成研究材料,容易丢掉原始口径与未知值。明确发布后沿现有成果页读取与刷新,不新增导航、重填或确认,也没有把 arithmetic agreement 当作金融判断。当前源码、原生计算/发布及所复用读回证据支持这个边界;更大投研业务仍不因此验收。
改动思路
复用 Finance 的 quantity reducer、研究 view validator 和既有 App/Lark renderer,Core 继续唯一拥有发布、当前 revision/hash 与启停。Python 仅做既有专门领域映射,不另建 TS 控制面、配置开关或 capability。只手工生成 view 会重新实现计算与缺证规则;新增页面/泛化框架也不能减少用户步骤。当前结构保留既有 producer 与 reader,新增一个真实会被原发布入口消费的 quantity wrapper。相邻重构已应用:public_reference_tree 移到原 presentation_validation owner,funding 与 quantity 共用安全规则,两个不同领域的 layer builder 保持局部。
| 路径 | 当前 head 的结果 |
|---|---|
| 原 quantity、funding、research 及 funding 非法引用 | 完整 stdout/stderr/exit 与实际0.8.15基线一致 |
| 新 quantity wrapper | 原生返回完整 assessment,发布同源 research view 与精确引用卡片草稿 |
| missing/conflict/stale/off | qualified结果保持未知;旧引用拒绝;关闭清除,显式恢复读回当前发布 |
上述表格是源码和执行证据的说明,不是独立验收。由既有 Finance quantity 和 presentation owner 派生展示,Core 仅保留原 lifecycle/hash authority。 本 PR 的边界是数量声明到既有成果页与精确引用卡片草稿的完整展示。 来源生产采用、消息发送和金融效用另有 owner。
具体改动
全 PR 十路径 +640/-22:quantity_presentation.py 265行、合成wrapper106行、tests192行,README及0.8.15→0.8.16版本元数据、CLI/dashboard schema dispatch、共享引用遍历迁移。Last-review-to-head 仅 tests/test_quantity_presentation.py 一项 URL 构造改动;运行35个py/json、CLI/view/frontend/dependency没有变化。前次 REQUEST_CHANGES 的合成凭据形态字面量已沿既有 funding fixture 惯例用 urlencode/urlunparse 构造,实际字符串与拒绝断言不变;相同扫描根、扫描器与canary现通过,无白名单或预算修改。
独立规范是 packages/loopx-finance-value-discovery/README.md,spec_revision b4603d8255de19d34a0b291b0f8cde106cbbbc6f。Quantity stocks and signed flows implemented:原身份/单位/精度/缺证由原reducer拥有;Public-Safe Research Surface implemented:完整声明和保守结论进入原validator与reader;Funding research review implemented:原版引用与错误语义保留;Public/private boundary implemented:原必需扫描红项已由fixture修复和相同检查解除。新README不是用来倒推验收标准。
- build_quantity_research_packet L45 只计算一次,保留原 opening/closing/flows、全部refs/digest/clock/identity/unit/value/accuracy/order和reason codes,原assessment随packet返回。100+25−8=117可复核;missing opening不倒算,不用零填未知;118 closing显示冲突但不输出qualified closing。主adjudication仍insufficient_evidence、alpha0、method unchanged。来源认证、PIT、现金和交易均不由展示推定。
- MAX_DISPLAY_FLOWS L15 与既有十二层容器对应:8 flows完整,9 flows明确拒绝。长 exact decimal 进入完整layer,metric不四舍五入。原256-flow数学接口不改;文本/卡片更大时仍显式拒绝,不截断后声称完整。
- build_finance_research_dashboard_packet L713 和CLI只为本provider-local input新增分支。已有view/envelope、Core生命周期和TS成果页不复制;实际旧输入 good/bad 四组完整输出/诊断/exit相同。
- public_reference_tree L188 复用原evidence_reference,nested identity/source refs仍拒绝private/unsafe内容,原funding error context一致。新schema literal局限本provider;QuantityMeasure、QuantityReconciliationState和decision_research_dashboard_v0复用既有owner。
对主干的风险
最大风险是让算术一致或不完整展示看起来已经认证,或共享引用迁移改变旧资金费率caller。当前代码固定保守adjudication和authority flags,完整回传assessment并显式限容;当前missing/rounded/class/coverage/conflict/long-decimal/8-vs9及private-ref测试覆盖这些反例。四组实际旧/新binary的完整stdout/stderr/exit对照无归一化,特别覆盖funding安全拒绝上下文,避免仅凭两个API都抛错判断兼容。
353项当前源码测试通过(20.80s),13项fixture定向检查通过;原同范围canary4项direct和17项selected现全部通过,包含未修改的公开边界scanner、syntax、diff及全树semantic smoke。Chat bundle源指纹验证通过。源码中无新的Core义务、substring状态分类、自动执行或account授权;本provider领域错误不扩散到Goal/Turn/quota。自动语义advisory未覆盖provider包,局部schema/enum/view归属另作人工审核。
页面证据明确按版本继承:原f5fb的完整packaged Goal Results桌面/390px手机、键盘刷新、unknown/conflict/旧hash拒绝、wrong-Goal卡片、disable清除/enable恢复和英文reload,原始DOM/调用回执已读取,另有独立完整评审佐证。现head相对该版本只改fixture,35运行文件及frontend/dependencies没有差异;当前native完整packet/publication/card又实际调用。未继承前次verdict,本次按完整PR重新判断。
原冻结asset/directory失败和本次额外locale探针均保持failed_STOP。本次实际观察locale=en、按钮Files,探针硬编码中文成果,停止在入口定位;未运行后续页面case,不冒充资格通过。这一caller诊断失败没有改变被继承的产品代码或得到相反的产品结果。按当前review contract的exact-head evidence_scope,独立且仍适用的读回继续有效;它不构成绕过一个仍未验证的受影响不变量。未查询、等待或轮询GitHub CI。
我的整体评价
APPROVE,仅针对 75abf85a109280aba71b48b335255cd678b0d582。以前的唯一公开扫描finding已经修复,相同检查通过,完整增量仍有实际消费者、明确未知和可恢复的版本/启停语义;long_horizon和user_experience均improved。现有owner组合足够,保留有部署调用者的旧契约,已合并共享安全检查,不需要新框架或重复任务。表示候选的README/version不等于正式发布;本机升级、source consumer采用、实际发送和效用按各自证据验收。
批准结论不替代原生approval closeout、紧邻merge readiness或用户的Finance范围授权,三个阶段仍分别读回。三个诊断失败的原记录保留;不把它们写成产品通过,也不让新增仪式性的“正式”标签否认仍有效的完整consumer证据。
English verdict: APPROVE — 75abf85. The synthetic unsafe-URL fixture preserves its rejected runtime value and now passes the unchanged required public-boundary scan. All353 current tests and4 direct/17 selected canary checks pass; four actual legacy CLI pairs preserve full output/diagnostics/exit. Installed native publication and exact Lark draft pass; complete packaged reader evidence is reused only after verifying unchanged runtime/UI/dependencies. The additional locale-specific diagnostic remains failed, not a new product verdict. Source utility, sending and deployment remain separate.
Quantity assessments previously lacked a producer for the existing Investment Research surface. The optional Finance research wrapper now returns the complete assessment and publishes bounded original operands, candidate/qualified quantities, holds and clocks through the existing Goal Results view and exact-reference Lark draft. Arithmetic agreement preserves unproven source/financial/trading admission. Overflow refuses without truncation; the 256-flow arithmetic API remains unchanged.
The user journey reuses Goal → Results → read/refresh/reference details, with no new navigation, repeated input or authority. Funding and quantity share the existing reference validator. The review finding about a synthetic unsafe URL is fixed using the existing runtime fixture-construction pattern; the rejected value and assertions remain identical.
Validation: 353 current package/extension/presentation tests, 13 focused tests, unchanged whole-diff canary (4 direct +17 selected, all pass), bundle integrity, source/wheel/installed runtime byte equality, native complete packet/publication/exact Lark draft, and four actual baseline/new CLI pairs with full stdout/stderr/exit equality. Complete packaged App missing/conflict/stale/wrong-scope/disable/recovery/phone/English evidence is reused from the prior head only after checking unchanged runtime/UI/dependencies. The latest head changes one test fixture.
Failed diagnostic runs remain failed: incorrect local asset mapping, mismatched synthetic directory revision, and a locale-specific selector. The current selector failure occurs before its later cases and does not replace inherited passing product evidence. No source production adoption, external card send, financial utility or installed App/Core upgrade is claimed. Provider deployment is a separate post-merge stage.