-
Notifications
You must be signed in to change notification settings - Fork 1
feat(email-writing): persist privacy-minimized review evidence #1328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
seonghobae
wants to merge
19
commits into
feat/llm-email-writing-contracts-task2
Choose a base branch
from
feat/llm-email-writing-review-evidence-task3
base: feat/llm-email-writing-contracts-task2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
2b7c2f5
test(email-writing): define review evidence contracts
seonghobae c458e24
feat(email-writing): persist privacy-minimized review evidence
seonghobae 001da50
fix(email-writing): register evidence metadata explicitly
seonghobae 764f8e9
ci(email-writing): add one-shot evidence review repair
seonghobae 9cec449
ci(email-writing): run one-shot evidence review repair
seonghobae 3522691
ci(email-writing): remove feedback tenant identifiers
seonghobae 2da5309
ci(email-writing): rerun corrected evidence repair
seonghobae 2c91c44
fix(email-writing): harden evidence tests under safety settings
seonghobae 7c28cc3
ci(email-writing): split backend repair from workflow mutation
seonghobae b688d0a
ci(email-writing): materialize backend review repair without workflow…
seonghobae 96cd7f8
fix(email-writing): address review evidence findings
github-actions[bot] 4a182c4
ci(email-writing): remove completed one-shot repair workflow
seonghobae 9d08e14
ci(email-writing): refresh Task 3 on current contracts parent
seonghobae 24b7644
Merge remote-tracking branch 'origin/feat/llm-email-writing-contracts…
6ab000e
ci(email-writing): remove Task 3 parent refresh workflow
51fb5e8
Merge remote-tracking branch 'origin/feat/llm-email-writing-contracts…
cursoragent f65974e
Merge current Task 2 into email-writing evidence Task 3
seonghobae 7ae87ab
Merge current Task 2 into email-writing evidence Task 3
seonghobae ea61b9d
Merge current Task 2 into email-writing evidence Task 3
seonghobae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| name: Email Writing Evidence TDD | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - feat/llm-email-writing-review-evidence-task3 | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: email-writing-evidence-tdd-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | ||
|
|
||
| jobs: | ||
| review-evidence: | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| ref: ${{ github.sha }} | ||
| persist-credentials: false | ||
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | ||
| with: | ||
| python-version: "3.14" | ||
| cache: pip | ||
| cache-dependency-path: backend/requirements-hashes.txt | ||
| - run: python -m pip install --disable-pip-version-check --require-hashes -r backend/requirements-hashes.txt | ||
| - name: Install hash-verified coverage tool | ||
| run: | | ||
| set -euo pipefail | ||
| mkdir -p /tmp/coverage-wheel | ||
| cat >/tmp/coverage-lock.txt <<'EOF' | ||
| coverage==7.15.2 --hash=sha256:eb6bcae8d1a9d305351ecb108232441d11c5cfe9de840a04388ba5d2db8d735c | ||
| EOF | ||
| python -m pip download \ | ||
| --disable-pip-version-check \ | ||
| --require-hashes \ | ||
| --no-deps \ | ||
| --only-binary=:all: \ | ||
| --platform any \ | ||
| --python-version 3.14 \ | ||
| --implementation py \ | ||
| --abi none \ | ||
| --dest /tmp/coverage-wheel \ | ||
| -r /tmp/coverage-lock.txt | ||
| python -m pip install --disable-pip-version-check --no-deps /tmp/coverage-wheel/coverage-7.15.2-py3-none-any.whl | ||
| - name: Run privacy-minimized model and migration tests | ||
| env: | ||
| PYTHONWARNINGS: error | ||
| DISABLE_BACKGROUND_WORKERS: "1" | ||
| run: | | ||
| set -euo pipefail | ||
| cd backend | ||
| output_file="$(mktemp)" | ||
| trap 'rm -f "$output_file"' EXIT | ||
| set +e | ||
| python -m pytest -q \ | ||
| tests/test_email_writing_models.py \ | ||
| tests/test_email_writing_migration.py 2>&1 | tee "$output_file" | ||
| test_status=${PIPESTATUS[0]} | ||
| set -e | ||
| if grep -Eiq '(^|[^[:alnum:]_])(Timeout|Fatal|Warn|Denied)([^[:alnum:]_]|$)' "$output_file"; then | ||
| echo "::error::Backend tests emitted prohibited stability output." | ||
| exit 1 | ||
| fi | ||
| exit "$test_status" | ||
| - name: Verify migration statement and branch coverage | ||
| env: | ||
| PYTHONWARNINGS: error | ||
| DISABLE_BACKGROUND_WORKERS: "1" | ||
| run: | | ||
| set -euo pipefail | ||
| cd backend | ||
| output_file="$(mktemp)" | ||
| trap 'rm -f "$output_file"' EXIT | ||
| python -m coverage erase | ||
| set +e | ||
| python -m coverage run --branch \ | ||
| --include='alembic/versions/20260812_0001_add_email_writing_review_evidence.py' \ | ||
| -m pytest -q tests/test_email_writing_migration.py 2>&1 | tee "$output_file" | ||
| test_status=${PIPESTATUS[0]} | ||
| set -e | ||
| if grep -Eiq '(^|[^[:alnum:]_])(Timeout|Fatal|Warn|Denied)([^[:alnum:]_]|$)' "$output_file"; then | ||
| echo "::error::Coverage tests emitted prohibited stability output." | ||
| exit 1 | ||
| fi | ||
| if [[ "$test_status" -ne 0 ]]; then | ||
| exit "$test_status" | ||
| fi | ||
| python -m coverage report --show-missing --fail-under=100 \ | ||
| alembic/versions/20260812_0001_add_email_writing_review_evidence.py | ||
| - name: Lint evidence implementation and tests | ||
| run: | | ||
| cd backend | ||
| python -m ruff check \ | ||
| db/email_writing_evidence.py \ | ||
| alembic/env.py \ | ||
| alembic/versions/20260812_0001_add_email_writing_review_evidence.py \ | ||
| tests/test_email_writing_models.py \ | ||
| tests/test_email_writing_migration.py | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.