Get:1 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
Hit:2 http://archive.ubuntu.com/ubuntu noble InRelease
Get:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Get:4 http://security.ubuntu.com/ubuntu noble-security/multiverse amd64 Packages [50.0 kB]
Get:5 http://security.ubuntu.com/ubuntu noble-security/restricted amd64 Packages [1801 kB]
Get:6 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [1533 kB]
Get:7 http://archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB]
Get:8 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [1245 kB]
Get:9 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [2149 kB]
Get:10 http://archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Packages [56.2 kB]
Get:11 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [1580 kB]
Get:12 http://archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Packages [1960 kB]
Get:13 http://archive.ubuntu.com/ubuntu noble-backports/main amd64 Packages [78.5 kB]
Get:14 http://archive.ubuntu.com/ubuntu noble-backports/multiverse amd64 Packages [671 B]
Get:15 http://archive.ubuntu.com/ubuntu noble-backports/universe amd64 Packages [40.4 kB]
Fetched 10.9 MB in 2s (5494 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libcurl4t64
The following packages will be upgraded:
  curl libcurl4t64
2 upgraded, 0 newly installed, 0 to remove and 156 not upgraded.
Need to get 569 kB of archives.
After this operation, 4096 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 curl amd64 8.5.0-2ubuntu10.13 [226 kB]
Get:2 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 libcurl4t64 amd64 8.5.0-2ubuntu10.13 [343 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 569 kB in 0s (1383 kB/s)
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 28580 files and directories currently installed.)
Preparing to unpack .../curl_8.5.0-2ubuntu10.13_amd64.deb ...
Unpacking curl (8.5.0-2ubuntu10.13) over (8.5.0-2ubuntu10.6) ...
Preparing to unpack .../libcurl4t64_8.5.0-2ubuntu10.13_amd64.deb ...
Unpacking libcurl4t64:amd64 (8.5.0-2ubuntu10.13) over (8.5.0-2ubuntu10.6) ...
Setting up libcurl4t64:amd64 (8.5.0-2ubuntu10.13) ...
Setting up curl (8.5.0-2ubuntu10.13) ...
Processing triggers for libc-bin (2.39-0ubuntu8.6) ...
downloading uv 0.9.5 x86_64-unknown-linux-gnu
no checksums to verify
installing to /root/.local/bin
  uv
  uvx
everything's installed!

To add $HOME/.local/bin to your PATH, either restart your shell or run:

    source $HOME/.local/bin/env (sh, bash, zsh)
    source $HOME/.local/bin/env.fish (fish)
Downloading cpython-3.13.9-linux-x86_64-gnu (download) (32.0MiB)
 Downloading cpython-3.13.9-linux-x86_64-gnu (download)
Downloading pygments (1.2MiB)
Downloading numpy (15.9MiB)
Downloading pillow (4.4MiB)
 Downloading pillow
 Downloading pygments
 Downloading numpy
Installed 8 packages in 45ms
============================= test session starts ==============================
platform linux -- Python 3.13.9, pytest-8.4.1, pluggy-1.6.0
rootdir: /tests
plugins: json-ctrf-0.3.5
collected 5 items

../tests/test_outputs.py ....F                                           [100%]

=================================== FAILURES ===================================
____________________________ test_image_similarity _____________________________

    def test_image_similarity():
        """Test that the generated image closely matches the reference.
    
        This test computes the normalized L2 similarity (cosine similarity)
        between the original path-traced image and the reconstructed image.
    
        The test requires at least 98% similarity, which ensures the solution
        accurately reproduces:
        - The scene geometry (spheres and planes)
        - The lighting and shading
        - The path tracing algorithm's stochastic sampling
    
        This high threshold validates that the implementation correctly
        implements the path tracing algorithm with proper ray-sphere
        intersection, material properties, and Monte Carlo sampling.
        """
        import numpy as np
        from PIL import Image
    
        # Load images using Pillow
        original = Image.open("/app/image.ppm")
        reconstructed = Image.open("/jail/reconstructed.ppm")
    
        # Convert to numpy arrays
        original_array = np.array(original).flatten() / 255.0
>       reconstructed_array = np.array(reconstructed).flatten() / 255.0
                              ^^^^^^^^^^^^^^^^^^^^^^^

/tests/test_outputs.py:103: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/root/.cache/uv/archive-v0/zJyn-KVlz5gwXK6jBSqbM/lib/python3.13/site-packages/PIL/Image.py:735: in __array_interface__
    new["data"] = self.tobytes()
                  ^^^^^^^^^^^^^^
/root/.cache/uv/archive-v0/zJyn-KVlz5gwXK6jBSqbM/lib/python3.13/site-packages/PIL/Image.py:794: in tobytes
    self.load()
/root/.cache/uv/archive-v0/zJyn-KVlz5gwXK6jBSqbM/lib/python3.13/site-packages/PIL/ImageFile.py:359: in load
    err_code = decoder.decode(b"")[1]
               ^^^^^^^^^^^^^^^^^^^
/root/.cache/uv/archive-v0/zJyn-KVlz5gwXK6jBSqbM/lib/python3.13/site-packages/PIL/PpmImagePlugin.py:294: in decode
    data = self._decode_blocks(maxval)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <PIL.PpmImagePlugin.PpmPlainDecoder object at 0x76e37808f4d0>
maxval = 255

    def _decode_blocks(self, maxval: int) -> bytearray:
        data = bytearray()
        max_len = 10
        out_byte_count = 4 if self.mode == "I" else 1
        out_max = 65535 if self.mode == "I" else 255
        bands = Image.getmodebands(self.mode)
        total_bytes = self.state.xsize * self.state.ysize * bands * out_byte_count
    
        half_token = b""
        while len(data) != total_bytes:
            block = self._read_block()  # read next block
            if not block:
                if half_token:
                    block = bytearray(b" ")  # flush half_token
                else:
                    # eof
                    break
    
            block = self._ignore_comments(block)
    
            if half_token:
                block = half_token + block  # stitch half_token to new block
                half_token = b""
    
            tokens = block.split()
    
            if block and not block[-1:].isspace():  # block might split token
                half_token = tokens.pop()  # save half token for later
                if len(half_token) > max_len:  # prevent buildup of half_token
                    msg = (
                        b"Token too long found in data: %s" % half_token[: max_len + 1]
                    )
                    raise ValueError(msg)
    
            for token in tokens:
                if len(token) > max_len:
                    msg = b"Token too long found in data: %s" % token[: max_len + 1]
                    raise ValueError(msg)
                value = int(token)
                if value < 0:
                    msg_str = f"Channel value is negative: {value}"
                    raise ValueError(msg_str)
                if value > maxval:
                    msg_str = f"Channel value too large for this mode: {value}"
>                   raise ValueError(msg_str)
E                   ValueError: Channel value too large for this mode: 411

/root/.cache/uv/archive-v0/zJyn-KVlz5gwXK6jBSqbM/lib/python3.13/site-packages/PIL/PpmImagePlugin.py:280: ValueError
==================================== PASSES ====================================
=========================== short test summary info ============================
PASSED ../tests/test_outputs.py::test_image_c_exists
PASSED ../tests/test_outputs.py::test_image_compiles
PASSED ../tests/test_outputs.py::test_no_deps
PASSED ../tests/test_outputs.py::test_runs_and_produces_output
FAILED ../tests/test_outputs.py::test_image_similarity - ValueError: Channel ...
========================= 1 failed, 4 passed in 12.72s =========================
