Skip to content

Commit 945e0e8

Browse files
mariaKtrv-auditor
andauthored
Install before building kdist to ensure kdist cache hash does not change (#38)
This PR addresses an issue in the Dockerfile where the kdist cache hash was not what we expected. This was identified due to failures of proofs that were using the generated image with `Directory does not exist`. ### Problem description The Docker image had mismatched kdist cache hashes. The Dockerfile ran `make && pip install .`: 1. `make` (via `uv run`) built kdist targets into cache hash `c7ca3c1` 2. `pip install .` changed the installed packages, causing kdist to compute a different hash `45ae7da` at runtime Result: `kdist which kompass.haskell` resolved to `45ae7da`, but the built targets were in `c7ca3c1`. Proofs failed with `Directory does not exist`. ### Fix Swap the order: `pip install .` first, then `kdist build`. This ensures the build uses the same package state as runtime, producing a consistent cache hash. Replace `make` with a direct `kdist -v build kompass.* -j4` call, since: - `make` runs `check` (flake8, mypy) which is unnecessary in the image — `test.yml` already exercises `make check`, `make build`, and `make test-integration` in CI - `make build` uses `uv run` which creates a separate environment with a different hash than `pip install` ### Testing I tested this locally by: - Built modified image with `docker build` - Verified single kdist cache (`kdist-45ae7da`) with all kompass targets - `kdist which kompass.haskell` resolves correctly - Successfully ran `test_ptoken_domain_data` proof end-to-end --------- Co-authored-by: devops <devops@runtimeverification.com>
1 parent 9351ea2 commit 945e0e8

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN chown -R kmir:kmir /home/kmir/.kompass
1414
USER kmir:kmir
1515
RUN rustup toolchain list && \
1616
cd /home/kmir/.kompass && \
17-
make && \
18-
pip install .
17+
pip install . && \
18+
kdist -v build kompass.* -j4
1919

2020
CMD ["kompass", "--help"]

package/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.22
1+
0.1.23

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "kompass"
7-
version = "0.1.22"
7+
version = "0.1.23"
88
description = "K Semantics for the Solana ecosystem"
99
requires-python = "~=3.10"
1010
dependencies = [

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)