Commit graph

7 commits

Author SHA1 Message Date
Research Assistant
064644c7c6 test: update ACTIONS count from 6 to 4, remove copy-context test cases 2026-05-10 14:10:41 +08:00
Research Assistant
f885adae48 feat: skill auto-deploy in update + Copy Context as pure JS + shared skill_deploy service
- New services/skill_deploy.py: single source of truth for agent skill deployment
  - AGENT_CONFIGS with 9 platforms, all vault-local
  - deploy_skills() with install/update mode (overwrite flag)
  - Used by both setup wizard and update worker
- update.py: _deploy_all_skills() after pip/git/zip update
- setup_wizard.py: delegates skill deploy to shared service
- config.py: add agent_platform default
- main.js: Copy Context + Copy Collection Context now pure JS
  - Uses in-memory _cachedItems / _currentPaperEntry
  - No subprocess spawn, no timeout, no JSON parse errors
- testable.js: remove needsKey/needsFilter from context actions
- commands.test.mjs: update assertions for removed flags
2026-05-10 12:33:23 +08:00
Research Assistant
06c2ce5f9d fix(plugin): extract testable functions to src/testable.js, fix vitest imports
- Move resolvePythonExecutable, getPluginVersion, classifyError, ACTIONS, etc. to src/testable.js
- main.js now requires from ./src/testable.js instead of inline duplication
- Tests import from ../src/testable.js (no obsidian dependency)
- Remove vitest obsidian mock setup (no longer needed)
- Fixes L3 Plugin Tests that failed because main.js requires 'obsidian'
2026-05-10 11:03:31 +08:00
Research Assistant
71d2d05f41 fix(plugin): mock obsidian module for vitest — main.js requires it at top level 2026-05-10 10:52:21 +08:00
Research Assistant
aff3cfe622 fix(plugin): update Vitest imports after src/ inline refactor
- Add named exports for testable functions (resolvePythonExecutable, getPluginVersion, etc.)
- Update test imports from ../src/*.js to ../main.js
- Fix repair action test: disabled flag was removed when ACTIONS was inlined
2026-05-10 10:48:06 +08:00
Research Assistant
0d49b5d285 fix: pre-existing test issues blocking CI on non-Windows platforms
test_ocr_preflight: mock fitz.open (not builtins.open) + set needs_sanitize=True
  - Code uses fitz.open(), not builtins.open() — mock was targeting wrong function
  - fitz.open() only called when meta.needs_sanitize is true — mock returned {} which skipped it
  - These tests were always broken but CI never ran before v2.1

test_e2e_cli: guard against None stdout in doctor_verdict test on Windows CI

L3 runtime.test.mjs: use platform-agnostic path matching
  - path.join produces / on Linux but \\\\ on Windows — test used \\\\ only
2026-05-09 18:06:37 +08:00
Research Assistant
2cb223ddbb feat(53-001): extract src/ modules from main.js and add Vitest test infrastructure
- runtime.js: resolvePythonExecutable, getPluginVersion, checkRuntimeVersion
- errors.js: classifyError, buildRuntimeInstallCommand, parseRuntimeStatus
- commands.js: ACTIONS, buildCommandArgs, runSubprocess
- package.json with vitest + obsidian-test-mocks + jsdom
- vitest.config.ts with jsdom environment
- 42 Vitest tests across 3 test files
- Refactored main.js to import from src/ modules
2026-05-09 00:05:19 +08:00