feat(sync): observation metadata, tags, exports, and Formulus LWW tagging#567
Merged
r0ssing merged 13 commits intoOpenDataEnsemble:devfrom Mar 22, 2026
Merged
Conversation
…rvice functionality - Added RawJSONExportHandler to handle requests for exporting observations as a ZIP of JSON files. - Implemented ExportRawJSONZip method in the data export service to generate the ZIP archive. - Enhanced mock service to support raw JSON export functionality. - Updated API routes to include the new endpoint for raw JSON export. - Added unit tests for both the handler and service to ensure correct behavior and error handling.
- Added support for multiple export formats (parquet, json, attachments) in the data export command. - Updated the client to handle downloading of raw JSON and attachments ZIP exports. - Improved error handling for API responses during export operations. - Updated command examples to reflect new usage patterns.
- Enhanced the observation model to include optional fields: author, device ID, and tags. - Updated database schema and migration to accommodate new fields. - Modified data export and sync functionalities to handle the new fields. - Adjusted tests and documentation to reflect the changes in the observation structure.
najuna-brian
approved these changes
Mar 22, 2026
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.
feat(sync): observation metadata, tags, exports, and Formulus LWW tagging
Description
This PR adds optional root-level observation fields (
author,device_id,tags) end-to-end: Postgres migration, Synkronus sync (pull/push), OpenAPI and protocol docs, Parquet + raw JSON export, and Formulus local storage + UI. Sync remains backward-compatible when these fields are absent.Synkronus
author,device_id, andtags(TEXT[]) onobservations(with comments).geolocation,author,device_id, andtagson pull and push; fields are optional and omitted when unset.author,device_id, andtags(tags as a JSON string column, consistent withgeolocation); raw JSON ZIP includes the same fields.Observationschema:author/device_id/tagsoptional; spec version bump.documentation/sync-protocol.md: documents optional root metadata includingtags.Formulus
tagscolumn (JSON array as string); migration from v4.author,device_id, andtags; push omits empty optional fields when appropriate.tagsas small pill/chip UI.last_write_wononce (deduped), exported asLAST_WRITE_WON_TAGinsyncConstants.ts; tag syncs to the server on the next push unless removed.Type of Change
Component(s) Affected
Related Issue(s)
Closes/Fixes/Resolves:
Testing
Breaking Changes
If breaking changes, please describe migration steps:
tags.Documentation Updates
Checklist
Thank you for contributing to Open Data Ensemble (ODE)!