Move inline tests to integration tests for ppk, plugin-sdk, plugin-host
Details
Migrate all #[cfg(test)] inline test modules to tests/ directories as
proper integration tests. This enforces the public API boundary and
ensures tests only exercise exported interfaces.
Crates migrated:
- privstack-ppk: 21 tests → tests/ppk_tests.rs
- privstack-plugin-sdk: 34 tests → tests/types_tests.rs
- privstack-plugin-host: 236 tests across 5 new files
(permissions, policy, wit_types, sandbox, manager)
Visibility changes to support integration tests:
- lib.rs: re-export TrackingLimiter, PluginState, AuditConfig
- wit_types.rs: make to_core_field() and to_core() pub
- manager.rs: remove #[cfg(test)] from new_for_test
- sandbox.rs: make track_fuel_consumption and last_fuel_consumed pub
Total: 291 integration tests, 0 inline tests remaining in these crates.
Add core test coverage: sync error/cloud + desktop services/SDK (518 C# tests)
Details
Rust (28 new tests):
- error_tests.rs: all 10 SyncError variants, Display, Debug, std::error::Error,
SyncResult, From<serde_json::Error>, unicode, edge cases (16 tests)
- cloud_storage_tests.rs: CloudStorageConfig defaults/custom/serde,
CloudFile create/clone/serde, ChangeSet empty/populated/clone (12 tests)
C# Desktop Services (5 new test files):
- EntityTypeMapTests: lookup roundtrips, uniqueness, all fields non-empty (14 tests)
- StringHelpersTests: emoji stripping, null/empty, accented/CJK preservation (8 tests)
- FocusModeServiceTests: state toggle, event firing, duplicate suppression (7 tests)
- QuickActionServiceTests: action collection, caching, invalidation, find by
ID/shortcut, case insensitivity, provider exception handling (11 tests)
- PlatformDetectorTests: platform/arch detection, memory, GPU/CPU detection,
hardware assessment, AI recommendation (11 tests)
C# SDK Tests (3 new test files):
- WikiLinkParserTests: wiki-link/privstack URL parsing, mixed formats,
ExtractContentFromEntity, ExtractSnippet, regex patterns (16 tests)
- UnixTimestampConverterTests: number/string/ISO reads, millis write,
roundtrip, epoch zero, negative, invalid token (8 tests)
- GraphProviderModelsTests: node CompositeKey, edge/content/link construction,
GraphContribution defaults and populated (8 tests)
C# Models (1 new test file):
- PropertyModelsTests: PropertyDefinition, PropertyGroup, RelationEntry,
PropertyTemplate, EntityMetadata — defaults, serialization, record with (21 tests)
Total C# tests: 379 → 518 (139 new)
Total Rust sync tests: +28
Add cloud api_client + vault recovery test coverage (93 tests)
Details
api_client_extended_tests.rs (61 tests):
- Token management: get/refresh/logout flows
- 429 rate limiting: Retry-After parsing, gate blocking, proactive throttling
- 401 auto-refresh retry on POST and DELETE
- Workspace 409 conflict resolution
- All endpoint error paths (500s)
- Data edge cases: invalid base64, string-encoded percents, empty lists
- Concurrent refresh deduplication
recovery_extended_tests.rs (32 tests):
- setup_recovery_with_mnemonic: roundtrip, overwrite, vault_manager wrapper
- reset_password: re-encryption roundtrip, mnemonic stays valid
- sanitize_for_sql: edge cases (quotes, unicode, empty, long strings)
- checkpoint and content hash verification
Add plugin-host test coverage: sandbox + manager (306 tests, 80%→85%)
Details
- TrackingLimiter: memory_growing allowed/denied, table_growing, instances/tables/memories
- get_resource_metrics: metadata-only, third-party limits, with entities, zero memory edge case
- PluginResourceMetrics: Debug, Clone, Serialize coverage
- from_wasm_cached: nonexistent file error path
- track_fuel_consumption: no-op for metadata-only
- call_link_type/call_navigate_to_item: error paths
- Manager: navigate_to_item, get_entity_view_data (capability not supported)
- Manager: get_plugin_metrics, get_all_plugin_metrics
- Manager: get_plugin/get_plugin_mut not found
- Manager: load_plugin_from_wasm error, navigation items with icons
- Manager: fetch_url_for_plugin network error, with_policy constructor
Fix QuestPDF license error in UnifiedRecoveryKitPdfService
Details
Add Community license configuration in static constructor, matching
the existing pattern in EmergencyKitPdfService. Without this, QuestPDF
throws on PDF generation since it requires explicit license selection.
Get notified about new releases