Skip to content

feat: add distributed project manifest primitives#53

Open
patrickleet wants to merge 1 commit into
mainfrom
codex/hops-service-create-microsvc-scaffold
Open

feat: add distributed project manifest primitives#53
patrickleet wants to merge 1 commit into
mainfrom
codex/hops-service-create-microsvc-scaffold

Conversation

@patrickleet
Copy link
Copy Markdown
Collaborator

@patrickleet patrickleet commented Jun 2, 2026

Summary

  • add a versioned Distributed project manifest envelope with project, service, endpoint, and transport metadata
  • make read-model/table schema metadata serializable for compiled manifest JSON
  • expose manifest SQL rendering through the existing deterministic table schema renderer

Tests

  • cargo check
  • cargo test manifest --lib
  • cargo test --lib
  • cargo fmt --check

Notes

Summary by CodeRabbit

New Features

  • Introduced distributed project manifest functionality for declaring and managing services, message endpoints, and database schemas.
  • Manifests support JSON serialization for configuration storage and can generate SQL migration artifacts and statements.
  • Fluent builder-style API simplifies manifest construction.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 2, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f2dd5fcd-6bb1-4130-90b6-46ca94d212c8

📥 Commits

Reviewing files that changed from the base of the PR and between f65012b and 4d28854.

📒 Files selected for processing (3)
  • src/lib.rs
  • src/manifest.rs
  • src/read_model/metadata.rs

📝 Walkthrough

Walkthrough

This PR introduces a serializable distributed manifest model for defining projects with table schemas and service metadata. It adds Serde support to read-model metadata types, defines a versioned DistributedManifestEnvelope containing a DistributedProjectManifest with fluent builders for schemas and services, and exposes these types at the crate root.

Changes

Distributed Manifest and Metadata Serialization

Layer / File(s) Summary
Enable read-model metadata serialization
src/read_model/metadata.rs
Serde imports updated and Serialize/Deserialize derives added to seven metadata types (ColumnType, ForeignKey, PrimaryKey, ColumnDef, IndexDef, RelationshipKind, RelationshipDef, ReadModelSchema) to enable JSON round-trip.
Distributed manifest envelope and builders
src/manifest.rs
DistributedManifestEnvelope with versioned schema wraps DistributedProjectManifest; project manifest provides builder methods for registering read models and table schemas, generating SQL statements and migration artifacts by dialect, and building a registry. ServiceManifest, MessageEndpointManifest, and TransportManifest types offer fluent constructors for commands, events, and transports (including http() convenience). Unit test validates JSON serialization/deserialization and asserts rendered SQL contains expected CREATE TABLE statements.
Crate root module declaration and re-exports
src/lib.rs
Public manifest module declared and DistributedManifestEnvelope, DistributedProjectManifest, ServiceManifest, MessageEndpointManifest, TransportManifest, and DISTRIBUTED_MANIFEST_SCHEMA_VERSION re-exported at crate root.

🎯 2 (Simple) | ⏱️ ~12 minutes

🐰 A manifest blooms with schemas bright,
Services dance in ordered light,
Tables serialize with ease,
SQL flows like gentle breeze,
Versioned envelopes hold our might!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.76% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add distributed project manifest primitives' accurately describes the main change: adding new manifest-related types and structures to support distributed project manifests.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/hops-service-create-microsvc-scaffold

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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