0.6.599

Published: (May 3, 2026 at 02:03 PM EDT)
4 min read
Source: Dev.to

Source: Dev.to

The Goal

I wanted a recent build of Jan.ai. I got a 0.6.599 .deb. The model was given a single, generic instruction—nothing about versions, tags, or checking what was already installed. It said:

Target application: jan.ai desktop application
Container name pattern: [os]-[shortname] (e.g., ubuntu-jan)
Base image: glibc‑based (e.g., ubuntu:22.04)

Procedure

  1. Create a container with the specified base image.
  2. If the container already exists, enter it and decide whether to continue or recreate.
  3. Use a web search to find build instructions for the target application on the detected OS.
  4. Build the application from source inside the container.
  5. No need to install the built application on the host.

Persistent build state

  • Maintain /tmp/build_state.json with fields: status, phase, steps_completed, last_error, progress_log.
  • Before any action, read the state file.
  • After each major step, update the file.
  • If a command fails, record the error, search for a fix, and continue.

Wrapper script (/tmp/run_and_log.sh)

#!/usr/bin/env bash
# Execute every build command through this wrapper.
# Append stdout+stderr to /tmp/build_output.log.
# Update the state file automatically.
# Return only a small JSON status (no output in tool response).

cmd="$@"
output=$($cmd 2>&1)
echo "$output" >> /tmp/build_output.log

# (Pseudo‑code for state update)
# jq '.steps_completed += 1 | .last_error = null' /tmp/build_state.json > /tmp/tmp.json && mv /tmp/tmp.json /tmp/build_state.json

# Return JSON status
echo '{"status":"ok"}'

Error handling

  • On failure, search the web for the exact error.
  • Apply fixes and retry.
  • After two failures, stop and report.

General guidelines

  • Prefer git for source retrieval.
  • Install dependencies via the native package manager.
  • For missing packages, build from source.
  • Avoid unnecessary steps.

The Hard Truth

The prompt did not say “check the latest tag”, “compare with your installed version”, or even “figure out what version you are building”. The model did exactly what I asked, and the failure was in the ask.

First attempt (Alpine)

  • The model installed git, gcc, rustup.
  • Cloned the Jan.ai repo, built the web frontend, then tried to compile the Rust backend.
  • Linking failed repeatedly (musl vs. glibc issues).
  • The model installed gcompat, patched pkg-config, tried cross‑compile tricks—nothing worked.
  • After several hours it wiped the container and started over.

Second attempt (Ubuntu 22.04)

The model searched for “jan.ai build from source ubuntu” and found the official README. It installed the required tools:

sudo apt-get update
sudo apt-get install -y build-essential libgtk-3-dev libwebkit2gtk-4.0-dev nodejs yarn rustup

Each command was run through the wrapper script, logging to /tmp/build_output.log and updating /tmp/build_state.json.

Build steps

yarn install          # succeeded
yarn build:web        # succeeded
cargo build --release   # succeeded

A binary jan appeared.

Packaging attempt

yarn tauri build

Failed with:

Failed to copy binary from "/opt/jan-build/src-tauri/target/release/jan-cli": No such file or directory.

The bundler expected jan-cli because src-tauri/Cargo.toml contained a [[bin]] entry for jan-cli with a missing source file.

  • The model tried a symlink → ignored.
  • Copied jan to jan-cli → bundler complained about missing the cli feature.
  • Created a dummy jan-cli.rs and compiled with --features cli → succeeded.

The resulting package:

Jan_0.6.599_amd64.deb

I copied it to the host, ran sudo dpkg -i Jan_0.6.599_amd64.deb, and confirmed the installation without noticing the warning:

downgrading from 0.7.9 to 0.6.599

Only then did I check the container’s Git log: the model had cloned main at commit f46148e77—months old, long before the current stable releases. The prompt never mentioned a version, so the model never cared.

Outcome

  • The app launched, loaded models, responded to prompts, and worked—just an older version.
  • Every missing binary triggered a trial‑and‑error cycle; the log file grew, and the state file recorded dozens of steps.
  • Two hours of compilation resulted in a downgrade.
  • The .deb remains in my downloads folder; I’ve installed, removed, and re‑installed it multiple times. It still works, unaware that anything is wrong.

I didn’t learn a grand lesson—just watched the machine grind.

0 views
Back to Blog

Related posts

Read more »

What’s Your Fear Score as a Developer?

Fear costs us everything. I once heard the quote, “You miss 100% of the shots you don’t take,” and it resonated throughout my career. Looking back, I missed man...