Skip to content

refactor: migrate datastore from data/ to .data/ hidden directory#83

Merged
github-actions[bot] merged 1 commit intomainfrom
mechanical-rename-data-to-dotdata
Jan 31, 2026
Merged

refactor: migrate datastore from data/ to .data/ hidden directory#83
github-actions[bot] merged 1 commit intomainfrom
mechanical-rename-data-to-dotdata

Conversation

@stack72
Copy link
Copy Markdown
Contributor

@stack72 stack72 commented Jan 31, 2026

  • Migrate swamp's internal data directory from /data/ to /.data/ (hidden directory)
  • This change improves repository cleanliness by hiding internal storage from casual browsing
  • All symlinks in logical views (/models/, /workflows/) now point to /.data/ paths

Changes

  • Domain layer: Updated repo_service.ts to create .data/ directory structure on init
  • Infrastructure layer: Updated all YAML repository implementations to use .data/ paths:
  • yaml_input_repository.ts
  • yaml_resource_repository.ts
  • yaml_data_repository.ts
  • yaml_output_repository.ts
  • yaml_workflow_repository.ts
  • yaml_workflow_run_repository.ts
  • yaml_evaluated_input_repository.ts
  • yaml_evaluated_workflow_repository.ts
  • streaming_log_repository.ts
  • fs_file_repository.ts
  • Symlink service: Updated symlink_repo_index_service.ts to create symlinks pointing to .data/
  • Documentation: Updated skill docs and design docs to reflect new paths
  • Configuration: Updated .gitignore to ignore .data/ subdirectories

Breaking Change

This is a breaking change for existing repositories. Users will need to either:

  • Run swamp repo init --force to reinitialize (losing existing data)
  • Manually rename their data/ directory to .data/

Test plan

  • deno check - Type checking passes
  • deno lint - Linting passes
  • deno fmt - Formatting passes
  • deno run test - All 1178 tests pass
  • deno run compile - Binary compiles successfully

🤖 Generated with Claude Code

- Migrate swamp's internal data directory from `/data/` to `/.data/` (hidden directory)
- This change improves repository cleanliness by hiding internal storage from casual browsing
- All symlinks in logical views (`/models/`, `/workflows/`) now point to `/.data/` paths

## Changes

- **Domain layer**: Updated `repo_service.ts` to create `.data/` directory structure on init
- **Infrastructure layer**: Updated all YAML repository implementations to use `.data/` paths:
- `yaml_input_repository.ts`
- `yaml_resource_repository.ts`
- `yaml_data_repository.ts`
- `yaml_output_repository.ts`
- `yaml_workflow_repository.ts`
- `yaml_workflow_run_repository.ts`
- `yaml_evaluated_input_repository.ts`
- `yaml_evaluated_workflow_repository.ts`
- `streaming_log_repository.ts`
- `fs_file_repository.ts`
- **Symlink service**: Updated `symlink_repo_index_service.ts` to create symlinks pointing to `.data/`
- **Documentation**: Updated skill docs and design docs to reflect new paths
- **Configuration**: Updated `.gitignore` to ignore `.data/` subdirectories

## Breaking Change

This is a **breaking change** for existing repositories. Users will need to either:
- Run `swamp repo init --force` to reinitialize (losing existing data)
- Manually rename their `data/` directory to `.data/`

## Test plan

- [x] `deno check` - Type checking passes
- [x] `deno lint` - Linting passes
- [x] `deno fmt` - Formatting passes
- [x] `deno run test` - All 1178 tests pass
- [x] `deno run compile` - Binary compiles successfully

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Approve with Suggestions

This is a well-executed mechanical rename from data/ to .data/ for hiding internal storage. The core implementation is correct - all actual path construction uses .data/ and tests have been updated appropriately.

No Blocking Issues

The PR passes all tests (1178 tests as noted), type checking, linting, and compilation. The functional code is correct.

Suggestions (non-blocking)

For completeness, consider updating these in a follow-up:

  1. Test fixture data - src/presentation/output/workflow_delete_output_test.tsx lines 17-18 and 25-26 still use data/workflows/... in test data. This doesn't affect functionality (it's just fixture data that gets passed through), but updating it would maintain consistency.

  2. JSDoc comments - Several files still document the old path in comments:

    • yaml_data_repository.ts:18
    • fs_file_repository.ts:24-25
    • yaml_input_repository.ts:24
    • yaml_resource_repository.ts:18
    • yaml_output_repository.ts:20
    • yaml_workflow_repository.ts:24
    • yaml_workflow_run_repository.ts:25
    • streaming_log_repository.ts:27-28
    • yaml_evaluated_input_repository.ts:15
    • yaml_evaluated_workflow_repository.ts:13

These are documentation-only and don't affect runtime behavior, but updating them would prevent future confusion.

Verification

  • ✅ All repository implementations correctly use .data/ paths
  • ✅ Symlink service creates symlinks pointing to .data/
  • .gitignore properly updated
  • ✅ Design docs and skill docs updated
  • ✅ Integration tests updated
  • ✅ Breaking change documented in PR description

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Approve with Suggestions

This is a well-executed mechanical rename from data/ to .data/ for hiding internal storage. The core implementation is correct - all actual path construction uses .data/ and tests have been updated appropriately.

No Blocking Issues

The PR passes all tests (1178 tests as noted), type checking, linting, and compilation. The functional code is correct.

Suggestions (non-blocking)

For completeness, consider updating these in a follow-up:

  1. Test fixture data - src/presentation/output/workflow_delete_output_test.tsx lines 17-18 and 25-26 still use data/workflows/... in test data. This doesn't affect functionality (it's just fixture data that gets passed through), but updating it would maintain consistency.

  2. JSDoc comments - Several files still document the old path in comments:

    • yaml_data_repository.ts:18
    • fs_file_repository.ts:24-25
    • yaml_input_repository.ts:24
    • yaml_resource_repository.ts:18
    • yaml_output_repository.ts:20
    • yaml_workflow_repository.ts:24
    • yaml_workflow_run_repository.ts:25
    • streaming_log_repository.ts:27-28
    • yaml_evaluated_input_repository.ts:15
    • yaml_evaluated_workflow_repository.ts:13

These are documentation-only and don't affect runtime behavior, but updating them would prevent future confusion.

Verification

  • ✅ All repository implementations correctly use .data/ paths
  • ✅ Symlink service creates symlinks pointing to .data/
  • .gitignore properly updated
  • ✅ Design docs and skill docs updated
  • ✅ Integration tests updated
  • ✅ Breaking change documented in PR description

@github-actions github-actions bot merged commit 97adf7d into main Jan 31, 2026
3 checks passed
@github-actions github-actions bot deleted the mechanical-rename-data-to-dotdata branch January 31, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant