feat(research): add Zotero classification audit evidence - #11
feat(research): add Zotero classification audit evidence#11seonghobae wants to merge 29 commits into
Conversation
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
|
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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
# Conflicts: # docs/PRD.md # docs/TRD.md # docs/adr/0006-zotero-research-intake.md # docs/product-technical-gap-baseline.md
seonghobae
left a comment
There was a problem hiding this comment.
Current-head finding: ClassificationAudit::provenance_complete_count treats item_version == 0 as missing provenance. That is not valid for the supported Zotero 9 Local API path. Zotero's primary Local API documentation says earlier versions reported synced versions, with 0 for objects that had never been synced; local edits also did not necessarily change those versions. Version zero is therefore a legitimate provenance coordinate, not evidence absence. The current regression explicitly expects a zero-version item to be incomplete, so the wrong invariant is executable. Add a test-first correction requiring a nonblank key with version 0 to remain provenance-complete, then make the minimum production/test repair; immutable content identity remains the separate PR #10 snapshot-digest lane.
Signed-off-by: Seongho Bae <me@seonghobae.me>
💡 Codex ReviewWith a valid receipt and matching snapshot, changing any AGENTS.md reference: AGENTS.md:L18-L18 ConceptWeave/crates/conceptweave-zotero/src/lib.rs Lines 338 to 344 in eda4d7a For snapshots containing child notes, attachments, annotations, or other excluded records, this constructs AGENTS.md reference: AGENTS.md:L18-L18 ConceptWeave/crates/conceptweave-zotero/src/lib.rs Lines 352 to 354 in eda4d7a When a report contains the same Zotero key twice with different item versions, both AGENTS.md reference: AGENTS.md:L18-L18 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
# Conflicts: # docs/PRD.md # docs/TRD.md # docs/adr/0006-zotero-research-intake.md
Signed-off-by: Seongho Bae <me@seonghobae.me>
# Conflicts: # docs/PRD.md # docs/TRD.md # docs/adr/0006-zotero-research-intake.md
|
@codex review |
Signed-off-by: Seongho Bae <me@seonghobae.me>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f509ebfa36
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
# Conflicts: # docs/TRD.md # docs/adr/0006-zotero-research-intake.md
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 551e6cb1f7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| provenance_complete_count: classified_items | ||
| .iter() | ||
| .filter(|item| !item.item_key.trim().is_empty()) | ||
| .count(), |
There was a problem hiding this comment.
Include linked child identities in the provenance count
When a bibliographic item has a linked child with a blank key, child_index retains that child in the proposal, but this predicate examines only the parent's key and counts the proposal as provenance-complete. Since the linked child can no longer be identified by a stable source coordinate, the audit overstates provenance completeness for malformed/untrusted snapshots; validate the proposal's linked child revisions as well as its own key before incrementing this count.
AGENTS.md reference: AGENTS.md:L18-L18
Useful? React with 👍 / 👎.
|
Current-stack correction (2026-09-05): exact base |
# Conflicts: # docs/PRD.md # docs/TRD.md
Signed-off-by: Seongho Bae <me@seonghobae.me>
Current source-scope and derived audit repair — 2026-09-06
Exact head
6dff8c2ee42cfeb7bf8688c1f7e95989b61be266normally preserves prior #111dc032598b41a35d52c09d8690c871e07365d7e3and parent #10fdf8b8d70c05bcb76c55cb6336c9bf31b5e42ce4. Base remainsfeat/zotero-golden-set-evaluation; OPEN Draft. Runtime is935e035, final test delta23178a9.RED
ebdd852reproduced findings 3934799129 and 3934994550: forged audit reaches governance, and duplicate parent/child coordinates count as provenance-complete. Source digest still represents source, not counters. The selected alternative is shared deterministic audit recomputation before governance; unique nonblank parent/linked-child keys are required for complete provenance. The earlier reply rejecting source-digest mixing does not remove the need for this derived-audit validation. Unknown original-source authenticity and duplicate proposal authorization are not claimed.PR10 source partition validation, inventory, pending ancestry and v2 approval binding remain intact. Original prediction-mismatch and independent-approval tests now use coherent attacker-controlled counts and retain their rejection expectations. Changing duplicate candidates together with their count remains a subsequent duplicate-owner binding Gap, not authority granted here.
Exact-head locked workspace tests75/15unfiltered suites including2doctests; runtime strictClippy, warnings-denied rustdoc, release build, format, CI contract and diff checks passed. Independent read-only source review reran17integritytests and found no new regression; this is not GitHub approval. Unchanged pinned coverage gate passed140/140functions1101/1101normalizedregions182/182normalizedbranches. Raw1502/1505lines2332/2343regions177/182branches are below100%.
Fresh native Zotero screenshot plus accessibility state both displayed3719items with list rows and attachment icons. Previous Mac-lock limitation is no longer current. Private bibliographic content/screenshots are not committed; this is only visual observation, not completed reclassification. Actual decisions/approvals/writes remain unchanged. Hosted exact-head checks, independent approval, protected integration, release and later restoration/review/write adoption remain pending. Earlier checkpoints below are historical.
Latest bounded-read integration checkpoint
Exact head
1dc032598b41a35d52c09d8690c871e07365d7e3normally merges parent4bb633305b04a1dd4c4ce526806c9469bcb79fd3while retaining previous child11d158b105cbd03edc34452358ebb3ff445e388e. Base remainsfeat/zotero-golden-set-evaluation. 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=60 suites=15, 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-pr11-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.
Current source-integrity note — 2026-09-05
autoresearch/zotero-reclassification-sep04@082710e8c9a0e37ddae528e305cd75ab3574d0bb.feat/zotero-golden-set-evaluation@e7d4e59f1b55b5954c5f8436527bc96e7ef2fb13.e7d4e59f1b55b5954c5f8436527bc96e7ef2fb13through 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_digestis 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.Earlier heads, runtime snapshots, campaign counts, and verification statements below are historical notes, not current acceptance evidence.
Historical PR notes — original text retained
Outcome
Adds aggregate classification-audit evidence on top of PR #10: snapshot count, bibliographic count, proposal count, provenance-complete count, abstentions, duplicate candidates, zero-success-path failures, and per-disposition totals. The report stays local and aggregate; it does not promote classifier output or Zotero metadata to governed semantic truth.
Exact stack — 2026-09-05
b821b0fd485201810650b6a8aed438f9f34b6ad8;cb365fbf175ae6588aa6176cf9e99ae4d85fcdca;cb365fb...; predecessor and local evidence do not transfer as GREEN.Current review disposition
Two prior current-line findings were checked against the actual contracts rather than accepted mechanically.
The P1 request to include
audit_summaryinsnapshot_digestis not a valid repair for this boundary.ClassificationReport::snapshot_digestandGoldenSetApproval::snapshot_digestare immutable Zotero source-snapshot content identities; TRD §11 states that the digest covers every raw Zotero item in canonical key order.audit_summaryis derived aggregate evidence from that same in-memory snapshot and is not used as semantic authority by golden-set evaluation. A future published report/artifact may define its own artifact digest at that publication boundary without redefining source-snapshot identity.The P2 provenance-completeness finding remains valid. Test-only predecessor
b836db910a07cb3c3fc3fb68140d70bcd8d6c6c2added a parent+linked-note regression requiring a proposal with a blank linked-child Zotero key to be excluded fromprovenance_complete_count; it did not execute before concurrent source repair. The retained production predicate requires the parent key and every retainedchild_item_keyto be nonblank. The P2 thread remains unresolved until the restacked exact head receives terminal verification; source repair alone is not described as RED→GREEN.Audit semantics
ClassificationAuditis aggregate-only. A successful report records snapshot/bibliographic/proposal/provenance/abstention/duplicate/disposition totals and zero reported failures; reader errors fail before a successful report is returned. Zotero 9 item version zero remains a valid observed revision coordinate rather than missing provenance. Provenance completeness additionally requires stable identity for every linked child coordinate retained by the proposal.Inherited PR #10 boundary
PR #10 remains Foundation-dependent. Its current head retains complete observed snapshot identity, raw-snapshot SHA-256 content binding, duplicate-key rejection independent of version, and caller-owned verification of the complete
ReviewedGoldenSet. #11 must not become independently merge-ready ahead of #10 or bypass any exact-head finding in its parent.Zotero boundary
No Zotero mutation exists in this stack. Zotero remains the bibliographic system of record; write-back is a separate Zotero 10+ reviewed capability with authorization, server identity, fresh preconditions, before/after receipts and rollback. Aggregate local counts are evaluation evidence only, never published semantic truth.
Next causal step
Keep Draft. Require exact
cb365fb...to execute Product/coverage/rustdoc on one unchanged head. If it fails, repair only the causal failure. Resolve the remaining P2 review thread only after current-head verification. PR #12 and later descendants must retain this current parent ancestry before their evidence is treated as current-stack evidence.