Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 36 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,12 @@ only.

## Offline runtime and TLS

The 1.10.0 image uses Debian 13 (trixie), with the glibc 2.41 family and GCC 14.
This runtime floor supplies `__isoc23_strtol`, required by the immutable amd64
engine library; bookworm's glibc 2.36 cannot load that library. Engine, codegen
and HPO remain at 1.10.0, with unchanged producer artifact SHA-256 pins.
The engine asset triples remain `linux-x86_64` and `linux-aarch64`.

The image is offline by design. The [backtest entrypoint](docker/entrypoint.sh)
transpiles and compiles locally using bundled code and mounted inputs, with no
runtime network fetch. The [release smoke](scripts/release_smoke.py) runs the
Expand Down Expand Up @@ -315,6 +321,16 @@ its bundle attached to an earlier or dedicated release before its first publish,
because the guard looks up the holding release by tag before the new tag's
GitHub Release exists.

Set-17 mirrors the trixie image's 72 source/version pairs at `v1.4.0` with `set-17.SOURCES.list` (set-id `76b31d334dc701427d36bbd034b463bdd69101b3bb34e67aa9569bd892d6994a`).
The trixie image needs a new source set derived from both native image inventories.
The existing bookworm sets do not establish its source coverage. Publication
still requires equal amd64/arm64 source/version sets, every exact source archive,
and a verified published list and asset mirror before adding a registry row.
The six toolchain pins map to `gcc-defaults` 1.220, `gcc-14` 14.2.0-19,
`binutils` 2.44-3, `eigen3` 3.4.0-5, `cmake` 3.31.6-2 and `make-dfsg` 4.4.1-2.
CMake and make remain build-only; the final inventories determine the complete
runtime source set, including glibc and all other base and dependency packages.

## License

The files in this repository (Dockerfile, entrypoint, scripts, workflows, tests)
Expand Down Expand Up @@ -353,24 +369,28 @@ to 1.0.0 carry `Apache-2.0`.

## Harness / engine ABI

`scripts/sync-harness.sh <engine-version>` vendors exactly twelve engine runtime
`scripts/sync-harness.sh <engine-version>` vendors exactly sixteen engine runtime
harness files into `docker/` from the pinned `pineforge-engine` tag, in sorted order:

- `bind_compiled_inventory.py`
- `entrypoint.sh`
- `pf_bars.py`
- `pf_sink.py`
- `pineforge_report_deadlines.py`
- `pineforge_report_supervise.py`
- `pineforge_sink_finalize.py`
- `pineforge_sink_to_json.py`
- `quota_columns.py`
- `request_feed_inventory.py`
- `run_execution_observer.py`
- `run_json.py`
- `run_phase_transport.py`
- `run_quota.py`
- `selected_window_plan.py`
- `selected_window_report.py`

`handle-upstream.yml` syncs those files and regenerates `docker/HARNESS-SHA256SUMS`
for the engine version it releases. The Dockerfile requires the same twelve names
for the engine version it releases. The Dockerfile requires the same sixteen names
and checks their installed bytes against the sums. It also refuses to build
when `docker/run_json.py`'s `EXPECTED_PF_ABI` differs from
`PF_ABI_VERSION` in the bundled engine headers.
Expand Down Expand Up @@ -407,8 +427,8 @@ its recorded equity and trade rows. The fixture provenance is documented in

`docker build` without `--target`, using `docker/Dockerfile`, builds the
backtest image: the last `default` stage aliases the runtime, `release`.
The default image differs from 1.5.0 only by the source notice, the two source
labels and the retained Debian package copyright files.
The 1.10.0 packaging refresh moves every Debian-based stage to trixie and replaces
bookworm's GCC 12 pins with GCC 14; the checked harness and entrypoint stay unchanged.
`ENGINE_VERSION`, `CODEGEN_VERSION` and `GUARD_POLICY_SETS_SHA256` are required for that build, and its
entrypoint remains `/opt/pineforge/bin/entrypoint.sh`. The guard policy value is read from `docker/GUARD-POLICY-SETS.pin`, computed privately and never re-derived here; the image records it in the `io.pineforge.guard.policy-sets-sha256` label and in `/opt/pineforge/guard-policy.sha256`.

Expand All @@ -424,7 +444,7 @@ The artifact cache is writable by the image's existing user; use `--cache-dir`
with a writable mount to retain compiled artifacts between containers.

With no first argument `hpo`, the dispatcher passes every argument unchanged
to the engine's existing `/opt/pineforge/bin/entrypoint.sh`. The twelve engine
to the engine's existing `/opt/pineforge/bin/entrypoint.sh`. The sixteen engine
harness files and their byte and ABI checks remain in place.

For `--target hpo`, `HPO_VERSION` is a required build argument with no default,
Expand All @@ -440,27 +460,27 @@ Publishing validates both bound artifact digests before passing
is checked against the sdist digest before extraction and compilation. These
per-release artifact pins are declared in `scripts/release_sources.py`, separate
from the six Debian toolchain versions below.
This change merges without a release; the first publish carrying HPO is the
1.6.0 lockstep. HPO 0.15.0 is the fixture for the signed box proof.
The 1.10.0 engine/codegen/HPO producer triple and both HPO artifact pins stay
unchanged by the Debian packaging refresh.

The box must supply exact Debian package versions through these required
build arguments; no toolchain version has been guessed:

| Build argument | Packages |
|---|---|
| `HPO_GCC_DEFAULTS_VERSION` | `gcc`, `g++`, `cpp` |
| `HPO_GCC_VERSION` | `gcc-12`, `g++-12`, `cpp-12`, `libgcc-12-dev`, `libstdc++-12-dev`, `libgcc-s1`, `libstdc++6` |
| `HPO_GCC_VERSION` | `gcc-14`, `g++-14`, `cpp-14`, `libgcc-14-dev`, `libstdc++-14-dev`, `libgcc-s1`, `libstdc++6` |
| `HPO_BINUTILS_VERSION` | `binutils` |
| `HPO_EIGEN_VERSION` | `libeigen3-dev` |
| `HPO_CMAKE_VERSION` | `cmake` (native build only) |
| `HPO_MAKE_VERSION` | `make` (native build only) |

`docker/hpo-toolchain.args` records those six pins as plain `NAME=VALUE` lines,
with comments and blank lines allowed, and no shell syntax. The values were
recorded by a signed box run (and a value left empty is reported by the tests as
an unfilled skip); the publish workflow reads the file and passes the
values as build arguments for `--target hpo`. The Dockerfile uses build
arguments only. The default target does not need this file or its arguments.
with comments and blank lines allowed, and no shell syntax. The trixie values
come from public Debian metadata for both amd64 and arm64; native validation
is pending. The publish parser rejects empty values; the historical test helper
discloses an empty value as an unfilled skip, which is never proof. Publishing
passes all six arguments to `--target hpo`; the default target does not need them.

The installed wheels' own `*.dist-info/licenses/` files are also copied to
`/opt/pineforge/licenses/pineforge-hpo/` (`LICENSE`, `NOTICE` and
Expand All @@ -486,9 +506,10 @@ wheel for an offline run; otherwise the test fetches it from PyPI and verifies
PyPI's digest. The same build helper must reject 0.13.2 because its real
`pineforge-codegen<1.4,>=1.1.0` bound excludes 1.5.0, then resolve 0.15.0 without
changing codegen. The tests also compute each target's stage dependencies,
compare `release` with the original runtime at `989a0fd9~1`, and check dispatcher
compare `release` with the historical runtime digest, allowing the exact trixie
base change, and check dispatcher
argv and exit status, the unchanged harness check, a forced licence mutation
and the README pair-rule bytes against `origin/main`. The args-file tests
and the pinned README pair-rule bytes. The args-file tests
compare its names with the real Dockerfile's toolchain declarations and
required guards, reject malformed or duplicate entries, and report empty
values as a named `unfilled toolchain versions` skip until the box fills them.
22 changes: 11 additions & 11 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ARG ENGINE_VERSION
ARG CODEGEN_VERSION

# --- Stage 1: stage the pure-Python transpiler (final image carries no pip) ---
FROM debian:bookworm-slim AS codegen
FROM debian:trixie-slim AS codegen
ARG CODEGEN_VERSION
RUN test -n "${CODEGEN_VERSION}" || { echo "ERROR: CODEGEN_VERSION build-arg is required (CI resolves it)" >&2; exit 1; }
RUN apt-get update && apt-get install -y --no-install-recommends \
Expand All @@ -38,7 +38,7 @@ RUN pip3 install --break-system-packages --no-cache-dir -U \
--target /opt/codegen "pineforge-codegen==${CODEGEN_VERSION}"

# --- Stage 2: fetch + verify the engine static-lib tarball (per build arch) ---
FROM debian:bookworm-slim AS engine
FROM debian:trixie-slim AS engine
ARG ENGINE_VERSION
ARG TARGETARCH
RUN test -n "${ENGINE_VERSION}" || { echo "ERROR: ENGINE_VERSION build-arg is required (CI resolves it)" >&2; exit 1; }
Expand All @@ -63,7 +63,7 @@ RUN set -eux; \
cp -r "/tmp/${base}/include" /opt/pineforge/include

# --- Stage 3: final = toolchain + engine lib + codegen + harness --------------
FROM debian:bookworm-slim AS release
FROM debian:trixie-slim AS release
ARG ENGINE_VERSION
ARG CODEGEN_VERSION
ARG GUARD_POLICY_SETS_SHA256
Expand Down Expand Up @@ -221,10 +221,10 @@ RUN set -eu; \
cp -r "$1/." /opt/hpo-licenses/pineforge-codegen/

# --- HPO toolchain: shared by the native build and the FULL runtime -----------
# No guessed package versions: the box supplies these exact Debian pins for
# both architectures. gcc/g++/cpp are the bookworm GCC-12 defaults; the compiler
# Exact Debian trixie pins for both architectures come from public package
# metadata in hpo-toolchain.args. gcc/g++/cpp are the GCC-14 defaults; the compiler
# and libstdc++ packages share HPO_GCC_VERSION. CMake/make stay build-only.
FROM debian:bookworm-slim AS hpo-toolchain
FROM debian:trixie-slim AS hpo-toolchain
ARG HPO_GCC_DEFAULTS_VERSION
ARG HPO_GCC_VERSION
ARG HPO_BINUTILS_VERSION
Expand All @@ -237,11 +237,11 @@ RUN set -eu; \
apt-get update; \
apt-get install -y --no-install-recommends \
"gcc=${HPO_GCC_DEFAULTS_VERSION}" "g++=${HPO_GCC_DEFAULTS_VERSION}" "cpp=${HPO_GCC_DEFAULTS_VERSION}" \
"gcc-12=${HPO_GCC_VERSION}" "g++-12=${HPO_GCC_VERSION}" "cpp-12=${HPO_GCC_VERSION}" \
"libgcc-12-dev=${HPO_GCC_VERSION}" "libstdc++-12-dev=${HPO_GCC_VERSION}" \
"gcc-14=${HPO_GCC_VERSION}" "g++-14=${HPO_GCC_VERSION}" "cpp-14=${HPO_GCC_VERSION}" \
"libgcc-14-dev=${HPO_GCC_VERSION}" "libstdc++-14-dev=${HPO_GCC_VERSION}" \
"libgcc-s1=${HPO_GCC_VERSION}" "libstdc++6=${HPO_GCC_VERSION}" \
"binutils=${HPO_BINUTILS_VERSION}" "libeigen3-dev=${HPO_EIGEN_VERSION}" python3; \
for pkg in gcc g++ cpp gcc-12 g++-12 cpp-12 libgcc-12-dev libstdc++-12-dev libgcc-s1 libstdc++6 binutils libeigen3-dev; do \
for pkg in gcc g++ cpp gcc-14 g++-14 cpp-14 libgcc-14-dev libstdc++-14-dev libgcc-s1 libstdc++6 binutils libeigen3-dev; do \
mkdir -p "/opt/pineforge/licenses/${pkg}"; \
cp -L "/usr/share/doc/${pkg}/copyright" "/opt/pineforge/licenses/${pkg}/copyright"; \
done; \
Expand Down Expand Up @@ -300,8 +300,8 @@ LABEL org.opencontainers.image.description="Full PineScript v6 -> deterministic
# CMake, make, pip and the native build tree stay in the build stages.
RUN apt-get update && apt-get install -y --no-install-recommends \
"gcc=${HPO_GCC_DEFAULTS_VERSION}" "g++=${HPO_GCC_DEFAULTS_VERSION}" "cpp=${HPO_GCC_DEFAULTS_VERSION}" \
"gcc-12=${HPO_GCC_VERSION}" "g++-12=${HPO_GCC_VERSION}" "cpp-12=${HPO_GCC_VERSION}" \
"libgcc-12-dev=${HPO_GCC_VERSION}" "libstdc++-12-dev=${HPO_GCC_VERSION}" \
"gcc-14=${HPO_GCC_VERSION}" "g++-14=${HPO_GCC_VERSION}" "cpp-14=${HPO_GCC_VERSION}" \
"libgcc-14-dev=${HPO_GCC_VERSION}" "libstdc++-14-dev=${HPO_GCC_VERSION}" \
"libgcc-s1=${HPO_GCC_VERSION}" "libstdc++6=${HPO_GCC_VERSION}" \
"binutils=${HPO_BINUTILS_VERSION}" "libeigen3-dev=${HPO_EIGEN_VERSION}" \
&& rm -rf /var/lib/apt/lists/* /usr/share/man /usr/share/locale /usr/share/info
Expand Down
16 changes: 8 additions & 8 deletions docker/LICENSE-SHA256SUMS
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
a81bdd422c2c015deca84bf6ad249bf0d7d19885fc01d1894463291b0b7313e1 binutils/copyright
da8191658b3452ce9caf31638ba61dab31a38c619fa39df119812e050f592fd3 cpp-12/copyright
20a9818b14f941467bcc0f459a1b1951e3bfecc1cc259e5004f8b9a80d7dc804 binutils/copyright
20390f8a6f3b1e4d7cb45dd8652dabb259bbef688cbad839bcdb0b9ba7252f79 cpp-14/copyright
156004744edbf17a975f0004ac4a9295b160ab403d646c445235711255ca9ff8 cpp/copyright
da8191658b3452ce9caf31638ba61dab31a38c619fa39df119812e050f592fd3 g++-12/copyright
20390f8a6f3b1e4d7cb45dd8652dabb259bbef688cbad839bcdb0b9ba7252f79 g++-14/copyright
156004744edbf17a975f0004ac4a9295b160ab403d646c445235711255ca9ff8 g++/copyright
da8191658b3452ce9caf31638ba61dab31a38c619fa39df119812e050f592fd3 gcc-12/copyright
20390f8a6f3b1e4d7cb45dd8652dabb259bbef688cbad839bcdb0b9ba7252f79 gcc-14/copyright
156004744edbf17a975f0004ac4a9295b160ab403d646c445235711255ca9ff8 gcc/copyright
d86a43829b598ef251601455af9c6a05027aec31f6380266890ea016c7ba5fb7 libeigen3-dev/copyright
da8191658b3452ce9caf31638ba61dab31a38c619fa39df119812e050f592fd3 libgcc-12-dev/copyright
da8191658b3452ce9caf31638ba61dab31a38c619fa39df119812e050f592fd3 libgcc-s1/copyright
da8191658b3452ce9caf31638ba61dab31a38c619fa39df119812e050f592fd3 libstdc++-12-dev/copyright
da8191658b3452ce9caf31638ba61dab31a38c619fa39df119812e050f592fd3 libstdc++6/copyright
20390f8a6f3b1e4d7cb45dd8652dabb259bbef688cbad839bcdb0b9ba7252f79 libgcc-14-dev/copyright
20390f8a6f3b1e4d7cb45dd8652dabb259bbef688cbad839bcdb0b9ba7252f79 libgcc-s1/copyright
20390f8a6f3b1e4d7cb45dd8652dabb259bbef688cbad839bcdb0b9ba7252f79 libstdc++-14-dev/copyright
20390f8a6f3b1e4d7cb45dd8652dabb259bbef688cbad839bcdb0b9ba7252f79 libstdc++6/copyright
5f43346a79228e0ee266ea08efc6e2106d64afa9255fc360cc329903268f720e pineforge-codegen/LICENSE
1aa95beed7fc0b368872fcd1bcf6a09a0f67ef3014b5e48ae21404cb647a1136 pineforge-hpo/LICENSE
fb088c51cdd2b82f2ee6488730de8334310796f124046df9679dc1e96f744d1b pineforge-hpo/NOTICE
Expand Down
1 change: 1 addition & 0 deletions docker/SOURCE-SETS.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ de7a6dfdd2afa6f1c52df5c376e0975884510e8ce65a302d707562e44dff1349 v1.3.0 84 1ae78
0bab451a5fc075359bd98d347399301f46dbae1e5cdde88c5d29837e18305fdf v1.4.0 84 c1be8b7e847979081df6dab249038b1210c872e67e1e53229e58e37d672dfd71 set-14.SOURCES.list
cb35339cfd799ec45d9d8f42eb4c86fd5ea53aa804e4de2be0cd8e2c47360f2f v1.4.0 84 5a21329c99f509860c3d7e924902510cc2eb4075de3663df21db3b26e225b1ca set-15.SOURCES.list
cc43cbdfb3f1e7a182e5f07618d556f9824d5fe348f793cb13b41e7897641f57 v1.4.0 84 24c977c4eda0e56ecb495ef55bd8a7f8c966c8217bea89b3aefa4b0530475d5a set-16.SOURCES.list
76b31d334dc701427d36bbd034b463bdd69101b3bb34e67aa9569bd892d6994a v1.4.0 72 c8c640fc002564dca0db3a61178a9a45e15ba0420361f6cff44d184a7760c19a set-17.SOURCES.list
4 changes: 2 additions & 2 deletions docker/SOURCES.txt.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This image contains software from Debian GNU/Linux 12 (bookworm), including the GNU C/C++
compiler (gcc/g++ 12.2.0) and GNU binutils 2.40, Eigen 3.4.0, and the Debian base system.
This image contains software from Debian GNU/Linux 13 (trixie), including the GNU C/C++
compiler (gcc/g++ 14.2.0) and GNU binutils 2.44, Eigen 3.4.0, and the Debian base system.
Each package is distributed under its own license, recorded in /usr/share/doc/<package>/copyright.
The complete corresponding source code of every Debian package in this image, at the exact
versions installed, is available at no charge from:
Expand Down
22 changes: 12 additions & 10 deletions docker/hpo-toolchain.args
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
# The build for --target hpo must pass these exact toolchain build arguments.
# The default target does not need them.
# This file is read as plain NAME=VALUE lines (no shell syntax).
# Values recorded by the signed box run of 2026-10-13 (apt-cache policy candidates in
# debian:bookworm-slim, uniform inside each package group; the installed versions in the built
# hpo image equal them).
# Values from Debian trixie main Packages metadata for amd64 and arm64, retrieved
# 2026-11-04; both indexes match the Debian 13.7 Release SHA256 entries.
# These replace bookworm's GCC-12 family; native build/runtime validation is pending.
# https://deb.debian.org/debian/dists/trixie/main/binary-amd64/Packages.xz
# https://deb.debian.org/debian/dists/trixie/main/binary-arm64/Packages.xz

# Debian packages gcc, g++, cpp
HPO_GCC_DEFAULTS_VERSION=4:12.2.0-3
HPO_GCC_DEFAULTS_VERSION=4:14.2.0-1

# Debian packages gcc-12, g++-12, cpp-12, libgcc-12-dev, libstdc++-12-dev, libgcc-s1, libstdc++6
HPO_GCC_VERSION=12.2.0-14+deb12u1
# Debian packages gcc-14, g++-14, cpp-14, libgcc-14-dev, libstdc++-14-dev, libgcc-s1, libstdc++6
HPO_GCC_VERSION=14.2.0-19

# Debian packages binutils
HPO_BINUTILS_VERSION=2.40-2
HPO_BINUTILS_VERSION=2.44-3

# Debian packages libeigen3-dev
HPO_EIGEN_VERSION=3.4.0-4
HPO_EIGEN_VERSION=3.4.0-5

# Debian packages cmake
HPO_CMAKE_VERSION=3.25.1-1
HPO_CMAKE_VERSION=3.31.6-2

# Debian packages make
HPO_MAKE_VERSION=4.3-4.1
HPO_MAKE_VERSION=4.4.1-2
8 changes: 8 additions & 0 deletions tests/fixtures/GPL-NOTICE-v2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
This image contains software from Debian GNU/Linux 13 (trixie), including the GNU C/C++
compiler (gcc/g++ 14.2.0) and GNU binutils 2.44, Eigen 3.4.0, and the Debian base system.
Each package is distributed under its own license, recorded in /usr/share/doc/<package>/copyright.
The complete corresponding source code of every Debian package in this image, at the exact
versions installed, is available at no charge from:
https://github.com/pineforge-4pass/pineforge-release/releases/tag/<this version>
(file SOURCES.list lists every package, version and SHA-256). The same packages can also be
obtained from https://snapshot.debian.org/ under the names and versions listed.
36 changes: 36 additions & 0 deletions tests/test_release_docs_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,41 @@ def test_missing_hpo_cache_sentence_is_rejected(self):
self.assert_scratch_guidance(without_cache_sentence)


class TrixieRuntimeDocumentationTest(unittest.TestCase):
def setUp(self):
self.readme = (ROOT / "README.md").read_text(encoding="utf-8")

def assert_trixie_guidance(self, text):
prose = " ".join(text.split())
for required in (
"Debian 13 (trixie), with the glibc 2.41 family and GCC 14",
"`__isoc23_strtol`",
"bookworm's glibc 2.36 cannot load that library",
"Engine, codegen and HPO remain at 1.10.0, with unchanged producer artifact SHA-256 pins",
"`linux-x86_64` and `linux-aarch64`",
"trixie image needs a new source set derived from both native image inventories",
"equal amd64/arm64 source/version sets",
"verified published list and asset mirror before adding a registry row",
"CMake and make remain build-only",
"native validation is pending",
"unfilled skip, which is never proof",
):
self.assertIn(required, prose)

def test_runtime_floor_unchanged_producers_and_pending_mirror_are_documented(self):
self.assert_trixie_guidance(self.readme)

def test_wrong_runtime_floor_or_missing_producer_or_mirror_disclosure_is_rejected(self):
for fragment in ("Debian 13 (trixie)", "glibc 2.41", "remain at 1.10.0",
"unchanged producer artifact SHA-256 pins",
"verified published list and asset mirror",
"native validation\nis pending", "unfilled skip, which is never proof"):
with self.subTest(fragment=fragment):
mutated = self.readme.replace(fragment, "omitted", 1)
self.assertNotEqual(mutated, self.readme)
with self.assertRaises(AssertionError):
self.assert_trixie_guidance(mutated)


if __name__ == "__main__":
unittest.main()
Loading
Loading