Skip to content

Ship the native Hummingbird 2 read-only server vertical slice #77

Description

@DandyLyons

Summary

Ship the native, read-only md-utils server vertical slice using Hummingbird 2.

This issue is deliberately limited to HTTP integration and application composition. Resource planning, storage, identity assessment, selection, indexing, and representation are supplied by their dedicated prerequisite issues.

Ship:

  1. a MarkdownUtilitiesServer Swift library containing the generic Hummingbird adapter; and
  2. an md-utils-server executable that loads configuration, composes dependencies, registers a validated EndpointPlan, and runs the application.

Responsibilities

  • Register generic Hummingbird 2 collection, item, and logical-path handlers from an immutable EndpointPlan.
  • Adapt the read snapshot's success, not-found, invalid-record, and identity-conflict results to HTTP.
  • Implement the representative read-only books resource.
  • Provide a thin executable composition root with startup configuration, logging, and lifecycle handling.
  • Test route behavior in process with Hummingbird's testing support.
  • Run natively on Linux without spawning the md-utils CLI.

Representative routes

  • GET /books returns selected candidates according to the configured selection mode.
  • GET /books/{id} returns an unambiguous primary-ID record.
  • GET /_md-utils/path/** returns an exact logical-path record when fallback is enabled.

The same canonical record may appear through multiple configured resources when it conforms to multiple mdtypes. Those routes share canonical identity and revision while retaining resource-specific projection and policy.

Acceptance criteria

  • Add a MarkdownUtilitiesServer library product and target.
  • Add a thin md-utils-server executable composition root.
  • Use Hummingbird 2 only.
  • Register generic routes from the immutable plan without resource-specific generated Swift code.
  • Implement collection, item, and reserved logical-path lookup handlers.
  • Map structured identity collisions to 409 Conflict without selecting an arbitrary record.
  • Preserve invalid rule-selected candidates with valid: false and diagnostics.
  • Implement the representative read-only books vertical slice on Linux.
  • Test success, not found, invalid candidates, nested paths, overlapping type membership, missing IDs, and duplicate IDs in process.
  • Document startup, restart, routing, identity, validity, collision, and performance behavior.

Dependencies

Blocked by:

Those issues incorporate #81 identity semantics and #92 storage.

Follow-ups

Non-goals

  • Endpoint planning internals, record indexing, or projection design.
  • Write operations.
  • OpenAPI or Swagger output.
  • Swift source generation, Swift OpenAPI Generator, or a build plugin.
  • Cloudflare Workers or WebAssembly.
  • SQLite or Durable Objects.
  • Hot reload, authentication, authorization, or production observability.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions