Skip to content

Zimi 1.15.6 - #154

Merged
epheterson merged 59 commits into
mainfrom
v1.15.6
Nov 11, 2026
Merged

epheterson merged 59 commits into
mainfrom
v1.15.6

Conversation

@epheterson

@epheterson epheterson commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Zimi

Games and Almanac

  • Fixes and Kiwix compatibility, so both ZIMs can be shared with the community.

Summary by cubic

Releases 1.15.6 with portable voice fixes, Kiwix-ready Games and Almanac ZIMs, and a multilingual Almanac.

Voices

  • Voice models missing their engine now show a Set up button and install in one tap without re-downloading model files.
  • External programs launched from a frozen app get the machine's environment instead of the bundle's libraries and PYTHONHOME, fixing voice setup on the portable Linux build.

Games and Almanac

  • Add World favorites and release-based New shelf rows, a Snake walls setting, and a credit line when read outside Zimi.
  • Word games draw words from the largest English Wiktionary instead of falling back to built-in words.
  • Fix Wiki Race accepting late results, the credit-line loader breaking Watch and learn, three-dimensional pinch zooming by the fingers' spread, and layout issues in RTL, at 360 px, in print, and on iPhone.
  • The Almanac ZIM now follows the browser's language across ten languages, with credits for every Golden Record picture.
  • Adds build_games_kiwix.py and build_almanac_kiwix.py so both ZIMs open cleanly in Kiwix; the community Almanac carries only the 8 public-domain NASA photographs and names the other 41.

Written for commit f6ce223. Summary will update on new commits.

View guided diff Turn on auto-fix

Summary by Sourcery

Improve portable voice setup and external-process behavior while making Games and Almanac ZIMs reliable, localized, and shareable through Kiwix.

New Features:

  • Add one-tap setup for downloaded voices whose engine is missing, including portable Linux support and accurate setup progress information.
  • Add World favorites, release-based New rows, Snake wall modes, localized Almanac content, and standalone ZIM credit lines.
  • Provide openZIM/Kiwix community build scripts for Games and Almanac editions with compatible metadata and public-domain-only Almanac imagery.

Bug Fixes:

  • Prevent frozen-app environment variables from breaking external Python, npm, Docker, and other programs.
  • Fix Kiwix catalog and viewer compatibility, Wiktionary selection, Wiki Race late results, game labels, RTL clock and date rendering, card-table safe-area layout, and script-loader conflicts.
  • Improve Golden Record attribution and omit non-public-domain images from community editions while preserving their credits.

Enhancements:

  • Extend ZIM metadata handling with long descriptions, licenses, and sources, and add build-year metadata for external credit lines.

CI:

  • Strengthen portable-build smoke checks for external program environment leakage.

Tests:

  • Add broad browser, voice setup, Kiwix compatibility, Golden Record, environment, metadata, and game behavior coverage.

Chores:

  • Release version 1.15.6 and refresh bundled Games and Almanac ZIM artifacts.

epheterson and others added 28 commits November 10, 2026 21:36
…h, not the bundle's

PyInstaller's bootloader points LD_LIBRARY_PATH at its folder; the machine's python3 then loaded the bundle's older libssl and pip had no ssl. One helper in subproc (external_env) used by popen and run; doctor probes it for the portable smoke test.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e tap to set up

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ove them

The labels of a row share a grid line (subgrid): the row is as tall as its tallest label and the values stay on one line. Without subgrid the old rule holds.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
….txt sets LongDescription, License and Source; the build year rides in each ZIM

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…World favorites and New rows

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…in the viewer, library games find their books, word games read the biggest English Wiktionary, a needs-scripts note, the credit line last, Snake walls, Wiki Race, the bar and card-table fixes

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…the free ones

The gallery said its pictures were NASA public domain and decoded from
the record's sound. They are NASA's scans of the originals, and only 8
of the 49 are NASA photographs; 41 are copyright Jon Lomberg, UN
Photo, Frank Drake, NAIC/Cornell, Jay M. Pasachoff and Picturepoint.

golden-record/credits.json is now the table the gallery draws from
(file, caption, credit, public domain), in the record's order. Each
picture shows its caption and credit; a note under the gallery says
who owns what. scripts/build_almanac_kiwix.py builds the Almanac for
openZIM/Kiwix (almanacstage community): the 41 left out, each drawn as
a card with its caption and credit. Zimi's own Almanac keeps all 49.
SOURCES.txt and the ZIM's zimi.txt list the pictures and owners.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… and credit stand under it

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… leaves out

Eric: no page or placeholder per picture. The gallery is one list in
the record's order, each picture beside its number, title and credit;
a tap still enlarges it. The Kiwix Almanac names each of the 41
pictures it leaves out as one line (number, title, credit) and says
once why; the enlarged view steps over them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
build_almanac_kiwix.py stages into a folder named for the scope (the
Name is zimi_<language>_<folder>) and sets the Title, both options.
Tests run the gallery's own code on each edition's table: 49 picture
rows in Zimi; 8 picture rows and 41 text rows in the Kiwix copy.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… toolbar, the credit line drawn by local.js as the page's last line

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…h openZIM's Name, Title and languages; Description and LongDescription can be given or changed in one line

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…hort one, the Golden Record sentence says once what is shown and what is named

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…anac; the standalone Almanac's 3D gear is not drawn (everything in it needs Zimi's server); the Kiwix Almanac is named zimi_en_almanac

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… the browser's language picks them, html lang and dir follow, dates and numbers through the language; the Kiwix edition is zimi_mul_almanac with the ten languages in its metadata

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…gear in the standalone 3D view

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…med as its Title is

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…month name is its own run in a right-to-left row, head labels take a second line instead of being cut, tiles in a row share a height

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

🧙 Sourcery has finished reviewing your pull request!


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 security issue, and 12 other issues

Security issues:

  • Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'. (link)

Fixed security issues:

  • Command injection from untrusted input passed to OS command execution (link) · Dashboard
Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="zimi/builtin/games/librarykit.js" line_range="156" />
<code_context>
-      out.push({ name: name, title: xmlText(e, 'title') || name, language: ISO3[lang] || (lang.length === 2 ? lang : code) || lang,
+      // A book's address in kiwix-serve is its file's name (wikipedia_en_all_maxi_2026-01), not its Name (wikipedia_en_all):
+      // the entry's text/html link says which. <name> still tells the project and the language.
+      var link = /<link[^>]*\btype="text\/html"[^>]*\bhref="[^"]*\/content\/([^"\/]+)"/.exec(e);
+      out.push({ name: link ? decodeURIComponent(link[1]) : name, title: xmlText(e, 'title') || name, language: ISO3[lang] || (lang.length === 2 ? lang : code) || lang,
         kind: wiki ? 'wiki' : 'zim', project: tok, article_count: +xmlText(e, 'articleCount') || 0, main_path: '' });
</code_context>
<issue_to_address>
**Dated ZIMs use the wrong book address**

When a Kiwix catalog puts `href` before `type` on a text/html link, `parseCatalog` only matches `type` before `href`, so it falls back to the ZIM’s `<name>` instead of its filename; article requests target the wrong book and library-backed games cannot load its pages.

Match the text/html link’s `type` and `href` attributes regardless of their order.
</issue_to_address>

### Comment 2
<location path="zimi/static/almanac.js" line_range="8423-8424" />
<code_context>
+// file, caption, who it is by and whether it is public domain. The Almanac built for Kiwix
+// (almanacstage, community) marks the copyrighted ones omitted and leaves their files out:
+// those are named in the list as a line of text (number, title, credit), so the sequence stays whole.
+var _GR_CREDITS_URL = '/static/golden-record/credits.json';
+var _GR_DIR = '/static/golden-record/';
+var _grImages = null;
+async function _loadGrCredits() {
</code_context>
<issue_to_address>
**Golden Record gallery is empty**

When the Almanac is served from a Kiwix book path that does not map `/static/` at the host root, `_loadGrCredits` requests credits from the host-root `/static/` path and its catch handler sets `_grImages` to `[]`; `_GR_DIR` also points image requests outside the book, so the gallery has no entries or images.

Resolve the credits and image URLs relative to the current book path.
</issue_to_address>

### Comment 3
<location path="zimi/subproc.py" line_range="125" />
<code_context>
+def run(cmd, **kwargs):
+    """``subprocess.run`` for a short probe, with the same environment rule as
+    ``popen``."""
+    return subprocess.run(cmd, **_for_program(cmd, kwargs))


</code_context>
<issue_to_address>
**Docker probes inherit bundled libraries**

When a portable frozen build runs Zimit with Docker available but the bootloader's library path breaks the Docker CLI, `zimi.crawler._probe` and `_image_supports_flag` still invoke `subprocess.run` directly rather than this wrapper. In a frozen portable build, Docker inherits the bundled library path, so the daemon probe fails and Zimi reports Docker as unavailable even when it is installed and running.

Route the Docker probes through `subproc.run` so they receive the cleaned external environment.
</issue_to_address>

### Comment 4
<location path="zimi/subproc.py" line_range="87" />
<code_context>
+    bundle = _bundle_dirs()
+    for name in _PYTHON_PATHS:
+        if any(d in env.get(name, "") for d in bundle):
+            env.pop(name)
+    for name in [k for k in env if k.startswith(_PYI_PREFIX)]:
+        del env[name]
</code_context>
<issue_to_address>
**Custom Python paths disappear**

When a frozen app's `PYTHONPATH` contains both a bundle directory and a user module directory, `external_env` removes the entire `PYTHONPATH` when it contains a bundle directory, including unrelated user paths; an external Python child then cannot import modules available only on those paths.

Remove only bundle-directory entries from `PYTHONPATH`, preserving the remaining entries.
</issue_to_address>

### Comment 5
<location path="zimi/builtin/games/wikirace.js" line_range="318" />
<code_context>
     provider.open(path).then(function (page) {
       busy = false;
+      // A page that arrives after the race ended (Give up, New game, a slow disk) counts for nothing: one race, one result.
+      if (race !== mine || race.done) return;
       race.steps.push({ path: page.path, title: page.title, via: 'link' });
       saveDaily();
</code_context>
<issue_to_address>
**Stale loads unlock the new race**

When a player gives up or starts a new race while an old page request is pending, then starts a page request in the new race before the old request settles, an old `go` or `goBack` completion clears the shared `busy` flag before checking whether its captured race is still current. If the player has started another race and a page is loading there, the stale completion unlocks it; another click starts a concurrent load, and their pages can be appended in completion order rather than click order. The old `go` rejection handler also writes its error into the current race’s status.

Check that the captured race is still current before changing `busy` or the UI in every success and failure handler.

Also at `zimi/builtin/games/wikirace.js:332`.
</issue_to_address>

### Comment 6
<location path="scripts/build_almanac_kiwix.py" line_range="70-74" />
<code_context>
+        set_fields(dest, Title=title, Language=LANGUAGES, Description=description or DESCRIPTION, LongDescription=long_description or LONG_DESCRIPTION)
+        # The Name is set outright: creator derives it from the Language metadata's 3-letter code (zimi_eng_...).
+        real = creator.zim_name
+        creator.zim_name = lambda scope, language="eng": name
+        try:
+            creator.create_folder_zim(dest, out_path=path, register=False, extra_items=ownzims.with_build_year())
+        finally:
+            creator.zim_name = real
+    return path
+
</code_context>
<issue_to_address>
**Concurrent builds write incorrect ZIM names**

When kiwix build functions overlap another ZIM build in the same Python process, both build functions replace the process-wide `creator.zim_name` while packaging, so a build can write another build’s Name metadata and out-of-order restores can leave a stale naming function installed; the archives have incorrect names and later builds can inherit them.

Prevent concurrent builds from sharing a temporarily replaced `creator.zim_name`, or avoid mutating that process-wide function.

Also at `scripts/build_games_kiwix.py:41-46`.
</issue_to_address>

### Comment 7
<location path="zimi/ownzims.py" line_range="369-372" />
<code_context>
         for stale in (new, new + ".tmp"):
             if os.path.exists(stale):
                 os.remove(stale)
-        creator.create_folder_zim(folder, out_path=new, register=False)
+        creator.create_folder_zim(folder, out_path=new, register=False, extra_items=with_build_year())
         os.replace(new, path)
         with open(path + _STAMP_EXT, "w", encoding="ascii") as f:
             f.write(want + "\n")
</code_context>
<issue_to_address>
**Concurrent own-ZIM builds collide**

When two build processes or callers build the same own ZIM at the same time, two `build()` calls for the same ZIM can select the same output and `.new.zim` paths. One call can remove or replace the other’s in-progress file, so a build fails or a stamp can describe a different archive than the one left on disk.

Serialize builds per own ZIM or give each build a unique temporary output path and atomically publish only its completed archive and matching stamp.
</issue_to_address>

### Comment 8
<location path="zimi/static/app.js" line_range="1383" />
<code_context>
   }
   var offer = null, nat = e === 'kokoro' && _voiceNatural();
-  if (nat && nat.runnable && !nat.installed && _naturalLangs(nat).indexOf(lang) >= 0) offer = nat;
+  if (nat && nat.runnable && (!nat.installed || nat.needs_setup) && _naturalLangs(nat).indexOf(lang) >= 0) offer = nat;
   if (e === 'piper' && row && row.piper && !row.piper.newer) offer = row.piper;
   if (offer && dl.tag === offer.tag) return { s: 'busy', tag: offer.tag };
</code_context>
<issue_to_address>
**Piper setup appears as a download**

When an installed Piper voice needs its missing engine set up and appears as a language-grid offer, `_voiceCell` ignores the Piper offer’s `setup` flag, so it returns the generic get state and Settings shows “Get” instead of “Set up,” although no voice model will be downloaded.

Have the Piper offer path render the setup action when `piper.setup` is true.

Also at `zimi/voices.py:2413`.
</issue_to_address>

### Comment 9
<location path="zimi/voices.py" line_range="2158" />
<code_context>
         return
     tag = _offer_tag(lang, accent)
-    if tag and tag not in installed() and _usable(VOICES[tag].engine):
+    if tag and _usable(VOICES[tag].engine) and (tag not in installed() or _needs_setup(tag, installed()[tag])):
         start_download(tag)

</code_context>
<issue_to_address>
**Voice removal races automatic setup**

When a voice is removed while `_maybe_fetch` checks a setup-only installed voice, when `remove(tag)` deletes an installed record after the first `installed()` check but before the second, `_maybe_fetch` indexes the now-missing tag and raises `KeyError` instead of completing its automatic setup check.

Read `installed()` once into a local mapping and use that snapshot for both membership and record lookup.
</issue_to_address>

### Comment 10
<location path="zimi/builtin/games/recent.js" line_range="362" />
<code_context>
+  function newSection(rows) {
+    var latest = '';
+    (rows || []).forEach(function (r) { if (r && r.added && (!latest || newer(r.added, latest))) latest = r.added; });
+    if (!latest) return null;
+    // Dealt one kind at a time (ten solitaires in a row would be one picture), the smallest kinds leading.
+    var kinds = {}, tiles = [];
</code_context>
<issue_to_address>
**New games row never appears**

When the shipped `games.json` has no `added` fields, as in this diff, `newSection` returns `null`, so the shelf never shows the New row and players cannot discover games added in the current release.

Add an `added` release value to each game that should appear in the New row and make the test require that release data exists.
</issue_to_address>

### Comment 11
<location path="tests/test_almanac_corners_browser.py" line_range="103" />
<code_context>
+            " return [...d.querySelectorAll('.alm-crossref-date')].map(e => e.innerHTML); }"
+        )
+        latin = [r for r in rows if "Aban" in r]
+        assert latin and '<bdi dir="ltr">Aban</bdi>' in latin[0], rows
+        # A row with no Latin in it is left alone.
+        assert any("bdi" not in r for r in rows), rows
</code_context>
<issue_to_address>
**Calendar test fails most months**

When the test runs outside the Persian month of Aban, `test_a_latin_month_is_its_own_run_in_a_hebrew_calendar_row` uses the current `_almSelectedJDN`, so line 103 fails when the Persian month is not Aban, even if RTL isolation works correctly.

Use a fixed Julian day known to fall in Aban, or assert isolation using the Latin month actually present for the chosen date.
</issue_to_address>

### Comment 12
<location path="tests/test_almanac_zim_languages_browser.py" line_range="72" />
<code_context>
+    first = page.evaluate(
+        "document.querySelector('#almanac-head .alm-card .alm-card-lbl').innerText.trim()"
+    )
+    assert (first.upper() == ENGLISH_FIRST_TILE) == (lang == "en"), first
+    view = "document.getElementById('almanac-view').innerText"
+    assert (
</code_context>
<issue_to_address>
**Wrong language strings pass**

When the page loads an incorrect non-English translation for a non-English locale, `test_the_page_follows_the_browsers_language` only checks that non-English locales do not show the English first-tile label; line 72 therefore passes if every non-English locale incorrectly shows the same other language's strings.

Assert the expected first-tile label for each tested locale, including the English fallback case.
</issue_to_address>

### Comment 13
<location path="zimi/subproc.py" line_range="125" />
<code_context>
    return subprocess.run(cmd, **_for_program(cmd, kwargs))
</code_context>
<issue_to_address>
**security (python.lang.security.audit.dangerous-subprocess-use-audit):** Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

*Source: opengrep*
</issue_to_address>

Sourcery assessment

Needs a human reviewer. 13 findings to address first, and if the voice setup path is wrong, it can leave an engine virtual environment installed on the user's machine, including when setup happens automatically; that is bounded and can be removed or rebuilt. The UI, game, and Kiwix changes otherwise cause runtime issues that reverting the release restores.

Blocking findings: zimi/builtin/games/librarykit.js:156, zimi/static/almanac.js:8424, zimi/subproc.py:125, zimi/subproc.py:87, zimi/builtin/games/wikirace.js:318, and 8 more


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread zimi/builtin/games/librarykit.js Resolved
Comment thread zimi/static/almanac.js
Comment on lines +8423 to +8424
var _GR_CREDITS_URL = '/static/golden-record/credits.json';
var _GR_DIR = '/static/golden-record/';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Golden Record gallery is empty

When the Almanac is served from a Kiwix book path that does not map /static/ at the host root, _loadGrCredits requests credits from the host-root /static/ path and its catch handler sets _grImages to []; _GR_DIR also points image requests outside the book, so the gallery has no entries or images.

Resolve the credits and image URLs relative to the current book path.

Prompt for AI agents
In `zimi/static/almanac.js` at lines 8423-8424:

**Golden Record gallery is empty**

When the Almanac is served from a Kiwix book path that does not map `/static/` at the host root, `_loadGrCredits` requests credits from the host-root `/static/` path and its catch handler sets `_grImages` to `[]`; `_GR_DIR` also points image requests outside the book, so the gallery has no entries or images.

Resolve the credits and image URLs relative to the current book path.

Comment thread zimi/subproc.py Resolved
Comment thread zimi/subproc.py Resolved
Comment thread zimi/builtin/games/wikirace.js Outdated
provider.open(path).then(function (page) {
busy = false;
// A page that arrives after the race ended (Give up, New game, a slow disk) counts for nothing: one race, one result.
if (race !== mine || race.done) return;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · Stale loads unlock the new race

When a player gives up or starts a new race while an old page request is pending, then starts a page request in the new race before the old request settles, an old go or goBack completion clears the shared busy flag before checking whether its captured race is still current. If the player has started another race and a page is loading there, the stale completion unlocks it; another click starts a concurrent load, and their pages can be appended in completion order rather than click order. The old go rejection handler also writes its error into the current race’s status.

Check that the captured race is still current before changing busy or the UI in every success and failure handler.

Also at zimi/builtin/games/wikirace.js:332.

Prompt for AI agents
In `zimi/builtin/games/wikirace.js` at line 318:

**Stale loads unlock the new race**

When a player gives up or starts a new race while an old page request is pending, then starts a page request in the new race before the old request settles, an old `go` or `goBack` completion clears the shared `busy` flag before checking whether its captured race is still current. If the player has started another race and a page is loading there, the stale completion unlocks it; another click starts a concurrent load, and their pages can be appended in completion order rather than click order. The old `go` rejection handler also writes its error into the current race’s status.

Check that the captured race is still current before changing `busy` or the UI in every success and failure handler.

Also at `zimi/builtin/games/wikirace.js:332`.

Comment thread zimi/voices.py Resolved
function newSection(rows) {
var latest = '';
(rows || []).forEach(function (r) { if (r && r.added && (!latest || newer(r.added, latest))) latest = r.added; });
if (!latest) return null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Medium · New games row never appears

When the shipped games.json has no added fields, as in this diff, newSection returns null, so the shelf never shows the New row and players cannot discover games added in the current release.

Add an added release value to each game that should appear in the New row and make the test require that release data exists.

Prompt for AI agents
In `zimi/builtin/games/recent.js` at line 362:

**New games row never appears**

When the shipped `games.json` has no `added` fields, as in this diff, `newSection` returns `null`, so the shelf never shows the New row and players cannot discover games added in the current release.

Add an `added` release value to each game that should appear in the New row and make the test require that release data exists.

Comment thread tests/test_almanac_corners_browser.py Resolved
Comment thread zimi/subproc.py
def run(cmd, **kwargs):
"""``subprocess.run`` for a short probe, with the same environment rule as
``popen``."""
return subprocess.run(cmd, **_for_program(cmd, kwargs))

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security (python.lang.security.audit.dangerous-subprocess-use-audit): Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.

Source: opengrep

epheterson and others added 4 commits November 11, 2026 00:14
…s a late page after a hot-seat handoff, Snake files a score under its own walls, a bare program name is looked up on PATH, the Almanac falls back to English on an unusable language file, the Golden Record credits retry, drop a stale render and escape file names, one installed-voice read, the Aban test uses a fixed day, the Almanac and Games release notes are separate

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…es use the machine's environment, a catalog link's attributes may come in either order, the language test checks each language's own word

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New security issues found

Comment thread zimi/static/almanac.js Resolved
Comment thread zimi/static/almanac.js Resolved

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New security issues found

Comment thread zimi/static/almanac.js Resolved
Comment thread zimi/static/almanac.js Resolved
epheterson and others added 23 commits November 11, 2026 00:33
…ndows program by its extension, the axe sweep does not tap the shelf's middle at desktop width

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…he bare-name test stays out of the bundle folder there; the hearts game-over test taps the card, as a person does

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… a fixed five seconds each

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…he page's own state (open, hand, press, hit element) instead of a bare timeout

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… (measured), not while the runner's software GL is still busy with the 3D view

The failure diagnostics showed the press cancelled with nothing lifted: a touch whose handler answers late is scrolled by the browser and cancelled. Branch and origin/main take the same time locally under 8x CPU throttling (hand-off 3 to 5 s).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…message; the BT prefs path is put back after each test

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nside the station's reach before it reads it

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…e Moon answers at its middle (the failure's event log showed the finger landing on the veil); the station pan test waits for the zoom and the held slide

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
main's CI after 1.15.5 failed only in browser tests; the plain test
job is the gate that reports them. Each failure, and the race behind it:

- Wiki Race for two: the end is a random walk from the start, so the
  start can link straight to it (5 of 40 picks on the fixture). The
  tap then won the race and Give up stayed disabled. The tap at the
  middle of a wrapped inline link also often missed it. Follow the
  first link that is not the end, by Playwright's click, and wait for
  the step to land.
- Kiwix games shelf: the viewer's own 'on_content_load is not defined'
  (already dropped in the Almanac test) was not dropped here. One
  shared list of the viewer's known errors for both.
- The dot's popover (hover): Home redraws once more when late data
  lands; locator.hover() meeting the redraw retried with a scroll,
  and the scroll closes the popover (1 in 5 locally). Move the mouse
  to the dot's middle, measured in the page in one go.
- Kept document library offline: enterSource ran before the boot's
  library list landed, so the ZIM was unknown. Wait for _zimInfo.
- Manage maps pane: open Manage only once the boot has the list, not
  mid-boot (init reads _bootHasPw, which enterManage's probe takes).

Co-Authored-By: Claude Opus <noreply@anthropic.com>
…ve the page scrolling sideways

Paper sets #almanac-content's padding to 0 (almanac-reference.css, @media
print). Chromium can keep that 0 after the print is over (seen with print
media emulation whenever the page was laid out while in print; a viewport
resize clears it). With the gutter gone the tiles' and chips' -16px edges,
and an orrery canvas sized meanwhile (its inline width is the wrap's), ran
16px past the screen: 406 of 390, intermittently in CI's tables suite after
its first table's print check.

The 16px side gutter is now .almanac-inner's own padding (max-width 632,
border-box: the same 600px column), which paper never touches; a stale
scroller padding can now only move the page 24px vertically.

Test: three print round trips with a layout in print, then no side scroll
and the first tile at the gutter. Fails on the old CSS with the CI
signature (content [406, 390], almanac-inner 390), passes now.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
… tests pinned to one instant

Two separate causes made the station's browser tests (test_almanac_pan_browser)
flaky in CI; neither was fresh orbital data (the tests' data dir is empty and
updates default to Ask first, so the page always gets the shipped snapshot).

1. 'AssertionError: 180' (no flip at the zenith): the station's place was the
   wall clock's. Within a few degrees of its highest latitude (51.6) the test's
   +-40 degree sweep runs past the celestial pole, where roll is measured from
   a north that turns over though the picture does not. The module now pins
   the view to the snapshot station's next northward equator crossing, clock
   stopped (and checks it is there). Shifted a quarter orbit on, the old test
   fails with 180; pinned, it passes.

2. '1.928e-05 < 1.846e-05' (a spreading pinch ended farther out): a product
   bug. Each finger's pointermove zoomed by its own ratio, clamped at the
   station's nearest; when the second frame's moves arrived second finger
   first, one step was clamped and the other finger's step back out was not,
   ending 4.5% farther than it began. The order of a frame's touches is the
   browser's. _aePinchZoom now asks for the distance the spread since the
   pinch began gives (the anchoring Look already uses); mid-flight it keeps
   the per-step ratio. Standing on a body gets the same. New test dispatches
   both orders: the old code gives CI's exact 1.928e-05; now both end at the
   nearest. The CDP test also waits for its last move to land (moves are
   frame-aligned) before reading the state.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
…rings late

Since e816f7c (topic/missions) the probes' table is fetched only once the
view is among the planets, not on the Earth the 3D view opens on. Pluto's
place comes from that table, so right after _aePreset('mars') Pluto has no
pos yet and _aeLmBodies() leaves it out: ('pluto', 'no body'). Wait for
Pluto's place as well as Mars's before comparing every body's vertices.

Belongs on topic/missions, where the lazy table landed.

Co-Authored-By: Claude Opus <noreply@anthropic.com>
…the station's nearest; the signed-in Field Guide test waits for the library list as the server holds it

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ge's console and failed requests were

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… message says whether the server announced and what the window heard

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Their queued downloads stayed in the queue and were written into the next test's downloads.json by any persist in the same worker (a pending-download test saw good.zim beside its own item).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A catalog left in the process by an earlier test made the archive duty find one and mark itself done.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The slide is a 0.2 s transition; on a loaded runner it was still 1.25 px short of rest at the fixed wait.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The wait was an async predicate, which wait_for_function treats as done once the promise settles, so it never waited. A file still on its way when the held state began was held, and Chromium does not replace a worker with a request in flight: the new worker stayed waiting for the rest of the run (about half of the runs on a loaded runner).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nks first

The result count moves by a few between runs and the first group with it; when it was not the source the next searches look in, they found nothing (about 1 run in 12).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…side

A coalesced redraw for late data landing between its two steps was counted as a third ask (2 runs in 100).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@epheterson
epheterson merged commit c873c3e into main Nov 11, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant