From d9fa2ad2e618c5244114290aa3ae97b11fd8ef13 Mon Sep 17 00:00:00 2001 From: Bill Hlavacek Date: Fri, 4 Dec 2026 23:28:08 -0700 Subject: [PATCH 01/10] Select the sources for laptop suite 2026.12.4 Pin Chatty 0.6.0, text-fetch 0.5.0 and LitKit 0.5.0 at their merged release commits and upgrade from the promoted 2026.12.3 suite, using the README revision whose installer commands users run today. Set the new tag in both installers and point the README and quickstart at the suite that ships the Los Alamos demo, chatty skill and tables by default. Signed-off-by: Bill Hlavacek --- README.md | 8 ++++---- docs/laptop-quickstart.md | 10 +++++----- release/install.ps1 | 2 +- release/install.sh | 2 +- release/sources.json | 14 +++++++------- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 4ad004c..429e7c2 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,9 @@ On a Linux NFS home with remote locking enabled, lifecycle commands use a privat Open a fresh terminal (or run the `export PATH` command printed by the Linux or macOS installer; on Windows, close all Windows Terminal windows first). From any directory, run `chatty --version`, `text-fetch --version`, and `litkit --version`. -The 2026.12.3 installer above supplies Chatty 0.5.0, text-fetch 0.4.0 and LitKit 0.4.0. +The 2026.12.4 installer above supplies Chatty 0.6.0, text-fetch 0.5.0 and LitKit 0.5.0. -The current source build includes 101 pages of Los Alamos and Manhattan Project history, including original scans from Edith C. Truslow’s report. Try `chatty corpus create demo --example` and +Starting with laptop suite 2026.12.4, Chatty includes 101 pages of Los Alamos and Manhattan Project history, including original scans from Edith C. Truslow’s report. Try `chatty corpus create demo --example` and `chatty retrieve '"Black Beauties"' --corpus demo --mode exact` to find Gosling’s account of wartime kitchens offline. `chatty index --example` builds the index from the bundled PDFs and uses Tesseract to read the scan, and `chatty index YOUR_FOLDER` imports your own documents. Follow the @@ -69,7 +69,7 @@ sessions in `./sessions` by default. To share sessions across working directorie set `session_path = "~/.config/chatty/sessions"` in that config. These locations are independent of the installed runtime. -The [laptop-2026.12.3 manifest](https://github.com/lanl/chatty/releases/download/laptop-2026.12.3/manifest.json) +The [laptop-2026.12.4 manifest](https://github.com/lanl/chatty/releases/download/laptop-2026.12.4/manifest.json) records the source revisions and wheel hashes. See the [maintainer release guide](release/README.md) to reproduce the suite. @@ -429,7 +429,7 @@ With `--json`, invalid command arguments exit 2 and write an `invalid_argument` New named corpora default to `research`. Set it explicitly with `chatty corpus create NAME --mode research`, inspect it with `chatty corpus status NAME`, and use `chatty skill --mode research` for its paper workflow. Older corpora use the same default. -Run `chatty skill` to print the agent guide for your installed version, or write it to a skill directory with `chatty skill --out ~/.claude/skills/chatty-corpus/SKILL.md`. This command is available in source builds after laptop suite 2026.12.3. For that release, read the [bundled guide](https://github.com/lanl/chatty/blob/laptop-2026.12.3/docs/agent-skill/SKILL.md). +Run `chatty skill` to print the agent guide for your installed version, or write it to a skill directory with `chatty skill --out ~/.claude/skills/chatty-corpus/SKILL.md`. Laptop suite 2026.12.3 lacks this command. For that release, read the [bundled guide](https://github.com/lanl/chatty/blob/laptop-2026.12.3/docs/agent-skill/SKILL.md). ### Warm retrieval across commands diff --git a/docs/laptop-quickstart.md b/docs/laptop-quickstart.md index 346b7a9..ae3775a 100644 --- a/docs/laptop-quickstart.md +++ b/docs/laptop-quickstart.md @@ -1,8 +1,8 @@ # Index a folder and retrieve your first passage -The Los Alamos demo is available from the current source checkout. Install the indexing tools with Python 3.12 and uv (`uv sync --locked --python 3.12 --extra index`), then activate the environment (`source .venv/bin/activate` or `.venv\Scripts\Activate.ps1`). +The [published laptop installer](../README.md#laptop-release-chatty-text-fetch-and-lanl-litkit) supplies the Los Alamos demo and everything else on this page except the desktop integration, starting with laptop suite 2026.12.4. To work from a checkout instead, install the indexing tools with Python 3.12 and uv (`uv sync --locked --python 3.12 --extra index`), then activate the environment (`source .venv/bin/activate` or `.venv\Scripts\Activate.ps1`). -The published laptop suite 2026.12.3 includes the earlier rain-gauge demo. If you used that installer, follow its [versioned quickstart](https://github.com/lanl/chatty/blob/3612d5be0421546940b5701525a4d8cb9f212e5a/docs/laptop-quickstart.md). +Laptop suite 2026.12.3 includes the earlier rain-gauge demo. If you installed that suite, follow its [versioned quickstart](https://github.com/lanl/chatty/blob/3612d5be0421546940b5701525a4d8cb9f212e5a/docs/laptop-quickstart.md). ## Index and search @@ -29,14 +29,14 @@ chatty retrieve "What were the Black Beauties in Los Alamos kitchens?" Open page 26 of `gosling-los-alamos-excerpt.pdf` in the workspace’s `example/los-alamos` directory to compare the passage with the caption. For your own scan with an unreliable text layer, run `chatty index YOUR_SCAN.pdf --pdf-backend fast --ocr force --ocr-engine tesseract` in a fresh workspace. -For the corresponding JSON commands and citation workflow, run `chatty skill` in a source build after laptop suite 2026.12.3. To save the installed guide, run `chatty skill --out PATH` with your agent's destination filename. For suite 2026.12.3, use its [bundled guide](https://github.com/lanl/chatty/blob/laptop-2026.12.3/docs/agent-skill/SKILL.md). +For the corresponding JSON commands and citation workflow, run `chatty skill`. To save the installed guide, run `chatty skill --out PATH` with your agent's destination filename. For suite 2026.12.3, use its [bundled guide](https://github.com/lanl/chatty/blob/laptop-2026.12.3/docs/agent-skill/SKILL.md). The first build downloads SPECTER2 and all-MPNet-base-v2 (about 880 MB together). Chatty stores them in a shared Hugging Face cache under `~/.cache/chatty-suite/hf_cache` by default (override with `HF_HOME`), so models are downloaded once across all workspaces and named corpora. A workspace indexed by an earlier release keeps using its own `hf_cache` folder until the shared cache exists. To choose another default workspace, set the top-level `rag_workspace` in `~/.config/chatty/config.toml`. An explicit `CHATTY_RAG_WORKSPACE` takes precedence over `LITKIT_WORKSPACE` and the configured path. `chatty workspace` prints the selection. To manage multiple isolated topic corpora, use `chatty corpus create ` and pass `--corpus ` to `chatty index`, `chatty retrieve`, `chatty search papers`, `chatty context`, `chatty paper`, `chatty doctor`, and `chatty chat`. - For scientific PDFs, use `chatty index YOUR_FOLDER --rich` to download IBM Granite-Docling and extract equations, tables and scans. The managed model uses PyTorch. With the pinned PyTorch 2.6 runtime on macOS, PDF conversion runs on CPU and LitKit can still use MPS for embeddings. To prefetch it and both embedding models, run `chatty models --download --with-pdf`. Set `HF_HUB_OFFLINE=1` to require cached models. - For fast conversion and per-page OCR, use `--pdf-backend fast`. Apple Vision is available on supported Macs. Tesseract requires a local executable and language data. Select an engine with `--ocr-engine vision`, `tesseract`, `auto` or `off`. The importer reports unreadable files and skipped scans. - To append new documents, run `chatty index YOUR_FOLDER --update`. You can also add a different folder. Keep each source folder at its original path. Existing documents and their citations stay in the index. To index edits or remove deleted documents, build in a fresh workspace. -- Local builds from this checkout index extracted table headers and cells by default. With laptop suite 2026.12.3, set `LITKIT_INCLUDE_TABLES=1` before indexing to enable them. Use `chatty paper --tables --json` to read them. For documents indexed before tables were enabled, build a fresh workspace from the originals. To skip tables in a new build, set `LITKIT_INCLUDE_TABLES=0`. +- Chatty indexes extracted table headers and cells by default, starting with laptop suite 2026.12.4. With suite 2026.12.3, set `LITKIT_INCLUDE_TABLES=1` before indexing to enable them. Use `chatty paper --tables --json` to read them. For documents indexed before tables were enabled, build a fresh workspace from the originals. To skip tables in a new build, set `LITKIT_INCLUDE_TABLES=0`. - Run `chatty doctor --retrieval` to inspect OCR, models and indices offline. `chatty doctor` also checks the configured LLM and, if configured, the text-fetch GROBID endpoint. ## Chat with the corpus @@ -54,7 +54,7 @@ Store the key on its own line in that file. On Linux or macOS, run `chmod 600 ~/ ## Use a named corpus in Claude Desktop -Install the desktop integration from a checkout with `uv sync --locked --python 3.12 --extra mcp --extra index`. Create and index a named corpus with the same Chatty installation. This integration is available in source builds after laptop suite 2026.12.3. +Install the desktop integration from a checkout with `uv sync --locked --python 3.12 --extra mcp --extra index`. Create and index a named corpus with the same Chatty installation. The laptop suite doesn't include the `mcp` extra, so the integration needs a checkout. Download and open the [Chatty desktop extension](../integrations/chatty.mcpb?raw=1) in Claude Desktop. Select the checkout's `.venv/bin/chatty` executable on macOS or `.venv\Scripts\chatty.exe` on Windows. The extension uses the read-only tools. Ask the app to search a corpus, verify a quotation against its evidence handle, or identify the earlier papers cited by a passage. diff --git a/release/install.ps1 b/release/install.ps1 index c137fd8..3bf6ed8 100644 --- a/release/install.ps1 +++ b/release/install.ps1 @@ -13,7 +13,7 @@ function Invoke-SuiteLifecycle { $PSNativeCommandUseErrorActionPreference = $false $ProgressPreference = 'SilentlyContinue' - $tag = 'laptop-2026.12.3' + $tag = 'laptop-2026.12.4' $manifestSha = '96e1d5b0aeb6d715c278409447ded93cb71cc636dd1f5d2555a17e49ca53f596' $uvSha = 'edd61f7f5728a56cc62455386661860bdfc7bab65872f39b0c25bdcc1d8e1beb' $suiteCommands = @('chatty', 'text-fetch', 'litkit') diff --git a/release/install.sh b/release/install.sh index 2954ece..82a9bfa 100755 --- a/release/install.sh +++ b/release/install.sh @@ -5,7 +5,7 @@ set -eu install_suite() ( orig_umask=$(umask) - tag=laptop-2026.12.3 + tag=laptop-2026.12.4 manifest_sha=96e1d5b0aeb6d715c278409447ded93cb71cc636dd1f5d2555a17e49ca53f596 python_version=3.12.12 suite_commands="chatty text-fetch litkit" diff --git a/release/sources.json b/release/sources.json index a549e30..56a58a1 100644 --- a/release/sources.json +++ b/release/sources.json @@ -1,13 +1,13 @@ { - "tag": "laptop-2026.12.3", + "tag": "laptop-2026.12.4", "upgrade_from": { - "tag": "laptop-2026.12.2", - "instructions_revision": "0a22f9d32215fe1c4b02a904079ea14f5bcb6e62", - "manifest_sha256": "579a7dc8b6843791f374d145b376a72f469bd74a3befc53fc3c66728f55b6072" + "tag": "laptop-2026.12.3", + "instructions_revision": "45a8a9688b8b5a6a21327006ff7658e30fafd5eb", + "manifest_sha256": "96e1d5b0aeb6d715c278409447ded93cb71cc636dd1f5d2555a17e49ca53f596" }, "projects": { - "chatty": {"version": "0.5.0", "revision": "d26d3cc4abfc0b5224b8d2691c463b92b9c2c89f"}, - "text-fetch": {"version": "0.4.0", "revision": "9fef87c6b35afedd7866661cb431f5f335f98efc"}, - "litkit": {"version": "0.4.0", "revision": "985534e55610db32c6ad9ce82a93beaf4da9259c"} + "chatty": {"version": "0.6.0", "revision": "c69db974134d55872c64bc4541b0b5af21a6b0ce"}, + "text-fetch": {"version": "0.5.0", "revision": "685ee8bc7f8178b035000cd7eb052726410dd2ce"}, + "litkit": {"version": "0.5.0", "revision": "3b6ee3ac074fc2440db92e5bef6e8a9ea572f340"} } } From 5fee4d08f25807b02c78ebd42bbca10309348833 Mon Sep 17 00:00:00 2001 From: Bill Hlavacek Date: Fri, 4 Dec 2026 23:28:08 -0700 Subject: [PATCH 02/10] Clarify the verify exit status and HPC profile precedence in the 0.6.0 changelog Signed-off-by: Bill Hlavacek --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64b8655..983878e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,13 +13,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Build a literature corpus from a topic or from seed papers. `chatty corpus create NAME --topic "..."` or `--seed PMCID` collects papers with text-fetch from the `--sources` given (default `europepmc`), following references and citations with `--expand` and `--depth`, within a `--max-papers` budget (default 25). `--dry-run` previews the selection and `--yes` downloads and indexes it. `chatty corpus add` collects more papers into an existing corpus, and `chatty corpus index` indexes the documents in a corpus's `sources` folder. - Follow citations inside a corpus. `chatty refs` lists the references of a paper, passage or physical page, and `--missing --fetch` collects the ones the corpus lacks. `chatty cited-by` finds the papers that cite a paper, with their citing passages, and `chatty corpus graph` exports the citation graph page by page as JSON or CSV. -- `chatty verify` checks a quotation, and a claimed value and unit, at its cited location. `--claims FILE` checks a JSONL file of claims. With `--json`, an unsupported claim exits 7 with `claim_not_supported`. +- `chatty verify` checks a quotation, and a claimed value and unit, at its cited location. `--claims FILE` checks a JSONL file of claims. An unsupported claim exits 7 (`claim_not_supported` in the `--json` report). - Save a passage's `evidence_handle` with a citation. After a later index, `context` and `paper` check it against the stored passage and return `stale_handle` when the text changed, with a replacement when the passage moved. - `chatty retrieve --queries FILE` runs a JSONL batch of queries. The first hybrid or semantic search starts a private local worker that keeps the embedding models loaded for later searches of the same corpus. Set `CHATTY_RETRIEVAL_SERVICE=0` to run each command in a fresh process instead. - `chatty index --background` returns as soon as the imported text can be searched exactly, and hybrid retrieval uses exact matches until the vectors are built. `chatty corpus status` reports exact, semantic and hybrid readiness and vector progress. `chatty index --ocr force` re-reads scans with an unreliable text layer. - `chatty corpus create NAME --example` installs a prepared index of public-domain Los Alamos history excerpts, so a first search works offline. - `chatty mcp` serves Chatty to desktop MCP clients such as Claude Desktop over stdio. `--corpus` limits which corpora it can see, `--timeout` limits each call (default 120 seconds), and `--allow-writes` exposes corpus creation, collection, indexing and deletion. `integrations/chatty.mcpb` is a desktop extension with the read-only tools. Install the `mcp` extra. -- SLURM builds. With `executor = "slurm"` in `~/.config/chatty/hpc.toml` (or a site default in `/etc/chatty/hpc.toml`, or the profile named by `CHATTY_HPC_CONFIG`), `chatty index` and confirmed collections run as single-node jobs in a Charliecloud image, using node-local scratch and local safetensors weights only. `chatty index --dry-run` previews the job and `chatty job status` reports its progress. +- SLURM builds. With `executor = "slurm"` in `~/.config/chatty/hpc.toml` (a site default can go in `/etc/chatty/hpc.toml`, and `CHATTY_HPC_CONFIG` names a profile that overrides both), `chatty index` and confirmed collections run as single-node jobs in a Charliecloud image, using node-local scratch and local safetensors weights only. `chatty index --dry-run` previews the job and `chatty job status` reports its progress. - `chatty skill` prints the agent guide for the installed version, and `--out PATH` writes it to a file. Named corpora record their mode. Existing corpora default to `research`, and `chatty skill --mode research` prints the research guidance. - `chatty corpus list --only NAME` lists only the named corpora. - With `--json`, errors include suggested remedies. An invalid argument exits 2 with `invalid_argument`, and an unknown corpus, paper or passage exits 3 with close matches. From 71684288d746cdc73e5ba81fa3c9bf66e25100e1 Mon Sep 17 00:00:00 2001 From: Bill Hlavacek Date: Fri, 4 Dec 2026 23:33:55 -0700 Subject: [PATCH 03/10] Pin the laptop-2026.12.4 manifest in the installers Build run 47489111450 produced manifest.json with SHA-256 0a9f8784201d0788f34a0c34dfa652e44220a3c382ec902a909748c2479db604. Signed-off-by: Bill Hlavacek --- release/install.ps1 | 2 +- release/install.sh | 2 +- release/manifest.sha256 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/release/install.ps1 b/release/install.ps1 index 3bf6ed8..a583bb9 100644 --- a/release/install.ps1 +++ b/release/install.ps1 @@ -14,7 +14,7 @@ function Invoke-SuiteLifecycle { $ProgressPreference = 'SilentlyContinue' $tag = 'laptop-2026.12.4' - $manifestSha = '96e1d5b0aeb6d715c278409447ded93cb71cc636dd1f5d2555a17e49ca53f596' + $manifestSha = '0a9f8784201d0788f34a0c34dfa652e44220a3c382ec902a909748c2479db604' $uvSha = 'edd61f7f5728a56cc62455386661860bdfc7bab65872f39b0c25bdcc1d8e1beb' $suiteCommands = @('chatty', 'text-fetch', 'litkit') diff --git a/release/install.sh b/release/install.sh index 82a9bfa..59783b6 100755 --- a/release/install.sh +++ b/release/install.sh @@ -6,7 +6,7 @@ install_suite() ( orig_umask=$(umask) tag=laptop-2026.12.4 - manifest_sha=96e1d5b0aeb6d715c278409447ded93cb71cc636dd1f5d2555a17e49ca53f596 + manifest_sha=0a9f8784201d0788f34a0c34dfa652e44220a3c382ec902a909748c2479db604 python_version=3.12.12 suite_commands="chatty text-fetch litkit" diff --git a/release/manifest.sha256 b/release/manifest.sha256 index 830e2ad..69df130 100644 --- a/release/manifest.sha256 +++ b/release/manifest.sha256 @@ -1 +1 @@ -96e1d5b0aeb6d715c278409447ded93cb71cc636dd1f5d2555a17e49ca53f596 manifest.json +0a9f8784201d0788f34a0c34dfa652e44220a3c382ec902a909748c2479db604 manifest.json From 7713212aaf1d555752cc7d2c3bb2ebe149d1dcc2 Mon Sep 17 00:00:00 2001 From: Bill Hlavacek Date: Fri, 4 Dec 2026 23:34:04 -0700 Subject: [PATCH 04/10] Pin the README install commands to the 2026.12.4 installers Signed-off-by: Bill Hlavacek --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 429e7c2..adcf753 100644 --- a/README.md +++ b/README.md @@ -20,14 +20,14 @@ On a Linux NFS home with remote locking enabled, lifecycle commands use a privat ```bash -/bin/sh -c 'installer=$(curl -fsSL https://raw.githubusercontent.com/lanl/chatty/ca9b9f3ffa1d1fcb623a02c8d2bc3e29ad9ad11b/release/install.sh) && /bin/sh -c "$installer" sh "$@"' sh +/bin/sh -c 'installer=$(curl -fsSL https://raw.githubusercontent.com/lanl/chatty/71684288d746cdc73e5ba81fa3c9bf66e25100e1/release/install.sh) && /bin/sh -c "$installer" sh "$@"' sh ``` **Windows x64** (64-bit Windows PowerShell 5.1 or PowerShell 7) ```powershell -& ([scriptblock]::Create((Invoke-RestMethod -ErrorAction Stop https://raw.githubusercontent.com/lanl/chatty/ca9b9f3ffa1d1fcb623a02c8d2bc3e29ad9ad11b/release/install.ps1))) +& ([scriptblock]::Create((Invoke-RestMethod -ErrorAction Stop https://raw.githubusercontent.com/lanl/chatty/71684288d746cdc73e5ba81fa3c9bf66e25100e1/release/install.ps1))) ``` Open a fresh terminal (or run the `export PATH` command printed by the Linux or macOS installer; on Windows, close all Windows Terminal windows first). @@ -55,12 +55,12 @@ or uninstall suite-owned files while preserving other files in the installation ```bash # Linux and macOS (replace --status with --clean or --uninstall) -/bin/sh -c 'installer=$(curl -fsSL https://raw.githubusercontent.com/lanl/chatty/ca9b9f3ffa1d1fcb623a02c8d2bc3e29ad9ad11b/release/install.sh) && /bin/sh -c "$installer" sh "$@"' sh --status +/bin/sh -c 'installer=$(curl -fsSL https://raw.githubusercontent.com/lanl/chatty/71684288d746cdc73e5ba81fa3c9bf66e25100e1/release/install.sh) && /bin/sh -c "$installer" sh "$@"' sh --status ``` ```powershell # Windows (replace -Status with -Clean or -Uninstall) -& ([scriptblock]::Create((Invoke-RestMethod -ErrorAction Stop https://raw.githubusercontent.com/lanl/chatty/ca9b9f3ffa1d1fcb623a02c8d2bc3e29ad9ad11b/release/install.ps1))) -Status +& ([scriptblock]::Create((Invoke-RestMethod -ErrorAction Stop https://raw.githubusercontent.com/lanl/chatty/71684288d746cdc73e5ba81fa3c9bf66e25100e1/release/install.ps1))) -Status ``` Keep your corpus and LitKit workspace (including its indices) in your own working From 0825e2de36a1ff4bd558d5db0784e77550d54b0b Mon Sep 17 00:00:00 2001 From: Bill Hlavacek Date: Fri, 4 Dec 2026 23:39:19 -0700 Subject: [PATCH 05/10] Give the published quickstart check Tesseract in native verification Chatty 0.6.0's quickstart check OCRs the Truslow scan with Tesseract and expects 70 OCR pages, but the verification runners never installed it and the test user's PATH holds only OS tools. Install Tesseract with English data on all four runners, as the quickstart workflow does, record its path, and add only that executable to the PATH of the quickstart check. Note in the quickstart that the installer doesn't supply Tesseract. Signed-off-by: Bill Hlavacek --- .github/workflows/laptop-verify.yml | 28 ++++++++++++++++++++++++++++ docs/laptop-quickstart.md | 2 +- release/README.md | 3 ++- release/verify.py | 18 +++++++++++++++++- 4 files changed, 48 insertions(+), 3 deletions(-) diff --git a/.github/workflows/laptop-verify.yml b/.github/workflows/laptop-verify.yml index 14b0d5c..d6b851b 100644 --- a/.github/workflows/laptop-verify.yml +++ b/.github/workflows/laptop-verify.yml @@ -83,6 +83,34 @@ jobs: context = {key: os.environ[key] for key in keys} path = Path(os.environ["RUNNER_TEMP"]) / "instructions/release/runner.json" path.write_text(json.dumps(context), encoding="utf-8") + - name: Install Tesseract for the quickstart's historical scan (Linux) + if: runner.os == 'Linux' + run: sudo apt-get update -qq && sudo apt-get install -y tesseract-ocr tesseract-ocr-eng + - name: Install Tesseract for the quickstart's historical scan (macOS) + if: runner.os == 'macOS' + run: command -v tesseract || brew install tesseract + - name: Install Tesseract for the quickstart's historical scan (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: | + for ($attempt = 1; $attempt -le 3; $attempt++) { + choco install tesseract --yes --no-progress + if ($LASTEXITCODE -eq 0) { break } + Start-Sleep -Seconds 30 + } + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + Join-Path $env:ProgramFiles 'Tesseract-OCR' >> $env:GITHUB_PATH + - name: Give the test user's quickstart English OCR + shell: python + run: | + import json, os, shutil, subprocess + from pathlib import Path + tesseract = shutil.which("tesseract") + assert tesseract, "Tesseract is not on PATH" + languages = subprocess.check_output([tesseract, "--list-langs"], text=True) + assert "eng" in languages.splitlines(), languages + path = Path(os.environ["RUNNER_TEMP"]) / "instructions/release/ocr.json" + path.write_text(json.dumps({"tesseract": str(Path(tesseract).resolve())}), encoding="utf-8") - name: Verify as a standard macOS user if: runner.os == 'macOS' shell: bash diff --git a/docs/laptop-quickstart.md b/docs/laptop-quickstart.md index ae3775a..7567153 100644 --- a/docs/laptop-quickstart.md +++ b/docs/laptop-quickstart.md @@ -1,6 +1,6 @@ # Index a folder and retrieve your first passage -The [published laptop installer](../README.md#laptop-release-chatty-text-fetch-and-lanl-litkit) supplies the Los Alamos demo and everything else on this page except the desktop integration, starting with laptop suite 2026.12.4. To work from a checkout instead, install the indexing tools with Python 3.12 and uv (`uv sync --locked --python 3.12 --extra index`), then activate the environment (`source .venv/bin/activate` or `.venv\Scripts\Activate.ps1`). +The [published laptop installer](../README.md#laptop-release-chatty-text-fetch-and-lanl-litkit) supplies the Los Alamos demo and everything else on this page except Tesseract and the desktop integration, starting with laptop suite 2026.12.4. To work from a checkout instead, install the indexing tools with Python 3.12 and uv (`uv sync --locked --python 3.12 --extra index`), then activate the environment (`source .venv/bin/activate` or `.venv\Scripts\Activate.ps1`). Laptop suite 2026.12.3 includes the earlier rain-gauge demo. If you installed that suite, follow its [versioned quickstart](https://github.com/lanl/chatty/blob/3612d5be0421546940b5701525a4d8cb9f212e5a/docs/laptop-quickstart.md). diff --git a/release/README.md b/release/README.md index f65c7c3..37ca6d5 100644 --- a/release/README.md +++ b/release/README.md @@ -79,7 +79,8 @@ today's package index is only part of cutting a **new** set. prerelease before promotion. **Verify published laptop wheels** runs the literal commands from outside a checkout as standard users on all four targets. Only OS tools are on the install - PATH. The verifier checks the published installer bytes, all reported wheels, + PATH. The workflow installs Tesseract with English data, as a user would for scanned + PDFs, and adds only Tesseract to the PATH of the quickstart check. The verifier checks the published installer bytes, all reported wheels, symlink collision guards in `~/.local/bin`, shell hygiene (no unsolicited Bash dotfiles on zsh-only Macs, fish support, normal dotfile umask), fresh-shell command discovery, the managed Python and Chatty's LitKit imports. diff --git a/release/verify.py b/release/verify.py index 85b41bd..f84c105 100644 --- a/release/verify.py +++ b/release/verify.py @@ -91,6 +91,21 @@ def install_environment(tmp: Path) -> dict[str, str]: return env +def with_tesseract(path: str, cwd: Path) -> str: + """Add the Tesseract a user installs for scanned PDFs, and no other system tool.""" + recorded = HERE / "ocr.json" + if not recorded.exists(): + return path + tesseract = Path(json.loads(recorded.read_bytes())["tesseract"]) + if WINDOWS: + directory = tesseract.parent + else: + directory = cwd / "ocr tools" + directory.mkdir(exist_ok=True) + (directory / "tesseract").symlink_to(tesseract) + return os.pathsep.join((path, str(directory))) + + def fresh_shell(command: str, cwd: Path, env: dict[str, str]) -> str: if WINDOWS: # A child of the original shell otherwise inherits its pre-install PATH. @@ -392,7 +407,8 @@ def active_runtime(expected_root: Path | None = None) -> Path: ) as response: local_file.write_bytes(response.read()) quickstart = cwd / "研究 field notes" - fresh_env = {**env, "PATH": fresh_shell(path_command, work, env)} + fresh_path = with_tesseract(fresh_shell(path_command, work, env), cwd) + fresh_env = {**env, "PATH": fresh_path} subprocess.run( [ str(initial / python_path), From 15fe4b2d6310c43eac5816a8d40ff6f43cc98b85 Mon Sep 17 00:00:00 2001 From: Bill Hlavacek Date: Fri, 4 Dec 2026 23:58:00 -0700 Subject: [PATCH 06/10] Wait for running suite programs before uninstalling on Windows Chatty 0.6.0 keeps a search worker alive for 60 idle seconds, and Windows won't delete the files a running program has loaded. Native verification uninstalled right after the quickstart's searches, and -Uninstall stopped at a locked extension module after it had already changed the user PATH. -Uninstall and -Clean now wait up to 90 seconds for processes running from the suite folder to exit, and fail with their process IDs before changing anything if they don't. Signed-off-by: Bill Hlavacek --- CHANGELOG.md | 1 + release/install.ps1 | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 983878e..045a86f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - On Windows, a query against a corpus with its own model cache releases the model files when it finishes, and piped JSON output stays readable on non-UTF-8 code pages. - The chat UI ignores a context-window response that arrives after it starts shutting down. - On a Linux NFS home directory, the laptop suite installer's lifecycle commands take an exclusive lock, so two clients can't install, upgrade or uninstall at once. +- On Windows, the laptop suite installer's `-Uninstall` and `-Clean` wait up to 90 seconds for running Chatty programs, such as the search worker, to exit before removing files, and otherwise stop without changing anything. ## [0.5.0] - 2026-12-03 diff --git a/release/install.ps1 b/release/install.ps1 index a583bb9..90e317e 100644 --- a/release/install.ps1 +++ b/release/install.ps1 @@ -75,6 +75,29 @@ function Invoke-SuiteLifecycle { } } + function Wait-SuiteIdle { + # Windows locks the files of running programs. Chatty's search worker exits after 60 idle seconds. + $prefix = $root.TrimEnd('\') + '\' + $deadline = (Get-Date).AddSeconds(90) + $announced = $false + while ($true) { + $busy = @(Get-Process -ErrorAction SilentlyContinue | Where-Object { + $path = $null + try { $path = $_.Path } catch { } + $path -and $path.StartsWith($prefix, [StringComparison]::OrdinalIgnoreCase) + }) + if ($busy.Count -eq 0) { return } + if ((Get-Date) -ge $deadline) { + throw "Chatty Suite programs are still running from $root (process $(($busy | ForEach-Object { $_.Id }) -join ', ')). Close them and rerun this command." + } + if (-not $announced) { + Write-Host 'Waiting up to 90 seconds for running Chatty Suite programs to exit...' + $announced = $true + } + Start-Sleep -Seconds 2 + } + } + function Get-PathRuntime($RegKey, $RawOpt) { if (-not $RegKey) { return $null } $userPath = $RegKey.GetValue('Path', '', $RawOpt) @@ -161,6 +184,7 @@ function Invoke-SuiteLifecycle { if ($registry) { $registry.Close() } } if (-not $activeRt -and @(Get-ManagedRuntimes).Count) { throw "Cannot identify the active suite. Rerun the installer before cleaning." } + Wait-SuiteIdle $removed = 0 [long]$reclaimed = 0 foreach ($dir in @(Get-ManagedRuntimes)) { @@ -180,6 +204,7 @@ function Invoke-SuiteLifecycle { # --- Lifecycle: -Uninstall --- if ($Uninstall) { if (-not (Test-SuiteHome)) { Write-Host "No suite files to uninstall at $root."; return } + Wait-SuiteIdle $registry = [Microsoft.Win32.Registry]::CurrentUser.CreateSubKey('Environment') $raw = [Microsoft.Win32.RegistryValueOptions]::DoNotExpandEnvironmentNames $pathCleaned = $false From eb139680ed24f9a1dfe8e19190ef0f7fa3cb5fc3 Mon Sep 17 00:00:00 2001 From: Bill Hlavacek Date: Fri, 4 Dec 2026 23:58:04 -0700 Subject: [PATCH 07/10] Pin the README install commands to the updated 2026.12.4 installers Signed-off-by: Bill Hlavacek --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index adcf753..307198f 100644 --- a/README.md +++ b/README.md @@ -20,14 +20,14 @@ On a Linux NFS home with remote locking enabled, lifecycle commands use a privat ```bash -/bin/sh -c 'installer=$(curl -fsSL https://raw.githubusercontent.com/lanl/chatty/71684288d746cdc73e5ba81fa3c9bf66e25100e1/release/install.sh) && /bin/sh -c "$installer" sh "$@"' sh +/bin/sh -c 'installer=$(curl -fsSL https://raw.githubusercontent.com/lanl/chatty/15fe4b2d6310c43eac5816a8d40ff6f43cc98b85/release/install.sh) && /bin/sh -c "$installer" sh "$@"' sh ``` **Windows x64** (64-bit Windows PowerShell 5.1 or PowerShell 7) ```powershell -& ([scriptblock]::Create((Invoke-RestMethod -ErrorAction Stop https://raw.githubusercontent.com/lanl/chatty/71684288d746cdc73e5ba81fa3c9bf66e25100e1/release/install.ps1))) +& ([scriptblock]::Create((Invoke-RestMethod -ErrorAction Stop https://raw.githubusercontent.com/lanl/chatty/15fe4b2d6310c43eac5816a8d40ff6f43cc98b85/release/install.ps1))) ``` Open a fresh terminal (or run the `export PATH` command printed by the Linux or macOS installer; on Windows, close all Windows Terminal windows first). @@ -55,12 +55,12 @@ or uninstall suite-owned files while preserving other files in the installation ```bash # Linux and macOS (replace --status with --clean or --uninstall) -/bin/sh -c 'installer=$(curl -fsSL https://raw.githubusercontent.com/lanl/chatty/71684288d746cdc73e5ba81fa3c9bf66e25100e1/release/install.sh) && /bin/sh -c "$installer" sh "$@"' sh --status +/bin/sh -c 'installer=$(curl -fsSL https://raw.githubusercontent.com/lanl/chatty/15fe4b2d6310c43eac5816a8d40ff6f43cc98b85/release/install.sh) && /bin/sh -c "$installer" sh "$@"' sh --status ``` ```powershell # Windows (replace -Status with -Clean or -Uninstall) -& ([scriptblock]::Create((Invoke-RestMethod -ErrorAction Stop https://raw.githubusercontent.com/lanl/chatty/71684288d746cdc73e5ba81fa3c9bf66e25100e1/release/install.ps1))) -Status +& ([scriptblock]::Create((Invoke-RestMethod -ErrorAction Stop https://raw.githubusercontent.com/lanl/chatty/15fe4b2d6310c43eac5816a8d40ff6f43cc98b85/release/install.ps1))) -Status ``` Keep your corpus and LitKit workspace (including its indices) in your own working From bfc65814b7e024ff5750c2e7ad7febcf19d9af25 Mon Sep 17 00:00:00 2001 From: Bill Hlavacek Date: Sat, 5 Dec 2026 00:01:02 -0700 Subject: [PATCH 08/10] Wait only for programs running from the files being removed -Clean keeps the active runtime, so an open chatty chat or a running index there shouldn't block it. -Clean now waits only for processes launched from the inactive runtimes it removes (each runtime's launcher lives as long as its interpreter), and -Uninstall for processes from the runtimes and the private Python. This also keeps a drive-root -Prefix from matching unrelated programs. Record the change under Unreleased, since the Chatty 0.6.0 wheel predates it. Signed-off-by: Bill Hlavacek --- CHANGELOG.md | 5 ++++- release/install.ps1 | 22 ++++++++++++++-------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 045a86f..796c253 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- On Windows, the laptop suite installer's `-Uninstall` and `-Clean` wait up to 90 seconds for Chatty programs running from the files they remove, such as the search worker, to exit, and otherwise stop without changing anything. First shipped in laptop suite 2026.12.4. + ## [0.6.0] - 2026-12-04 ### Added @@ -37,7 +41,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - On Windows, a query against a corpus with its own model cache releases the model files when it finishes, and piped JSON output stays readable on non-UTF-8 code pages. - The chat UI ignores a context-window response that arrives after it starts shutting down. - On a Linux NFS home directory, the laptop suite installer's lifecycle commands take an exclusive lock, so two clients can't install, upgrade or uninstall at once. -- On Windows, the laptop suite installer's `-Uninstall` and `-Clean` wait up to 90 seconds for running Chatty programs, such as the search worker, to exit before removing files, and otherwise stop without changing anything. ## [0.5.0] - 2026-12-03 diff --git a/release/install.ps1 b/release/install.ps1 index 90e317e..501193e 100644 --- a/release/install.ps1 +++ b/release/install.ps1 @@ -75,20 +75,26 @@ function Invoke-SuiteLifecycle { } } - function Wait-SuiteIdle { + function Wait-SuiteIdle([string[]]$Paths) { # Windows locks the files of running programs. Chatty's search worker exits after 60 idle seconds. - $prefix = $root.TrimEnd('\') + '\' + # A runtime's Scripts\python.exe launcher lives as long as the interpreter it starts. + $prefixes = @($Paths | Where-Object { $_ } | ForEach-Object { $_.TrimEnd('\') + '\' }) + if ($prefixes.Count -eq 0) { return } $deadline = (Get-Date).AddSeconds(90) $announced = $false while ($true) { $busy = @(Get-Process -ErrorAction SilentlyContinue | Where-Object { $path = $null try { $path = $_.Path } catch { } - $path -and $path.StartsWith($prefix, [StringComparison]::OrdinalIgnoreCase) + if (-not $path) { return $false } + foreach ($prefix in $prefixes) { + if ($path.StartsWith($prefix, [StringComparison]::OrdinalIgnoreCase)) { return $true } + } + return $false }) if ($busy.Count -eq 0) { return } if ((Get-Date) -ge $deadline) { - throw "Chatty Suite programs are still running from $root (process $(($busy | ForEach-Object { $_.Id }) -join ', ')). Close them and rerun this command." + throw "Chatty Suite programs are still running from $($Paths -join ', ') (process $(($busy | ForEach-Object { $_.Id }) -join ', ')). Close them and rerun this command." } if (-not $announced) { Write-Host 'Waiting up to 90 seconds for running Chatty Suite programs to exit...' @@ -184,11 +190,11 @@ function Invoke-SuiteLifecycle { if ($registry) { $registry.Close() } } if (-not $activeRt -and @(Get-ManagedRuntimes).Count) { throw "Cannot identify the active suite. Rerun the installer before cleaning." } - Wait-SuiteIdle + $inactive = @(Get-ManagedRuntimes | Where-Object { $_.FullName -notin @($activeRt, $pathRuntime) }) + Wait-SuiteIdle @($inactive | ForEach-Object { $_.FullName }) $removed = 0 [long]$reclaimed = 0 - foreach ($dir in @(Get-ManagedRuntimes)) { - if ($dir.FullName -in @($activeRt, $pathRuntime)) { continue } + foreach ($dir in $inactive) { $reclaimed += Get-DirectorySize $dir.FullName Remove-Item -LiteralPath $dir.FullName -Recurse -Force $removed++ @@ -204,7 +210,7 @@ function Invoke-SuiteLifecycle { # --- Lifecycle: -Uninstall --- if ($Uninstall) { if (-not (Test-SuiteHome)) { Write-Host "No suite files to uninstall at $root."; return } - Wait-SuiteIdle + Wait-SuiteIdle @($runtimes, $pythonHome) $registry = [Microsoft.Win32.Registry]::CurrentUser.CreateSubKey('Environment') $raw = [Microsoft.Win32.RegistryValueOptions]::DoNotExpandEnvironmentNames $pathCleaned = $false From bab38e81611768dce5025a14c8230ad7d09ba0da Mon Sep 17 00:00:00 2001 From: Bill Hlavacek Date: Sat, 5 Dec 2026 00:01:02 -0700 Subject: [PATCH 09/10] Pin the README install commands to the updated 2026.12.4 installers The installers changed again in review. Signed-off-by: Bill Hlavacek --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 307198f..dc10c32 100644 --- a/README.md +++ b/README.md @@ -20,14 +20,14 @@ On a Linux NFS home with remote locking enabled, lifecycle commands use a privat ```bash -/bin/sh -c 'installer=$(curl -fsSL https://raw.githubusercontent.com/lanl/chatty/15fe4b2d6310c43eac5816a8d40ff6f43cc98b85/release/install.sh) && /bin/sh -c "$installer" sh "$@"' sh +/bin/sh -c 'installer=$(curl -fsSL https://raw.githubusercontent.com/lanl/chatty/bfc65814b7e024ff5750c2e7ad7febcf19d9af25/release/install.sh) && /bin/sh -c "$installer" sh "$@"' sh ``` **Windows x64** (64-bit Windows PowerShell 5.1 or PowerShell 7) ```powershell -& ([scriptblock]::Create((Invoke-RestMethod -ErrorAction Stop https://raw.githubusercontent.com/lanl/chatty/15fe4b2d6310c43eac5816a8d40ff6f43cc98b85/release/install.ps1))) +& ([scriptblock]::Create((Invoke-RestMethod -ErrorAction Stop https://raw.githubusercontent.com/lanl/chatty/bfc65814b7e024ff5750c2e7ad7febcf19d9af25/release/install.ps1))) ``` Open a fresh terminal (or run the `export PATH` command printed by the Linux or macOS installer; on Windows, close all Windows Terminal windows first). @@ -55,12 +55,12 @@ or uninstall suite-owned files while preserving other files in the installation ```bash # Linux and macOS (replace --status with --clean or --uninstall) -/bin/sh -c 'installer=$(curl -fsSL https://raw.githubusercontent.com/lanl/chatty/15fe4b2d6310c43eac5816a8d40ff6f43cc98b85/release/install.sh) && /bin/sh -c "$installer" sh "$@"' sh --status +/bin/sh -c 'installer=$(curl -fsSL https://raw.githubusercontent.com/lanl/chatty/bfc65814b7e024ff5750c2e7ad7febcf19d9af25/release/install.sh) && /bin/sh -c "$installer" sh "$@"' sh --status ``` ```powershell # Windows (replace -Status with -Clean or -Uninstall) -& ([scriptblock]::Create((Invoke-RestMethod -ErrorAction Stop https://raw.githubusercontent.com/lanl/chatty/15fe4b2d6310c43eac5816a8d40ff6f43cc98b85/release/install.ps1))) -Status +& ([scriptblock]::Create((Invoke-RestMethod -ErrorAction Stop https://raw.githubusercontent.com/lanl/chatty/bfc65814b7e024ff5750c2e7ad7febcf19d9af25/release/install.ps1))) -Status ``` Keep your corpus and LitKit workspace (including its indices) in your own working From d832165b0da0a5dcf9e8e3dc48f2613e20497d49 Mon Sep 17 00:00:00 2001 From: Bill Hlavacek Date: Sat, 5 Dec 2026 00:29:07 -0700 Subject: [PATCH 10/10] Wait for the search worker before simulating a damaged runtime on Windows The repair check deletes a FAISS extension right after a search. On Windows the 0.6.0 search worker still has it loaded for up to 60 idle seconds, so the deletion was denied. Retry the deletion on Windows for up to 90 seconds. Signed-off-by: Bill Hlavacek --- release/verify.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/release/verify.py b/release/verify.py index f84c105..8ecbc45 100644 --- a/release/verify.py +++ b/release/verify.py @@ -106,6 +106,19 @@ def with_tesseract(path: str, cwd: Path) -> str: return os.pathsep.join((path, str(directory))) +def remove_when_unloaded(path: Path) -> None: + """Delete a module once Windows releases it. Chatty's search worker exits after 60 idle seconds.""" + deadline = time.monotonic() + 90 + while True: + try: + path.unlink() + return + except PermissionError: + if not WINDOWS or time.monotonic() > deadline: + raise + time.sleep(2) + + def fresh_shell(command: str, cwd: Path, env: dict[str, str]) -> str: if WINDOWS: # A child of the original shell otherwise inherits its pre-install PATH. @@ -550,7 +563,7 @@ def check_preserved() -> None: extensions = list(site.glob("_swigfaiss*.pyd" if WINDOWS else "_swigfaiss*.so")) assert extensions, site for extension in extensions: - extension.unlink() + remove_when_unloaded(extension) install(command, cwd, env) repaired = active_runtime() assert repaired != active