fix(prompts): expose only opaque prompt response identifiers - #1517
fix(prompts): expose only opaque prompt response identifiers#1517seonghobae wants to merge 6 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesPrompt response identifier contract
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The PR removes sequential database identifiers from prompt responses while preserving existing access controls; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
Superseded after exact semantic comparison with #1206 ( |
Owner and bounded context
ContextualWisdomLab/naruonowns the Prompt Catalog response contract. The initial naming repair correctly identified barePromptResponse.idas underspecified, but fresh independent review found the stronger causal issue: preserving that sequential database identity under an alias still exposed an unnecessary enumerable identifier even though the domain already has opaqueprompt_uid.TDD / direct review repair
2c83f95e04160d75ad348a1eca2d667c8a12313cestablished the original naming defect.fb8ca83f7f3010c0be8a3e02484d77318dea1ec9requiresprompt_uidto be the sole response identifier and forbids bothidandprompt_record_idfrom runtime serialization and generated JSON schema, even when the ORM-shaped source still contains privateid=17.961d6b1685cd22418e40a8910d6c481876cb35d9removes the database row identity fromPromptResponse;ConfigDict(from_attributes=True)continues to extract only the public fields fromPromptTemplate.Public contract and security
GET /api/promptsandPOST /api/promptsnow return the already-present opaqueprompt_uidas the sole prompt identifier. The redundant sequentialidproperty is intentionally removed. Organization/workspace scoping and ownership filters remain unchanged; opaque identifiers are defense-in-depth and do not replace object-level authorization.OWASP API Security Top 10 API1:2023 identifies object identifiers, including sequential integers, as common BOLA attack inputs and recommends unpredictable record identifiers together with authorization checks. The doctoring update records that rationale without claiming that identifier opacity alone provides authorization.
DDD / persistence / research traceability
docs/doctoring/prompt-response-semantic-identifiers.mdrecords the Prompt Catalog bounded context, public-vs-persistence identity boundary, deliberate compatibility tightening, persistence invariants, OWASP API1:2023, and APA 7 traceability to Feitelson et al. (2022) and Alpern et al. (2024). No database schema, persisted row identity, endpoint path, tenant filter, migration, lock, UPSERT, partition, or read/write topology changes.Exact identity
develop@042b0c70531b229af3acbd0421a2f23098d848b37f9bc105e3c0b7472c693ec30d9d3ae44ed21579fix/prompt-response-semantic-idFresh exact-head required checks and qualifying independent non-author current-head approval are mandatory; predecessor/base/model-only evidence does not transfer.
Merge gate
Do not merge until this unchanged current head has all live required checks terminal-success, zero valid unresolved findings/review threads, qualifying independent non-author approval current for the last push, and ordinary branch protection permits it. No force-push, self-approval, administrative bypass, gate weakening, or finding suppression.
Summary by CodeRabbit
API Changes
prompt_uididentifier.Documentation