Skip to content

feat(email-writing): add secure contextual-orchestrator tenant boundary - #1359

Closed
seonghobae wants to merge 75 commits into
developfrom
feat/llm-email-writing-orchestrator-task5
Closed

feat(email-writing): add secure contextual-orchestrator tenant boundary#1359
seonghobae wants to merge 75 commits into
developfrom
feat/llm-email-writing-orchestrator-task5

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Product outcome

Adds the production boundary that lets Naruon use contextual-orchestrator for email-writing candidate generation and independent judging without binding Naruon to one upstream model or leaking tenant credentials, provider details, prompts, or orchestration internals.

Shipped scope

  • owner- and organization-scoped, encrypted orchestration configuration
  • dedicated modular FastAPI configuration router
  • canonical HTTPS-origin validation, DNS pinning, redirect rejection, and rebinding protection
  • bounded request/response/JSON/trace work
  • stable redacted error taxonomy, retry policy, and circuit breaker
  • async candidate path plus bounded synchronous Judge lane with cancellation-safe capacity accounting
  • migration and exact-scope persistence contracts
  • statement/branch coverage and docstring gates for the Task 5 production slice
  • APA 7 doctoring and psychometric/LLM-as-a-Judge claim boundaries

Verification

GitHub Actions executes focused contract, hardening, migration, lint, compile, docstring, and 100% statement/branch coverage gates. No COPILOT_GITHUB_TOKEN or model secret is required by this deterministic boundary test suite.

Architecture boundary

The orchestration API is isolated from legacy tenant/mailbox settings so it can later be extracted as an MSA module while Naruon remains independently operable. The branch retains the revision-scoped email-writing context and evidence contracts it consumes.

seonghobae and others added 30 commits August 12, 2026 09:13
seonghobae and others added 25 commits August 15, 2026 19:28
…' into feat/llm-email-writing-contracts-task2
…-task2' into feat/llm-email-writing-review-evidence-task3
…idence-task3' into feat/llm-email-writing-context-task4
…ask4' into feat/llm-email-writing-orchestrator-task5
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

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

Next review available in: 20 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a172977b-6460-4a0e-9b45-f2afcd49fec9

📥 Commits

Reviewing files that changed from the base of the PR and between bc98789 and 819c000.

📒 Files selected for processing (42)
  • .github/workflows/email-writing-context-tdd.yml
  • .github/workflows/email-writing-contracts-tdd.yml
  • .github/workflows/email-writing-evidence-tdd.yml
  • .github/workflows/email-writing-orchestrator-hardening-tdd.yml
  • .github/workflows/email-writing-orchestrator-tdd.yml
  • .github/workflows/email-writing-task5-finalize.yml
  • backend/alembic/env.py
  • backend/alembic/versions/20260812_0001_add_email_writing_review_evidence.py
  • backend/alembic/versions/20260813_0001_add_email_writing_orchestrator_config.py
  • backend/api/email_writing_orchestrator_config.py
  • backend/api/tenant_config.py
  • backend/db/email_writing_evidence.py
  • backend/db/email_writing_orchestrator_config.py
  • backend/main.py
  • backend/services/contextual_orchestrator_client.py
  • backend/services/email_writing_context_service.py
  • backend/services/email_writing_contracts.py
  • backend/services/email_writing_orchestrator_port.py
  • backend/services/tenant_config_scope.py
  • backend/tests/test_contextual_orchestrator_client.py
  • backend/tests/test_contextual_orchestrator_hardening.py
  • backend/tests/test_email_writing_context_service.py
  • backend/tests/test_email_writing_context_service_coverage.py
  • backend/tests/test_email_writing_contracts.py
  • backend/tests/test_email_writing_contracts_coverage.py
  • backend/tests/test_email_writing_contracts_terminal_coverage.py
  • backend/tests/test_email_writing_migration.py
  • backend/tests/test_email_writing_models.py
  • backend/tests/test_email_writing_orchestrator_config_api.py
  • backend/tests/test_email_writing_orchestrator_migration.py
  • backend/tests/test_email_writing_orchestrator_module_boundary.py
  • backend/tests/test_email_writing_orchestrator_scope.py
  • backend/tests/test_email_writing_orchestrator_terminal_coverage.py
  • docs/adr/0001-inkspan-backed-llm-email-writing-guidance.md
  • docs/adr/README.md
  • docs/doctoring/llm-email-writing-guidance-and-fast-mlsirm-judge.md
  • docs/superpowers/plans/2026-08-12-llm-email-writing-guidance-implementation.md
  • docs/superpowers/specs/2026-08-12-inkspan-llm-email-writing-guidance-design.md
  • frontend/src/lib/email-writing.coverage.test.ts
  • frontend/src/lib/email-writing.parser-coverage.test.ts
  • frontend/src/lib/email-writing.test.ts
  • frontend/src/lib/email-writing.ts

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

Closing this competing base-target PR to keep one authoritative review lane for the exact same head 819c00050fc82617454dea5781f939a15158f071.

Technical reason:

No unique commit or file is discarded: all head content remains available in Draft PR #1356. The correct path is to validate and merge the parent stack in order, then retarget or reconstruct Task 5 onto protected develop and establish fresh exact-head evidence.

@seonghobae seonghobae closed this Aug 15, 2026
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