feat(email-writing): define strict review contracts - #1327
Conversation
|
Warning Review limit reachedNext included review available in 58 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (9)
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 |
|
PR governance metadata gate is not ready for
|
|
@coderabbitai review |
|
…' into feat/llm-email-writing-contracts-task2
…' into feat/llm-email-writing-contracts-task2
…' into feat/llm-email-writing-contracts-task2 Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
|
@coderabbitai review Please review the unchanged exact current head |
|
|
…ask4' into feat/llm-email-writing-orchestrator-task5 Retarget Task 5 onto live #1329 head 4570747 (merged onto live #1328 51fb5e8 / #1327 fb7c406 / #1322 bfc2df1 / develop@dd8d1519). Preserve the hardened contextual-orchestrator boundary. Do not restore write-capable Task 5 promotion/finalize workflows. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
|
Caution Review failedAn error occurred during the review process. Please try again later. 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 |
|
@coderabbitai review Please review exact current head |
🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
head='c3147918fd75af2092171e8e6d404057fd0659d3'
parent='ec0e1d367a0fb03f4431286260897e010421ef0c'
echo '== Commit topology =='
git rev-parse "$head" "$parent"
git merge-base --is-ancestor "$parent" "$head" && echo 'stated parent is an ancestor'
git show -s --format='head=%H%nparents=%P%nsubject=%s' "$head"
echo
echo '== Changed paths against stated parent =='
git diff --name-status "$parent" "$head"
echo
git diff --stat "$parent" "$head"
echo
echo '== Production file outlines =='
ast-grep outline backend/services/email_writing_contracts.py --items all || true
ast-grep outline frontend/src/lib/email-writing.ts --items all || true
echo
echo '== Backend implementation =='
cat -n backend/services/email_writing_contracts.py
echo
echo '== Frontend implementation =='
cat -n frontend/src/lib/email-writing.ts
echo
echo '== Targeted boundary searches =='
rg -n -i -C 2 \
'(keyword|phrase|grammar|clarity|tone|semantic|language|recipient|sender|domain|nearest|regex|revision|sha-?256|etag|TextPositionSelector|code.?point|utf-?8|duplicate|finite|provenance|diagnostic)' \
backend/services/email_writing_contracts.py frontend/src/lib/email-writing.ts || true
echo
echo '== Test outlines and focused assertions =='
for f in \
backend/tests/test_email_writing_contracts.py \
backend/tests/test_email_writing_contracts_coverage.py \
backend/tests/test_email_writing_contracts_terminal_coverage.py \
frontend/src/lib/email-writing.test.ts \
frontend/src/lib/email-writing.coverage.test.ts \
frontend/src/lib/email-writing.parser-coverage.test.ts
do
echo "-- $f --"
ast-grep outline "$f" --items all || true
rg -n -i -C 1 \
'(unicode|code.?point|surrogate|duplicate|utf-?8|non.?finite|extra|coerc|bound|depth|node|provenance|privacy|selector|revision|etag|malformed)' \
"$f" || true
doneLength of output: 110339 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '== Frontend raw-parser bound tests =='
sed -n '360,430p' frontend/src/lib/email-writing.coverage.test.ts
sed -n '1,120p' frontend/src/lib/email-writing.parser-coverage.test.ts
echo
echo '== Searches for total-node accounting and non-BMP length coverage =='
rg -n -i -C 2 \
'(MAX_JSON_NODES|node_limit|node.?count|code.?point|codePointAt|Array\.from|spread\(|emoji|non.?BMP|surrogate pair|astral)' \
frontend/src/lib/email-writing.ts \
frontend/src/lib/email-writing.test.ts \
frontend/src/lib/email-writing.coverage.test.ts \
frontend/src/lib/email-writing.parser-coverage.test.ts \
backend/tests/test_email_writing_contracts.py \
backend/tests/test_email_writing_contracts_coverage.py || true
echo
echo '== Exact frontend implementation lines for candidate findings =='
sed -n '151,171p;380,515p' frontend/src/lib/email-writing.ts
echo
echo '== Working tree and exact diff context =='
git status --short
git diff --unified=20 ec0e1d367a0fb03f4431286260897e010421ef0c c3147918fd75af2092171e8e6d404057fd0659d3 -- frontend/src/lib/email-writing.tsLength of output: 33467
I found two contract issues.
I did not approve or merge this Draft PR.
|
|
@coderabbitai review |
|
Scope
This Draft PR implements Task 2 only of the email-writing guidance plan: strict backend/frontend review contracts and deterministic transport/integrity validation. It does not add persistence, authorized thread construction, contextual-orchestrator calls, Candidate/Judge semantics, review API, editor integration, sending, policy publication, or release behavior.
Semantic authority remains strict: these contracts may validate JSON shape/size, Unicode, revision/hash, selector bounds and transport safety, but must not infer grammar, clarity, tone, pragmatics, technical suitability, actionability, or intent through keyword/regex/phrase-list/sender-domain/recipient-count/language-name/nearest-text/position rules.
Live stack state — 2026-09-01
Parent #1322 is
9f1836d09e6b4db97855d701d8220268e9fb4d87. Task 2 is nowab74a345e4d03680da32a7eac2cc1fca3005cfb3and contains that exact parent as a non-destructive merge parent. The PR base snapshot resolves to the same root head.The unique Task-2 delta remains the nine focused contract/test files:
.github/workflows/email-writing-contracts-tdd.yml,backend/services/email_writing_contracts.py, its focused backend tests, and the frontendemail-writingtransport/parser implementation and tests. The design-root documentation is inherited from #1322 and is not Task-2-owned semantic work.All predecessor-head checks/reviews are stale. Fresh exact-head evidence must be evaluated only for
ab74a345e4d03680da32a7eac2cc1fca3005cfb3.Contract behavior retained
TextPositionSelectortransport using Unicode-code-point offsets;No mutable Inkspan branch/package is consumed here. Runtime/editor consumption waits for an immutable released Inkspan artifact exposing the required writing-diagnostics public contract with integrity and source provenance.
Dependency continuation
#1328 has been reconciled onto this exact Task-2 head as
ea61b9de9cd26a26209da36e858510a31486531a; later task-owned descendants have likewise been advanced in dependency order. No predecessor evidence transfers across head movements.Evidence and merge boundary
Keep this PR Draft while fresh current-head gates and review/thread state are regenerated. Queued/pending/skipped-required/cancelled/neutral/failed/absent/stale/predecessor/synthetic/model-only/status-only/author-only evidence is non-passing. Merge requires the unchanged exact head to satisfy live protected-branch/ruleset requirements, all applicable exact-head CI/security/coverage/package/provenance gates, zero valid unresolved findings, and the qualifying independent approval required by live governance after the last push.
There is still no shipped writing-guidance feature in this PR; the existing editor and send path remain available.