Skip to content

feat(people): expose employment history HTTP read - #155

Draft
seonghobae wants to merge 47 commits into
feat/people-employment-history-readfrom
feat/employment-history-http-read
Draft

seonghobae wants to merge 47 commits into
feat/people-employment-history-readfrom
feat/employment-history-http-read

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Buyer-visible scope

Adds the read-only customer HTTP boundary GET /v1/tenants/{tenant_record_id}/people/{person_record_id}/employment-history. Tenant/Person scope stays explicit, known_at remains exact UTC, purpose/field authorization stays in #149, and the route does not mutate Employment or make an employment decision.

Current stack authority

Current direct base: #149 69b5e8796245ef82bcc05a316bc0aa8b4f171b8d
Current exact head: 4b8fa8e1bd29d941f5889f346014133aaa1c02e9
Protected truth beneath the stack: develop@eb9757f8649aaad026a9865508d9aad50c1a7a4f

The current exact head ordinary-forward adopts #341 through #149/#55. Only canonical parent-owned hire_http.py and the focused dependency-binding regression were adopted; the Employment HTTP/OpenAPI/test/docs delta remains intact. Earlier #333#337 transport/read hardening is preserved. No mutable owner source was copied. ADR 0155 remains Proposed.

Oversized path data still fails before tokenization; synchronous read_employment_history(...) remains isolated through asyncio.to_thread(...); support references remain correlated; Employment-local path/query contracts stay intact. Shared People transport/authentication/read-model authority comes through the canonical owner stack rather than leaf reimplementation. The offload is availability isolation, not p95≤20ms acceptance; #257 remains the buyer-path measurement owner.

This stacked exact head does not inherit parent acceptance evidence. After #55/#65/#149 reach protected develop, #155 must ordinary-forward onto protected truth, retarget to develop, and reacquire Foundation/Security/SAST/CodeQL/model review, qualifying independent approval, and applicable latency evidence.

Keep Draft. No self/model approval, routine bypass, gate weakening, mutable-owner source copy, no-op retrigger, predecessor-evidence transfer, force-push/destructive rebase, synthetic status, or simple Close is authorized.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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

현재 exact head 03030dbccba3b6044e2b4d8201203f309d4f40de 기준으로 재검토해 주세요. 특히 oversized scope['path']_looks_like_employment_history_route()strip()/split()에 도달하기 전에 256-character gate에서 차단되는지와 normal-sized routing semantics가 유지되는지 확인해 주세요.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== checked-out commit =='
git rev-parse HEAD
git status --short

echo '== candidate route and test files =='
rg -n -i -C 3 '_looks_like_employment_history_route|employment-history|employment_history' . \
  -g '!node_modules/**' -g '!dist/**' -g '!build/**' | head -n 500

echo '== Python outlines =='
fd -e py . | xargs -r ast-grep outline --lang python --items all --match 'employment|route|scope' 2>/dev/null | head -n 500

Length of output: 81826


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '== employment-history HTTP implementation =='
sed -n '1,460p' services/people-api/src/orgmetra_people_api/employment_history_http.py

echo '== boundary-hardening tests =='
cat -n services/people-api/tests/test_employment_history_http_boundary_hardening.py

echo '== HTTP route tests =='
cat -n services/people-api/tests/test_employment_history_http.py

echo '== current repair commits and diffs =='
git show --no-ext-diff --format=fuller --stat 8a367eb8885807dc21581c55e6a21b10e2ca5799
git diff --no-ext-diff 8a367eb8885807dc21581c55e6a21b10e2ca5799 99c3ec578a57c31f039cab70b6e3a90a4b85623a -- \
  services/people-api/src/orgmetra_people_api/employment_history_http.py \
  services/people-api/tests/test_employment_history_http_boundary_hardening.py \
  services/people-api/tests/test_employment_history_http.py

Length of output: 43057


@seonghobae 검토를 완료했습니다. 이 exact head에서 해당 경로 처리 순서는 요구사항과 일치합니다.

  • scope["path"]str이 아니면 404를 반환합니다.
  • str 경로가 256자를 초과하면 400을 반환합니다.
  • 이 길이 검사는 _looks_like_employment_history_route(path) 호출보다 먼저 실행됩니다.
  • 따라서 oversized 경로는 _looks_like_employment_history_route()strip() 또는 split()에 도달하지 않습니다.
  • test_oversized_path_fails_before_route_tokenization은 route helper를 실패하도록 패치하고, 400 응답 및 인증·포트 호출 없음도 확인합니다.
  • 256자 이하의 정상 경로는 기존과 같이 route helper를 통과합니다.
  • 정상 크기의 비대상 경로는 기존과 같이 인증 전에 404 route_not_found를 반환합니다.
  • 정상 크기의 대상 경로는 기존 요청 파싱, 인증, 서비스 호출 순서를 유지합니다.

정적 소스와 회귀 테스트를 검토했습니다. 저장소 코드는 실행하지 않았습니다. 이 확인 범위에서는 새로운 문제를 찾지 못했습니다. PR은 Draft 상태를 유지해야 하며, 보호된 develop 기준의 exact-head 검증은 아직 별도로 필요합니다.

⚠️ Action not completed

Review rate limited.

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.

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

Labels

enhancement New feature or request priority: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant