Repository navigation
OSAC-2750: PRD: API Quality: Declarative Validation, Auto-Generated Public API, and Consistency - #152
Conversation
…erated Public API, and Consistency Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb>
|
Warning Review limit reached
Next review available in: 39 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Repository: osac-project/coderabbit/.coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughAdds a PRD describing declarative validation, generated public APIs, soft-deletion-aware constraint enforcement, DAO/query semantics cleanup, scope boundaries, assumptions, dependencies, and provenance. ChangesAPI Quality PRD
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
AI EP Review: EP-152Score: 5/10 | Verdict: PASS
Verdict: The PRD is a marginally passing engineering quality initiative that bundles four independent epics under an API consistency theme, but lacks standard OSAC personas, measurable acceptance criteria, and contains significant design leakage. Feedback: Reframe user stories around canonical OSAC personas (Tenant User, Tenant Admin, etc.) experiencing the actual product outcomes — e.g., 'As a Tenant User, I receive consistent, actionable validation error messages when creating any resource type.' Remove implementation details (protovalidate, protoc plugin, JSONB, DAO) from the PRD and reserve them for the design document. Consider whether this belongs as a Jira epic with individual tasks rather than a PRD, since no new product capability is introduced — the value is consistency and quality of existing behavior. Critical (0)None. Important (4)
Suggestions (3)
Review costModel: claude-opus-4-6 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: avishayt, htayrie-rh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Looks good but I saw it's in draft state |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@enhancements/OSAC-1577-api-quality/prd.md`:
- Around line 15-16: Clarify the OSAC-1275 entry in the PRD as a completed
prerequisite rather than an OSAC-1577 deliverable: remove its implementation
from the in-scope requirements, retain the completion/status note, and update
the repeated assumption accordingly. Ensure the remaining scope describes only
OSAC-1577 acceptance criteria.
- Around line 17-18: Update the PRD requirements around cross-object constraints
to define observable soft-deletion behavior: specify whether soft-deleted
resources release unique names and whether references to soft-deleted resources
are rejected or ignored. Keep the guidance at the behavioral-requirements level
without prescribing storage or implementation mechanics.
- Around line 23-24: Reconcile the “Breaking API changes” scope in the PRD with
the backward-compatibility statement near the upgrade-support discussion: define
which existing consumers and persisted records must remain compatible during the
current deployment, and explicitly identify the owner or validation process for
the cross-epic contract. Update the relevant AIP adoption and compatibility
assumptions without relying solely on per-epic testing.
- Line 50: Update the protoc-gen-cleanapi bullet in the OSAC-1577 PRD to define
a verifiable production-ready criterion for OSAC-1274, using a measurable
requirement such as API compatibility coverage, performance benchmarks, or a
formal schema-stability guarantee. Alternatively, link directly to OSAC-1274’s
acceptance criteria, while preserving the dependency statement.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 1d756dbe-7ed9-4b0e-9421-f7606e665bf2
📒 Files selected for processing (1)
enhancements/OSAC-1577-api-quality/prd.md
OSAC-1331 is about preventing relationships to soft-deleted objects, not general uniqueness or referential integrity constraints. Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@enhancements/OSAC-1577-api-quality/prd.md`:
- Line 17: Revise the OSAC-1331 soft-deletion requirement in the PRD to require
rejecting relationships to soft-deleted objects without mandating database-level
enforcement. Leave the implementation mechanism open for the OSAC-1331 design
unless database-level enforcement has been explicitly validated.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d543b7fb-5a43-42c4-8798-b60d5ac51d9c
📒 Files selected for processing (1)
enhancements/OSAC-1577-api-quality/prd.md
AI EP Review: EP-152Score: 5/10 | Verdict: FAIL
Verdict: The PRD scores 5/10 and fails the >=7 threshold — it reads as an internal engineering quality initiative with non-standard personas, pervasive design leakage in the In Scope section, generic business justification, and four independent capabilities bundled under one umbrella. Feedback: Rewrite the PRD from the perspective of API consumers using OSAC's canonical personas (Tenant User, Tenant Admin, Cloud Provider Admin, Cloud Infrastructure Admin) — describe what they observe changing, not how the engineering works internally. Replace implementation-specific In Scope items ('protovalidate annotations', 'protoc plugin', 'DAO cleanup') with user-observable outcomes ('validation errors are consistent and derived from the API schema', 'the API rejects references to deleted resources with a clear error'). Consider whether this belongs as a PRD at all — four independent engineering improvements with separate Jira tickets may be better tracked as individual Jira tasks or as an epic with separate features, especially since OSAC-1275 is already complete. Critical (2)
Important (4)
Suggestions (3)
Review costModel: claude-opus-4-6 |
- Move OSAC-1275 to Prior Work section (already complete) - Remove "at the database level" design detail from OSAC-1331 scope Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb>
AI EP Review: EP-152Score: 4/10 | Verdict: FAIL
Verdict: The PRD scores 0 on User-Facing Focus due to pervasive design leakage (protoc plugins, DAO semantics, Go validation code, PostgreSQL foreign keys), triggering an automatic fail at 4/10 total. Feedback: Rewrite the PRD from the perspective of API consumers using OSAC's canonical personas (Tenant User, Tenant Admin, Cloud Provider Admin, Cloud Infrastructure Admin) — not 'API Developer.' Frame the problem as user pain: what goes wrong for a Tenant User who submits invalid input today, or who tries to reference a deleted subnet? Strip all implementation details (protoc plugins, DAO, Go validation, PostgreSQL FK) into the design document; the PRD should describe only what users can observe changing. Consider whether the three independent epics (OSAC-1274, OSAC-1331, OSAC-1540) belong as separate features rather than one bundled PRD, since each can ship and deliver value independently. Critical (2)
Important (3)
Suggestions (3)
Review costModel: claude-opus-4-6 |
…Public API, and Consistency (osac-project#152) * Add PRD for OSAC-1577: API Quality — Declarative Validation, Auto-Generated Public API, and Consistency Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb> * PRD OSAC-1577: revise — correct OSAC-1331 scope to safe deletion OSAC-1331 is about preventing relationships to soft-deleted objects, not general uniqueness or referential integrity constraints. Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb> * PRD OSAC-1577: address review feedback - Move OSAC-1275 to Prior Work section (already complete) - Remove "at the database level" design detail from OSAC-1331 scope Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb> --------- Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb> Co-authored-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb>
…Public API, and Consistency (osac-project#152) * Add PRD for OSAC-1577: API Quality — Declarative Validation, Auto-Generated Public API, and Consistency Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb> * PRD OSAC-1577: revise — correct OSAC-1331 scope to safe deletion OSAC-1331 is about preventing relationships to soft-deleted objects, not general uniqueness or referential integrity constraints. Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb> * PRD OSAC-1577: address review feedback - Move OSAC-1275 to Prior Work section (already complete) - Remove "at the database level" design detail from OSAC-1331 scope Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb> --------- Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb> Co-authored-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb>
…Public API, and Consistency (osac-project#152) * Add PRD for OSAC-1577: API Quality — Declarative Validation, Auto-Generated Public API, and Consistency Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb> * PRD OSAC-1577: revise — correct OSAC-1331 scope to safe deletion OSAC-1331 is about preventing relationships to soft-deleted objects, not general uniqueness or referential integrity constraints. Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb> * PRD OSAC-1577: address review feedback - Move OSAC-1275 to Prior Work section (already complete) - Remove "at the database level" design detail from OSAC-1331 scope Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb> --------- Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb> Co-authored-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb>
|
/retitle OSAC-2750: PRD: API Quality: Declarative Validation, Auto-Generated Public API, and Consistency |
…Public API, and Consistency (osac-project#152) * Add PRD for OSAC-1577: API Quality — Declarative Validation, Auto-Generated Public API, and Consistency Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb> * PRD OSAC-1577: revise — correct OSAC-1331 scope to safe deletion OSAC-1331 is about preventing relationships to soft-deleted objects, not general uniqueness or referential integrity constraints. Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb> * PRD OSAC-1577: address review feedback - Move OSAC-1275 to Prior Work section (already complete) - Remove "at the database level" design detail from OSAC-1331 scope Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb> --------- Signed-off-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb> Co-authored-by: Haim Tayrie <htayrie@htayrie-thinkpadt14gen5.raanaii.csb>
PRD: API Quality — Declarative Validation, Auto-Generated Public API, and Consistency
Jira: https://redhat.atlassian.net/browse/OSAC-1577
Summary
This PRD covers four API quality workstreams for the fulfillment service: declarative validation via protovalidate (already complete), automated public API generation from annotated private protos, a standard pattern for cross-object constraint enforcement respecting soft deletion, and incremental DAO/query consistency fixes. The scope is bounded to the four existing epics (OSAC-1275, OSAC-1274, OSAC-1331, OSAC-1540) with no new resource types or breaking changes.
Requesting Review On
How to Review
Summary by CodeRabbit