fix(zotero): validate completed review batch context - #34
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
seonghobae
left a comment
There was a problem hiding this comment.
유효한 보안 finding입니다. validate_output_path는 parent를 canonicalize()해 allowlist를 확인하지만 반환값은 다시 raw path입니다. 따라서 /tmp/alias/output.json에서 alias -> /tmp처럼 upper-parent symlink를 통해 검증을 통과한 뒤, 실제 create_report_file 전에 alias가 다른 디렉터리로 교체되면 create-new 0600 write가 검증된 canonical temp parent 밖으로 redirection될 수 있습니다. 입력 경계는 이미 resolved_parent.join(file_name)으로 복구되어 있는데 출력 경계만 동일 invariant를 보존하지 못합니다. 최소 수리는 filename을 추출해 validated_path = resolved_parent.join(file_name)을 만들고 existence/symlink 검사와 반환 모두 그 canonical rebuilt path를 사용하게 하는 것입니다. Final-component create-new/0600 semantics는 그대로 유지해야 합니다. 이 finding은 current exact head a84e6d49aba2a4fd0b0ef303a342922c4ce909bb 기준이며, hosted RED/GREEN은 아직 주장하지 않습니다.
seonghobae
left a comment
There was a problem hiding this comment.
Current-head repair review at 86288cdf5959040a95221c2ca2d99e243d25dc27: the retained output_parent_canonicalization.rs contract now matches production. validate_output_path keeps only the final filename after canonicalizing/authorizing the parent, rebuilds validated_path from that canonical parent, checks the rebuilt path, and returns it. Commit diff is confined to this causal boundary; create-new and exact-0600 behavior are unchanged. This closes the source-level finding only. The PR remains Draft and has no exact-head pull-request workflow run yet, so hosted GREEN/merge-readiness is not claimed.
Signed-off-by: Seongho Bae <me@seonghobae.me>
|
Live authority correction (2026-09-05): GitHub's current PR fields are |
# Conflicts: # docs/TRD.md
Normal merge retains PR34 strict context conversion and research audit plus PR33 source identity and pending-source scope. Populate required patch identity only after whole-batch equality; retain both parent and successor tests. No predecessor delta is discarded and no approval authority is created.
September 7 source-scope continuity checkpoint
Exact head
9eb89b8d4e751c34e640261f4883381571c83f25normally merges PR3393faf6ab750a99469196cf71567498be83c22a6bviabd8f995; original PR34 delta and research audits are retained. Whole-batch equality precedes projection of required proposal identity; strict JSON boundaries reject direct batch downcasting. Regression coverage rejects missing/blank/stale identity, altered pending-source counts, and old reviewed context against a fresh worksheet. No extra hash or authority issuer.Original baseline 171 tests/37 suites; final exact-head workspace 221 tests/37 suites including 3 doctests. Strict Clippy, warnings-denied rustdoc, formatting, CI contract and unchanged coverage gate pass on unchanged final code. Coverage 342 reported functions, 3192 normalized regions, 580 normalized branches at 100%; raw 4308/4370 lines, 6555/6662 regions, 535/580 branches are not 100%. Intermediate fixture compile/assumption failures are documented, not production RED. Independent bounded source review found no additional finding; not GitHub approval. Logs
/tmp/conceptweave-pr34-{head-tests,final-verified,clippy-final,rustdoc-final,coverage}.log; PRD/TRD/Proposed ADR0006/Gap updated.Remain OPEN Draft behind prerequisite. Root/later consumers unadopted; actual decisions and approvals 0/3715 plus 4 unresolved sources. Visual Inspection retried: Mac locked, manual unlock required; no fresh screenshot. No real Zotero write, hosted GREEN, protected merge or release. PR36 is the next source-capture successor; PR35 is independent CI work.
Latest bounded-read integration checkpoint
Exact head
b9060df2cb1ea02314be429932031fc07de1de30normally merges parentd82b2f2896bc4cfef5d34ac6f6f83f7cee1072f6while retaining previous child853517c1c43fdaeea0cef57b2f0e63a34b0fe2db. Base remainsautoresearch/zotero-steward-review-batch. The #9 whole-snapshot elapsed-time repair and its RED/GREEN evidence are inherited without reverse-merging later features or discarding predecessor deltas.This exact head passes Rust 1.98.0 locked workspace tests=171 suites=37, including doctests and excluding filtered subprocess duplicates, strict all-target Clippy, warnings-denied rustdoc, formatting, the existing CI contract and diff checks. Log:
/private/tmp/conceptweave-deadline-pr34-20260906.log. Intermediate coverage is not inferred from owner/final-endpoint coverage. No new dependency, actual paper read/decision, Zotero mutation or authority issuer was used.Draft and protected prerequisites remain. Local tests are not hosted GREEN, independent approval, merged/released source or evidence for another head. Earlier checkpoints below are retained history, not the current head.
Verified local approval-order repair — 2026-09-06 checkpoint
Exact head:
autoresearch/zotero-reviewed-batch-patch@853517c1c43fdaeea0cef57b2f0e63a34b0fe2db. Exact base:autoresearch/zotero-steward-review-batch@18932783aeb336a6d58e8a19f6d7dd6ecfb9ab3a.Original planner owner #13 preserves regression
505e111c993d8269e5b7b9e17a25a5ce20f8606eand repair8a684882005085d8b3cb47812e185975084e0475. Every existing local request/mode/item/metadata check finishes before the external approval verifier. Invalid requests invoke it zero times; valid complete requests invoke it exactly once. Local validation errors intentionally precede approval denial. Deterministic operations and complete before/after/rollback metadata are unchanged.This exact head passed locked Rust 1.98.0 workspace tests (168 tests / 37 unfiltered suites, doctests included), strict all-target Clippy, formatting, warnings-denied rustdoc, CI contract and diff checks before normal push. Normal parent integration retains both the prior child and verified parent as ancestors. Coverage from another stack head is not attributed to this head.
Keep Draft behind the existing prerequisite stack. This is local verification, not hosted current-head GREEN, independent approval, protected merge or release. No later full-text feature was reverse-merged into an earlier owner. Full-text-aware write admission, authentic decisions and independent authority remain separate gaps; no real Zotero/model request, label, approval or write was performed for this repair.
Earlier coordinates and status claims below are historical.
Prior PR description, retained without discarding evidence
Current repair checkpoint — 2026-09-05
Exact head:
b69f97792a5b3f48f627b50ede200c45eccf6050. Named base:autoresearch/zotero-steward-review-batchate6a94178c929b47a23a2ef3d5b00afba5a997363when checked.This ordinary merge retains old head
b0119a57047e7b1fe5ddfbbf4b973de0f15de172and its repaired named parent as ancestors. It carries PR #29's earliest-owner static private-JSON diagnostic, inclusive 16 MiB pre-create metadata writer guard and regression tests, plus PR #28's fixture warning repair. Existing child functionality remains intact; full-text features were not reverse-merged into earlier owners.This exact head passed
cargo +1.98.0 test --locked --workspace(163 tests across 37 unfiltered suites, including doctests), strict Clippy across all targets, formatting, warnings-denied rustdoc, the CI contract check andgit diff --check. Nested filtered subprocess results are not counted twice. Coverage was not rerun at this particular new head; historical or later-child coverage is not transferred to it.Normal push preserves history and the existing Draft/prerequisite boundary. These are local results, not hosted current-head GREEN or independent protected approval. All required reviews/checks must be revalidated on the unchanged current head after prerequisites integrate. No force push, close, retarget, self-approval, dismissal, protected merge, new label, model request or Zotero write occurred. Authentic decisions and independently approved labels remain separately 0/3,715.
Preserved earlier description and historical checkpoints
Current checkpoint — 2026-09-05
Head:
2e6448e896e65562ebeee2fd339dec64d9fdf6e5; base #33:cdc7f697fd72e41947e70dc05e42dae7e3b4a712; OPEN/Draft. Ordinary push preserved the parent/root stack and all earlier deltas. This checkpoint changes documentation and aggregate research evidence only; production source and existing private review artifacts are unchanged.The read-only full-text sweep attempted all 3,473 manifest entries: 3,432 HTTP 200, 41 HTTP 404 and five empty content strings. Nonempty text linked to 3,203/3,715 bibliographic parents, including 800/1,000 without retained abstracts; 2,561 parents also had complete index counters. The sweep used 224,842,838 response bytes and 10,737 ms inside explicit diagnostic budgets. It retained aggregate observations only, not raw text or item identities. Availability is neither an atomic snapshot nor a text-bound classification.
Zotero 10.0.1 exact source
36749bd0bd4fdac9ee46c16f7aa7bed094a0851fconfirms mixed sync/local/indexing version storage and a missing full-text list version header. PRD FR-9, TRD and Proposed ADR 0006 now forbid treating that cursor as metadata snapshot proof or reusing old approvals for later text. Root-source findings and reproduction limits are in the full-text audit; the linked JSON contains aggregate evidence only.The 76-repository metadata census now has 13 exact-default-head candidate audits, with 63 not yet audited at that depth. DiskSage's protected-main Rust named-class reasoning subset is an implemented product-specific filesystem capability, not a released general ontology library. Three selected owners still have resolved GitHub release source commits; ConceptWeave adoption remains unproved.
Local verification at this exact checkpoint: CI contract, nine focused Rust tests, 18 local documentation links, 13 candidate rows, all aggregate partitions, and the original report's SHA-256/exact 0600 mode passed. Review caught ambient curl configuration/proxy risk in the reproduction examples;
a2bbe0fdisabled configuration inheritance/proxies/redirects and bounded responses, and both corrected probes were executed.2e6448edistinguishes attempted from successful retrieval and makes schema 42 historical. No new full-workspace or coverage run is claimed here; the prior 143-test/coverage results below belong to their recorded head.Lifecycle-capability metric remains 25, steward decisions 0/3,715, externally approved labels 0/3,715 and newly text-bound proposals zero. No Zotero write, authority prompt, raw-content publication, upstream patch, protected merge or immutable release is claimed. Keep Draft behind the full owner stack and current protection rules. No force push, self-approval, review dismissal or routine closure.
Historical checkpoint retained for provenance
The following describes
2a75051and earlier evidence. References to “current” within it are historical, not transferred checks or approval for this head.Problem and behavior
A completed steward batch carries the bibliography and evidence shown during review. Reading it as a context-free patch would discard edited display fields and detach the decision from that context. This change rebuilds the expected pending view from the original report/current worksheet, compares every displayed field, rejects blank or abstaining decisions, and then reuses the atomic decision-patch operation. Batch roots, rows, evidence and tags reject unknown fields; patch roots reject rich batches.
--apply-review-batchreads distinct bounded owner-only artifacts and creates a separate0600worksheet. The inherited output-parent repair retains the validated canonical parent before file creation. Neither command changes Zotero or grants approval.Exact branch at 2a75051 — 2026-09-05
2a75051f0082103511222e278de24b2690fe6bfe; base feat(zotero): export bounded steward review batches #33:cdc7f697fd72e41947e70dc05e42dae7e3b4a712; OPEN/Draft.e7d4e59f1b55b5954c5f8436527bc96e7ef2fb13now reaches all 23 descendants through ordinary non-force merges, preserving original deltas. Current-parent and root ancestry were independently verified. Source identity binds complete captured provider JSON values plus actual typed classifier input. Approval separately binds the complete proposal records; missing bindings in old receipts fail closed and must never be backfilled.4718073→ GREEN61fee4c: title/evidence changes and blank proposal bindings cannot reuse the old approval. PR feat(zotero): roundtrip owner-only classification reports #2825a787aproves valid report roundtrip digest equality and rejects altered serialized title/evidence before external verification.a359c5balso repairs the existing macOS test expectation for canonical/private/varversus/var, without changing production file protection. The coverage run at that head then exposed five unexercised missing-filename rejection regions. Test-only6f27da9covers that actual boundary rather than excluding it.Local verification at 2a75051
2a75051f0082103511222e278de24b2690fe6bfepassed 143 workspace tests across 36 suites, strict Clippy with warnings denied, formatting, rustdoc with warnings denied, the CI contract checker,git diff --check, eight local documentation links and all 12 inventory rows. The full existing coverage gate passed: source-normalized regions 3,197/3,197, normalized branch outcomes 596/596, functions 314/314. Raw LLVM instantiated totals remain lines 3,822/3,908, regions 5,603/5,734 and branch outcomes 528/596; these raw totals are not claimed as 100%. This is local evidence, not current hosted GREEN or approval.Actual research campaign and owner inventory
A new repaired read-only capture at
a359c5b9d1013e84f5832506f5a57aec364e6493observed Zotero 10.0.1 / API 3 / schema 44 / library version 2, with 8,326 records, 3,715 bibliographic proposals and zero reported read failures. The distinct owner-only report, worksheet and progress bind snapshotsha256:0666dbebfb0c5aa99deb5a6dda1fc02d84bc46d08aaaddf25f5526a18eceef6d. The separate first batch generated at6f27da9contains 25 pending decisions. Progress remains 0/3,715; first-batch decisions remain 0/25. Historical Zotero 9 and pre-repair Zotero 10 artifacts are preserved, never silently upgraded or mixed with current approval inputs. File hashes and mode/size evidence are recorded indocs/product-technical-gap-baseline.md; no bibliography is committed.The inventory separates a 76-repository metadata census from a bounded exact-default-head audit of 12 candidates. RankWeave, mhtml-etl-gateway and fast-mlsirm have GitHub releases resolved to source commits. Veilpick's default tree contains only a license; graphify is a fork without a returned CWL GitHub release. There is no claim of source-level discovery across the remaining 64 repositories, verified ConceptWeave adoption or permission to create a duplicate utility owner.
No externally approved full review, authorization prompt, Zotero write, record merge/deletion, rollback, protected integration or immutable ConceptWeave release is claimed. Earlier heads and pre-repair observations remain historical in the campaign baseline.
Integration requirements
Keep Draft behind #33 and its full owner stack through Foundation #1. Product CI bootstrap #35 remains a separate prerequisite; its workflow-only Dependency Review skip cannot prove dependency-changing Foundation success. Integration requires applicable checks on the current unchanged head, resolved valid findings and independent approval under current protection rules. The unresolved loopback confidentiality risk in #18 remains explicitly documented for live-write claims. No force push, self-approval, review dismissal, administrator bypass or routine PR closure is permitted.
Refs #8.