Repository navigation
WIP(A04): authorized history reads and bounded finance ZIP — 47 scoped checks passing - #875
LIghtJUNction wants to merge 6 commits into
Conversation
Add source-only A04 read projection helpers, synthetic test fixtures, PostgreSQL snapshot test definitions and allowlisted JSON output. Pending S11 module wiring, dependencies, real source integration, authorization, complete finance export and executable test evidence.
…finance ZIP Use existing stored credential checks inside one read-only snapshot for scope, counts, pages, totals and all export documents. Refuse missing, writable or duplicate offline sources; preserve unknown historical money and raw quota. Add real PostgreSQL restricted-role and HTTP integration tests, plus a scoped read-only CI runner that retains resolved lockfile and exact tested input. The offline A03 source-view provider and catalog integration remain required; synthetic fixtures are not historical import or production readiness evidence.
|
补充 c3fa657 的实际验收进展:专用 job已有 10+6+16 项通过,history_repository 为 9 通过、1 失败。 值得先检查 archive.rs 的错误映射: 组合 CI另外仍受 Cargo.lock 的 |
Keep byte limits through JSON and ZIP layers instead of converting them into missing-source errors. Retain real IO/source failures and poison incomplete usage exports. Follow up on PR #875 failing PG limit case.
…eipts Check column grants on both source views and qualification receipts. Add real PostgreSQL regressions for column grants, duplicate receipts, ZIP footer bounds and malformed usage, plus typed sink IO tests. Freeze the S11 lock integration patch in the isolated acceptance runner instead of resolving a different dependency graph on each CI run.
Preserve the concurrent A04 PostgreSQL/HTTP/ZIP implementation. Add native-only settled charge reads with strict account/key scope and synthetic PG regressions. Add allowlisted CSV output with spreadsheet formula protection and metadata/row validation. Bound historical aggregate metadata processing without reporting partial money totals. A03 legacy source completeness and full integration remain blocked.
Allow safe JSON escaping of control characters as before. Reject NUL only for CSV, where spreadsheet readers may truncate input. Verify the separate format policies with regression cases from the A04 CI failure.
A04 v2 已推送并完成本次专项验证(2026-10-12)提交: 专项验收:PASS。 A04 history and finance acceptance #38241490901,Rust 1.99 与合成 PostgreSQL 环境执行 A04 关联测试,工作流最终 整个项目尚未通过: |
|
本轮按固定 head 目前最先可收口的两项是原始 head 的交付完整性:
已有 A04 专项 PostgreSQL 记录只证明其明确输入和合成来源合同,不能补齐真实历史迁移。与 #884 / S11 的下一道接口请固定为 自动 workflow 与仓库拓扑规则的差异交给 S11 按现有治理处理,不以放宽测试/工作流保护换取绿色。请优先完成上述锁文件和格式交付,再在本机验证固定提交。Draft/未集成状态保持,#895 不据此关闭。 |
开发主线交接(2026-10-12)
开发默认主线现为
wip/rust-core-go-extensions;旧单体main与traditional冻结于3948a0a1ee1cefdd016a7aa45a11851545bb4b85。分支交接不是发布、部署或验收通过。原问题、源码基线、测试与未完成项保留;旧单体路径仅作历史证据,后续先在微服务源码重新确认并按职责移植,不回灌旧数据库/权限/资金实现。主线/S11 跟踪:#895。Extore 商品同步:#894,未验收,禁止部署,尤其禁止合并/推送 Extore
main。本 PR 的候选实现和已有验证范围保持原样;不因主线交接自动合并或标记验收完成。
A04 当前状态
任务范围。最新提交
0d2aaa2f766c77f15890f2a2b6c17aaeca84a4fa。已完成本轮源码修复与隔离定向验收:47 项通过,0 失败、0 跳过,其中 22 项使用真实 PostgreSQL。保留 Draft;没有声称完整 A04、真实历史迁移或最终组合验收完成。
本 PR 已不是最初的 7 文件未接线版本。现有实现包含 Core 模块和 HTTP 接线、统一鉴权读取、历史金额投影、统计与分组、15 个 JSON 文档组成的财务 ZIP。完整历史来源视图仍由 A03/S11 提供;测试中的来源提供方是合成数据,不能用于生产导入。
本轮修改
2fe4626:修复 ZIP/JSON 多层写入把限额误报为来源不可用的问题。文件上限、空间/配额不足保留限额类别;一般 IO、格式和数据错误不混为限额。中途失败的 writer 仍禁止输出貌似完整的部分结果。0d2aaa2:只读资格检查同时检查整表与单列 INSERT/UPDATE 权限,以及来源回执的写权限。缺失、重复或互相矛盾的来源回执一律拒绝。本轮只改变 7 个 A04 源码/测试叶文件;保留先前提交的公共接线,不回写共享 WIP、生产库或其他任务域。
实际验证
最新专用 CI · 结果及精确输入归档
实际工具:rustc
1.99.0 (b940084d7 2026-09-28);cargo1.99.0 (5f94df478 2026-08-27);专属 PostgreSQL 17 服务。cargo test --locked --test history_read --test finance_export \ --test history_repository --test financial_profile --no-fail-fast证据范围:isolated-tested。 CI 从合并候选
abef1340db8cb9b25918ddc39d6db7335f0e9a75检出,在一次性环境应用固定的 S11 锁文件补丁并运行 A04 文件的 rustfmt,再编译和测试。不是未修改源码树上的全仓 CI,也不是浏览器或真实历史数据验收。checked-source.tar.gzSHA-256:030fd6db0ab2d1a08b83d09d5ef51164c45b014fe67a7bdd4ec4d6e61d5e0dce31a6c92b24e5f3bc2de49eb09bd2423fd2596dc0943a70bbfba89c669fa4fe11test-exit-code.txt为0;所有 47 项均无 skip/ignore。测试使用实际持久化的 Core 会话、Key、用户/团队角色及受限数据库角色;HTTP 测试调用真实路由处理函数。来源视图及其中业务材料是合成 fixture,未执行真实服务进程/浏览器联合验收。
历史失败保留:
c3fa657为 41 通过、1 个导出限额用例失败;2fe4626专用 CI 全部 42 项通过。没有将旧提交结果当作新输入结果。S11 精确接入
services/core/tests/history_read/cargo-lock.patch是锁文件的最小候选补丁。它将 Git blobe571b17a29f201e321f005eba20c2b4fa0bf3bf0转为b54ce5875919b916743171f6ce9b72a1d08449a7,只补所需依赖,不更新原有依赖版本。最新 CI 归档的
generated.patch包含相同锁文件变更和仍需落地的 A04 格式变更。S11 应先核对输入并git apply --check,选择应用该完整补丁一次;不要再重复应用 lock-only 补丁。基线改变须重新核对,不强推或覆盖其他任务。共享
Cargo.lock尚未直接修改。组合 CI 的格式、锁定依赖步骤仍失败,不能用专用验收成功覆盖这些失败。最终组合仍须重新编译、检查和测试。来源合同与未完成验收
运行时只读取
core_history.source_contract_v1、log_records_v1、quota_data_v1、finance_records_v1、finance_options_v1。精确列类型见tests/fixtures/history_source_v1.sql,该文件仅为合成提供方,不是生产 DDL 或导入证明。每个 dataset 必须且只能有一条有效 v1/complete 回执;哈希格式合法不等于来源真实性已获证明。A03/S11 仍需提供并核验真实归属/ID 映射、历史与 native 的去重、退款/作废规则、逐条计价基准及全部财务数据集。非零 opening 的金额证明、累计用量和每条日志美元金额不可互换;缺来源不能伪造 complete 或用空数组/零补齐。Go 不取得 Core DSN,运行时不导入或重写来源。
A10/S11 仍需验证当前前端的会话传递、分页/DTO 兼容及浏览器流程,并完成最终组合和真实历史只读对账。在这些条件满足前,不关闭 A04,不标记 MIGRATED,不合并为已完成版,不发布或部署。