Bug Report: Update Cache Preservation Broken in nightly-695Install: #2108

Open
opened 2026-11-21 19:22:49 +00:00 by bigwiggler · 4 comments

What you used

Linux AppImage

Version

695

Channel

Nightly

Where it stopped

Installing or updating the launcher or the builder

The error

# Bug Report: Update Cache Preservation Broken in nightly-695

**Version:** Longshot Launcher nightly-148-985cc614  
**Target build:** nightly-695-96caf2f2  
**Previous build:** nightly-626-8859673e  
**Platform:** Linux

### Description

Updating from nightly-626 to nightly-695 appears to have broken the expected cache-preservation behavior.

The launcher reports:

```text
instance folder: nightly-626-8859673e renamed to nightly-695-96caf2f2
shader caches: kept where they are, in the build's own folder
```

However, the update process performs a build for nightly-695, including game translation and compilation.

The log also reports:

```text
object store: 0 objects from it
```

This raises a concern that existing cached build artifacts are not being reused as expected during an update.

### Expected Behavior

Updating Longshot should preserve and reuse applicable existing caches and build artifacts wherever possible, rather than unnecessarily rebuilding work that has already been completed.

### Actual Behavior

The launcher renames the existing instance directory, but the update still performs extensive translation and compilation work. The object store reports zero objects reused.

### Relevant Environment

- Linux
- NVIDIA GPU
- DLSS enabled
- 12 GB memory allocation
- 6 workers
- Update from nightly-626 to nightly-695

### Request

Please investigate whether nightly-695 changed cache handling or cache invalidation during updates, particularly the relationship between the renamed instance directory, shader caches, and the build object store.

The concern is that updating builds may no longer be preserving or reusing cached work as intended.

Operating system and free space on the output drive

Cachy os 500gb+

Visual Studio or Build Tools version, and Windows SDK version

No response

Log

No response

Before you send it

  • It still fails on the newest release.
  • I searched the open issues for this error.
  • I'm not attaching game files or anything built from them.
### What you used Linux AppImage ### Version 695 ### Channel Nightly ### Where it stopped Installing or updating the launcher or the builder ### The error ````text # Bug Report: Update Cache Preservation Broken in nightly-695 **Version:** Longshot Launcher nightly-148-985cc614 **Target build:** nightly-695-96caf2f2 **Previous build:** nightly-626-8859673e **Platform:** Linux ### Description Updating from nightly-626 to nightly-695 appears to have broken the expected cache-preservation behavior. The launcher reports: ```text instance folder: nightly-626-8859673e renamed to nightly-695-96caf2f2 shader caches: kept where they are, in the build's own folder ``` However, the update process performs a build for nightly-695, including game translation and compilation. The log also reports: ```text object store: 0 objects from it ``` This raises a concern that existing cached build artifacts are not being reused as expected during an update. ### Expected Behavior Updating Longshot should preserve and reuse applicable existing caches and build artifacts wherever possible, rather than unnecessarily rebuilding work that has already been completed. ### Actual Behavior The launcher renames the existing instance directory, but the update still performs extensive translation and compilation work. The object store reports zero objects reused. ### Relevant Environment - Linux - NVIDIA GPU - DLSS enabled - 12 GB memory allocation - 6 workers - Update from nightly-626 to nightly-695 ### Request Please investigate whether nightly-695 changed cache handling or cache invalidation during updates, particularly the relationship between the renamed instance directory, shader caches, and the build object store. The concern is that updating builds may no longer be preserving or reusing cached work as intended. ```` ### Operating system and free space on the output drive Cachy os 500gb+ ### Visual Studio or Build Tools version, and Windows SDK version _No response_ ### Log _No response_ ### Before you send it - [x] It still fails on the newest release. - [x] I searched the open issues for this error. - [x] I'm not attaching game files or anything built from them.
Member

Possibly related, for context:

  • issue #1906 # Bug Report: Shared Object Cache Fails to Reuse Compiled Objects Across Nightly Updates on LinuxInstall: — Same Linux nightly object-store miss; updated builds still report zero reused objects.
  • issue #1907 BUG: Shared Build Cache Is Not Reusing Compiled Objects Between Nightly Versions (Linux) — Same reporter and exact zero-object reuse symptom across nightly updates.
  • PR MagicBeanDev/LongshotLauncher#184 feat(builds): an instance's folder is builds//, renamed when it updates — Update-folder rename and retained in-instance shader caches behavior.
Possibly related, for context: - issue #1906 # Bug Report: Shared Object Cache Fails to Reuse Compiled Objects Across Nightly Updates on LinuxInstall: — Same Linux nightly object-store miss; updated builds still report zero reused objects. - issue #1907 BUG: Shared Build Cache Is Not Reusing Compiled Objects Between Nightly Versions (Linux) — Same reporter and exact zero-object reuse symptom across nightly updates. - PR MagicBeanDev/LongshotLauncher#184 feat(builds): an instance's folder is builds/<track>/<version>, renamed when it updates — Update-folder rename and retained in-instance shader caches behavior.
Author

It not my setup. its a clean cachy OS install. I had the same issue 2 week ago ON WINDOWS. so I switched. Its a issue that keeps breaking its self in your updates.

It not my setup. its a clean cachy OS install. I had the same issue 2 week ago ON WINDOWS. so I switched. Its a issue that keeps breaking its self in your updates.
Author

its rebuilding EVERY fucking file - code_006.c 24 MB 58s (61s)
INF code_038.c 24 MB 58s (62s)
INF code_052.c 24 MB 60s (63s)
INF code_041.c 24 MB 61s (64s)
INF code_048.c 24 MB 61s (64s)
INF code_005.c 25 MB 67s (71s)
INF code_036.c 24 MB 63s (125s)
INF code_007.c 26 MB 65s (128s)
INF code_054.c 24 MB 71s (134s)
INF code_046.c 24 MB 73s (138s)
INF code_045.c 24 MB 80s (151s)
INF code_025.c 23 MB

So tired of this shit. tell claude to not fuck with this part. You had it working perfect around 625

its rebuilding EVERY fucking file - code_006.c 24 MB 58s (61s) INF code_038.c 24 MB 58s (62s) INF code_052.c 24 MB 60s (63s) INF code_041.c 24 MB 61s (64s) INF code_048.c 24 MB 61s (64s) INF code_005.c 25 MB 67s (71s) INF code_036.c 24 MB 63s (125s) INF code_007.c 26 MB 65s (128s) INF code_054.c 24 MB 71s (134s) INF code_046.c 24 MB 73s (138s) INF code_045.c 24 MB 80s (151s) INF code_025.c 23 MB So tired of this shit. tell claude to not fuck with this part. You had it working perfect around 625
Contributor

Correction to the cause, from reading the build code and the 618 -> 625 history. This is for whoever picks up the chunk half; no fix is claimed here, and it does not undo anything that update cost.

  • The chunk key is already a content hash. nx2/build.py's object_key(src, fl, deps) is sha1(<the generated chunk C's bytes> + flag_text(fl) + <the generated headers>). There is no lift/translation key in it. nx2/chunks.py keeps the boundaries in work/image/chunks.txt, and the lift writes a chunk's functions in address order with no version, timestamp or hash in the file, so the same C gets the same key.
  • The 618 -> 625 update did not fail on the translation. Your log says the game was translated with these tools before: translating it again is skipped, so the chunk C was identical. git log 2210931c..a104182b shows the only build-relevant change between the two nightly sources was #1727, which changed split_giants.flag(): that function hashed its own file into every chunk's compile flags, so every chunk's key moved. #1727 also changed how giant functions are split (guest locals, direct pieces), so most chunks' compiled text genuinely changed. Replaying the two splitter versions over one translation here: 70 of 76 code files differ, and only the 6 with no function of 256 KB or more are byte-identical.
  • So that update's bill was #1727's one-time recompile, documented in its Risks ("the first build after updating recompiles every lifted chunk once"), not the shared object store being broken for the chunks. A content-key change would not have avoided it.

There is a real, smaller fix for the future: key a chunk by the bytes actually compiled (the split copy) instead of the splitter's file hash. A later splitter edit that leaves a chunk's split output unchanged would then reuse its object (0 chunks compiled), where today any edit to nx2/split_giants.py recompiles all of them. A splitter edit that changes the output still recompiles exactly the chunks it changes. #2199's host/renderer keys are separate and untouched. This is claimed in the room as chunk-object-key; no PR yet.

Correction to the cause, from reading the build code and the 618 -> 625 history. This is for whoever picks up the chunk half; no fix is claimed here, and it does not undo anything that update cost. - **The chunk key is already a content hash.** `nx2/build.py`'s `object_key(src, fl, deps)` is `sha1(<the generated chunk C's bytes> + flag_text(fl) + <the generated headers>)`. There is no lift/translation key in it. `nx2/chunks.py` keeps the boundaries in `work/image/chunks.txt`, and the lift writes a chunk's functions in address order with no version, timestamp or hash in the file, so the same C gets the same key. - **The 618 -> 625 update did not fail on the translation.** Your log says `the game was translated with these tools before: translating it again is skipped`, so the chunk C was identical. `git log 2210931c..a104182b` shows the only build-relevant change between the two nightly sources was #1727, which changed `split_giants.flag()`: that function hashed its own file into every chunk's compile flags, so every chunk's key moved. #1727 also changed *how* giant functions are split (guest locals, direct pieces), so most chunks' compiled text genuinely changed. Replaying the two splitter versions over one translation here: **70 of 76 code files differ, and only the 6 with no function of 256 KB or more are byte-identical.** - So that update's bill was #1727's one-time recompile, documented in its Risks ("the first build after updating recompiles every lifted chunk once"), not the shared object store being broken for the chunks. A content-key change would not have avoided it. There is a real, smaller fix for the future: key a chunk by the bytes actually compiled (the split copy) instead of the splitter's file hash. A later splitter edit that leaves a chunk's split output unchanged would then reuse its object (0 chunks compiled), where today any edit to `nx2/split_giants.py` recompiles all of them. A splitter edit that changes the output still recompiles exactly the chunks it changes. #2199's host/renderer keys are separate and untouched. This is claimed in the room as `chunk-object-key`; no PR yet.
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot#2108
No description provided.