Skip to content

fix(composition): classify superseded serving snapshots before HTTP projection - #442

Draft
seonghobae wants to merge 4 commits into
feat/product-composition-http-response-mappingfrom
feat/product-composition-serving-conflict-response
Draft

seonghobae wants to merge 4 commits into
feat/product-composition-http-response-mappingfrom
feat/product-composition-serving-conflict-response

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Scope

Narrow serving-failure classification child of #440. Current base is #440 exact 0050f14701ea92fd85a2691a280d29c46a97b63b and current source head is 9bbb792ef43fca8b08684f4f55a8bfe65e1120da, open · Draft · mergeable, ordinary-forward only. This branch owns the typed durable-currentness-to-route-unavailability adapter and changes no SQL/migration bytes, durable state rules, owner schema, authentication, owner HTTP dispatch, deployment packaging or performance evidence.

Contract

RED ee642f086b8d08a14d1a7f9befef9ee490a1baa7 requires both selected-route and resource-specific 405 currentness consumers to translate typed ActivationConflictError into CompositionRouteUnavailableError, while leaving ActivationAuthorizationError unwrapped. Repair cd908b65a8047d85e57cb82c0665185c201972b3 introduced one _current_route_ids() adapter; d58dc07034082a18a5de6c9f4df03d40b096a72f repaired diff-docstring quality without altering behavior.

#437 repaired expiry ambiguity at exact a09d6fb928e0272673b82ef7353ed83213aa994d. ServingEvidenceExpiredError is an ActivationConflictError subtype used only for otherwise-valid recovery evidence that expires at the PostgreSQL wall-clock linearization point. Clock rewind, malformed durable state, retargeting and authorization/integrity failures remain ActivationAuthorizationError. This branch therefore projects expected expiry to ordinary route unavailability without exception-message inspection and does not launder integrity/security failures.

The repaired parent authority was adopted ordinary-forward through #438/#439/#440 and then into this branch. No force-push, destructive rebase, SQL change or duplicate owner logic was introduced. PostgreSQL lineage remains 0018→0025.

Descendant lifecycle authority — current

#443 exact 728f07a8c86f92bbf33586f2a8007da9f31f5e06 owns bounded inbound ASGI request-body/receive lifecycle. #444 exact e1af671deeeec682dffdf809cb8579dcc4d439da owns core outbound ASGI response-event/send validation. Current response-completion leaf #446 exact 7954f5bf606584ddb5bbcd29e1b64e49041b9409 prevalidates complete non-streaming responses, enforces no-content/framing/transfer-coding rules and detaches validated caller headers before transport. None of these descendants changes this PR's currentness classification or SQL/migration bytes.

Verification boundary

Canonical acceptance uses one unchanged exact #446 7954f5bf606584ddb5bbcd29e1b64e49041b9409 composition tree. #447 exact 47ac3556dfef7d5d27af2af8ae2ba5038b837e7c is the current Draft #260 Foundation discovery/runtime implementation; it remains non-GREEN pending normal #64/#305 metadata integration plus protected-base checks/review. #261 owns installed wheel/sdist acceptance; #311 exact dbc2fcf70ba6a6883381e8526cd62c6e19ce159c owns the complete inherited 0018→0025 PostgreSQL inventory on the same tree. Source-level typing/stacking, bot status and mergeability are not exact-head runtime GREEN.

#440 remains the HTTP projection owner; #437 remains durable currentness owner. Proposed architecture #433 is source-current at ff50182c25ccf45928b1413f947c992f62be2ded but ADR 0432 remains Proposed.

Keep Draft until same-tree package/install/PostgreSQL execution, prerequisite checks and qualifying independent review exist. No self-approval, routine administrator bypass, gate weakening, synthetic status, feature-local quality workflow, mutable sibling source, cross-service SQL, force-push/destructive rebase, predecessor-GREEN transfer, premature Ready/merge/release or simple Close is authorized.

Refs #432 #433 #437 #438 #439 #440 #443 #444 #446 #447 #260 #261 #311 #100.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: d44fa969-9870-424b-a22e-98732feddb7f

📥 Commits

Reviewing files that changed from the base of the PR and between d8f161a and d58dc07.

📒 Files selected for processing (2)
  • services/product-composition-api/src/orgmetra_product_composition/request_routing.py
  • services/product-composition-api/tests/test_request_routing_preselection_boundary.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

라우팅 중 복구된 스냅샷과 현재 상태가 일치하지 않으면 ActivationConflictError를 CompositionRouteUnavailableError로 변환합니다. 이 처리는 Allow 권한 계산과 선택된 라우트의 가용성 검증에 적용됩니다. 권한 오류는 변환하지 않고 전파합니다.

Changes

라우팅 오류 처리

Layer / File(s) Summary
스냅샷 충돌 변환 및 라우팅 검증
services/product-composition-api/src/orgmetra_product_composition/request_routing.py, services/product-composition-api/tests/test_request_routing_preselection_boundary.py
_current_route_ids가 현재 라우트 상태 조회 중 발생한 ActivationConflictError를 CompositionRouteUnavailableError로 변환합니다. 두 라우팅 경로에서 이 헬퍼를 사용합니다. GET 및 POST 테스트는 원인 오류가 보존되는지 확인하며, ActivationAuthorizationError는 변환되지 않고 전파되는지 확인합니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to d58dc

The changed routing paths have regression coverage, and no merge-blocking issue was identified. Merge after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 2 files.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 superseded serving snapshot을 HTTP projection 전에 분류하는 핵심 변경을 정확하고 간결하게 설명합니다.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review exact head d58dc07034082a18a5de6c9f4df03d40b096a72f, including the prior currentness classification change and the follow-up test-docstring repair. Re-evaluate pre-merge docstring coverage against this exact head.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
gh api repos/ContextualWisdomLab/Orgmetra/pulls/442 --jq '{head_sha: .head.sha, state: .state, draft: .draft, html_url: .html_url}'
gh api repos/ContextualWisdomLab/Orgmetra/pulls/442/commits --jq '.[-5:] | map({sha: .sha, subject: (.commit.message | split("\n")[0])})'

Length of output: 992


@seonghobae, PR #442 is at the requested head, d58dc07034082a18a5de6c9f4df03d40b096a72f. I will request a full review so it covers the prior currentness classification change and the follow-up test-docstring repair. The review should re-evaluate pre-merge docstring coverage at this head.

⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 2 minutes.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Retry exact-head review for d58dc07034082a18a5de6c9f4df03d40b096a72f after the prior capacity-limited attempt. Please re-evaluate the diff-scoped docstring coverage finding as well as the currentness-classification change.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail
gh api repos/ContextualWisdomLab/Orgmetra/pulls/442 --jq '{head_sha: .head.sha, state: .state, draft: .draft, html_url: .html_url}'

Length of output: 456


@seonghobae, PR #442 is open and still at d58dc07034082a18a5de6c9f4df03d40b096a72f. I’ll retry the full review at that head. The review should re-evaluate the diff-scoped docstring coverage finding and the currentness-classification change.

✅ Action performed

Full review finished.

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