feat(zotero): connect approved execution boundary - #19
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 |
|
@codex review\n\nPlease review exact head |
|
@coderabbitai review\n\nPlease review exact head |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
head='11d1eec178bad6b09a4163cddd0bf165728c8a94'
parent='cf1832461c0b22e92afc3fe671c977964bf06ac4'
printf '%s\n' '=== commit verification ==='
git rev-parse HEAD
git rev-parse "${head}^{parent}"
git cat-file -t "$head"
git cat-file -t "$parent"
git merge-base --is-ancestor "$parent" "$head" && echo "specified parent is an ancestor"
git diff-tree --no-commit-id --name-status -r "$parent" "$head"
printf '%s\n' '=== diff stat ==='
git diff --stat "$parent" "$head"
printf '%s\n' '=== changed Rust outlines ==='
git diff --name-only "$parent" "$head" -- '*.rs' |
while IFS= read -r file; do
[ -n "$file" ] || continue
printf '\n--- %s ---\n' "$file"
ast-grep outline "$file" --items all --view expanded || true
done
printf '%s\n' '=== focused symbols and safety-related references ==='
rg -n -i -C 3 \
'(dry.run|preflight|reconcil|rollback|receipt|api.?key|authorization|bearer|secret|token|localhost|127\.0\.0\.1|base.?url|server|request|response|delete|create|update)' \
$(git diff --name-only "$parent" "$head" -- '*.rs' '*.md' '*.toml') || true
printf '%s\n' '=== exact source diff ==='
git diff --find-renames --find-copies --unified=80 "$parent" "$head" -- '*.rs' '*.toml'Length of output: 1882 🏁 Script executed: #!/bin/bash
set -euo pipefail
repo='ContextualWisdomLab/ConceptWeave'
head='11d1eec178bad6b09a4163cddd0bf165728c8a94'
parent='cf1832461c0b22e92afc3fe671c977964bf06ac4'
printf '%s\n' '=== immutable commit metadata ==='
gh api "repos/${repo}/commits/${head}" \
--jq '{sha, parents: [.parents[].sha], message: .commit.message, files: [.files[] | {filename, status, additions, deletions, patch}]}'
printf '%s\n' '=== exact parent-to-head comparison ==='
gh api "repos/${repo}/compare/${parent}...${head}" \
--jq '{status, ahead_by, behind_by, merge_base_commit: .merge_base_commit.sha, commits: [.commits[] | .sha], files: [.files[] | {filename, status, additions, deletions, previous_filename, patch}]}'Length of output: 32800 🏁 Script executed: #!/bin/bash
set -euo pipefail
file='crates/conceptweave-zotero/src/lib.rs'
printf '%s\n' '=== source map ==='
ast-grep outline "$file" --items all --view expanded
printf '%s\n' '=== production definitions and relevant call sites ==='
rg -n -C 4 \
'^(pub )?(fn|struct|enum|impl)\s+(execute_classification_write_plan|execute_classification_write_plan_with_zotero10|Zotero10LocalAdapter|Zotero10Authorization|Zotero10|.*Key)|\b(get_item|write_item|authorize|into_adapter|into_zotero|Authorization)\s*\(' \
"$file"
printf '%s\n' '=== safety-sensitive implementation references ==='
rg -n -i -C 5 \
'(derive\(|Debug|Display|Serialize|Deserialize|api.?key|authorization|bearer|zotero-server-id|server.?id|authorization|header|redirect|timeout|dry.run|preflight|reconcil|rollback|receipt|write.?item|get.?item)' \
"$file"
printf '%s\n' '=== source slices around each relevant definition ==='
for line in $(rg -n \
'^(pub )?fn execute_classification_write_plan|^(pub )?fn execute_classification_write_plan_with_zotero10|^(pub )?struct Zotero10LocalAdapter|^(pub )?struct Zotero10Authorization|^impl Zotero10LocalAdapter|^impl Zotero10Authorization|^mod tests' \
"$file" | cut -d: -f1); do
start=$(( line > 45 ? line - 45 : 1 ))
end=$(( line + 220 ))
printf '\n--- lines %s-%s ---\n' "$start" "$end"
sed -n "${start},${end}p" "$file"
doneLength of output: 174434 🏁 Script executed: #!/bin/bash
set -euo pipefail
file='crates/conceptweave-zotero/src/lib.rs'
printf '%s\n' '=== locally available exact head range ==='
git rev-parse HEAD
git rev-parse HEAD^
git diff --check HEAD^ HEAD
git diff --name-status HEAD^ HEAD
git diff --unified=35 HEAD^ HEAD -- "$file"
printf '%s\n' '=== execution-core tests ==='
rg -n -C 6 \
'^\s*fn .*?(dry_run|preflight|reconcil|rollback|partial_failure|write_plan|execute).*?\(' \
"$file"
printf '%s\n' '=== direct execution-core invocations in tests ==='
rg -n -C 8 \
'\bexecute_classification_write_plan(_with_zotero10)?\s*\(' \
"$file"
printf '%s\n' '=== secret-bearing types and formatting / serialization implementations ==='
rg -n -C 3 \
'impl\s+(fmt::Debug|fmt::Display|Serialize|Deserialize)\s+for\s+(Zotero10LocalAuthorization|Zotero10LocalAdapter)|derive\([^)]*(Debug|Serialize)[^)]*\).*?(Zotero10LocalAuthorization|Zotero10LocalAdapter)|api_key' \
"$file"Length of output: 11865
No actionable findings. The new public boundary delegates directly to The delegation preserves these behaviors:
The added mock Local API test verifies the expected three preflight requests, one verified write, and the post-write rollback revision.
|
Non-force two-parent restack onto current authorization parent. Preserve the approved-execution integration while inheriting the repaired Foundation CI, receipt, and transport lineage. Signed-off-by: Seongho Bae <me@seonghobae.me>
|
Current-stack correction (2026-09-05): exact base |
Verified local approval-order repair — 2026-09-06 checkpoint
Exact head:
autoresearch/zotero10-approved-execution@de9df48d727fe22a3f1efb881d7d17ef0566b620. Exact base:autoresearch/zotero10-local-authorization@5e33981ccb0691e0a24260652c44fe8e28afb8d9.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 (106 tests / 20 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 source-integrity note — 2026-09-05
autoresearch/zotero10-approved-execution@9dc1387a588a3ecfe2be255f68467be68a9fc591.autoresearch/zotero10-local-authorization@1105f4f12ebf37fb98d9d52ba44078c765ed86eb.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
Connect one user-authorized/server-bound Zotero 10 adapter to the existing reviewed-plan execution core without creating a second mutation implementation. The slice preserves dry-run, complete preflight, same-boundary reconciliation, and reverse rollback receipts, with one end-to-end mock Local API path covering preflight -> write -> receipt coordinates.
Current exact stack — 2026-09-05
autoresearch/zotero10-local-authorization@bb8ef8c1f30bbd1c71f6569b9d9441108a362b05;b6c11b280ad7d04e45f9fd694026bddc80370658;Inherited gates that this PR does not erase
THREAT_MODEL.md,SECURITY.md, anddocs/TRD.md, plus its Rust contract and corrected Zotero bibliography.The mock adapter path proves orchestration mechanics only. It cannot turn predecessor source repairs into exact-head GREEN.
Security/product boundary
Zotero's Local API uses
http://localhost:23119/api/;Zotero-Server-IDis a database continuity/precondition coordinate, not cryptographic peer authentication. Until product security explicitly accepts hostile same-host observation/interposition as out of scope or Zotero provides authenticated encrypted/equivalent IPC, this path must not be advertised or released as enterprise-secure live write-back.No key may enter repository fixtures, logs, receipts, serializable domain artifacts, semantic evidence, or model prompts. No live Zotero mutation is claimed.
Dependency and merge gate
Keep Draft behind #18 -> #17 -> #16 -> #15 -> #13 -> #12 -> #11 -> #10 -> #9 -> Foundation. Later transport/integration tests never substitute for exact-head predecessor review, Product, security, coverage, or governance evidence. Require all predecessor gates and any #19-local finding to reach one unchanged exact-head GREEN with protected review/security/dependency checks terminal. No self-approval, routine administrator bypass, force-push, destructive rebase, secret persistence, provider-security overclaim, or live mutation without approved rollback evidence.
Refs #8.