Conversation
…ersion tag - OPSIN round-trip verification is now on by default - flat/squared restyle: no rounded corners, left-aligned header - long names and atom-id lines wrap instead of overflowing - new /api/depict endpoint renders the molecule with RDKit atom indices; shown in the "Explain this name" section - pin openclatura[web]==0.1.4 and show the installed version in the header (healthz override reports distribution metadata, since the 0.1.4 wheel hardcodes __version__ = "0.1.0") Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rdkit.Chem.Draw dlopens a bundled libcairo that needs libXrender & friends, absent from the Vercel runtime image. Bundle the closure (Debian bullseye builds, glibc<=2.26 symbols, compatible with the AL2023 runtime) and ctypes-preload them before the Draw import. The import is now also non-fatal: without it /api/depict degrades instead of crashing every endpoint at cold start. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fontconfig inside the rdkit wheel needs libexpat.so.1, also absent from the Vercel runtime image. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
py2opsin writes a fixed-name temp file in the CWD; concurrent requests in one warm function process collide on it and the round-trip raises, surfacing as status "error". Shadow /api/name with a version that holds a process-wide lock around verify_opsin runs and retries once. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Results are deterministic per package version, so responses are cached
under {endpoint}:{version}:{flags}:{sha256(canonical SMILES)} with a
90-day TTL via the Upstash REST API (stdlib urllib, no new deps).
Failures and OPSIN error/skipped statuses are never cached; any cache
error falls back to computing. Without KV_REST_API_URL/TOKEN the cache
is a no-op, so the deploy is safe before the store is provisioned.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The result cache can now use any S3-compatible object store via stdlib SigV4 signing (CACHE_S3_ENDPOINT/BUCKET/ACCESS_KEY/SECRET_KEY; AWS_* names accepted for local runs but reserved on Vercel). Upstash REST remains as fallback backend. Expiry via bucket lifecycle rule. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
OPSIN's CLI streams names line-by-line, so keep one JVM alive per function instance instead of booting one per verification (~1.5 s -> ~10 ms warm). Comparison logic mirrors verify_with_opsin; on any daemon hiccup the process is killed and the request falls back to the one-shot py2opsin path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
New GET /api/warmup boots the OPSIN JVM and primes the naming engine; the frontend fires it on page load so the serverless cold start overlaps with editor initialization instead of delaying the first naming request. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Sorry @AdrianM0, your pull request is larger than the review limit of 300000 diff characters
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (7)
📒 Files selected for processing (31)
🔥 Files not summarized due to errors (2)
📝 WalkthroughWalkthroughThe change adds RDKit CIP-aware stereochemistry, reconstruction auditing with decision-trace output, regression tests, and a deployed web interface with cached naming, explanation, depiction, OPSIN verification, and bundled Ketcher assets. ChangesCore molecule analysis
Hosted molecule naming web app
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant Ketcher
participant WebPage
participant API
participant Openclatura
User->>Ketcher: Draw or select molecule
Ketcher->>WebPage: Emit structure change
WebPage->>API: POST /api/name
API->>Openclatura: Generate name and optional verification
Openclatura-->>API: Name, trace, and verification
API-->>WebPage: JSON response
WebPage-->>User: Render name, badges, and rule hints
User->>WebPage: Request explanation
WebPage->>API: POST /api/describe and /api/depict
API-->>WebPage: Explanation and SVG
WebPage-->>User: Render explanation and depiction
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8)website/public/ketcher/asset-manifest.jsonTraceback (most recent call last): website/public/ketcher/manifest.jsonTraceback (most recent call last): website/public/ketcher/serve.jsonTraceback (most recent call last):
🔧 ast-grep (0.44.1)website/public/ketcher/static/js/main.cb80d824.jsast-grep skipped this file: it is too large to scan (29521424 bytes) website/public/ketcher/static/js/535.c5fc3b49.chunk.jsast-grep timed out on this file website/public/ketcher/static/js/622.ed91acd0.chunk.jsast-grep timed out on this file 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 |
Summary by CodeRabbit
New Features
Improvements
Bug Fixes