Repository navigation
Conversation
Review:请求修改审查 head: [P1] 合法空白页被拒绝
请恢复 missing/null 返回空内容;用真实 worker 覆盖 missing、null、空数组、正常单流/多流和非法数组成员。 [P1] 范围检查遗漏对象间与 xref 前的未索引字节
请对排序后的每个 gap 做词法验证,只允许空白/注释。首部、中间、xref 前的未索引对象/垃圾应拒绝;空白/注释应接受;保留重叠、错误身份和注释覆盖对象头反例。 [P1] 删除已有防线测试,未等价迁移pdf_container_tests.rs 从 339 行降至 14 行,删去 duplicate/escaped keys、xref generation/count/footer、未索引/overlap、全局节点/嵌套/字符串预算、逐字节截断/变异 panic-free、zlib 截断/校验和/尾随数据/解压上界等。新增 container_matrix.rs 的三个测试不是等价覆盖,common builder 也不是断言。 请恢复仍适用的旧测试,仅调整本次有意变化的间接 Length 等规则;搬迁须保留对应行为断言。 [P2] 注释判断误拒字符串中的百分号
[P2] 预算承诺与实现不一致正文宣称 8 MiB xref、30 秒;classic_section 无对应 section 字节预算或循环 deadline 检查;container 独立为 20 秒,后续层另为 30 秒,不能视为同一文件级上限。trailer 节点也没有计入从零开始的 Loader.nodes 总账。总文件/entry 限制仍在,但不是这些保证。 请统一/说明分层预算并补 at-limit/one-over 和跨 trailer/object 节点总账断言,或收窄本 slice 承诺。 合并门槛修复回归并恢复安全矩阵;native workspace 中运行 cargo test -p ops-documents、真实 worker PDF suites、完整 verify/size;缺 worker skip 不算通过。当前 head pull_request CI 为 action_required,须有真实通过记录;补 Unreleased CHANGELOG 与双语行为文档。不要把本 slice 的回归交给未来 A2 修补。 |
Verify every gap between constructs and before the xref, counting only whitespace and comments, so an unindexed object or a comment that hides a header is never recovered. Count the xref section and trailer toward the file-wide metadata budget and check the container deadline inside the xref loop. Keep /ObjStm and /XRef refused until the xref-stream slice reads them.
Assert missing, null, empty-array and list-member page contents in the container unit tests and in the real worker suite, including the invalid member that must fail as a parse error.
Document indirect stream lengths, per-gap lexical verification, the xref/trailer share of the metadata budget, and the 20-second container sub-deadline inside the 30-second read deadline. Record the same bounds in the Unreleased changelog.
|
CI status: the new head |
PR A1
Part of #811 — slice A1/7. Stack base: main at
033aba3; latest main88ecc72is merged as7bd7c76.The working A2..A7 stack lives in
sefanty17/dsh-opsPRs #7..#13; this upstream PR is the A1 contribution.What was wrong
ops_read_pdfassumed one classic cross-reference table and direct object values. Files with indirect/Length,/Sizeor/Countfailed before any text was read.The first review found four regressions: a missing or null
/Contentsbecame a parse error, the range verifier checked only the gap before the first object, the xref/trailer metadata no longer counted toward the file-wide budget, and a literal%such as(100%)on the same physical line as a later header was mistaken for a comment. The restored container suite did not pin the gap or blank-page cases.The change
/Length,/Sizeand/Countin either direction.%comments may appear. A comment that hides a header is refused, while a%inside a literal string stays data./ObjStmand/XRefrefused in this slice; the xref/object-stream slice relaxes them when it reads them.Deliberately not done here: xref streams, object streams, the producer offset tolerance and the 8 MiB decoded xref/object-stream budget (slice A2).
Validation
CI requiredrun triggered bypull_request; the latest run isaction_required(maintainer approval), URL belownpm run verifyoutput from the approved rundocs/CHANGELOG.md## [Unreleased]entry addedpackage.jsonversion oroptionalDependenciesThe run for the current head
7bd7c76isaction_required: a maintainer must approve it before it can run. The previous head596d9f2had a greenpull_requestrun; these review fixes are the delta.Environment
v24.12.0; Rust1.98.1.origin/main033aba3; latest main88ecc72is merged as7bd7c76.