Skip to content

feat(research): add Zotero classification audit evidence - #11

Draft
seonghobae wants to merge 29 commits into
feat/zotero-golden-set-evaluationfrom
autoresearch/zotero-reclassification-sep04
Draft

seonghobae wants to merge 29 commits into
feat/zotero-golden-set-evaluationfrom
autoresearch/zotero-reclassification-sep04

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Current Classification Audit authority — 2026-09-14 KST

Exact head 6dff8c2ee42cfeb7bf8688c1f7e95989b61be266; OPEN / Draft / currently non-mergeable because the named parent branch #10 has advanced beyond this child's historical base. This branch preserves its historical classification-audit delta: shared deterministic audit recomputation before governance, unique/nonblank parent and linked-child coordinates for provenance completeness, coherent source/proposal inventory, source-scope validation, pending ancestry, and its then-current approval binding. Aggregate counts remain evidence only; they do not authenticate source origin or grant semantic, Zotero-write, or publication authority.

Parent authority — source repaired, acceptance still pending

Golden-set #10 is now exact bf6ad9a1c613bd4a36a237d914030997d5721b02, OPEN / Draft / mechanically mergeable on canonical Research Intake #9 a67d9d66b35024d6f2155f50ee5c9fb7d2e1dbe9, at STALE_PARENT_REPAIRED / AGGREGATE_COMPATIBILITY_REPAIRED / CAPTURE_PROVENANCE_REPAIRED / CANONICAL_CRATE_ROOT_REPAIRED / ACCEPTANCE_PENDING.

#10 preserves #9's private constructor-bound ClassificationReport and stable public ZoteroItem { key, version, data }. Its provenance repair moved caller-constructible raw capture to the non-authenticating conceptweave-zotero-captured-json-snapshot-v3 domain; actual provider-origin evidence remains transport-owned. A subsequent crate-layout review found that the temporary src/merged_lib.rs package root incorrectly wrapped canonical Research Intake src/lib.rs, which owns crate-level safety/lint and conditional nightly-coverage attributes. RED 18e99a5982c326cf9460db590341bf58b735510a pins the canonical-root contract; production eccfc978fc28f883cfe548eb14e8eab715e3e4bf restores src/lib.rs as package root, attaches/re-exports golden_set there, removes the Cargo lib-path override, and deletes the wrapper. Current #10 documentation is code-current at bf6ad9a1....

Do not restack this child yet. Exact #10 bf6ad9a1... has no repository-owned pull-request workflow generation yet, and the current execution environment lacks the pinned Rust toolchain, so its latest provenance/crate-root source repairs have not received exact-head native acceptance. Existing sequencing review 5158473210 remains valid: only after #10 reaches unchanged-head acceptance should #11 ordinary/non-force adopt the complete accepted parent, reconcile this branch's historical approval/audit contracts against the parent's current v3 identities and crate layout, preserve every still-valid child delta, and reset all exact-head evidence. Do not flatten, copy selected files, close, force-push, destructively rebase, or make #11 independently merge-ready ahead of the parent.

Historical exact-head evidence boundary

Current 6dff8c2... previously executed locked Rust 1.98 workspace evidence: 75 tests across 15 unfiltered suites including two doctests, strict Clippy, warnings-denied rustdoc, release, format and CI-contract checks. The unchanged pinned coverage gate recorded 140/140 functions, 1,101/1,101 normalized regions and 182/182 normalized branches; raw LLVM totals were lower and remain diagnostic. That evidence is valid only for this predecessor head and must not be transferred after parent reconciliation.

After accepted #10 adoption, the #11 successor requires fresh exact-head Rust 1.98 workspace/fmt/strict Clippy/rustdoc/release/owned-production 100% coverage, applicable hosted checks, qualifying independent review, and zero valid unresolved findings.

Upstream protected gate

ConceptWeave protected/default main remains f4f440dd58c77d7cd90dff8a1eb2eeb9a9940425; Product bootstrap #35 remains exact 9bb82f041483cb4e0cf1aa1f5450b413309f9a05, OPEN / Ready, with repository-owned Product workflow still absent from protected main.

Protected .github/main is 828eaaefb0cc97bba4da63eb9270447476d26710. Central review-repair .github#2170@ae0f2f57f1d2abda7bb2e7ac9ce3bf8f1cac6f39 is OPEN / Ready / mergeable at SOURCE_REPAIRED / FULL_SUITE_DEPENDENCY_REPAIRED / ACCEPTANCE_PENDING; Runtime Quality, Security Scan, Python Security and SAST Semgrep are terminal success, while CodeQL PR remains queued and no qualifying approval is present. Central CodeQL handler .github#2106@1ba96e4ddf6a800435651ec1c49acff533242fd9 and Noema owner .github#2079@6d7e833224e06b4316df3d6bbdfcb4658e151956 remain separate acceptance-pending owner prerequisites. None of this evidence transfers to this child.

Do not use manual/no-op reruns, Ready/Draft toggles, synthetic status or weakened evidence identity to make this descendant appear GREEN.

No live Zotero mutation, semantic publication, self-approval, review dismissal, force push, destructive rebase, gate weakening, mutable supplier dependency, or predecessor-evidence transfer.

Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
@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

chatgpt-codex-connector Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-04T14:43:56.265815Z c28fcca Draft marked ready
ℹ️ 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" or "@codex security review".

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
seonghobae marked this pull request as draft September 4, 2026 13:53
Preserve PR #11 audit evidence while adopting the current PR #10 test-only snapshot-content identity contract without rewriting history.

Signed-off-by: Seongho Bae <me@seonghobae.me>

@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 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

if !verify_approval(&golden.approval) {

P1 Badge Bind the approval to the reviewed labels

With a valid receipt and matching snapshot, changing any golden.labels entry still passes verification because verify_approval receives only GoldenSetApproval, and none of that authenticated data commits to the labels. The function then counts altered values as steward-approved truth, allowing golden-set metrics to be corrupted while reported as verified; bind a canonical label digest into the approval or have the verifier authenticate the complete ReviewedGoldenSet.

AGENTS.md reference: AGENTS.md:L18-L18


let report_snapshot = report
.classified_items
.iter()
.map(|item| SnapshotItemRevision {
item_key: item.item_key.clone(),
item_version: item.item_version,
})

P1 Badge Bind the approval to the entire classifier input

For snapshots containing child notes, attachments, annotations, or other excluded records, this constructs report_snapshot only from top-level bibliographic classified_items, even though those omitted records are part of the classifier input and can affect linked-child evidence. An approval that correctly lists the complete Zotero item-key/version snapshot therefore fails with SnapshotMismatch; omitting those records makes it pass but leaves part of the source snapshot unauthenticated. Retain and compare the full input item-revision identity rather than the classified subset.

AGENTS.md reference: AGENTS.md:L18-L18


if report_snapshot.len() != report.classified_items.len()
|| approved_snapshot.len() != golden.approval.snapshot_items.len()
{

P2 Badge Reject duplicate keys even when versions differ

When a report contains the same Zotero key twice with different item versions, both SnapshotItemRevision pairs remain distinct, so this length check passes and a matching approval is accepted. The later BTreeMap keyed only by item_key silently discards one proposal, producing metrics from an ambiguous report instead of failing closed as duplicate report identities should; validate item-key uniqueness independently of version.

AGENTS.md reference: AGENTS.md:L18-L18

ℹ️ 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/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
@seonghobae
seonghobae marked this pull request as ready for review September 4, 2026 14:01
@seonghobae

Copy link
Copy Markdown
Contributor Author

@codex review

Preserve PR #11 audit evidence while non-force adopting the current PR #10 test-only integrity contracts.

Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae
seonghobae marked this pull request as draft September 4, 2026 14:05
Signed-off-by: Seongho Bae <me@seonghobae.me>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread crates/conceptweave-zotero/src/lib.rs
# Conflicts:
#	docs/TRD.md
#	docs/adr/0006-zotero-research-intake.md
@seonghobae
seonghobae marked this pull request as ready for review September 4, 2026 14:09
@seonghobae

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +709 to +712
provenance_complete_count: classified_items
.iter()
.filter(|item| !item.item_key.trim().is_empty())
.count(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@seonghobae
seonghobae marked this pull request as draft September 4, 2026 14:21
@seonghobae
seonghobae marked this pull request as ready for review September 4, 2026 14:26
Non-force two-parent restack onto current golden-set evaluation parent. Preserve the classification-audit delta while inheriting the current Foundation CI contract through #9 and #10.

Signed-off-by: Seongho Bae <me@seonghobae.me>

Copy link
Copy Markdown
Contributor Author

Current-stack correction (2026-09-05): exact base #10 bf35f97a1d5d2538e3370cf70a70b4294c1faed6; exact head 472dd348e8f0f07b154af2f63e868104e7519de5. Non-force restack preserves classification-audit semantics; older body SHAs are historical and do not transfer GREEN.

@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.

Dependency handoff: keep this PR Draft/open and preserve its complete classification-audit delta. Parent #10 fdf8b8d70c05bcb76c55cb6336c9bf31b5e42ce4 is now a verified stale-parent/non-mergeable lane: current canonical #9 is a67d9d66b35024d6f2155f50ee5c9fb7d2e1dbe9, while #10 still has historical merge base 51c7df6d03f072449422fd58ca24b2f9d6026f07 and is 81 commits behind current #9. Review #10 5158471700 requires ordinary non-force semantic integration rather than close/force/rebase.

Do not restack #11 ahead of that repair by flattening or source-copying #10. After a repaired #10 successor exists, integrate that exact parent normally into #11, retain the derived-audit/provenance repairs here, and treat all current 6dff8c2... Rust/coverage/review evidence as predecessor evidence only for the new head. No publication/write authority changes.

@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.

Parent repair has advanced materially. #10 is now ordinary/non-force reconciled with canonical #9 and current exact head is 865e3d569c814fdd3b18d6f4402d2ec9bfd2f3ef, OPEN / Draft / mechanically mergeable at STALE_PARENT_REPAIRED / AGGREGATE_COMPATIBILITY_REPAIRED / ACCEPTANCE_PENDING. Keep this #11 branch open and Draft on its current exact head. Do not restack yet because #10 still lacks unchanged-head Rust 1.98 and hosted/review acceptance; predecessor evidence must not transfer. Once #10 reaches exact-head acceptance, adopt the complete accepted #10 head by ordinary non-force integration, preserving this branch's classification-audit delta and resetting all exact-head evidence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant