test: v0.39.0 — frontend test harness + provider-compatibility matrix#125
Merged
Merged
Conversation
No product code changes; this adds coverage that locks in the v0.37/v0.38 fixes and the S3-compatible (rule 18) degradation contract. A. Frontend test harness (the frontend had ZERO tests). Vitest + Testing-Library (jsdom), `npm test` wired into CI between lint and build. Suite: useTurnRunner helpers (cleanError incl. the FE9 provider-404 guard; looksLikeError no-false- trigger), the sessionRuns store (patch/merge, failedText round-trip, drop-guard + abort/cancel), and a turn-flow test (api mocked) for FE2 message preservation across sessions. Production build unaffected (vitest config separate; bundle byte-identical). B. Provider-compatibility matrix (test_provider_compat.py). Pins rule-18 degradation across real S3-compatible deviation shapes (coded NotImplemented/ MethodNotAllowed/NotSupported/Unsupported and code-less 501/405): the central detectors map gaps to provider_unsupported and keep AccessDenied/403 distinct; every object read tool degrades to a flagged success (no raise, no success=false, no credential leak); all four review_bucket_* engines yield findings, not a crash, on a provider that implements none of the config surface. Also documents/pins the existing inconsistency in how tools express the gap (status strings vs bool). Checks: sidecar 710 passed (68 new) + ruff clean; frontend tsc + 17 tests + build clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01M3YojFPzjkfMj6YYSwvzdx
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
No product code changes — this version is pure test coverage. It closes the two biggest coverage gaps and locks in the v0.37/v0.38 fixes + the S3-compatible (rule 18) contract against regression.
A. Frontend test harness
The frontend had zero tests, despite a substantial turn-runner / store state machine that the v0.38 fixes leaned on (stop-hides-turn, cross-session message loss, reload race). Added:
npm test, wired into CI between lint and build. Vitest config is separate fromvite.config.ts, so the production build/bundle is byte-identical.useTurnRunnerpure helpers —cleanError(incl. the FE9 guard: a bare "not found"/"404" with no provider context is not rewritten to the model-404 hint) andlooksLikeError(no false trigger on "I have 404 objects").sessionRunsstore — patch/merge, functional patches, thefailedTextround-trip (FE2), and the drop-guard (a deleted session's late writes can't resurrect its entry; abort + cancel fire).failedText; a failure on the visible session restores it into the composer.B. Provider-compatibility matrix (rule 18)
Most S3 tests stub AWS-shaped happy paths; the S3-compatible contract (R2 / MinIO / GCS-XML / B2 / Ceph deviations) had little direct coverage. New
test_provider_compat.py(68 cases) pins the degradation contract across the real deviation shapes — codedNotImplemented/MethodNotAllowed/NotSupported/Unsupported, and code-less501/405gateway rejections:_is_unsupported,config_tools._read) map every gap shape toprovider_unsupported, and keep a genuine permission error (AccessDenied/403) distinct — never masked as a capability gap;get_object_tagging/_acl/_attributes,list_object_versions/list_multipart_uploads) degrades to a successful probe with the gap flagged — never a raise, neversuccess=false, never a leaked credential;review_bucket_*engines, against a provider that implements none of the config surface, return findings — not a crashed run.The matrix also documents and pins an existing inconsistency it surfaced: object tools express the gap three ways (
tagging_status/acl_status/attributes_statusstrings vs a booleanprovider_unsupported). Left as-is (both are documented and agent-read); the tests lock current behavior rather than churn the agent-facing shape.Checks run
cd sidecar && pytest -q— 710 passed (68 new intest_provider_compat.py).ruff check app— clean.cd frontend && npm run typecheck && npm test && npm run build— tsc clean, 17 tests pass, build clean (bundle byte-identical).Context
This follows an empirical review of a third-party package-size report: a real build (PyInstaller 6.21) showed its headline "~150 MiB duplicate
.so" claim was a measurement artifact (6.x symlink-dedups; one real copy) and that several "unused" Arrow libs (Substrait/dataset/acero) are ELF-NEEDEDby the parquet path. Packaging trims were shelved (暂时不删); this test-coverage work was chosen as the next increment instead.🤖 Generated with Claude Code
https://claude.ai/code/session_01M3YojFPzjkfMj6YYSwvzdx
Generated by Claude Code