Skip to content

feat(habit): wire durable runtime and HTTP workflow - #44

Closed
seonghobae wants to merge 12 commits into
mainfrom
feat/habit-postgres-runtime
Closed

feat(habit): wire durable runtime and HTTP workflow#44
seonghobae wants to merge 12 commits into
mainfrom
feat/habit-postgres-runtime

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Summary

Implements #42 as the next production slice of #36.

  • requires a validated PostgreSQL URL and bounded pool settings before creating the Habit runtime
  • injects PostgresHabitRepository through NestJS instead of process-local storage
  • closes the PostgreSQL pool idempotently through application shutdown hooks
  • exposes versioned tenant-scoped endpoints for habit creation/listing, bounded occurrences, idempotent completion, and immutable history
  • validates UUIDv4 workspace and habit identifiers, exact request shapes, recurrence discriminators, dates, timestamps, and idempotency keys
  • maps validation, not-found, idempotency-conflict, persistence, and unexpected failures to credential-free RFC 9457-compatible problem details
  • adds runtime, HTTP-boundary, and controller coverage for configuration bounds, shutdown, recurrence workflows, tenant isolation, exact replay, and safe failure responses
  • documents configuration ownership, deployment migration requirements, temporary workspace-header trust, deferred authenticated authorization, and rollback behavior

Deferred

Authenticated workspace derivation, database-aware readiness, deployment-time migration locking, network-level HTTP integration tests, and higher-level habit workflows remain separate reviewable slices.

Validation gate

Merge only when CI, AppGuardrail, Semgrep, Security Scan, Commercial Readiness, CodeRabbit, and all human/security review requirements pass on the exact head with no unresolved actionable findings.

Closes #42

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@seonghobae, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 14 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7058bb5f-fb41-467d-b47c-be2c87c7b72d

📥 Commits

Reviewing files that changed from the base of the PR and between cab995e and ec6aa02.

📒 Files selected for processing (11)
  • .github/workflows/ci.yml
  • apps/habit-service/migrations/README.md
  • apps/habit-service/src/habit-http-boundary.test.ts
  • apps/habit-service/src/habit-http-boundary.ts
  • apps/habit-service/src/habit-http-controller.test.ts
  • apps/habit-service/src/habit-http-controller.ts
  • apps/habit-service/src/habit-runtime.test.ts
  • apps/habit-service/src/habit-runtime.ts
  • apps/habit-service/src/main.ts
  • docs/superpowers/plans/2026-08-04-habit-postgres-runtime-slice.md
  • package.json

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

Copy link
Copy Markdown
Contributor Author

Superseded by #43, which now includes the same bounded runtime and strict HTTP boundary plus production-module network/PostgreSQL integration evidence, restart durability, credential-free failure coverage, and the capability-manifest evidence paths required for habit.recurring-core. Closing this duplicate to keep one authoritative review head.

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.

Wire Habit PostgreSQL runtime and versioned HTTP workflow

1 participant