Sync log rework#8
Open
Warhammer4000 wants to merge 2 commits into
Open
Conversation
Introduce a durable SQLite-backed audit log queue and wire it into the logging pipeline. - Add internal/auditlogstore with schema and APIs (Open, Insert, GetPending, DeleteByIDs, Close) and a logHash/normalizeEventData implementation matching previous dedup behavior. - Replace the in-memory LogBuffer with the persistent store in LoggingIntegration: collection, real-time subscription and shutdown now write/read from the SQLite queue; checkpoint and time-window logic updated to advance correctly. - Add Uploader.UploadFromStore to batch-upload pending rows from the local store and delete successful rows; integrate final/force uploads to use the store. - Remove the old in-memory buffer implementation and its tests (internal/logging/buffer.go and tests/logging_buffer_test.go); update comprehensive tests and .claude/settings.local.json entries. Purpose: provide durable, deduplicated, retryable local persistence for audit logs so uploads survive restarts and can be retried safely.
Introduce a SQLite-backed SoftwareStore to persist software catalog state, reconcile fresh scans (upsert + mark uninstalled) and return the full catalog. Integrate the store into the scheduler and standalone software sync loop so scans are saved, non-fatal store errors are logged, and the full catalog (with first/last seen and is_active) is sent to the server. Improve browser extension collection by reading manifest.json files directly (handle i18n placeholders and single-item PowerShell JSON). Adjust API payload/types to include is_active, first_seen_at and last_seen_at and remove IconURL. Update tests and local .claude settings accordingly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reworked how log sync and software sync happens
Agent Gets data -> Stores in SQLite -> Attempts to send from SQLite to Supabase -> IF fail try again later from database.