Commit Graph
1266 Commits
Author SHA1 Message Date
yu-i-i 9c5be38261 Sandboxed compiles: adjust clsi-profile 2026-09-22 02:41:37 +02:00
yu-i-i c83f53d0b6 Fix: always include repository prefix in sandboxed compiles image name 2026-09-22 02:41:35 +02:00
yu-i-i 119258ea95 Refactor Sandboxed Compiles 2026-09-22 02:41:34 +02:00
yu-i-i 8c6109a90d Add 'poll' to clsi seccomp profile, fixes minted. Thanks, David. 2026-09-22 02:41:34 +02:00
yu-i-i 79c2579d3b Allow selecting a TeX Live image for a project 2026-09-18 20:42:00 +02:00
Jakob AckermannandClaude Opus 5 6caa5fc3a3 [monorepo] read empty content from its hash, in a shared blob store base (#36831)
The hash of empty content is a property of the content rather than of anything
stored: every project's empty file has it, whether or not a blob was ever written
under it, and a file may reference it before anything has. Eight blob stores were
each paying a lookup -- a database query, an HTTP request, a read of a cache that
offline mode may be the only thing standing in for -- to be told what the hash
already says, and clsi had already reinvented the answer on its own.

overleaf-editor-core gains BlobStoreBase, which answers getString for that hash
and delegates the rest to the fetchString its subclasses provide. getObject comes
with it: four stores spelled out the same JSON.parse of getString, and a fifth
wrapped it in a log line.

Adopted by history-v1's BlobStore, BackupBlobStore, HashCheckBlobStore and
recover_zip's RecoveryBlobStore, by project-history's BlobStore, by clsi's
BlobStore, and by web's HistoryBlobStore, SimpleBlobStore and FrontendBlobStore.
history-v1 keeps its own answers in getStream, getBlob and getBlobs, which no
other store implements. Writing and copying a blob are untouched, so a project
that wrote empty content still has a blob for it and a read answers the same
either way.

Two paths could not handle a project holding a tracked change or a comment at
all. Loading such a file needs the ranges blob its rangesHash points at, and
hashing one again needs to write it back, so a store missing getObject or
putObject fails outright:

- recover_zip died on `blobStore.getObject is not a function`, making every such
  project unrecoverable. The test covering it asserts a tracked delete is absent
  from the zip, which the script already asked for and never reached.
- GET /projects/:project_id/latest/hashed_content returned 500 from the same
  cause, then would have hit a missing putObject in snapshot.store.
  HashCheckBlobStore becomes a class over the base and gains putObject.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
GitOrigin-RevId: c84f62465beff6cf77ffac26aa772984e1b554cb
2026-09-17 12:06:30 +00:00
Brian Gough 538d04ddb8 Merge pull request #36664 from overleaf/lg-wordcount-sync-resources
[clsi] sync project resources for word count

GitOrigin-RevId: fe96c936e7aba22ab94416a102dcb7e4835e1256
2026-09-17 12:03:09 +00:00
Jimmy Domagala-TangandTim Gibbon baa9cf78d9 Adding 2025 and 2026 incremental compiles options (#35850)
* feat: adding 2025 and 2026 incremental compiles options

* feat: remove dmtcp from compiler list and autoselect checkpointing version with labs inclusion

* feat: updating seccomp profile for checkpointing

* feat: disable non-premium dmtcp compiles, and align checkpoint version detection between clsi and web

* feat: adding in reminder of checkpoint experiment, and using session based split test retrieval

* Increase Packer build.sh timeout from 1h15m to 1h30m as build takes approx 1h

* fix: moving checkpointing check from tag name based to hasCheckpointing flag set as part of allowed_images, and removing uneeded seccomp rule

* feat: move variant/ image selection to CLSI, and have web control only what options to set for a compile. removing uneeded extra variants from webs list of allowed images

* feat: adding compile timer as a query string as well

---------

Co-authored-by: Tim Gibbon <tim.gibbon@overleaf.com>
GitOrigin-RevId: cdbdf76a62dcd5a585925f18d64b6cb9cd6ed373
2026-09-17 12:00:46 +00:00
Jimmy Domagala-Tang 009668c224 Release TeX Live 2026.1 as the default image (#36382)
* feat: releasing 2026.1 texlive to general release and promoting to default image

* fix: update clsi image tests so their likeness calcs work locally on different archs

* feat: updating epstopdf fixture and adding note to texlive Dockerfile used for codespaces

* fix: use generated image-eps-convert instead of fixture version that drifts

GitOrigin-RevId: 13c4f6977dbf07ddd34c9a5ab3ea295cddcbe025
2026-09-17 11:59:26 +00:00
Jakob Ackermann de0d1a7226 Merge pull request #36219 from overleaf/jpa-zod-web-platform
[web] platform: adopt strict zod schema and extend test coverage

GitOrigin-RevId: e3a0b7b4c52ac116f28be0d284284e3bd3994cda
2026-09-17 11:55:40 +00:00
Brian Gough 6b3d95cea4 add optimisable png count and compile stats to compile-with-optimizable-pngs event (#36279)
* add count of optimisable pngs to HistoryResourceWriter

* add optimisable png count and compile stats to compile-with-optimizable-pngs event

GitOrigin-RevId: 5c528d727473ec2d3082845d8d5b60844f3434f6
2026-09-17 11:49:41 +00:00
Jakob Ackermann 591b9f5d39 [clsi] adopt strict zod types and extend test coverage (#36090)
GitOrigin-RevId: ce11933ccc10ac74baf5c78cec194b5532a357a2
2026-09-17 11:47:13 +00:00
Anna Claire Fields a63fd554c3 Replace MOCHA_GREP with TEST_NAME_PATTERN (#34404)
GitOrigin-RevId: b1b2d1be3d0725f930d83ef035836482ffb72dcd
2026-09-17 11:45:29 +00:00
Jimmy Domagala-TangandBrian Gough 35ba44f22b Adding project PNG optimization check to compile analytics (#35925)
* feat: adding in check for if the project could have had a png optimized as part of the compile-result-backend event

* feat: updating using new compile metrics to filter for only eligible project compiles

* move projectHasUnconvertedPngs to stats

* add e2e test for projectHasUnconvertedPngs

* add unit tests for compile-with-optimizable-pngs analytics event

---------

Co-authored-by: Brian Gough <brian.gough@overleaf.com>
GitOrigin-RevId: 97e9d184420c34fc1d3e9f6cfe63f6b916f0202f
2026-09-17 11:44:29 +00:00
Brian Gough fd87cf1ddd Merge pull request #35966 from overleaf/bg-return-optimised-image-stats-and-timings
return image stats and timings in compile response

GitOrigin-RevId: ec700b8cb6680bfd8f28ad0f1f2bbdb0479398bc
2026-09-17 11:44:22 +00:00
Andrew Rumble da3adace36 Merge pull request #34850 from overleaf/acf-ar-yarn-pnp-redux
[monorepo] yarn pnp redux

GitOrigin-RevId: fb04cab879b04ead2665b5e985a44053ceea33f3
2026-09-17 11:35:26 +00:00
Brian Gough 9ff7e66b99 Merge pull request #35504 from overleaf/bg-png2pdf-on-slow-images-only
run png2pdf on slow images only

GitOrigin-RevId: 2d0ecd35bfcfc308773502c28eeb5a722055a5a9
2026-09-17 11:29:12 +00:00
Brian Gough aad50452af Merge pull request #35333 from overleaf/bg-png2pdf-minimum-size-threshold
enforce a minimum size threshold on png2pdf conversions

GitOrigin-RevId: fa558afb5455ff5d0373e3d50e57f7207a923fcb
2026-09-17 11:29:09 +00:00
Jakob AckermannandAndrew Rumble 9519dc5e66 [fetch-utils] use default agent with a 1s timeout and 3 attempts in connect phase (#35406)
Co-authored-by: Andrew Rumble <andrew.rumble@overleaf.com>
GitOrigin-RevId: cb1e854d61ce623fa557ae003dc7159b096e1f86
2026-09-17 11:24:37 +00:00
Andrew Rumble 152004a600 Merge pull request #35095 from overleaf/lg-node-24-17-platform-compat
[Node 24.17.0][Platform packages] Fix node-fetch keep-alive false positive and bump clsi yauzl for Node 24.17

GitOrigin-RevId: 9e0382533d45e1e3b3ed88d4ccfc577591666e10
2026-09-17 11:24:02 +00:00
Andrew Rumble 5a602e1b1d Merge pull request #35290 from overleaf/ar-stop-using-unix-formatter-locally
[monorepo] switch from unix to stylish formatter for lint

GitOrigin-RevId: e3c84e556941b4747e469a123a99d5731697976d
2026-09-17 11:21:32 +00:00
Brian Gough 0dd69cb143 add clsi metrics for png2pdf (#35239)
* add clsi metrics for png2pdf

* update metrics to use png2pdf boolean

GitOrigin-RevId: 0d96020b659b31cdf16f5d26c128928dae45f8f9
2026-09-17 11:20:34 +00:00
Jakob Ackermann f62bd990d4 [clsi-cache] add support for png2pdf (#35200)
GitOrigin-RevId: ebc505528f2a001923acf2d39e6dd43107f5f35e
2026-09-17 11:20:00 +00:00
Lucie GermainandClaude Opus 4.8 cc741ec2f1 [Security upgrade] bump multer 2.1.1 -> 2.2.0 (web + clsi) (#34916)
GHSA-72gw-mp4g-v24j / CVE-2026-5079 — DoS via deeply nested field names,
patched in 2.2.0. multer is a direct dep of web and clsi (file uploads).

- bump multer to 2.2.0 in services/web and services/clsi
- re-target the Overleaf local patch (attach files with no filename as
  'undefined' instead of skipping) from 2.1.1 to 2.2.0, kept as a scoped
  root resolution to match the repo's patch convention

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
GitOrigin-RevId: 0d10137b521ebaacee71fc41adba32c4530a4041
2026-09-17 11:19:49 +00:00
Jakob AckermannandBrian Gough 69ccb3c316 [clsi] integrate png2pdf (#34796)
* Add png to pdf converter for optimising image loading in pdftex

* refactor

* move fixtures

* refactor and add unit tests

* Remove gamma correction from PNG processing and update related tests

* Add crc32fast dependency and enhance PNG processing tests

* Add fixture test cases for PNG processing

* fix alpha channel to match pdftex

pdftex always uses an 8 bit alpha channel in the output even for 16 bit images

* Refactor PNG processing to use Option for alpha stream and update related logic

* Enhance PDF writing by adding DecodeParms for alpha stream and optimize PNG encoding process

* Add pixel dimensions support in PNG processing and PDF writing

* [copybara] move clsi excludes

* [clsi] move gitignore rules

* [png2pdf] move into dockerfiles folder

* [png2pdf] use atomic writes

* [clsi] integrate png2pdf

* [saas-e2e] add coverage for png2pdf

* [png2pdf] make compatible with seccomp profile in clsi

* [copybara] remove exclude following move of png2pdf

* [copybara] remove spurious excludes

* fix broken detection of malformed chunk headers

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* [project-history] add build script flag for depending on doc-updater types

* [png2pdf] run tests as part of clsi pipeline

* [png2pdf] fix calculation of PDF page size

* [web] put png2pdf behind feature flag and make it opt-in

* [web] fix ClsiManager.promises.sendRequest invocation after merge

* extend is_copy_safe function to follow pdftex

see the conditions in pdftex's writepng.c
https://svn.tug.org:8369/texlive/trunk/Build/source/texk/web2c/pdftexdir/writepng.c?revision=78081&view=markup#l575

the criteria are not an exact match because the png crate does not support all the
png chunk types
https://github.com/image-rs/image-png/issues/116

if the criteria result in a png being converted or skipped the final result should be the same.

in one case the conversion will be done by pdftex (at runtime)
in the other case the conversion will be done by png2pdf -

both conversions should give the same result.

* include tests in png2pdf Dockerfile

* [clsi] explicitly disable png2pdf conversion for project conversion

* [clsi] png2pdf: count converted files

* [png2pdf] bump date in docker image tag

* [web] make draft-setting option wider when png2pdf is available

---------

Co-authored-by: Brian Gough <brian.gough@overleaf.com>
GitOrigin-RevId: d0d952ee009bf93c72bba2ffe763ae0160d396e4
2026-09-17 11:17:28 +00:00
Lucie Germain 210ced0d31 Merge pull request #33361 from overleaf/copilot/remove-direct-use-of-body-parser
Remove direct use of body-parser in favour of express built-ins

GitOrigin-RevId: 656c5f216daf68e86d53ae07d272e080bd5ab27f
2026-09-17 11:14:46 +00:00
Kristina 4622848a19 [web] optimize process notifications and add monitoring metrics (#34699)
GitOrigin-RevId: 411355cbdbb25d871b9cfb2afbb0ad235041337f
2026-09-17 11:12:59 +00:00
Jakob Ackermann 9fd0d644cf [agents] refine guidance for running tests (#34977)
* [monorepo] fix handling of quoted MOCHA_GREP

* [agents] refine guidance for running tests

- nudge it towards scoped module targets
- nudge it to really run e2e tests when changed
- nudge it towards a11y cypress matchers
- recommend quoting for MOCHA_GREP

* [web] fix forwarding of mocha args from module Makefile

* [monorepo] use BRANCH_NAME_TAG_SAFE for building the ci image name

* [web] also make BRANCH_NAME_TAG_SAFE available in module Makefile

(It's not really needed, but will make copilot happy.)

GitOrigin-RevId: bfda3c8fe2b4f857ef111ac63f94b35a82ad75f8
2026-06-26 08:07:37 +00:00
Jakob Ackermann 6b084424b5 [monorepo] fix running make lint from root (#33559)
* [monorepo] remove spurious package-name field from buildscript.txt

* [monorepo] align variables/paths across build script variants

* [monorepo] align linting/test setup for jobs/libraries

* [monorepo] fix "make lint/lint_fix" from root

* [wiki-algolia] integrate with yarn workspace

GitOrigin-RevId: a0954f2936d03cd4a69b3f2c8098d9ee2e361993
2026-06-23 08:06:37 +00:00
Brian Gough d75ef19bbf Merge pull request #34746 from overleaf/bg-clsi-apparmor
add new clsi apparmor profile for checkpoints

GitOrigin-RevId: 3a003263326613d3166343d54adb7050fe1e9847
2026-06-23 08:05:38 +00:00
Anna Claire Fields 7035a2e025 Revert "Acf pnp migration master" (#34709)
GitOrigin-RevId: ec7d63e1212e05dd6dfc7a0ddf785c11eca76ad6
2026-06-17 08:07:56 +00:00
Anna Claire Fields 8f07308342 Acf pnp migration master (#34040)
GitOrigin-RevId: 418eab9bc733f27a6e0f8f04a2a8e21c2f5a491f
2026-06-17 08:07:16 +00:00
Brian Gough 6f9b7031f4 pass through checkpoint setting (#34631)
GitOrigin-RevId: 50e9791b468253ee966b0eac822b2a01321a0ece
2026-06-16 08:07:14 +00:00
Brian Gough be4108a573 add glob matching to isExtraneousFile (#34633)
GitOrigin-RevId: f12aedb52195cfc9e3254936f1db6189f49c3f37
2026-06-16 08:07:09 +00:00
Jakob Ackermann b11027d58f [monorepo] add clsi-sharded mode (#34614)
* [monorepo] provide clsi-sharded dev-env setup

* [monorepo] provide sharded clsi-nginx when using clsi-sharded

* [clsi-perf] run on all instances again

* [monorepo] switch default TL to 2025.1 in clsi (same as web)

* [monorepo] avoid starting base clsi when running clsi-perf with clsi-sharded

* [clsi-lb] use 3s check interval in clsi-sharded mode

GitOrigin-RevId: 3cae8f0c1db69dbd76b94b45dc45b3abb2fa0a83
2026-06-16 08:06:34 +00:00
Mathias Jakobsen b7946791f4 Merge pull request #34553 from overleaf/mj-pandoc-html-mathml
[clsi] Add mathml option to HTML export

GitOrigin-RevId: c0736f0ae78020c2c554e8aaed9472f050323fd4
2026-06-16 08:06:25 +00:00
Jakob Ackermann 58970cd6ea [clsi] prepare for non-representative clsiServerIds (#34546)
* [clsi] forward instanceType to web

* [clsi] expose zone in compile response

* [clsi-perf] add new fields for instanceType and zone

* [clsi] expose isPreEmptible flag in compile response

* [clsi-perf] also add isPreEmptible field

* [clsi] rename isPreEmptible -> isSpotInstance

GitOrigin-RevId: 2bc2d772e0b14da83afb51f5f3e4fefd3f60b733
2026-06-15 08:08:00 +00:00
Jakob Ackermann 9743c7006e [clsi] tests: remove verbose after hook for printing metrics (#34532)
This was useful when iterating on the pdf-caching feature.
PDF caching has been stable for years. We can remove the logging now.

GitOrigin-RevId: 826c91c1e45d3dae1bb3ce5aeb7b6a3f9283392c
2026-06-15 08:06:23 +00:00
Anna Claire Fields b2edd33ca5 [PnP Migration] update ESLint cache location to use a unified .cache directory (#34485)
GitOrigin-RevId: 3b4551405e4b9fa552d6f289a31dd4eb2a73d875
2026-06-10 11:58:34 +00:00
Mathias Jakobsen f52dccbee5 Merge pull request #34350 from overleaf/mj-pandoc-texinputs
[clsi] Add TEXINPUTS variable to compressing conversion

GitOrigin-RevId: 7d708f106f6abf344707a87ba75a6e41f4023bd8
2026-06-09 08:06:05 +00:00
Anna Claire Fields 97247b8ea5 [PnP migration] Remove mock-fs dependency (#33835)
GitOrigin-RevId: ff8df32d85b2ecd2837c9eee6d6d2b3b95285239
2026-06-05 08:06:54 +00:00
Anna Claire Fields 44dee7592a use require.resolve for mocha reporter paths (#34235)
GitOrigin-RevId: af607dfdeac8f91f63db294a964ade7622225932
2026-06-05 08:06:46 +00:00
Anna Claire Fields bfcf75855a [PnP migration] Convert .prettierrc to .prettierrc.cjs with require.resolve (#34237)
GitOrigin-RevId: ab57ca143bca8bfd2b44f03f9712a1aae70b2c1c
2026-06-05 08:06:42 +00:00
Mathias Jakobsen fc31a88767 Merge pull request #34145 from overleaf/ds-download-html-using-pandoc-clsi-1
[CLSI] Download as HTML feature

GitOrigin-RevId: 374101c1f957a00eda423a6be0363c08b5de7a95
2026-06-05 08:06:03 +00:00
Jakob AckermannandBrian Gough df61bfc788 [clsi] initial version of /convert/pdf-to-jpeg (#33752)
* [monorepo] consolidate clsi-lb host/ip env-vars

Target env-var is CLSI_LB_HOST. Keep CLSI_LB_IP populated for a week.

* [clsi] initial version of /convert/pdf-to-jpeg

* [rails] use fake-secrets in CI and Codespaces

* [rails] adapt tests for using clsi to convert PDFs to image

* [rails] add rake task for comparing clsi conversion with transloadit

* [clsi] double check that output.jpg is a regular file

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [clsi] fix composing basename

* [monorepo] fix clsi-lb host env-var post merge

* [monorepo] sort dev-environment.env hosts

* [rails] use local pdf file rather than downloading it again

Download from the old renderer code path still. It's dead code.

* [terraform] clsi: enable pdf to jpg conversion

---------

Co-authored-by: Brian Gough <brian.gough@overleaf.com>
GitOrigin-RevId: 5ecaa8559d299486340bb3961f06b29f7c4dfcca
2026-06-05 08:05:55 +00:00
Brian Gough f8c7e092fa upgrade to eslint v10 (#34054)
* upgrade from eslint version 8 to eslint version 10

* remove unsupported eslint-env directive

* include jsx files in latexqc linting

* use basePath and extends to maintain paths in writefull eslint

* fix yarn.lock

with ./bin/yarn install

* preserve existing glob patterns in web eslint config

* restore original comments

* fix worker path

* corrected comment about eslint-plugin-mocha

* remove unused imports

* remove unused import of includeIgnoreFile

* switch to individual eslit.config.mjs files

* fix lint errors on eslint.config.mjs in web

* update build scripts for eslint.config.mjs

* update volumes for RUN_LINTING_CI_MONOREPO in web Makefile

updated manually as this makefile is not autogenerated
the RUN_LINTING_CI_MONOREPO command is only used for prettier, not eslint, but updating for consistency.

* migrate from mocha/no-skipped-tests to mocha/no-pending-tests

see https://github.com/lo1tuma/eslint-plugin-mocha/pull/365
"rule no-skipped-tests has been removed, its functionality has been merged into the existing no-pending-tests rule"

GitOrigin-RevId: 2c8f25c8049a0dba374a51df1214286bb5093a51
2026-06-03 08:06:29 +00:00
Gernot Schulz a0ca344065 Merge pull request #34127 from overleaf/gs-j-cd-hooks
Add deploy pipeline trigger hooks to Jenkinsfiles

GitOrigin-RevId: 80bb89615ae16b733009dca21a5fc41b5c30e993
2026-06-01 08:04:55 +00:00
Jakob Ackermann e7a202a0bf [clsi] fix duplicate import of Errors module (#34068)
GitOrigin-RevId: e1dec5e5d439e5d178f9f7400c0873e0be6e90f8
2026-05-28 08:08:10 +00:00
Jakob Ackermann 7e4820f0b0 [clsi] migrate convert project to document to compile from history (#33985)
* [clsi] add request flag for isCompileFromHistory

* [clsi] derive cacheKey for history snapshot from compile dir

* [clsi] migrate convert project to document to compile from history

* [clsi] address review feedback

* [web] determine root doc at the time of converting the project

* [web] wait for flush before starting document conversion

* [saas-e2e] add tests for root doc override when converting project

GitOrigin-RevId: 71c578030949b89f3a74e7f7ab882dfa9c98c17a
2026-05-28 08:08:06 +00:00
Jakob Ackermann 666788be70 [clsi] nginx: use a fixed project id for the content domain access check (#33291)
GitOrigin-RevId: 7801fa001e42b1b96d851f74efff396bc6471980
2026-05-28 08:08:02 +00:00