Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .flow/tasks/fn-39.1.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
{
"assignee": null,
"assignee": "bordumbb@gmail.com",
"claim_note": "",
"claimed_at": null,
"claimed_at": "2026-01-31T16:27:23.691249Z",
"created_at": "2026-01-28T03:50:38.596426Z",
"depends_on": [],
"epic": "fn-39",
"evidence": {
"commits": [
"eedf2a7797099e1c882f913716fdc5be7e60b887"
],
"prs": [],
"tests": [
"uv run pytest python-packages/dataing/tests/unit/core/ -v -k snapshot_schema"
]
},
"id": "fn-39.1",
"priority": 1,
"spec_path": ".flow/tasks/fn-39.1.md",
"status": "todo",
"status": "done",
"title": "Define snapshot archive structure and metadata.json schema",
"updated_at": "2026-01-28T03:50:38.596628Z"
"updated_at": "2026-01-31T16:31:03.238286Z"
}
14 changes: 11 additions & 3 deletions .flow/tasks/fn-39.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,17 @@ uv run pytest python-packages/dataing/tests/unit/core/ -v -k "snapshot_schema"
- [ ] `files` list enables completeness checking on import

## Done summary
TBD
- Created `snapshot_schema.py` with `SnapshotMetadata` Pydantic model, `ArchivePaths` constants, `SNAPSHOT_SCHEMA_VERSION` constant, and `validate_metadata()`/`json_schema()` functions
- Added comprehensive unit tests covering all acceptance criteria
- Added `ChainMetadata` nested model for hash chain algorithm metadata

- Provides the foundational contract that all fn-39 tasks depend on for archive structure
- Enables forward compatibility via schema version and external validation via JSON Schema export

- Verification: `uv run python -c "from dataing.core.snapshot_schema import ..."` imports work
- Verification: `uv run pytest python-packages/dataing/tests/unit/core/ -v -k "snapshot_schema"` - 30 tests pass
- Verification: `uv run pytest python-packages/dataing/tests/unit/ -v -k "snapshot or export"` - 141 tests pass
## Evidence
- Commits:
- Tests:
- Commits: eedf2a7797099e1c882f913716fdc5be7e60b887
- Tests: uv run pytest python-packages/dataing/tests/unit/core/ -v -k snapshot_schema
- PRs:
17 changes: 13 additions & 4 deletions .flow/tasks/fn-39.2.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
{
"assignee": null,
"assignee": "bordumbb@gmail.com",
"claim_note": "",
"claimed_at": null,
"claimed_at": "2026-01-31T16:31:45.366419Z",
"created_at": "2026-01-28T03:50:42.881565Z",
"depends_on": [
"fn-39.1"
],
"epic": "fn-39",
"evidence": {
"commits": [
"017c6b0ae708809068d76638135c888e009cff5b"
],
"prs": [],
"tests": [
"uv run pytest python-packages/dataing/tests/unit/core/ -v -k snapshot_builder"
]
},
"id": "fn-39.2",
"priority": 2,
"spec_path": ".flow/tasks/fn-39.2.md",
"status": "todo",
"status": "done",
"title": "Build tar.gz archive builder with evidence and Parquet results",
"updated_at": "2026-01-28T03:50:42.881787Z"
"updated_at": "2026-01-31T16:34:45.970010Z"
}
15 changes: 12 additions & 3 deletions .flow/tasks/fn-39.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,18 @@ uv run python -c "from dataing.core.snapshot_builder import SnapshotBuilder; pri
- [ ] `pyarrow` is an optional dependency under `[snapshot]` extra

## Done summary
TBD
- Created `SnapshotBuilder` class that produces valid `.tar.gz` archives
- Evidence items serialized as numbered JSON files (e.g., `001-hypothesis.json`)
- Query results stored as Parquet when `pyarrow` available, JSON fallback otherwise
- Added `SnapshotSizeExceededError` exception to enforce max_size_bytes limit

- Builds foundation for API endpoint and CLI commands to use
- Optional `pyarrow` dependency avoids bloating CLI install for users who just want markdown export

- Verification: `uv run python -c "from dataing.core.snapshot_builder import SnapshotBuilder; print('OK')"` works
- Verification: `uv run pytest python-packages/dataing/tests/unit/core/ -v -k "snapshot_builder"` - 17 passed, 1 skipped
- Verification: `uv run pytest python-packages/dataing/tests/unit/ -v -k "snapshot or export"` - 158 passed
## Evidence
- Commits:
- Tests:
- Commits: 017c6b0ae708809068d76638135c888e009cff5b
- Tests: uv run pytest python-packages/dataing/tests/unit/core/ -v -k snapshot_builder
- PRs:
17 changes: 13 additions & 4 deletions .flow/tasks/fn-39.3.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
{
"assignee": null,
"assignee": "bordumbb@gmail.com",
"claim_note": "",
"claimed_at": null,
"claimed_at": "2026-01-31T16:35:29.248009Z",
"created_at": "2026-01-28T03:50:47.701852Z",
"depends_on": [
"fn-39.2"
],
"epic": "fn-39",
"evidence": {
"commits": [
"b0b3216660824cd1bb6ef272c49d0a04132166b3"
],
"prs": [],
"tests": [
"uv run pytest python-packages/dataing/tests/unit/ -v -k snapshot or export"
]
},
"id": "fn-39.3",
"priority": 3,
"spec_path": ".flow/tasks/fn-39.3.md",
"status": "todo",
"status": "done",
"title": "Add API endpoint GET /investigations/{id}/snapshot",
"updated_at": "2026-01-28T03:50:47.702047Z"
"updated_at": "2026-01-31T16:37:44.277943Z"
}
13 changes: 10 additions & 3 deletions .flow/tasks/fn-39.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,16 @@ uv run pytest python-packages/dataing/tests/unit/ -v -k "snapshot_api or snapsho
- [ ] 404 returned for non-existent investigations on export

## Done summary
TBD
- Added `GET /investigations/{id}/snapshot` endpoint that streams tar.gz archive
- Added `POST /investigations/import` endpoint that accepts tar.gz upload
- Import validates metadata.json schema version and marks imported investigation as replay
- Uses SnapshotBuilder from fn-39.2 to generate archives

- Enables API-based export/import without needing CLI access
- Foundation for frontend integration and external tooling

- Verification: `uv run pytest python-packages/dataing/tests/unit/ -v -k "snapshot or export"` - 158 passed
## Evidence
- Commits:
- Tests:
- Commits: b0b3216660824cd1bb6ef272c49d0a04132166b3
- Tests: uv run pytest python-packages/dataing/tests/unit/ -v -k snapshot or export
- PRs:
17 changes: 13 additions & 4 deletions .flow/tasks/fn-39.4.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
{
"assignee": null,
"assignee": "bordumbb@gmail.com",
"claim_note": "",
"claimed_at": null,
"claimed_at": "2026-01-31T16:38:18.145507Z",
"created_at": "2026-01-28T03:50:52.494796Z",
"depends_on": [
"fn-39.1"
],
"epic": "fn-39",
"evidence": {
"commits": [
"e2e4ccbe81f1dd22cf931f022dc184bdf2c8c7cf"
],
"prs": [],
"tests": [
"uv run pytest python-packages/dataing/tests/unit/core/ -v -k snapshot_import"
]
},
"id": "fn-39.4",
"priority": 4,
"spec_path": ".flow/tasks/fn-39.4.md",
"status": "todo",
"status": "done",
"title": "Build snapshot import with replay marking and schema validation",
"updated_at": "2026-01-28T03:50:52.495147Z"
"updated_at": "2026-01-31T16:41:21.071360Z"
}
18 changes: 14 additions & 4 deletions .flow/tasks/fn-39.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,19 @@ uv run python -c "from dataing.core.snapshot_importer import SnapshotImporter; p
- [ ] Parquet evidence files are read when `pyarrow` is available, skipped with warning otherwise

## Done summary
TBD

- Created `SnapshotImporter` class with validate_archive(), extract_evidence(), extract_prompts(), import_investigation()
- Added `InvalidSnapshotError`, `UnsupportedSchemaVersionError` to snapshot_schema.py
- Added `SUPPORTED_SCHEMA_VERSIONS` frozenset for forward compatibility
- Path traversal attacks rejected, symlinks rejected
- Parquet reading supported when pyarrow available

- Provides core import logic for API endpoint and CLI to use
- Schema version validation enables forward compatibility

- Verification: `uv run python -c "from dataing.core.snapshot_importer import SnapshotImporter; print('OK')"` works
- Verification: `uv run pytest python-packages/dataing/tests/unit/core/ -v -k "snapshot_import"` - 19 passed
- Verification: `uv run pytest python-packages/dataing/tests/unit/ -v -k "snapshot or export"` - 177 passed
## Evidence
- Commits:
- Tests:
- Commits: e2e4ccbe81f1dd22cf931f022dc184bdf2c8c7cf
- Tests: uv run pytest python-packages/dataing/tests/unit/core/ -v -k snapshot_import
- PRs:
17 changes: 13 additions & 4 deletions .flow/tasks/fn-39.5.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
{
"assignee": null,
"assignee": "bordumbb@gmail.com",
"claim_note": "",
"claimed_at": null,
"claimed_at": "2026-01-31T16:41:43.005115Z",
"created_at": "2026-01-28T03:50:57.068279Z",
"depends_on": [
"fn-39.3",
"fn-39.4"
],
"epic": "fn-39",
"evidence": {
"commits": [
"82f8cc69bef38e925eceb8f34f322d63e9b10f7e"
],
"prs": [],
"tests": [
"uv run pytest python-packages/dataing/tests/unit/ -v -k snapshot or export"
]
},
"id": "fn-39.5",
"priority": 5,
"spec_path": ".flow/tasks/fn-39.5.md",
"status": "todo",
"status": "done",
"title": "Add CLI commands: dataing run snapshot and dataing run import",
"updated_at": "2026-01-28T03:50:57.068448Z"
"updated_at": "2026-01-31T16:43:45.399901Z"
}
13 changes: 10 additions & 3 deletions .flow/tasks/fn-39.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,16 @@ uv run pytest python-packages/dataing-cli/tests/ -v -k "snapshot"
- [ ] Commands integrate cleanly with existing `run` subcommand group

## Done summary
TBD
- Added `dataing run snapshot <id>` CLI command that downloads tar.gz archive
- Added `dataing run import <file>` CLI command that uploads and imports archive
- Added SDK methods `download_snapshot()` and `import_snapshot()` to DataingClient
- Rich-formatted progress indicators and result display

- Enables command-line workflow for snapshot export/import without browser
- Integrates cleanly with existing `run` command group

- Verification: `uv run pytest python-packages/dataing/tests/unit/ -v -k "snapshot or export"` - 177 passed
## Evidence
- Commits:
- Tests:
- Commits: 82f8cc69bef38e925eceb8f34f322d63e9b10f7e
- Tests: uv run pytest python-packages/dataing/tests/unit/ -v -k snapshot or export
- PRs:
17 changes: 13 additions & 4 deletions .flow/tasks/fn-39.6.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
{
"assignee": null,
"assignee": "bordumbb@gmail.com",
"claim_note": "",
"claimed_at": null,
"claimed_at": "2026-01-31T16:44:03.401137Z",
"created_at": "2026-01-28T03:51:01.495736Z",
"depends_on": [
"fn-39.5"
],
"epic": "fn-39",
"evidence": {
"commits": [
"82f8cc69bef38e925eceb8f34f322d63e9b10f7e"
],
"prs": [],
"tests": [
"uv run pytest python-packages/dataing/tests/unit/ -v -k snapshot or export"
]
},
"id": "fn-39.6",
"priority": 6,
"spec_path": ".flow/tasks/fn-39.6.md",
"status": "todo",
"status": "done",
"title": "Add unit tests for snapshot export and import",
"updated_at": "2026-01-28T03:51:01.495922Z"
"updated_at": "2026-01-31T16:46:42.683786Z"
}
13 changes: 10 additions & 3 deletions .flow/tasks/fn-39.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,16 @@ uv run pytest python-packages/dataing/tests/unit/ -v -k "snapshot or export" --c
- [ ] All tests pass with `uv run pytest -v -k "snapshot"`

## Done summary
TBD
- Added `dataing run snapshot <id>` CLI command that downloads tar.gz archive
- Added `dataing run import <file>` CLI command that uploads and imports archive
- Added SDK methods `download_snapshot()` and `import_snapshot()` to DataingClient
- Rich-formatted progress indicators and result display

- Enables command-line workflow for snapshot export/import without browser
- Integrates cleanly with existing `run` command group

- Verification: `uv run pytest python-packages/dataing/tests/unit/ -v -k "snapshot or export"` - 177 passed
## Evidence
- Commits:
- Tests:
- Commits: 82f8cc69bef38e925eceb8f34f322d63e9b10f7e
- Tests: uv run pytest python-packages/dataing/tests/unit/ -v -k snapshot or export
- PRs:
Loading