Skip to content

Comments

Design a basic storage abstraction layer for the server#657

Merged
jviotti merged 1 commit intomainfrom
storage-abstraction-server
Feb 23, 2026
Merged

Design a basic storage abstraction layer for the server#657
jviotti merged 1 commit intomainfrom
storage-abstraction-server

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Feb 23, 2026

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

@jviotti jviotti force-pushed the storage-abstraction-server branch from c0bed98 to 135493a Compare February 23, 2026 19:33
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 10 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/storage/storage.cc">

<violation number="1" location="src/storage/storage.cc:38">
P2: Avoid relying on assert for input validation here; in release builds a key without '/' will overflow the substring indices and yield an invalid path. Handle the missing slash with a runtime error or a fallback path.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@augmentcode
Copy link

augmentcode bot commented Feb 23, 2026

🤖 Augment PR Summary

Summary: This PR introduces a basic Storage abstraction for the server, replacing direct std::filesystem-based path construction with key-based lookups.

Changes:

  • Added a new src/storage library with sourcemeta::one::Storage for resolving keys to on-disk metapack files
  • Linked the server target against the new storage library and added it to the build
  • Refactored schema serving, evaluation, and search actions to read JSON/raw data via Storage instead of absolute paths
  • Extended action_serve_metapack_file with overloads for local paths and storage-backed keys
  • Updated server dispatch/handlers to pass a single Storage instance throughout request handling

Technical Notes: Keys are constructed via Storage::key(...) and resolved into the existing “sentinel” metapack layout (% directories), enabling future storage backend substitutions with minimal handler churn.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode 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 completed. 4 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti force-pushed the storage-abstraction-server branch from 135493a to 1cb94f9 Compare February 23, 2026 19:47
@jviotti jviotti merged commit fa0cf7b into main Feb 23, 2026
5 checks passed
@jviotti jviotti deleted the storage-abstraction-server branch February 23, 2026 20:42
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