Skip to main content

Argus One audit and local candidate

Baseline: 18c8a01; candidate: 0.1.1. Initial source inspection used installed Zotero 10.0.5, followed by source checks at 10.0.6. The application is now observed at 10.0.7. Live plugin qualification has not been run. The initial default-profile inventory reports no enabled/installed extensions; the repository and historical XPI therefore are not evidence of installation. No working Zotero profile or library was modified in this repository audit.

Confirmed findings and changes

Severity Evidence and user impact Repair
High argus.js assigned getter-only item.relatedItems. A Node reproduction using the actual property contract left related links empty while older records were trashed. Use native Zotero merge; no manual related-item assignment.
High Hand-written merging omitted replacement/citation identity, incoming relation retargeting and note-key remapping. Delegate to native mergeItems.mjs, with the compatibility API as a fallback.
High Field/creator exceptions were swallowed before trashing old records. Fail explicitly, recover touched objects, and stop the run.
High Native transaction rollback alone does not reset successfully saved object caches or the relation index. Capture parents, children, annotations and incoming-relation subjects; reject their pending edits, reload after failure, rebuild affected relation entries, and require restart if recovery fails.
Medium Shutdown removed menus but left asynchronous scans able to merge subsequent groups. Invalidate the active lifecycle; block writes after awaited loads and later groups, while allowing an already-started native merge to finish. Freeze reviewed plan arrays across awaits.
Medium Weak DOI syntax admitted 10.x/foo trailing text; mixed types and stale/current edits were not checked. Exact wrapper normalization, strict syntax, unambiguous Extra fallback, same-type/personal-library/editability/snapshot guards.
Medium Source manifest restricted 9., tracked archives restricted 9.0., despite broader README claims. Archive update URL referenced the old owner. Candidate declares 9.0–10.0.*, no dead update feed, explicit qualification limits.
Medium Source, root XPI and source ZIP disagreed; no behavior tests or build checks. Preserve historical archives; create reproducible versioned dist files, verify their source equivalence, and add CI/tests.

Native API contract and tradeoffs

The installed application archive /Applications/Zotero.app/Contents/Resources/app/omni.ja was read without launching Zotero or opening a library. The inspected modules were:

  • chrome/content/zotero/xpcom/data/item.js: getter-only relatedItems and field APIs.
  • chrome/content/zotero/mergeItems.mjs: native merge handling of collections, tags, replacement relations, incoming links, notes, attachments, and undo data.
  • chrome/content/zotero/xpcom/db.js: transaction waiting rather than nesting.
  • chrome/content/zotero/xpcom/data/dataObject.js: load/reload and pending-change APIs.
  • chrome/content/zotero/xpcom/pluginAPI/menuManager.js: menu registration contract.

The native merge starts its own transaction. An outer transaction would wait on itself, so version 0.1.1 intentionally processes groups one transaction at a time. A failed group is rolled back by Zotero; earlier completed groups remain merged. The dialog reports that distinction. Newest values are selected before merging; Zotero subsequently retains the earliest dateAdded, and may consolidate duplicate attachments. These native semantics replace the older all-groups transaction and manual child movement claims. Native consolidation can use PDF text fingerprints and web titles rather than byte equality. Children use their current saved content; the preview covers the parent identity/field plan, while pending edits anywhere in the affected scope block merging. This is distinct from Attaclone’s exact-byte PDF matching.

References: Zotero JavaScript API, plugin development, and the installed API implementation above. The source manifest range is not proof that every declared version has been tested in a running application.

Acceptance and reproducible checks

node --check src/argus-one/argus.js
node --check src/argus-one/bootstrap.js
node --test tests/*.test.cjs
python3 -m unittest discover -s tests -p 'test_*.py' -v
python3 tools/build.py
python3 tools/build.py --check

Node tests execute the plugin adapter against a simulated Zotero API, including DOI edge cases, newest/tie selection, incompatible groups, stale previews, pending changes, transaction contention, cancellation, native failure and partial completion, child-cache restoration and incoming-relation index recovery. Shutdown during loading and between groups, plus reviewed-plan immutability, are also covered. The 15 Node checks and 2 Python checks pass locally. They verify delegation rather than reimplementing or claiming to test Zotero’s entire native merge engine. Python tests verify archive identity, reproducibility and refusal to overwrite differing files.

The 0.1.0 root archives remain unchanged. New 0.1.1 files and SHA-256 receipt are under ignored dist/. No release, tag, GitHub push or plugin installation was performed by this audit. CI is configured but has not yet run on GitHub.

Before working-library use, run the candidate in a disposable Zotero profile with synthetic duplicates, collections, related records, notes and attachments; verify replaced-item/citation identity and failure recovery. Keep a full backup. Regenerate Workbench manifests, audits and staged proposals after merge operations. Remaining opportunities are selected-group UI, an authenticated release/update channel, and validation across additional Zotero/OS versions.