Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9d0f2a0
sync: upstream Vercel Chat v4.26.0
claude Apr 16, 2026
f932f26
fix(thread): clear fallback placeholder on whitespace-only streams
claude Apr 16, 2026
0ff1703
docs: note placeholder-clear divergence in CHANGELOG and ARCHITECTURE
claude Apr 16, 2026
6e99c83
fix(reviver): make from_json idempotent for object_hook use
claude Apr 16, 2026
2ad1dac
ci: add pyrefly type checking and expand lint coverage
claude Apr 17, 2026
0cc5d11
ci: fix lint job cache + add least-privilege permissions
claude Apr 17, 2026
6070884
Potential fix for pull request finding 'CodeQL / Workflow does not co…
patrick-chinchill Apr 17, 2026
6c3871c
fix(gchat,serde): round-trip <url|text> links; sync adapter_name on r…
claude Apr 17, 2026
101846f
ci: dedupe permissions block in lint.yml
claude Apr 17, 2026
0e2b07c
chore: gitignore .claude/ (subagent worktree root)
claude Apr 17, 2026
2ea626b
docs: mark c4e3bee gchat/serde fixes as divergences from upstream
claude Apr 17, 2026
bf74563
fix(gchat): accept any URL scheme in <url|text> round-trip
claude Apr 17, 2026
dfef313
fix(gchat): fall back to parenthesized form when link label contains …
claude Apr 17, 2026
139bb63
docs: record the gchat reserved-char fallback as a Python divergence
claude Apr 17, 2026
c72a943
docs: codify divergence policy + add in-code breadcrumbs
claude Apr 17, 2026
8dd34d1
address coderabbit review findings
claude Apr 17, 2026
8874aab
tighten to_json adapter_name + exercise warm-up path in test
claude Apr 17, 2026
1ce9cbf
address remaining codex + coderabbit findings
claude Apr 17, 2026
5926e42
docs: add `]` to the gchat link-label non-parity row
claude Apr 17, 2026
891ef60
fix(types): rename format converter params to platform_text + pin pyr…
claude Apr 17, 2026
a501fff
fix(channel): use `is not None` for adapter_name serialization + docu…
claude Apr 17, 2026
4da149f
tighten two more CodeRabbit tests; hold one
claude Apr 17, 2026
e08b85e
fix(gchat): AST placeholder substitution for <url|text> round-trip
claude Apr 17, 2026
d62e0e6
fix(gchat): preserve <url|text> inside code spans, guard out-of-range…
claude Apr 17, 2026
ef7589e
test: close the gaps the self-review surfaced
claude Apr 18, 2026
f9a925d
fix(gchat): 3 round-trip corrections from Codex P2s
claude Apr 18, 2026
94ee17a
docs: add Self-Review Discipline section to CLAUDE.md
claude Apr 18, 2026
a572379
docs: split Self-Review Discipline into dedicated docs/SELF_REVIEW.md
claude Apr 18, 2026
f4c6253
fix(gchat, thread): 3 bugs found by self-review subagents
claude Apr 18, 2026
c381a63
fix(thread): narrow except in _fallback_stream from BaseException to …
claude Apr 18, 2026
6168961
fix(serde): invalidate state/channel caches on idempotent adapter rebind
claude Apr 18, 2026
a869df0
fix(serde): resolve adapter via _adapter.name on idempotent chat rebind
claude Apr 18, 2026
5daeb32
docs: add 7th principle — rebind/idempotent-path state coherence
claude Apr 18, 2026
5c4e999
fix(serde, gchat): address 4 findings from 7-principle self-review re…
claude Apr 18, 2026
2e14133
fix+docs: 7-principle re-review + upstream drift audit round 2
claude Apr 18, 2026
c345ac3
fix(thread): SentMessage reflects actual platform content, not final_…
claude Apr 18, 2026
30f6ce5
fix(serde): make idempotent rebind transactional on adapter-lookup fa…
claude Apr 18, 2026
4e48d4c
chore: ruff format + extend SELF_REVIEW §6 with error-path note
claude Apr 18, 2026
108914e
fix(thread): wrap final-edit in try/except to avoid orphaning placeho…
claude Apr 18, 2026
40ba768
docs(changelog): backfill 4 Python-specific divergences from non-pari…
claude Apr 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Lint & Type Check

on:
push:
branches: [main]
paths:
- 'src/**'
- 'tests/**'
- 'scripts/**'
- 'pyproject.toml'
- '.pyrefly-baseline.json'
- '.github/workflows/lint.yml'
pull_request:
branches: [main]
types: [opened, reopened, ready_for_review, synchronize]
paths:
- 'src/**'
- 'tests/**'
- 'scripts/**'
- 'pyproject.toml'
- '.pyrefly-baseline.json'
- '.github/workflows/lint.yml'
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
lint:
name: Lint & Type Check
runs-on: ubuntu-latest
if: "!github.event.pull_request.draft"
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.2.2
with:
fetch-depth: 1

- uses: astral-sh/setup-uv@e4db8464a088ece1b920f60402e813ea4de65b8f # v4

- name: Install dependencies
run: uv sync --group dev

- name: Ruff check
id: ruff_check
continue-on-error: true
run: uv run ruff check src/ tests/ scripts/

- name: Ruff format check
id: ruff_format
continue-on-error: true
run: uv run ruff format --check src/ tests/ scripts/

- name: Test quality audit
id: audit
continue-on-error: true
run: uv run python scripts/audit_test_quality.py

- name: Pyrefly type check (against baseline)
id: pyrefly
continue-on-error: true
run: uv run pyrefly check --baseline=.pyrefly-baseline.json

- name: Minimize uv cache
run: uv cache prune --ci

- name: Report results
if: always()
run: |
echo "## Lint & Type Check Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Step | Outcome |" >> $GITHUB_STEP_SUMMARY
echo "|---|---|" >> $GITHUB_STEP_SUMMARY
echo "| Ruff check | ${{ steps.ruff_check.outcome }} |" >> $GITHUB_STEP_SUMMARY
echo "| Ruff format | ${{ steps.ruff_format.outcome }} |" >> $GITHUB_STEP_SUMMARY
echo "| Test audit | ${{ steps.audit.outcome }} |" >> $GITHUB_STEP_SUMMARY
echo "| Pyrefly | ${{ steps.pyrefly.outcome }} |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ "${{ steps.pyrefly.outcome }}" = "success" ]; then
echo "No new type issues above the baseline." >> $GITHUB_STEP_SUMMARY
else
echo "New type issues above the baseline. Either fix them or refresh the baseline with \`uv run pyrefly check --baseline=.pyrefly-baseline.json --update-baseline\` if intentional." >> $GITHUB_STEP_SUMMARY
fi

- name: Fail if any step failed
if: always()
env:
RUFF_CHECK: ${{ steps.ruff_check.outcome }}
RUFF_FORMAT: ${{ steps.ruff_format.outcome }}
AUDIT: ${{ steps.audit.outcome }}
PYREFLY: ${{ steps.pyrefly.outcome }}
run: |
failures=0
for var in RUFF_CHECK RUFF_FORMAT AUDIT PYREFLY; do
outcome="${!var}"
if [ "$outcome" != "success" ]; then
echo "$var failed (outcome: $outcome)"
failures=1
fi
done
[ "$failures" -eq 0 ] || exit 1
9 changes: 3 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches: [main]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -19,11 +22,5 @@ jobs:
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --group dev
- name: Lint
run: uv run ruff check src/
- name: Format check
run: uv run ruff format --check src/
- name: Test quality audit
run: uv run python scripts/audit_test_quality.py
- name: Run tests
run: uv run pytest tests/ -q --tb=short --cov=chat_sdk --cov-fail-under=70
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ build/
.pytest_cache/
.mypy_cache/
uv.lock
.claude/
Loading
Loading