Skip to content

feat(zotero): roundtrip owner-only classification reports - #28

Draft
seonghobae wants to merge 36 commits into
autoresearch/zotero-worksheet-finalizationfrom
autoresearch/zotero-report-roundtrip
Draft

feat(zotero): roundtrip owner-only classification reports#28
seonghobae wants to merge 36 commits into
autoresearch/zotero-worksheet-finalizationfrom
autoresearch/zotero-report-roundtrip

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Verified local approval-order repair — 2026-09-06 checkpoint

Exact head: autoresearch/zotero-report-roundtrip@b411b66c2ec34c39bb0cceb27f96221a1fda4416. Exact base: autoresearch/zotero-worksheet-finalization@9c4ecf5fc8bc3e16c3aaffc10ba0498e59128f9d.

Original planner owner #13 preserves regression 505e111c993d8269e5b7b9e17a25a5ce20f8606e and repair 8a684882005085d8b3cb47812e185975084e0475. 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 (135 tests / 26 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: 5c95bb77ac12d25477ef278f7a23976700ceac2b. Named base: autoresearch/zotero-worksheet-finalization at 0a87c0af11230c98bd423b67428a00f3e5cb90fe when checked.

This head restores one test-fixture conversion already corrected by 1ca8a79 and reintroduced by merge 1623aad; unchanged predecessor d6e7b35 reproduced strict-Clippy failure. Commit 5c95bb7 changes that one line only. No later private-reader or full-text feature was backported.

This exact head passed cargo +1.98.0 test --locked --workspace (130 tests across 26 unfiltered suites, including doctests), strict Clippy across all targets, formatting, warnings-denied rustdoc, the CI contract check and git 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 source-integrity note — 2026-09-05

  • Exact head: autoresearch/zotero-report-roundtrip@25a787a201bfa4e5c71a78d35ab79e0ab857d354.
  • Exact base: autoresearch/zotero-worksheet-finalization@61fee4c3acada36355fbaaa0020828f3a7081555.
  • This head inherits PR feat(research): add steward golden-set evaluation #10 root e7d4e59f1b55b5954c5f8436527bc96e7ef2fb13 through ordinary merge ancestry. The source-snapshot digest binds complete captured raw provider JSON and the actual typed classifier inputs; source evidence and derived proposals retain separate identities.
  • GoldenSetApproval.proposal_digest is required and binds the complete proposal records used for evaluation. The current proposal digest is checked before the caller-owned governance verifier. Do not backfill old receipts: regenerate evidence and obtain a new approval bound to the reviewed evidence.
  • Deserialization regression 25a787a201bfa4e5c71a78d35ab79e0ab857d354 preserves proposal identity across a valid report round trip and rejects imported title/evidence edits under the original approval at finalization/evaluation, with zero governance-verifier calls for the changed report.
  • Keep Draft. This note does not claim current exact-head hosted GREEN, independent approval, protected merge, live Zotero mutation, or governed publication. Root, predecessor, and terminal-stack local test evidence is not transferred as per-PR hosted evidence.

Earlier heads, runtime snapshots, campaign counts, and verification statements below are historical notes, not current acceptance evidence.

Historical PR notes — original text retained

Outcome

Make the complete owner-only ClassificationReport JSON deserializable and fail closed so offline review/finalization can reconstruct the original snapshot-bound steward workload without rereading mutable Zotero state.

Current exact stack — 2026-09-05

Review -> RED -> repair lineage

Restored child provenance must match the immutable snapshot's exact direct-child relationships, not merely snapshot membership. The retained repair preserves each SnapshotItemRevision.parent_item_key coordinate and requires every classified top-level item's direct-child set to match exactly. It rejects blank/absent parents, self/classified children, reassignment, reuse, omission and duplicate child keys, while accepting valid nested bibliographic item -> attachment -> annotation provenance when every intermediate parent exists in the same snapshot.

The duplicate-merge boundary also retains full source coordinates, top-level-only eligibility and deterministic local validation before the approval verifier. Executed predecessor RED/local verification remains attributable to the original heads and is not exact-head hosted GREEN for 2de9254....

Governance and merge gate

This proves only the intended owner-only artifact-integrity contract at source level. It does not create steward decisions, authorize publication or change live reviewed completion from 0/3,715. Existing artifacts generated before parent coordinates were added are superseded and must be regenerated from one live snapshot.

Keep Draft behind #27 -> #26 -> #25 -> #24 -> #23 -> #22 -> #21 -> #20 -> #19 -> #18 -> #17 -> #16 -> #15 -> #13 -> #12 -> #11 -> #10 -> #9 -> Foundation. Require one unchanged exact head with terminal required checks, independent approval and zero valid unresolved findings before integration.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@seonghobae

Copy link
Copy Markdown
Contributor Author

@codex review

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 12 minutes.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current-head review found one valid provenance-integrity gap introduced by making ClassificationReport a deserializable offline input: build_steward_review_worksheet validates classified parent key/version membership in snapshot_items, but retained child_item_keys are only required to be nonblank. A restored report can therefore name an unknown linked child and still satisfy the audit count/worksheet projection. Test-only commit f185f5fbdd5921002d0cc4bfea00dd763d56eea8 now requires such an artifact to fail with WorksheetError::InvalidReport. Production remains intentionally unchanged until this exact test head executes and supplies RED; the minimal repair is snapshot-membership validation for every retained child provenance key.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Root repair completed non-force at exact head 703695910067c26b45595a2175d78cbaaf74e0f4. The new test was reproduced RED in an isolated Rust 1.98 target, then build_steward_review_worksheet was fixed at the shared validation boundary to require every retained child key to exist in the bound snapshot. Focused roundtrip/worksheet tests, Clippy, and normalized source region/branch coverage passed. No report delta was discarded.

@seonghobae

Copy link
Copy Markdown
Contributor Author

SHA correction for the immediately preceding evidence comment: the exact repaired PR28 head is 70369591dadf1c43df89e9ab54f8aac355232fa7.

seonghobae added a commit that referenced this pull request Sep 4, 2026
Non-force restack PR #29 onto PR #28 current head. Preserve offline distinct-file finalization and parent-aware provenance while carrying current predecessor receipt RED contracts and inherited security boundary through ancestry; no predecessor GREEN is claimed.

Copy link
Copy Markdown
Contributor Author

Current-stack correction (2026-09-05): exact base #27 42994f771cc1bbacf09cf0d9d1ba0d5057f77c41; exact head 459ebab2b7819f886052cf7bec3361979b918c8c. Parent-aware report roundtrip/child provenance repairs are preserved non-force; prior body SHAs are historical only.

Restore the clone-only intent of 1ca8a79. PR #28 merge 1623aad retained an unnecessary into() after clone(); current PR #29 inherits that strict-Clippy failure. Later descendants already keep the clone-only expression. No receipt evidence or behavior changes.

(cherry picked from commit 79facfc875dfe72c78680d98fce89b813bc216a1)
seonghobae added a commit that referenced this pull request Sep 5, 2026
Restore the clone-only intent of 1ca8a79. PR #28 merge 1623aad retained an unnecessary into() after clone(); current PR #29 inherits that strict-Clippy failure. Later descendants already keep the clone-only expression. No receipt evidence or behavior changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant