Skip to content

feat(research): add steward golden-set evaluation - #10

Draft
seonghobae wants to merge 51 commits into
feat/zotero-research-classificationfrom
feat/zotero-golden-set-evaluation
Draft

seonghobae wants to merge 51 commits into
feat/zotero-research-classificationfrom
feat/zotero-golden-set-evaluation

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Current authority — 2026-09-14 KST

Exact head bf6ad9a1c613bd4a36a237d914030997d5721b02; base/current canonical Research Intake #9 a67d9d66b35024d6f2155f50ee5c9fb7d2e1dbe9. OPEN / Draft / mechanically mergeable. State: STALE_PARENT_REPAIRED / AGGREGATE_COMPATIBILITY_REPAIRED / CAPTURE_PROVENANCE_REPAIRED / CANONICAL_CRATE_ROOT_REPAIRED / ACCEPTANCE_PENDING.

The owned delta remains steward-reviewed golden-set evaluation above Research Intake: complete raw/typed snapshot content binding, proposal/report digest binding, source-scope admission, inventory/approval integrity, pending-source ancestry, deterministic classification evaluation and aggregate-only quality evidence. No classifier result, local Zotero metadata, caller-supplied raw JSON, approval JSON or evaluation score becomes governed semantic authority by itself.

Ordinary stale-parent reconciliation

Historical #10 fdf8b8d70c05bcb76c55cb6336c9bf31b5e42ce4 was rooted at historical #9 51c7df6d03f072449422fd58ca24b2f9d6026f07; before repair it was 35 commits ahead / 81 behind current #9 and non-mergeable. Review 5192181682 required preserving current #9's private constructor-bound ClassificationReport and stable public ZoteroItem { key, version, data } instead of reopening trusted fields or adding mandatory caller-owned source_record provenance.

Ordinary two-parent integration c9954e286041c80d08655e092f10007a684ceab1 has parents historical #10 fdf8b8d70... and current #9 a67d9d66.... Current compare from #9 remains ahead with zero commits behind. No force-push, destructive rebase, whole-tree ours/theirs selection or predecessor-check transfer was used.

Current #9's trusted report fields stay private and public ZoteroItem remains key/version/data only. GoldenSnapshot composes evaluation evidence over read-only Research Intake accessors rather than reminting a competing trusted aggregate.

Raw-capture provenance repair

Exact-head review 5192398634 found that the first reconciliation overstated provenance. CapturedZoteroItem::try_from(Value) is public and caller-constructible: arbitrary fabricated JSON can be decoded and passed to classify_captured_golden_snapshot. Domain separation can bind content and distinguish code paths, but cannot prove that caller-supplied bytes originated from Zotero. The previous conceptweave-zotero-provider-snapshot-v3 label therefore could be misread as provider-authenticated evidence.

The repair is ordinary-forward and remains inside #10's Draft/unreleased contract:

  • RED 67b5214ce8cd39fddbc1ba6043971b9832b2ef17 requires caller-constructed raw capture to use conceptweave-zotero-captured-json-snapshot-v3.
  • Production 2e52972745953fbb5b606226fce2dda2cf61abd3 changes the digest domain and rustdoc: raw JSON plus decoded typed input are content-bound, while provider origin requires a separate transport-owned attestation boundary.
  • Doctoring c0a139d82649d44b7fc8a115357ddc7b961315ed invalidates the superseded provider-labelled semantics rather than locally migrating receipts.
  • Regression terminology and ADR/TRD/UML/CHANGELOG/gap documentation use the same v3 authority boundary.

The typed fixture domain remains conceptweave-zotero-typed-snapshot-v3; proposal identity remains conceptweave-classification-proposals-v3. If authenticated Zotero-origin evidence becomes a product requirement, a canonical transport adapter that actually observes the response must mint the attestation. A public Value constructor or caller-selected digest domain cannot grant that authority.

Canonical crate-root repair

Review 5192569298 found a structural reconciliation defect: [lib] path = "src/merged_lib.rs" made the canonical Research Intake src/lib.rs a nested module even though that file owns crate-level forbid(unsafe_code), deny(missing_docs), and conditional nightly coverage-feature attributes. The wrapper also introduced a second crate-root seam around #9's canonical owner.

RED 18e99a5982c326cf9460db590341bf58b735510a adds tests/library_root_contract.rs, requiring the package to retain canonical src/lib.rs and that root to own/export golden_set. Production repair eccfc978fc28f883cfe548eb14e8eab715e3e4bf is one ordinary commit ahead / zero behind the RED and changes only three paths: removes the three-line Cargo lib-path override, adds mod golden_set; pub use golden_set::*; to the canonical root, and deletes src/merged_lib.rs. No trusted aggregate field, public Zotero item shape, coverage threshold, provider/model policy or semantic authority changed.

Documentation successors 9026fa4b60153fcb3a075b4ce99efcd3997d701e (CHANGELOG), f00abccaf95baa56400db872cb64a79d2e4a41bc (TRD), and current head bf6ad9a1c613bd4a36a237d914030997d5721b02 (gap baseline) make that owner boundary code-current.

Exact-head acceptance boundary

All predecessor Rust/fmt/Clippy/rustdoc/release/coverage evidence is historical and does not transfer after the crate-root repair. This execution host has no cargo, rustc, rustfmt, or rustup, so no native RED/GREEN execution is claimed for this exact head. The RED is an executable regression contract, not a claim that it was run here.

Keep this PR Draft. Require one unchanged exact head to pass repository-pinned Rust 1.98 workspace tests, fmt, strict all-target Clippy, warnings-denied rustdoc, release, owned production function/region/branch coverage, applicable Product/security/dependency/review checks, qualifying independent review, and zero valid unresolved findings before Ready or merge.

Central owner boundary

ConceptWeave protected/default main remains f4f440dd58c77d7cd90dff8a1eb2eeb9a9940425. Product bootstrap #35 remains OPEN / Ready at 9bb82f041483cb4e0cf1aa1f5450b413309f9a05; its Product PR workflow is not yet on protected main.

Protected .github/main remains 828eaaefb0cc97bba4da63eb9270447476d26710. Review-repair .github#2170@ae0f2f57f1d2abda7bb2e7ac9ce3bf8f1cac6f39 remains OPEN / Ready / mergeable at SOURCE_REPAIRED / FULL_SUITE_DEPENDENCY_REPAIRED / ACCEPTANCE_PENDING. Agent Review Runtime Quality CI 34775874685, Security Scan 34775874680, Python Security 34775874736, and SAST Semgrep 34775874812 are terminal success; CodeQL PR 34775874728 remains queued and no qualifying approval is present. Central CodeQL handler .github#2106@1ba96e4ddf6a800435651ec1c49acff533242fd9 and Noema owner .github#2079@6d7e833224e06b4316df3d6bbdfcb4658e151956 remain separate acceptance-pending prerequisites. Central evidence does not transfer to this leaf.

Descendant handoff

#11 remains exact 6dff8c2ee42cfeb7bf8688c1f7e95989b61be266, OPEN / Draft and non-mergeable because its named parent branch has advanced beyond historical #10. Do not restack #11 while #10 is still acceptance-pending. After this exact #10 lineage reaches unchanged-head acceptance, #11 and later research descendants must ordinary/non-force adopt the complete accepted parent while preserving their own valid deltas and resetting exact-head evidence.

Do not flatten/copy selected files, close valid descendants, force-push, destructively rebase, self-approve, dismiss review, weaken gates, synthesize status, use manual/no-op triggers, mutate Zotero, publish semantic truth or transfer predecessor evidence.

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

Copy link
Copy Markdown
Contributor Author

@codex review

@seonghobae

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 4e71d9e8-2e47-4cea-b07b-2194d943e4ec

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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:30.602107Z d5ccd73 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.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@seonghobae
seonghobae marked this pull request as ready for review September 4, 2026 13:29

@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: e7d3243fed

ℹ️ 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 Outdated
Comment thread crates/conceptweave-zotero/src/lib.rs Outdated
Comment thread crates/conceptweave-zotero/src/lib.rs Outdated
@seonghobae
seonghobae marked this pull request as draft September 4, 2026 13:46
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae
seonghobae marked this pull request as ready for review September 4, 2026 13:49
@seonghobae

Copy link
Copy Markdown
Contributor Author

@codex review

@seonghobae
seonghobae marked this pull request as draft September 4, 2026 13:50
seonghobae added a commit that referenced this pull request Sep 4, 2026
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>

@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: 399794e5ae

ℹ️ 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 Outdated
Comment thread crates/conceptweave-zotero/src/lib.rs Outdated
Comment thread crates/conceptweave-zotero/src/lib.rs Outdated
Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae
seonghobae marked this pull request as ready for review September 4, 2026 14:01
@seonghobae

Copy link
Copy Markdown
Contributor Author

@codex review

seonghobae added a commit that referenced this pull request Sep 4, 2026
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:04
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 8c939d0c35

ℹ️ 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".

Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae
seonghobae marked this pull request as ready for review September 4, 2026 14:09
@seonghobae

Copy link
Copy Markdown
Contributor Author

@codex review

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

P1 semantic-reconciliation finding on exact fdf8b8d70c05bcb76c55cb6336c9bf31b5e42ce4 against current parent #9 a67d9d66b35024d6f2155f50ee5c9fb7d2e1dbe9.

The stale-parent finding is not only a textual conflict. Current #9 intentionally made ClassificationReport provenance/snapshot/inventory state private and constructor-bound with read-only accessors. This #10 branch's golden-set integrity tests were authored against the older public aggregate and directly read or mutate trusted report fields (library_version, rule_revision, classified_items, unclassified_items, pending_source_item_keys, snapshot_items, observed_item_count). Reopening those fields during restack would regress the exact aggregate-integrity invariant that current #9 now owns. Negative corruption tests must instead use an internal/test-only construction seam or an explicitly untrusted wire/fixture type; golden evaluation production code should consume read-only accessors.

A second compatibility seam is ZoteroItem: #10 adds a mandatory public source_record: Option<serde_json::Value> field and updates its own struct literals to fabricate None. Current #9's public item shape has only key/version/data and existing callers/tests construct that shape directly. A bare merge therefore creates a source-breaking API change and pushes raw-provider provenance responsibility onto callers. Preserve the current public source contract or introduce a backward-compatible constructor/default/separate provider-record boundary; do not require unrelated callers to mint a fake raw record.

Required RED→GREEN for the ordinary non-force reconciliation:

  • keep current #9's compile-fail/private trusted aggregate invariant;
  • make golden-set evaluation work through read-only report accessors and an explicit internal/untrusted-fixture path for corruption tests;
  • preserve raw provider snapshot binding without making source_record=None a caller-owned authenticity signal;
  • add regressions proving the golden proposal/approval digest changes for every material current-#9 proposal/evidence field while remaining order-stable;
  • preserve all #10 golden-label/approval/digest functionality and all current #9 lifecycle, abstention, source-resolution, provenance and publication deltas;
  • regenerate exact-head Rust 1.98/fmt/strict Clippy/rustdoc/release/owned coverage and hosted/review evidence after the repaired merge.

The current #10 head has no hosted workflow generation, so no exact-current hosted GREEN exists to carry. Keep Draft/open and repair forward; whole-tree ours/theirs, force push, destructive rebase, public-field rollback, or closing the valid delta is not acceptable.

@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 reconciliation finding: #10 is still rooted at historical #9 51c7df6d03f072449422fd58ca24b2f9d6026f07, while canonical #9 is a67d9d66b35024d6f2155f50ee5c9fb7d2e1dbe9; compare remains 35 ahead / 81 behind and non-mergeable. The valid golden-set delta must be adopted by ordinary two-parent integration, but not by reopening #9's private constructor-bound ClassificationReport and not by adding mandatory caller-owned ZoteroItem.source_record. I am treating those as repair findings: preserve #9's public ZoteroItem { key, version, data } construction contract and private report aggregate, move raw-provider capture to an explicit captured/wire boundary, keep golden approval/evaluation aggregate-only, and bind proposal digests to all current #9 lifecycle/evidence fields through read-only accessors. Existing #10 corruption tests that mutate trusted report internals must move to an explicitly untrusted/test-only boundary rather than weakening encapsulation. No force push, destructive rebase, whole-tree ours/theirs, or partial delta discard.

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

Exact-head checkpoint after ordinary parent reconciliation and documentation currentization. Current #10 is now based on #9 a67d9d66b35024d6f2155f50ee5c9fb7d2e1dbe9, mechanically mergeable, with the current #9 lib.rs blob preserved and golden evaluation layered through CapturedZoteroItem/GoldenSnapshot rather than reopening trusted fields. Both historical P1 threads (complete raw provider binding and proposal/approval binding) are repaired forward and resolved with exact source coordinates. This is not approval: no repository-owned PR workflow generation exists on 865e3d569..., combined status is CodeRabbit success only, and the current execution host has no cargo/rustc/rustfmt/rustup. Keep Draft until unchanged-head Rust 1.98 + hosted/review acceptance is established.

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

Exact-head semantic review at 865e3d569c814fdd3b18d6f4402d2ec9bfd2f3ef found one provenance-contract P1.

CapturedZoteroItem::try_from(Value) is a public caller-constructible boundary. Any caller can fabricate an arbitrary JSON Value, decode it successfully, and pass it to classify_captured_golden_snapshot. The resulting receipt is nevertheless domain-separated as conceptweave-zotero-provider-snapshot-v3, while docs/doctoring/golden_set_reconciliation.md says the typed-fixture domain exists so a fixture cannot be presented as provider-authenticated evidence. Domain separation distinguishes two code paths, but it does not authenticate the origin of bytes supplied through the public constructor. A fabricated caller value can therefore mint the same provider-labelled receipt class as bytes actually obtained from Zotero.

Repair this without inventing provider trust: first add an executable regression fixing the receipt semantics, then minimally rename/reframe the public raw-JSON receipt domain as caller/capture-bound evidence (for example conceptweave-zotero-captured-json-snapshot-v3) and explicitly state that it binds complete bytes/shape but does not prove provider origin. If later genuine provider authentication is needed, it must enter through a transport-owned capture/attestation boundary rather than a caller-selected digest domain. Keep the typed-fixture domain distinct. Because #10 is Draft/unreleased and exact-head acceptance is still absent, do not migrate or backfill old receipts; invalidate/regenerate them under fresh approval.

This is a COMMENT finding, not approval or merge authorization.

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

Exact-head follow-up at 6aa1d39512cbbf9d37df518f4109d0e69eef0689.

The provenance finding from review 5192398634 is source-repaired in this lineage. RED 67b5214ce8cd39fddbc1ba6043971b9832b2ef17 fixes the intended contract: a public caller-constructed raw JSON capture must produce the non-authenticating conceptweave-zotero-captured-json-snapshot-v3 receipt class. Production 2e52972745953fbb5b606226fce2dda2cf61abd3 changes the digest domain and rustdoc so raw bytes plus decoded typed input are content-bound but do not claim provider origin. Doctoring, product baseline, ADR, TRD, CHANGELOG and UML were then brought forward through exact 6aa1d395...; the UML's stale v2 proposal-binding reference is also corrected to v3.

Mechanical compare from the RED to current head is ordinary-forward and does not reopen current #9's private ClassificationReport or alter its stable ZoteroItem { key, version, data } contract. The superseded provider-labelled receipt semantics are Draft/unreleased evidence and are invalidated rather than locally migrated.

No exact-head GREEN is claimed: this host has no Rust toolchain, this exact head has zero repository-owned PR workflow runs and no combined commit statuses, and no qualifying independent approval exists. Keep Draft and acceptance-pending.

This COMMENT is not approval or merge authorization.

@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: the ordinary reconciliation changed [lib] to src/merged_lib.rs, which then includes the canonical Research Intake src/lib.rs as a nested module. That source file still carries #![cfg_attr(coverage_nightly, feature(coverage_attribute))]. Rust enables unstable compiler features through crate-level #![feature(...)]; nesting that source turns a crate-level capability declaration into a module-level inner attribute when coverage_nightly is active. The normal stable lane can hide this because cfg_attr removes the attribute when the cfg is false, while the intended nightly/coverage configuration becomes structurally invalid. This is also an unnecessary second crate-root seam around the canonical Research Intake owner.

Repair contract: first add a regression that requires the package library root to remain src/lib.rs and requires that root to export the golden-set module. Then minimally attach golden_set from the canonical crate root, restore Cargo's normal src/lib.rs root, and remove the wrapper. Do not reopen ClassificationReport, change the public ZoteroItem shape, weaken coverage, or transfer predecessor GREEN. Exact-head Rust/hosted evidence remains required after the repair.

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

Exact-head source checkpoint at bf6ad9a1c613bd4a36a237d914030997d5721b02.

The crate-root finding from review 5192569298 is repaired forward. RED 18e99a5982c326cf9460db590341bf58b735510a pins the canonical-root contract. Production eccfc978fc28f883cfe548eb14e8eab715e3e4bf restores src/lib.rs as the package root, attaches/re-exports golden_set there, removes the Cargo [lib] override, and deletes the temporary wrapper. Mechanical RED→repair compare is one commit ahead / zero behind and limited to those three paths. Documentation successors make the same ownership boundary current.

This is source repair, not GREEN or approval. No predecessor Rust evidence transfers. This exact head still needs repository-pinned Rust 1.98 workspace/fmt/strict Clippy/rustdoc/release/owned coverage plus hosted security/review acceptance and qualifying independent review before Ready or merge.

@seonghobae
seonghobae marked this pull request as ready for review September 13, 2026 22:59
@seonghobae
seonghobae marked this pull request as draft September 13, 2026 22:59

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

Fresh prerequisite checkpoint only; Research source is unchanged.

ConceptWeave protected/default main remains f4f440dd58c77d7cd90dff8a1eb2eeb9a9940425, so Product bootstrap #35 is still required before this exact Research head can obtain repository-owned Product evidence. Central .github/main has advanced to protected ebc69a4016f7668beaef5e3b592d378f22ada684. Review-repair #2170 is now non-force restacked at c741b608322208b8bc222792ceb3b6c63207e157; Noema #2079 is restacked at e7c5044c4a6228850829660e32b1bed342cc5cb3; earlier checks/reviews on their predecessor heads are historical. CodeQL handler #2106 still requires semantic restack because the protected advance overlaps its governed CHANGELOG/gap-baseline edits.

No bf6ad9a1... Research file changed, no predecessor GREEN is transferred, and #11 remains untouched until this parent reaches unchanged-head native/hosted/review acceptance. This COMMENT supersedes only the stale central-coordinate paragraph in the body.

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