Skip to content

SQLite storage baseline#5

Draft
JSYoo5B wants to merge 5 commits into
codex/03-runtime-repository-boundariesfrom
codex/04-sqlite-storage-baseline
Draft

SQLite storage baseline#5
JSYoo5B wants to merge 5 commits into
codex/03-runtime-repository-boundariesfrom
codex/04-sqlite-storage-baseline

Conversation

@JSYoo5B

@JSYoo5B JSYoo5B commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds SQLite as the first durable repository target.
  • Implements SQLite repositories for image, compute servers, and volumes.
  • Adds persistence coverage for image repository behavior.

Main Review Points

  • SQLite schema creation and repository behavior.
  • Store-layer error handling and persistence semantics.
  • Dependency footprint from the SQLite driver.

Verification

  • go test ./...

return repository, nil
}

func (r *SQLiteRepository) Init() error {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

SQLite schema creation is colocated with the repository implementation. That keeps the first durable store self-contained, while the app service still only sees the repository interface.

return r.db.Close()
}

func (r *SQLiteRepository) Create(image Image) Image {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

The current repository interface returns the created model without an error, so this implementation panics on unexpected DB failures. This is acceptable for the current narrow slice, but it is a design point to revisit when store errors need to become app-level responses.

created_at,
updated_at
FROM images
ORDER BY sequence`)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

The sequence column is used to preserve insertion order for list responses. This mirrors the earlier in-memory ids slice and avoids nondeterministic map iteration in tests.

@JSYoo5B JSYoo5B marked this pull request as draft July 2, 2026 21:09
@JSYoo5B JSYoo5B force-pushed the codex/03-runtime-repository-boundaries branch from ba99115 to 6a40197 Compare July 5, 2026 12:48
@JSYoo5B JSYoo5B force-pushed the codex/04-sqlite-storage-baseline branch from ff34ab3 to a7acbbd Compare July 5, 2026 12:50
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