pdf 2026-05-12T14:34:35.778757363Z ╭──────────── git repo clone ───────────╼ pdf 2026-05-12T14:34:35.779491742Z │  › fetching app source code pdf 2026-05-12T14:34:35.779495923Z │ => Selecting branch "staging" pdf 2026-05-12T14:34:37.934858109Z │ => Checking out commit "3620b4718ac56dcb180f44d382e4199101e42df9" pdf 2026-05-12T14:34:37.991032817Z │ pdf 2026-05-12T14:34:37.993720187Z │  ✔ cloned repo to /.app_platform_workspace pdf 2026-05-12T14:34:38.008373140Z ╰────────────────────────────────────────╼ pdf 2026-05-12T14:34:38.008396602Z pdf 2026-05-12T14:34:38.272391013Z ╭──────────── dockerfile build ───────────╼ pdf 2026-05-12T14:34:38.284968981Z │  › using dockerfile /.app_platform_workspace/Dockerfile pdf 2026-05-12T14:34:38.286088664Z │  › using build context /.app_platform_workspace/ pdf 2026-05-12T14:34:38.286242872Z │ pdf 2026-05-12T14:34:38.323285849Z │ INFO[0000] Resolved base name golang to builder pdf 2026-05-12T14:34:38.323312418Z │ INFO[0000] Retrieving image manifest golang pdf 2026-05-12T14:34:38.323539552Z │ INFO[0000] Retrieving image library/golang from registry mirror pdf 2026-05-12T14:34:40.298510096Z │ INFO[0001] Retrieving image manifest golang pdf 2026-05-12T14:34:40.298537781Z │ INFO[0001] Returning cached image manifest pdf 2026-05-12T14:34:41.129135205Z │ INFO[0002] Retrieving image manifest debian:bookworm-slim pdf 2026-05-12T14:34:41.129164303Z │ INFO[0002] Retrieving image library/debian:bookworm-slim from registry mirror pdf 2026-05-12T14:34:41.727468416Z │ INFO[0003] Retrieving image manifest debian:bookworm-slim pdf 2026-05-12T14:34:41.727498880Z │ INFO[0003] Returning cached image manifest pdf 2026-05-12T14:34:41.727743867Z │ INFO[0003] Built cross stage deps: map[0:[/app/dist/server]] pdf 2026-05-12T14:34:41.728363752Z │ INFO[0003] Retrieving image manifest golang pdf 2026-05-12T14:34:41.728367746Z │ INFO[0003] Returning cached image manifest pdf 2026-05-12T14:34:41.728369850Z │ INFO[0003] Retrieving image manifest golang pdf 2026-05-12T14:34:41.728371806Z │ INFO[0003] Returning cached image manifest pdf 2026-05-12T14:34:41.728373934Z │ INFO[0003] Executing 0 build triggers pdf 2026-05-12T14:34:41.728376794Z │ INFO[0003] Building stage 'golang' [idx: '0', base-idx: '-1'] pdf 2026-05-12T14:34:41.728384681Z │ INFO[0003] Resolving srcs [go.*]... pdf 2026-05-12T14:34:41.730187073Z │ INFO[0003] Checking for cached layer pdf 2026-05-12T14:34:41.866943877Z │ INFO[0003] Using caching version of cmd: RUN go mod download && go mod verify pdf 2026-05-12T14:34:41.927110344Z │ INFO[0003] Checking for cached layer pdf 2026-05-12T14:34:41.972331116Z │ INFO[0003] No cached layer found for cmd RUN go test -v ./... && CGO_ENABLED=0 go build -v -installsuffix 'static' -ldflags="-X 'main.version=$(git rev-parse --short HEAD)' -X 'main.build=$(date --iso-8601=seconds)'" -o dist/server ./cmd/server pdf 2026-05-12T14:34:41.972400032Z │ INFO[0003] Unpacking rootfs as cmd COPY go.* ./ requires it. pdf 2026-05-12T14:34:59.154214626Z │ INFO[0020] Initializing snapshotter ... pdf 2026-05-12T14:34:59.154253334Z │ INFO[0020] Taking snapshot of full filesystem... pdf 2026-05-12T14:35:02.901662026Z │ INFO[0024] ARG GITHUB_USER_BUILD pdf 2026-05-12T14:35:02.917752923Z │ INFO[0024] No files changed in this command, skipping snapshotting. pdf 2026-05-12T14:35:02.918044642Z │ INFO[0024] ARG GITHUB_TOKEN_BUILD pdf 2026-05-12T14:35:02.918047888Z │ INFO[0024] No files changed in this command, skipping snapshotting. pdf 2026-05-12T14:35:02.918049795Z │ INFO[0024] ARG timezone=Asia/Bangkok pdf 2026-05-12T14:35:02.918056093Z │ INFO[0024] No files changed in this command, skipping snapshotting. pdf 2026-05-12T14:35:02.918058002Z │ INFO[0024] ENV GITHUB_USER $GITHUB_USER_BUILD pdf 2026-05-12T14:35:02.918060072Z │ INFO[0024] No files changed in this command, skipping snapshotting. pdf 2026-05-12T14:35:02.918061815Z │ INFO[0024] ENV GITHUB_TOKEN $GITHUB_TOKEN_BUILD pdf 2026-05-12T14:35:02.918063520Z │ INFO[0024] No files changed in this command, skipping snapshotting. pdf 2026-05-12T14:35:02.918065932Z │ INFO[0024] ENV TZ $timezone pdf 2026-05-12T14:35:02.918067705Z │ INFO[0024] No files changed in this command, skipping snapshotting. pdf 2026-05-12T14:35:02.918308027Z │ INFO[0024] WORKDIR /app pdf 2026-05-12T14:35:02.918310256Z │ INFO[0024] Cmd: workdir pdf 2026-05-12T14:35:02.918312045Z │ INFO[0024] Changed working directory to /app pdf 2026-05-12T14:35:02.918313841Z │ INFO[0024] Creating directory /app with uid -1 and gid -1 pdf 2026-05-12T14:35:02.918315683Z │ INFO[0024] Taking snapshot of files... pdf 2026-05-12T14:35:02.919970533Z │ INFO[0024] Resolving srcs [go.*]... pdf 2026-05-12T14:35:02.920631303Z │ INFO[0024] COPY go.* ./ pdf 2026-05-12T14:35:02.920634637Z │ INFO[0024] Resolving srcs [go.*]... pdf 2026-05-12T14:35:02.930248298Z │ INFO[0024] Taking snapshot of files... pdf 2026-05-12T14:35:02.931811892Z │ INFO[0024] RUN go mod download && go mod verify pdf 2026-05-12T14:35:02.931816122Z │ INFO[0024] Found cached layer, extracting to filesystem pdf 2026-05-12T14:35:47.574986495Z │ INFO[0069] COPY . . pdf 2026-05-12T14:35:47.767338345Z │ INFO[0069] Taking snapshot of files... pdf 2026-05-12T14:35:48.376055915Z │ INFO[0070] RUN go test -v ./... && CGO_ENABLED=0 go build -v -installsuffix 'static' -ldflags="-X 'main.version=$(git rev-parse --short HEAD)' -X 'main.build=$(date --iso-8601=seconds)'" -o dist/server ./cmd/server pdf 2026-05-12T14:35:48.778227392Z │ INFO[0070] Cmd: /bin/sh pdf 2026-05-12T14:35:48.778266065Z │ INFO[0070] Args: [-c go test -v ./... && CGO_ENABLED=0 go build -v -installsuffix 'static' -ldflags="-X 'main.version=$(git rev-parse --short HEAD)' -X 'main.build=$(date --iso-8601=seconds)'" -o dist/server ./cmd/server] pdf 2026-05-12T14:35:48.778284472Z │ INFO[0070] Running: [/bin/sh -c go test -v ./... && CGO_ENABLED=0 go build -v -installsuffix 'static' -ldflags="-X 'main.version=$(git rev-parse --short HEAD)' -X 'main.build=$(date --iso-8601=seconds)'" -o dist/server ./cmd/server] pdf 2026-05-12T14:35:56.112140456Z │ ? github.com/s0ngkran/pdf_watermark_process/cmd/make_blank [no test files] pdf 2026-05-12T14:36:04.093771020Z │ ? github.com/s0ngkran/pdf_watermark_process/cmd/sample_watermark [no test files] pdf 2026-05-12T14:36:04.471562126Z │ ? github.com/s0ngkran/pdf_watermark_process/cmd/server [no test files] pdf 2026-05-12T14:36:04.471592450Z │ ? github.com/s0ngkran/pdf_watermark_process/internal/assets/fonts [no test files] pdf 2026-05-12T14:36:04.498866204Z │ === RUN TestLoadConfig_Defaults pdf 2026-05-12T14:36:04.498909862Z │ === RUN TestLoadConfig_Defaults/App.Port pdf 2026-05-12T14:36:04.498913072Z │ === RUN TestLoadConfig_Defaults/Worker.CPURatio pdf 2026-05-12T14:36:04.498915823Z │ === RUN TestLoadConfig_Defaults/Worker.MinPagesForParallel pdf 2026-05-12T14:36:04.498918563Z │ === RUN TestLoadConfig_Defaults/Watermark.DefaultOpacity pdf 2026-05-12T14:36:04.498921080Z │ === RUN TestLoadConfig_Defaults/Watermark.DefaultFontSize pdf 2026-05-12T14:36:04.498923360Z │ === RUN TestLoadConfig_Defaults/Watermark.DefaultCopies pdf 2026-05-12T14:36:04.498926234Z │ === RUN TestLoadConfig_Defaults/Watermark.Rotation pdf 2026-05-12T14:36:04.498928526Z │ === RUN TestLoadConfig_Defaults/Watermark.Font pdf 2026-05-12T14:36:04.498930811Z │ === RUN TestLoadConfig_Defaults/Memory.Threshold pdf 2026-05-12T14:36:04.498933124Z │ === RUN TestLoadConfig_Defaults/Memory.MaxConcurrentJobs pdf 2026-05-12T14:36:04.498935419Z │ --- PASS: TestLoadConfig_Defaults (0.00s) pdf 2026-05-12T14:36:04.498937573Z │ --- PASS: TestLoadConfig_Defaults/App.Port (0.00s) pdf 2026-05-12T14:36:04.498939643Z │ --- PASS: TestLoadConfig_Defaults/Worker.CPURatio (0.00s) pdf 2026-05-12T14:36:04.498942155Z │ --- PASS: TestLoadConfig_Defaults/Worker.MinPagesForParallel (0.00s) pdf 2026-05-12T14:36:04.498944406Z │ --- PASS: TestLoadConfig_Defaults/Watermark.DefaultOpacity (0.00s) pdf 2026-05-12T14:36:04.498946601Z │ --- PASS: TestLoadConfig_Defaults/Watermark.DefaultFontSize (0.00s) pdf 2026-05-12T14:36:04.498948990Z │ --- PASS: TestLoadConfig_Defaults/Watermark.DefaultCopies (0.00s) pdf 2026-05-12T14:36:04.498951125Z │ --- PASS: TestLoadConfig_Defaults/Watermark.Rotation (0.00s) pdf 2026-05-12T14:36:04.498953277Z │ --- PASS: TestLoadConfig_Defaults/Watermark.Font (0.00s) pdf 2026-05-12T14:36:04.498955638Z │ --- PASS: TestLoadConfig_Defaults/Memory.Threshold (0.00s) pdf 2026-05-12T14:36:04.499046330Z │ --- PASS: TestLoadConfig_Defaults/Memory.MaxConcurrentJobs (0.00s) pdf 2026-05-12T14:36:04.499068325Z │ === RUN TestLoadConfig_EmptyName pdf 2026-05-12T14:36:04.499071848Z │ --- PASS: TestLoadConfig_EmptyName (0.00s) pdf 2026-05-12T14:36:04.499074875Z │ PASS pdf 2026-05-12T14:36:04.499077596Z │ ok github.com/s0ngkran/pdf_watermark_process/internal/config 0.025s pdf 2026-05-12T14:36:10.028950454Z │ === RUN TestMerge_CountExceedsMax pdf 2026-05-12T14:36:10.028978858Z │ 2026/05/12 21:36:04 [Merge] Request received from 0.0.0.0, Content-Length: 4320 pdf 2026-05-12T14:36:10.028981699Z │ --- PASS: TestMerge_CountExceedsMax (0.00s) pdf 2026-05-12T14:36:10.028983469Z │ === RUN TestMerge_CountAtMax pdf 2026-05-12T14:36:10.028996971Z │ 2026/05/12 21:36:04 [Merge] Request received from 0.0.0.0, Content-Length: 4122 pdf 2026-05-12T14:36:10.028998743Z │ 2026/05/12 21:36:04 [Merge] Merging 20 PDFs pdf 2026-05-12T14:36:10.029001092Z │ 2026/05/12 21:36:04 [DEBUG] NewProcessor: created temp directory: /tmp/pdf_watermark_3708300568 pdf 2026-05-12T14:36:10.029007127Z │ 2026/05/12 21:36:04 [DEBUG] MergePDFs: starting, 20 PDFs to merge pdf 2026-05-12T14:36:10.029154229Z │ 2026/05/12 21:36:04 [ERROR] MergePDFs: failed to read PDF 0: ReadContext failed: Read: xRefTable failed: pdfcpu: can't find last xref section pdf 2026-05-12T14:36:10.029179307Z │ 2026/05/12 21:36:04 [Merge] Failed to merge PDFs: failed to read PDF 0: ReadContext failed: Read: xRefTable failed: pdfcpu: can't find last xref section pdf 2026-05-12T14:36:10.029182086Z │ --- PASS: TestMerge_CountAtMax (0.00s) pdf 2026-05-12T14:36:10.029183893Z │ === RUN TestMerge_TotalSizeExceedsMax pdf 2026-05-12T14:36:10.029186155Z │ 2026/05/12 21:36:09 [Merge] Request received from 0.0.0.0, Content-Length: 125829653 pdf 2026-05-12T14:36:10.029187951Z │ --- PASS: TestMerge_TotalSizeExceedsMax (4.11s) pdf 2026-05-12T14:36:10.029190116Z │ === RUN TestMerge_CountZero pdf 2026-05-12T14:36:10.029192488Z │ 2026/05/12 21:36:09 [Merge] Request received from 0.0.0.0, Content-Length: 181 pdf 2026-05-12T14:36:10.029202063Z │ --- PASS: TestMerge_CountZero (0.00s) pdf 2026-05-12T14:36:10.029203746Z │ === RUN TestMerge_CountOne_PassesValidator pdf 2026-05-12T14:36:10.029205573Z │ 2026/05/12 21:36:09 [Merge] Request received from 0.0.0.0, Content-Length: 377 pdf 2026-05-12T14:36:10.029207222Z │ 2026/05/12 21:36:09 [Merge] Merging 1 PDFs pdf 2026-05-12T14:36:10.029208988Z │ 2026/05/12 21:36:09 [DEBUG] NewProcessor: created temp directory: /tmp/pdf_watermark_1255647466 pdf 2026-05-12T14:36:10.029397156Z │ 2026/05/12 21:36:09 [DEBUG] MergePDFs: starting, 1 PDFs to merge pdf 2026-05-12T14:36:10.029400467Z │ 2026/05/12 21:36:09 [DEBUG] MergePDFs: only 1 PDF, returning as-is pdf 2026-05-12T14:36:10.029402169Z │ 2026/05/12 21:36:09 [Merge] Success: merged 1 PDFs into 20 bytes pdf 2026-05-12T14:36:10.029403991Z │ --- PASS: TestMerge_CountOne_PassesValidator (0.00s) pdf 2026-05-12T14:36:10.029406110Z │ === RUN TestMerge_InvalidPDF pdf 2026-05-12T14:36:10.029408297Z │ 2026/05/12 21:36:09 [Merge] Request received from 0.0.0.0, Content-Length: 562 pdf 2026-05-12T14:36:10.029410560Z │ --- PASS: TestMerge_InvalidPDF (0.00s) pdf 2026-05-12T14:36:10.029412192Z │ === RUN TestTextStampV2_HappyPath_WithLastUpdated pdf 2026-05-12T14:36:10.029414550Z │ 2026/05/12 21:36:09 [TextStampV2] Request received from 0.0.0.0, Content-Type: multipart/form-data; boundary=51e3f42dd95c08a222f55ad12ee04936dc10b3d3073cc73037d606fb4c84, Content-Length: 7244 pdf 2026-05-12T14:36:10.029417282Z │ 2026/05/12 21:36:09 [TextStampV2] PDF file received: name=sample.pdf, size=6224 bytes pdf 2026-05-12T14:36:10.029423870Z │ 2026/05/12 21:36:09 [TextStampV2] Parameters: id=42, name=สมชาย ใจดี, name_en=Somchai Jaidee, citizen_id=1234567890123 pdf 2026-05-12T14:36:10.029425580Z │ 2026/05/12 21:36:09 [TextStampV2] Starting layered PDF processing... pdf 2026-05-12T14:36:10.029427280Z │ 2026/05/12 21:36:09 [DEBUG] HideWatermarkOCG: no OCG matched "Watermark", passthrough pdf 2026-05-12T14:36:10.029428882Z │ 2026/05/12 21:36:09 [TextStampV2] Processing complete, output size: 77669 bytes pdf 2026-05-12T14:36:10.029431002Z │ 2026/05/12 21:36:09 [text-stamp-v2] pdf_url= pages=1 memory_pct_start=0.0 duration_ms=11 outcome=success error="" pdf 2026-05-12T14:36:10.029435775Z │ --- PASS: TestTextStampV2_HappyPath_WithLastUpdated (0.01s) pdf 2026-05-12T14:36:10.029437446Z │ === RUN TestTextStampV2_HappyPath_Multipart pdf 2026-05-12T14:36:10.029439179Z │ 2026/05/12 21:36:09 [TextStampV2] Request received from 0.0.0.0, Content-Type: multipart/form-data; boundary=1d5411fadeaaf394b475211325c3d52e0f38269aa74e4a6a2d07b3f95288, Content-Length: 6981 pdf 2026-05-12T14:36:10.029441048Z │ 2026/05/12 21:36:09 [TextStampV2] PDF file received: name=sample.pdf, size=6224 bytes pdf 2026-05-12T14:36:10.029442705Z │ 2026/05/12 21:36:09 [TextStampV2] Parameters: id=42, name=สมชาย ใจดี, name_en=Somchai Jaidee, citizen_id=1234567890123 pdf 2026-05-12T14:36:10.029444462Z │ 2026/05/12 21:36:09 [TextStampV2] Starting layered PDF processing... pdf 2026-05-12T14:36:10.029446107Z │ 2026/05/12 21:36:09 [DEBUG] HideWatermarkOCG: no OCG matched "Watermark", passthrough pdf 2026-05-12T14:36:10.029447857Z │ 2026/05/12 21:36:09 [TextStampV2] Processing complete, output size: 70814 bytes pdf 2026-05-12T14:36:10.029449497Z │ 2026/05/12 21:36:09 [text-stamp-v2] pdf_url= pages=1 memory_pct_start=0.0 duration_ms=10 outcome=success error="" pdf 2026-05-12T14:36:10.029451298Z │ --- PASS: TestTextStampV2_HappyPath_Multipart (0.01s) pdf 2026-05-12T14:36:10.029452992Z │ === RUN TestTextStampV2_MissingPDF pdf 2026-05-12T14:36:10.029454749Z │ 2026/05/12 21:36:09 [TextStampV2] Request received from 0.0.0.0, Content-Type: multipart/form-data; boundary=4f7679360928402a17388333cc38c0c906af84b5c6053bc0af1e6d98df12, Content-Length: 292 pdf 2026-05-12T14:36:10.029456565Z │ 2026/05/12 21:36:09 [text-stamp-v2] pdf_url= pages=-1 memory_pct_start=0.0 duration_ms=0 outcome=error error="PDF file or pdf_url is required" pdf 2026-05-12T14:36:10.029458413Z │ --- PASS: TestTextStampV2_MissingPDF (0.00s) pdf 2026-05-12T14:36:10.029460295Z │ === RUN TestTextStampV2_MissingID_Allowed pdf 2026-05-12T14:36:10.029462022Z │ 2026/05/12 21:36:09 [TextStampV2] Request received from 0.0.0.0, Content-Type: multipart/form-data; boundary=2b31c5b090e4e3f1ac2d447e978e25ad2ab50f7d27783fad40a426eca596, Content-Length: 6579 pdf 2026-05-12T14:36:10.029463797Z │ 2026/05/12 21:36:09 [TextStampV2] PDF file received: name=sample.pdf, size=6224 bytes pdf 2026-05-12T14:36:10.029465400Z │ 2026/05/12 21:36:09 [TextStampV2] Parameters: id=, name=n, name_en=, citizen_id= pdf 2026-05-12T14:36:10.029467358Z │ 2026/05/12 21:36:09 [TextStampV2] Starting layered PDF processing... pdf 2026-05-12T14:36:10.029469143Z │ 2026/05/12 21:36:09 [DEBUG] HideWatermarkOCG: no OCG matched "Watermark", passthrough pdf 2026-05-12T14:36:10.029470693Z │ 2026/05/12 21:36:09 [TextStampV2] Processing complete, output size: 65121 bytes pdf 2026-05-12T14:36:10.029472425Z │ 2026/05/12 21:36:09 [text-stamp-v2] pdf_url= pages=1 memory_pct_start=0.0 duration_ms=9 outcome=success error="" pdf 2026-05-12T14:36:10.029474082Z │ --- PASS: TestTextStampV2_MissingID_Allowed (0.01s) pdf 2026-05-12T14:36:10.029475803Z │ === RUN TestTextStampV2_MissingName pdf 2026-05-12T14:36:10.029481098Z │ 2026/05/12 21:36:09 [TextStampV2] Request received from 0.0.0.0, Content-Type: multipart/form-data; boundary=3143071bd409824427aa53690a7d30980c91697947d82c20e43f3972f1c6, Content-Length: 6577 pdf 2026-05-12T14:36:10.029482804Z │ 2026/05/12 21:36:09 [TextStampV2] PDF file received: name=sample.pdf, size=6224 bytes pdf 2026-05-12T14:36:10.029485178Z │ 2026/05/12 21:36:09 [text-stamp-v2] pdf_url= pages=1 memory_pct_start=0.0 duration_ms=0 outcome=error error="name required" pdf 2026-05-12T14:36:10.029486956Z │ --- PASS: TestTextStampV2_MissingName (0.00s) pdf 2026-05-12T14:36:10.029490832Z │ === RUN TestTextStampV2_SSRFURLBlocked pdf 2026-05-12T14:36:10.029492423Z │ 2026/05/12 21:36:09 [TextStampV2] Request received from 0.0.0.0, Content-Type: multipart/form-data; boundary=88dbf230ef9c67ffa0bfcc2d37befec7dd9c3874055a2a360117792f6be8, Content-Length: 426 pdf 2026-05-12T14:36:10.029493956Z │ 2026/05/12 21:36:09 [TextStampV2] ERROR: Invalid PDF URL: url host resolves to a non-public address pdf 2026-05-12T14:36:10.029495647Z │ 2026/05/12 21:36:09 [text-stamp-v2] pdf_url=http://127.0.0.1/x pages=-1 memory_pct_start=0.0 duration_ms=0 outcome=error error="Invalid PDF URL: url host resolves to a non-public address" pdf 2026-05-12T14:36:10.029497293Z │ --- PASS: TestTextStampV2_SSRFURLBlocked (0.00s) pdf 2026-05-12T14:36:10.029498878Z │ === RUN TestTextStampV2_SSRFSchemeBlocked pdf 2026-05-12T14:36:10.029500498Z │ 2026/05/12 21:36:09 [TextStampV2] Request received from 0.0.0.0, Content-Type: multipart/form-data; boundary=a7817624dc9561a843875209af7936a5dff02e0af296807a0979ed661522, Content-Length: 426 pdf 2026-05-12T14:36:10.029502046Z │ 2026/05/12 21:36:09 [TextStampV2] ERROR: Invalid PDF URL: only http(s) URLs are allowed pdf 2026-05-12T14:36:10.029504926Z │ 2026/05/12 21:36:09 [text-stamp-v2] pdf_url=file:///etc/passwd pages=-1 memory_pct_start=0.0 duration_ms=0 outcome=error error="Invalid PDF URL: only http(s) URLs are allowed" pdf 2026-05-12T14:36:10.029506642Z │ --- PASS: TestTextStampV2_SSRFSchemeBlocked (0.00s) pdf 2026-05-12T14:36:10.029508206Z │ === RUN TestTextStampV2_EmptyBody pdf 2026-05-12T14:36:10.029509846Z │ 2026/05/12 21:36:09 [TextStampV2] Request received from 0.0.0.0, Content-Type: multipart/form-data; boundary=x, Content-Length: 0 pdf 2026-05-12T14:36:10.029511621Z │ 2026/05/12 21:36:09 [TextStampV2] ERROR: Failed to parse multipart form: form size must be greater than 0. Given 0 pdf 2026-05-12T14:36:10.029513293Z │ 2026/05/12 21:36:09 [text-stamp-v2] pdf_url= pages=-1 memory_pct_start=0.0 duration_ms=0 outcome=error error="Failed to parse multipart form: form size must be greater than 0. Given 0" pdf 2026-05-12T14:36:10.029514857Z │ --- PASS: TestTextStampV2_EmptyBody (0.00s) pdf 2026-05-12T14:36:10.029516415Z │ === RUN TestTextStampV2_ServiceErrorMapsTo500 pdf 2026-05-12T14:36:10.029518048Z │ 2026/05/12 21:36:09 [TextStampV2] Request received from 0.0.0.0, Content-Type: multipart/form-data; boundary=80191bc325ec29e241ef205d5b9c9f7cdb5fe357437cb505ce7d01d55aaa, Content-Length: 485 pdf 2026-05-12T14:36:10.029519600Z │ 2026/05/12 21:36:09 [TextStampV2] PDF file received: name=sample.pdf, size=18 bytes pdf 2026-05-12T14:36:10.029521316Z │ 2026/05/12 21:36:09 [TextStampV2] Parameters: id=1, name=n, name_en=, citizen_id= pdf 2026-05-12T14:36:10.029523056Z │ 2026/05/12 21:36:09 [TextStampV2] Starting layered PDF processing... pdf 2026-05-12T14:36:10.029524791Z │ 2026/05/12 21:36:09 [LayeredStamp] OCG hide failed (passthrough): ocg: read context: ReadContext failed: Read: xRefTable failed: pdfcpu: can't find last xref section pdf 2026-05-12T14:36:10.029526640Z │ 2026/05/12 21:36:09 [TextStampV2] ERROR: Failed to process PDF: layered stamp: page dims: dims: read: ReadContext failed: Read: xRefTable failed: pdfcpu: can't find last xref section pdf 2026-05-12T14:36:10.029529919Z │ 2026/05/12 21:36:09 [text-stamp-v2] pdf_url= pages=-1 memory_pct_start=0.0 duration_ms=0 outcome=error error="layered stamp: page dims: dims: read: ReadContext failed: Read: xRefTable failed: pdfcpu: can't find last xref section" pdf 2026-05-12T14:36:10.029531742Z │ --- PASS: TestTextStampV2_ServiceErrorMapsTo500 (0.00s) pdf 2026-05-12T14:36:10.029533643Z │ === RUN TestNewTextStampV2Handler_NoMonitor pdf 2026-05-12T14:36:10.029537248Z │ --- PASS: TestNewTextStampV2Handler_NoMonitor (0.00s) pdf 2026-05-12T14:36:10.029538921Z │ === RUN TestNewTextStampV2HandlerWithMonitor_StoresMonitor pdf 2026-05-12T14:36:10.029540458Z │ --- PASS: TestNewTextStampV2HandlerWithMonitor_StoresMonitor (0.00s) pdf 2026-05-12T14:36:10.029542142Z │ === RUN TestDownloadPDF_HappyPath pdf 2026-05-12T14:36:10.029543867Z │ --- PASS: TestDownloadPDF_HappyPath (0.00s) pdf 2026-05-12T14:36:10.029545469Z │ === RUN TestDownloadPDF_Non200 pdf 2026-05-12T14:36:10.029547025Z │ --- PASS: TestDownloadPDF_Non200 (0.00s) pdf 2026-05-12T14:36:10.029548646Z │ === RUN TestDownloadPDF_ExceedsSizeLimit pdf 2026-05-12T14:36:10.029557482Z │ --- PASS: TestDownloadPDF_ExceedsSizeLimit (0.80s) pdf 2026-05-12T14:36:10.029559077Z │ === RUN TestDownloadPDF_ConnectionRefused pdf 2026-05-12T14:36:10.029560770Z │ --- PASS: TestDownloadPDF_ConnectionRefused (0.00s) pdf 2026-05-12T14:36:10.029565369Z │ === RUN TestTextStampV2_PdfURL_ValidationReached pdf 2026-05-12T14:36:10.029566973Z │ 2026/05/12 21:36:09 [TextStampV2] Request received from 0.0.0.0, Content-Type: multipart/form-data; boundary=dd8c34a5f60c46aa79e7a9548f151020f3162978a1f505dafc839101b364, Content-Length: 446 pdf 2026-05-12T14:36:10.029568634Z │ 2026/05/12 21:36:09 [TextStampV2] Downloading PDF from URL: https://example.com/does-not-exist.pdf pdf 2026-05-12T14:36:10.029570185Z │ 2026/05/12 21:36:09 [text-stamp-v2] pdf_url=https://example.com/does-not-exist.pdf pages=-1 memory_pct_start=0.0 duration_ms=46 outcome=error error="Failed to download PDF: HTTP 404 Not Found" pdf 2026-05-12T14:36:10.029571821Z │ --- PASS: TestTextStampV2_PdfURL_ValidationReached (0.05s) pdf 2026-05-12T14:36:10.029573581Z │ === RUN TestReadPDFInput_CoversAllBranches pdf 2026-05-12T14:36:10.029575124Z │ --- PASS: TestReadPDFInput_CoversAllBranches (0.00s) pdf 2026-05-12T14:36:10.029577330Z │ PASS pdf 2026-05-12T14:36:10.029579070Z │ ok github.com/s0ngkran/pdf_watermark_process/internal/handler 5.023s pdf 2026-05-12T14:36:10.032179963Z │ ? github.com/s0ngkran/pdf_watermark_process/internal/memory [no test files] pdf 2026-05-12T14:36:10.032199274Z │ === RUN TestNewAPIKeyAuth pdf 2026-05-12T14:36:10.032202229Z │ === RUN TestNewAPIKeyAuth/valid_API_key_allows_request pdf 2026-05-12T14:36:10.032204084Z │ === RUN TestNewAPIKeyAuth/missing_API_key_returns_401 pdf 2026-05-12T14:36:10.032206149Z │ === RUN TestNewAPIKeyAuth/invalid_API_key_returns_401 pdf 2026-05-12T14:36:10.032209313Z │ === RUN TestNewAPIKeyAuth/health_check_skips_auth pdf 2026-05-12T14:36:10.032216578Z │ === RUN TestNewAPIKeyAuth/health_check_with_invalid_key_still_passes pdf 2026-05-12T14:36:10.032218409Z │ === RUN TestNewAPIKeyAuth/empty_configured_key_skips_auth_(dev_mode) pdf 2026-05-12T14:36:10.032220067Z │ === RUN TestNewAPIKeyAuth/empty_configured_key_skips_auth_even_with_header pdf 2026-05-12T14:36:10.032221882Z │ === RUN TestNewAPIKeyAuth/valid_key_on_merge_endpoint pdf 2026-05-12T14:36:10.032362629Z │ === RUN TestNewAPIKeyAuth/missing_key_on_merge_endpoint_returns_401 pdf 2026-05-12T14:36:10.032375468Z │ --- PASS: TestNewAPIKeyAuth (0.00s) pdf 2026-05-12T14:36:10.032377567Z │ --- PASS: TestNewAPIKeyAuth/valid_API_key_allows_request (0.00s) pdf 2026-05-12T14:36:10.032379625Z │ --- PASS: TestNewAPIKeyAuth/missing_API_key_returns_401 (0.00s) pdf 2026-05-12T14:36:10.032381310Z │ --- PASS: TestNewAPIKeyAuth/invalid_API_key_returns_401 (0.00s) pdf 2026-05-12T14:36:10.032394262Z │ --- PASS: TestNewAPIKeyAuth/health_check_skips_auth (0.00s) pdf 2026-05-12T14:36:10.032396053Z │ --- PASS: TestNewAPIKeyAuth/health_check_with_invalid_key_still_passes (0.00s) pdf 2026-05-12T14:36:10.032397977Z │ --- PASS: TestNewAPIKeyAuth/empty_configured_key_skips_auth_(dev_mode) (0.00s) pdf 2026-05-12T14:36:10.032401893Z │ --- PASS: TestNewAPIKeyAuth/empty_configured_key_skips_auth_even_with_header (0.00s) pdf 2026-05-12T14:36:10.032403728Z │ --- PASS: TestNewAPIKeyAuth/valid_key_on_merge_endpoint (0.00s) pdf 2026-05-12T14:36:10.032405392Z │ --- PASS: TestNewAPIKeyAuth/missing_key_on_merge_endpoint_returns_401 (0.00s) pdf 2026-05-12T14:36:10.032407449Z │ PASS pdf 2026-05-12T14:36:10.032409227Z │ ok github.com/s0ngkran/pdf_watermark_process/internal/middleware 0.006s pdf 2026-05-12T14:36:10.032411031Z │ === RUN TestChannelToByte pdf 2026-05-12T14:36:10.032412675Z │ --- PASS: TestChannelToByte (0.00s) pdf 2026-05-12T14:36:10.032414372Z │ === RUN TestToPdfY pdf 2026-05-12T14:36:10.032415984Z │ --- PASS: TestToPdfY (0.00s) pdf 2026-05-12T14:36:10.032417645Z │ === RUN TestLayer1RingPositions pdf 2026-05-12T14:36:10.032419600Z │ --- PASS: TestLayer1RingPositions (0.00s) pdf 2026-05-12T14:36:10.032421281Z │ === RUN TestBuildOverlayPDF_RejectsInvalidInputs pdf 2026-05-12T14:36:10.032422906Z │ --- PASS: TestBuildOverlayPDF_RejectsInvalidInputs (0.00s) pdf 2026-05-12T14:36:10.032424760Z │ === RUN TestBuildOverlayPDF_HappyPath_EmbeddedBytes pdf 2026-05-12T14:36:10.032426398Z │ --- PASS: TestBuildOverlayPDF_HappyPath_EmbeddedBytes (0.02s) pdf 2026-05-12T14:36:10.032428117Z │ === RUN TestBuildOverlayPDF_BadRegularFontBytes pdf 2026-05-12T14:36:10.032429728Z │ --- PASS: TestBuildOverlayPDF_BadRegularFontBytes (0.00s) pdf 2026-05-12T14:36:10.032431483Z │ === RUN TestBuildOverlayPDF_BadBoldFontBytes pdf 2026-05-12T14:36:10.032488148Z │ --- PASS: TestBuildOverlayPDF_BadBoldFontBytes (0.00s) pdf 2026-05-12T14:36:10.032491663Z │ === RUN TestBuildOverlayPDF_BytesWinOverPath pdf 2026-05-12T14:36:10.032493508Z │ --- PASS: TestBuildOverlayPDF_BytesWinOverPath (0.02s) pdf 2026-05-12T14:36:10.032495239Z │ === RUN TestBuildOverlayPDF_HappyPath_A4 pdf 2026-05-12T14:36:10.032496967Z │ --- PASS: TestBuildOverlayPDF_HappyPath_A4 (0.02s) pdf 2026-05-12T14:36:10.032498820Z │ === RUN TestBuildOverlayPDF_BlankFields_StillProducesPDF pdf 2026-05-12T14:36:10.032629224Z │ --- PASS: TestBuildOverlayPDF_BlankFields_StillProducesPDF (0.02s) pdf 2026-05-12T14:36:10.032632032Z │ === RUN TestBuildOverlayPDF_Landscape pdf 2026-05-12T14:36:10.032633702Z │ --- PASS: TestBuildOverlayPDF_Landscape (0.01s) pdf 2026-05-12T14:36:10.032639930Z │ === RUN TestBuildOverlayPDF_MissingFontFile pdf 2026-05-12T14:36:10.032641655Z │ --- PASS: TestBuildOverlayPDF_MissingFontFile (0.00s) pdf 2026-05-12T14:36:10.032643494Z │ === RUN TestStudentDataZeroValueIsValid pdf 2026-05-12T14:36:10.032645421Z │ --- PASS: TestStudentDataZeroValueIsValid (0.00s) pdf 2026-05-12T14:36:10.032647256Z │ === RUN TestBuildOverlayPDF_BadRegularFontPath pdf 2026-05-12T14:36:10.032648900Z │ --- PASS: TestBuildOverlayPDF_BadRegularFontPath (0.00s) pdf 2026-05-12T14:36:10.032650562Z │ === RUN TestBuildOverlayPDF_BadBoldFontPath pdf 2026-05-12T14:36:10.032652189Z │ --- PASS: TestBuildOverlayPDF_BadBoldFontPath (0.00s) pdf 2026-05-12T14:36:10.032654241Z │ === RUN TestLayerColorConstants pdf 2026-05-12T14:36:10.032655901Z │ --- PASS: TestLayerColorConstants (0.00s) pdf 2026-05-12T14:36:10.032671980Z │ === RUN TestLayer3BrandText pdf 2026-05-12T14:36:10.032673741Z │ --- PASS: TestLayer3BrandText (0.00s) pdf 2026-05-12T14:36:10.032778108Z │ === RUN TestLayer4LabelUsesEnDash pdf 2026-05-12T14:36:10.032782316Z │ --- PASS: TestLayer4LabelUsesEnDash (0.00s) pdf 2026-05-12T14:36:10.032784016Z │ === RUN TestBuildOverlayPDF_Layer3Renders pdf 2026-05-12T14:36:10.032785882Z │ --- PASS: TestBuildOverlayPDF_Layer3Renders (0.01s) pdf 2026-05-12T14:36:10.032787743Z │ === RUN TestBuildOverlayPDF_WithPdfName pdf 2026-05-12T14:36:10.032789475Z │ --- PASS: TestBuildOverlayPDF_WithPdfName (0.01s) pdf 2026-05-12T14:36:10.032791639Z │ === RUN TestBuildOverlayPDF_EmptyPdfName_NoCornerLayer pdf 2026-05-12T14:36:10.032793299Z │ --- PASS: TestBuildOverlayPDF_EmptyPdfName_NoCornerLayer (0.01s) pdf 2026-05-12T14:36:10.032795104Z │ === RUN TestDrawLayerCorner_RendersFullFormatWhenLastUpdatedSet pdf 2026-05-12T14:36:10.032797101Z │ --- PASS: TestDrawLayerCorner_RendersFullFormatWhenLastUpdatedSet (0.02s) pdf 2026-05-12T14:36:10.032798737Z │ === RUN TestDrawLayerCorner_OmitsLastUpdatedSuffixWhenEmpty pdf 2026-05-12T14:36:10.032800331Z │ --- PASS: TestDrawLayerCorner_OmitsLastUpdatedSuffixWhenEmpty (0.03s) pdf 2026-05-12T14:36:10.032802014Z │ === RUN TestHideWatermarkOCG_DisablesMatchingLayer pdf 2026-05-12T14:36:10.032803671Z │ 2026/05/12 21:36:05 [DEBUG] HideWatermarkOCG: matched and disabled OCG "Watermark" pdf 2026-05-12T14:36:10.032805482Z │ --- PASS: TestHideWatermarkOCG_DisablesMatchingLayer (0.01s) pdf 2026-05-12T14:36:10.032807133Z │ === RUN TestHideWatermarkOCG_CaseInsensitiveMatch pdf 2026-05-12T14:36:10.032808849Z │ 2026/05/12 21:36:05 [DEBUG] HideWatermarkOCG: matched and disabled OCG "Watermark" pdf 2026-05-12T14:36:10.032810495Z │ --- PASS: TestHideWatermarkOCG_CaseInsensitiveMatch (0.01s) pdf 2026-05-12T14:36:10.032812102Z │ === RUN TestHideWatermarkOCG_NoOCG_Passthrough pdf 2026-05-12T14:36:10.032814162Z │ 2026/05/12 21:36:05 [DEBUG] HideWatermarkOCG: no OCG matched "Watermark", passthrough pdf 2026-05-12T14:36:10.032815858Z │ --- PASS: TestHideWatermarkOCG_NoOCG_Passthrough (0.00s) pdf 2026-05-12T14:36:10.032817400Z │ === RUN TestHideWatermarkOCG_OCGWithDifferentName_Passthrough pdf 2026-05-12T14:36:10.032818982Z │ 2026/05/12 21:36:05 [DEBUG] HideWatermarkOCG: no OCG matched "Watermark", passthrough pdf 2026-05-12T14:36:10.032820667Z │ --- PASS: TestHideWatermarkOCG_OCGWithDifferentName_Passthrough (0.00s) pdf 2026-05-12T14:36:10.032822368Z │ === RUN TestOcgNameEquals_SupportsStringLiteralAndHex pdf 2026-05-12T14:36:10.032823951Z │ --- PASS: TestOcgNameEquals_SupportsStringLiteralAndHex (0.00s) pdf 2026-05-12T14:36:10.032825491Z │ === RUN TestHideWatermarkOCG_GarbageInput_ReturnsError pdf 2026-05-12T14:36:10.032827003Z │ --- PASS: TestHideWatermarkOCG_GarbageInput_ReturnsError (0.00s) pdf 2026-05-12T14:36:10.032828811Z │ === RUN TestApplyOverlayPages_SinglePage pdf 2026-05-12T14:36:10.032830389Z │ --- PASS: TestApplyOverlayPages_SinglePage (0.02s) pdf 2026-05-12T14:36:10.032831957Z │ === RUN TestApplyOverlayPages_MultiPage_AllPages pdf 2026-05-12T14:36:10.032833676Z │ --- PASS: TestApplyOverlayPages_MultiPage_AllPages (0.02s) pdf 2026-05-12T14:36:10.032835339Z │ === RUN TestApplyOverlayPages_SpecificPages pdf 2026-05-12T14:36:10.032836975Z │ --- PASS: TestApplyOverlayPages_SpecificPages (0.03s) pdf 2026-05-12T14:36:10.032838587Z │ === RUN TestApplyOverlayPages_EmptyInput pdf 2026-05-12T14:36:10.032842745Z │ --- PASS: TestApplyOverlayPages_EmptyInput (0.00s) pdf 2026-05-12T14:36:10.032844493Z │ === RUN TestApplyOverlayPages_EmptyOverlay pdf 2026-05-12T14:36:10.032846035Z │ --- PASS: TestApplyOverlayPages_EmptyOverlay (0.00s) pdf 2026-05-12T14:36:10.032847590Z │ === RUN TestApplyOverlayPages_GarbageOverlay pdf 2026-05-12T14:36:10.032849284Z │ --- PASS: TestApplyOverlayPages_GarbageOverlay (0.00s) pdf 2026-05-12T14:36:10.032850935Z │ === RUN TestApplyOverlayPages_PDF14WithStructElementDictE pdf 2026-05-12T14:36:10.032852622Z │ --- PASS: TestApplyOverlayPages_PDF14WithStructElementDictE (0.03s) pdf 2026-05-12T14:36:10.032854140Z │ === RUN TestPageDimensions_ReturnsPerPageSizes pdf 2026-05-12T14:36:10.032855706Z │ --- PASS: TestPageDimensions_ReturnsPerPageSizes (0.00s) pdf 2026-05-12T14:36:10.032857435Z │ === RUN TestPageDimensions_GarbageInput pdf 2026-05-12T14:36:10.032858972Z │ --- PASS: TestPageDimensions_GarbageInput (0.00s) pdf 2026-05-12T14:36:10.032860548Z │ === RUN TestPageDimensions_PDF14WithStructElementDictE pdf 2026-05-12T14:36:10.032862044Z │ --- PASS: TestPageDimensions_PDF14WithStructElementDictE (0.01s) pdf 2026-05-12T14:36:10.032863643Z │ === RUN TestPageDimensions_EmptyBytes pdf 2026-05-12T14:36:10.032865179Z │ --- PASS: TestPageDimensions_EmptyBytes (0.00s) pdf 2026-05-12T14:36:10.032866740Z │ === RUN TestPageDimensions_HeaderOnly pdf 2026-05-12T14:36:10.032868286Z │ --- PASS: TestPageDimensions_HeaderOnly (0.00s) pdf 2026-05-12T14:36:10.032869815Z │ === RUN TestPageDimensions_MixedDims pdf 2026-05-12T14:36:10.032957533Z │ --- PASS: TestPageDimensions_MixedDims (0.00s) pdf 2026-05-12T14:36:10.032960344Z │ === RUN TestPageDimensionsFile_RoundTrip pdf 2026-05-12T14:36:10.032962525Z │ --- PASS: TestPageDimensionsFile_RoundTrip (0.00s) pdf 2026-05-12T14:36:10.032964225Z │ === RUN TestPageDimensionsFile_MissingFile pdf 2026-05-12T14:36:10.032965922Z │ --- PASS: TestPageDimensionsFile_MissingFile (0.00s) pdf 2026-05-12T14:36:10.032967495Z │ === RUN TestGroupPagesByDim_AllSameSize pdf 2026-05-12T14:36:10.032969081Z │ --- PASS: TestGroupPagesByDim_AllSameSize (0.00s) pdf 2026-05-12T14:36:10.032970754Z │ === RUN TestGroupPagesByDim_MixedSizes pdf 2026-05-12T14:36:10.033070135Z │ --- PASS: TestGroupPagesByDim_MixedSizes (0.00s) pdf 2026-05-12T14:36:10.033072740Z │ === RUN TestGroupPagesByDim_Tolerance pdf 2026-05-12T14:36:10.033074489Z │ --- PASS: TestGroupPagesByDim_Tolerance (0.00s) pdf 2026-05-12T14:36:10.033076262Z │ === RUN TestGroupPagesByDim_NegativeToleranceFallsBackToDefault pdf 2026-05-12T14:36:10.033078238Z │ --- PASS: TestGroupPagesByDim_NegativeToleranceFallsBackToDefault (0.00s) pdf 2026-05-12T14:36:10.033080247Z │ === RUN TestBuildPageSelection pdf 2026-05-12T14:36:10.033081907Z │ --- PASS: TestBuildPageSelection (0.00s) pdf 2026-05-12T14:36:10.033083895Z │ === RUN TestEnsureReadable_ValidPDF pdf 2026-05-12T14:36:10.033085662Z │ --- PASS: TestEnsureReadable_ValidPDF (0.01s) pdf 2026-05-12T14:36:10.033087562Z │ === RUN TestEnsureReadable_Garbage pdf 2026-05-12T14:36:10.033089325Z │ --- PASS: TestEnsureReadable_Garbage (0.00s) pdf 2026-05-12T14:36:10.033091120Z │ === RUN TestMergePDFs_Concatenates pdf 2026-05-12T14:36:10.033093049Z │ 2026/05/12 21:36:05 [DEBUG] NewProcessor: created temp directory: /tmp/pdf_watermark_4216651753 pdf 2026-05-12T14:36:10.033094841Z │ 2026/05/12 21:36:05 [DEBUG] MergePDFs: starting, 2 PDFs to merge pdf 2026-05-12T14:36:10.033099434Z │ 2026/05/12 21:36:05 [DEBUG] MergePDFs: read PDF 0, pages: 2 pdf 2026-05-12T14:36:10.033101199Z │ 2026/05/12 21:36:05 [DEBUG] MergePDFs: read PDF 1, pages: 1 pdf 2026-05-12T14:36:10.033102999Z │ 2026/05/12 21:36:05 [DEBUG] MergePDFs: merged PDF 1, dest pages: 3 pdf 2026-05-12T14:36:10.033104703Z │ 2026/05/12 21:36:05 [DEBUG] MergePDFs: completed, output size: 9065 bytes pdf 2026-05-12T14:36:10.033106404Z │ --- PASS: TestMergePDFs_Concatenates (0.01s) pdf 2026-05-12T14:36:10.033108374Z │ === RUN TestMergePDFs_SinglePDF_PassThrough pdf 2026-05-12T14:36:10.033110037Z │ 2026/05/12 21:36:05 [DEBUG] NewProcessor: created temp directory: /tmp/pdf_watermark_4294797532 pdf 2026-05-12T14:36:10.033111805Z │ 2026/05/12 21:36:05 [DEBUG] MergePDFs: starting, 1 PDFs to merge pdf 2026-05-12T14:36:10.033113430Z │ 2026/05/12 21:36:05 [DEBUG] MergePDFs: only 1 PDF, returning as-is pdf 2026-05-12T14:36:10.033115073Z │ --- PASS: TestMergePDFs_SinglePDF_PassThrough (0.00s) pdf 2026-05-12T14:36:10.033116790Z │ === RUN TestMergePDFs_RejectsEmpty pdf 2026-05-12T14:36:10.033118407Z │ 2026/05/12 21:36:05 [DEBUG] NewProcessor: created temp directory: /tmp/pdf_watermark_4094201731 pdf 2026-05-12T14:36:10.033233214Z │ 2026/05/12 21:36:05 [DEBUG] MergePDFs: starting, 0 PDFs to merge pdf 2026-05-12T14:36:10.033237229Z │ 2026/05/12 21:36:05 [ERROR] MergePDFs: no PDFs to merge pdf 2026-05-12T14:36:10.033239180Z │ --- PASS: TestMergePDFs_RejectsEmpty (0.00s) pdf 2026-05-12T14:36:10.033241018Z │ PASS pdf 2026-05-12T14:36:10.033242776Z │ ok github.com/s0ngkran/pdf_watermark_process/internal/pdf 0.335s pdf 2026-05-12T14:36:10.033244412Z │ === RUN TestNewLayeredStampService_WiresConfig pdf 2026-05-12T14:36:10.033246294Z │ --- PASS: TestNewLayeredStampService_WiresConfig (0.00s) pdf 2026-05-12T14:36:10.033248000Z │ === RUN TestLayeredStampService_ProcessPDF_EmptyInput pdf 2026-05-12T14:36:10.033249824Z │ --- PASS: TestLayeredStampService_ProcessPDF_EmptyInput (0.00s) pdf 2026-05-12T14:36:10.033251454Z │ === RUN TestLayeredStampService_ProcessPDF_GarbageInput pdf 2026-05-12T14:36:10.033255190Z │ 2026/05/12 21:36:04 [LayeredStamp] OCG hide failed (passthrough): ocg: read context: ReadContext failed: Read: xRefTable failed: pdfcpu: can't find last xref section pdf 2026-05-12T14:36:10.033257010Z │ --- PASS: TestLayeredStampService_ProcessPDF_GarbageInput (0.00s) pdf 2026-05-12T14:36:10.033258556Z │ === RUN TestLayeredStampService_ProcessPDF_HappyPath pdf 2026-05-12T14:36:10.033260446Z │ 2026/05/12 21:36:04 [DEBUG] HideWatermarkOCG: no OCG matched "Watermark", passthrough pdf 2026-05-12T14:36:10.033262185Z │ --- PASS: TestLayeredStampService_ProcessPDF_HappyPath (0.03s) pdf 2026-05-12T14:36:10.033264002Z │ === RUN TestLayeredStampService_ProcessPDF_NoFlattening_OutputSearchable pdf 2026-05-12T14:36:10.033265649Z │ 2026/05/12 21:36:05 [DEBUG] HideWatermarkOCG: no OCG matched "Watermark", passthrough pdf 2026-05-12T14:36:10.033267312Z │ --- PASS: TestLayeredStampService_ProcessPDF_NoFlattening_OutputSearchable (0.02s) pdf 2026-05-12T14:36:10.033268979Z │ === RUN TestLayeredStampService_ProcessPDF_MixedPageSizes pdf 2026-05-12T14:36:10.033270652Z │ 2026/05/12 21:36:05 [DEBUG] HideWatermarkOCG: no OCG matched "Watermark", passthrough pdf 2026-05-12T14:36:10.033272282Z │ --- PASS: TestLayeredStampService_ProcessPDF_MixedPageSizes (0.02s) pdf 2026-05-12T14:36:10.033273935Z │ === RUN TestProcessOptions_WithPdfName pdf 2026-05-12T14:36:10.033278099Z │ --- PASS: TestProcessOptions_WithPdfName (0.00s) pdf 2026-05-12T14:36:10.033279705Z │ === RUN TestProcessOptions_WithLastUpdated pdf 2026-05-12T14:36:10.033281297Z │ --- PASS: TestProcessOptions_WithLastUpdated (0.00s) pdf 2026-05-12T14:36:10.033282895Z │ === RUN TestLayeredStampService_ProcessPDF_AppliesOptions pdf 2026-05-12T14:36:10.033284601Z │ 2026/05/12 21:36:05 [DEBUG] HideWatermarkOCG: no OCG matched "Watermark", passthrough pdf 2026-05-12T14:36:10.033286214Z │ --- PASS: TestLayeredStampService_ProcessPDF_AppliesOptions (0.02s) pdf 2026-05-12T14:36:10.033287805Z │ === RUN TestLayeredStampService_ProcessPDF_RespectsContextCancel pdf 2026-05-12T14:36:10.033289405Z │ --- PASS: TestLayeredStampService_ProcessPDF_RespectsContextCancel (0.01s) pdf 2026-05-12T14:36:10.033291099Z │ === RUN TestLayeredStampService_ProcessPDF_DeadlineTightenedIsSafe pdf 2026-05-12T14:36:10.033292745Z │ 2026/05/12 21:36:05 [DEBUG] HideWatermarkOCG: no OCG matched "Watermark", passthrough pdf 2026-05-12T14:36:10.033294405Z │ 2026/05/12 21:36:05 [DEBUG] HideWatermarkOCG: no OCG matched "Watermark", passthrough pdf 2026-05-12T14:36:10.033295940Z │ --- PASS: TestLayeredStampService_ProcessPDF_DeadlineTightenedIsSafe (0.02s) pdf 2026-05-12T14:36:10.033297799Z │ === RUN TestCalculateWorkerCount pdf 2026-05-12T14:36:10.033299447Z │ === RUN TestCalculateWorkerCount/zero_ratio_returns_at_least_1 pdf 2026-05-12T14:36:10.033301130Z │ === RUN TestCalculateWorkerCount/negative_ratio_returns_at_least_1 pdf 2026-05-12T14:36:10.033302730Z │ === RUN TestCalculateWorkerCount/positive_ratio_returns_at_least_1 pdf 2026-05-12T14:36:10.033306190Z │ === RUN TestCalculateWorkerCount/full_ratio_returns_at_least_1 pdf 2026-05-12T14:36:10.033307926Z │ --- PASS: TestCalculateWorkerCount (0.00s) pdf 2026-05-12T14:36:10.033309552Z │ --- PASS: TestCalculateWorkerCount/zero_ratio_returns_at_least_1 (0.00s) pdf 2026-05-12T14:36:10.033311188Z │ --- PASS: TestCalculateWorkerCount/negative_ratio_returns_at_least_1 (0.00s) pdf 2026-05-12T14:36:10.033312839Z │ --- PASS: TestCalculateWorkerCount/positive_ratio_returns_at_least_1 (0.00s) pdf 2026-05-12T14:36:10.033314341Z │ --- PASS: TestCalculateWorkerCount/full_ratio_returns_at_least_1 (0.00s) pdf 2026-05-12T14:36:10.033315888Z │ === RUN TestCalculatePageRanges pdf 2026-05-12T14:36:10.033317436Z │ === RUN TestCalculatePageRanges/10_pages,_2_workers pdf 2026-05-12T14:36:10.033319253Z │ === RUN TestCalculatePageRanges/10_pages,_3_workers_(uneven_split) pdf 2026-05-12T14:36:10.033348331Z │ === RUN TestCalculatePageRanges/1_page,_4_workers_(more_workers_than_pages) pdf 2026-05-12T14:36:10.033351461Z │ === RUN TestCalculatePageRanges/5_pages,_1_worker pdf 2026-05-12T14:36:10.033353363Z │ === RUN TestCalculatePageRanges/zero_workers_defaults_to_1 pdf 2026-05-12T14:36:10.033355218Z │ --- PASS: TestCalculatePageRanges (0.00s) pdf 2026-05-12T14:36:10.033356936Z │ --- PASS: TestCalculatePageRanges/10_pages,_2_workers (0.00s) pdf 2026-05-12T14:36:10.033358564Z │ --- PASS: TestCalculatePageRanges/10_pages,_3_workers_(uneven_split) (0.00s) pdf 2026-05-12T14:36:10.033360408Z │ --- PASS: TestCalculatePageRanges/1_page,_4_workers_(more_workers_than_pages) (0.00s) pdf 2026-05-12T14:36:10.033362068Z │ --- PASS: TestCalculatePageRanges/5_pages,_1_worker (0.00s) pdf 2026-05-12T14:36:10.033363693Z │ --- PASS: TestCalculatePageRanges/zero_workers_defaults_to_1 (0.00s) pdf 2026-05-12T14:36:10.033365429Z │ === RUN TestCalculatePageRanges_Contiguous pdf 2026-05-12T14:36:10.033369628Z │ --- PASS: TestCalculatePageRanges_Contiguous (0.00s) pdf 2026-05-12T14:36:10.033371299Z │ === RUN TestCalculateMemoryAwareWorkerCount_NilMonitor pdf 2026-05-12T14:36:10.033372926Z │ --- PASS: TestCalculateMemoryAwareWorkerCount_NilMonitor (0.00s) pdf 2026-05-12T14:36:10.033374542Z │ === RUN TestCalculateMemoryAwareWorkerCount_ZeroThreshold pdf 2026-05-12T14:36:10.033376338Z │ --- PASS: TestCalculateMemoryAwareWorkerCount_ZeroThreshold (0.00s) pdf 2026-05-12T14:36:10.033378155Z │ PASS pdf 2026-05-12T14:36:10.033379855Z │ ok github.com/s0ngkran/pdf_watermark_process/internal/service 0.121s pdf 2026-05-12T14:36:10.237810984Z │ net pdf 2026-05-12T14:36:10.728898462Z │ vendor/golang.org/x/net/http/httpproxy pdf 2026-05-12T14:36:10.728927826Z │ github.com/valyala/tcplisten pdf 2026-05-12T14:36:10.728931058Z │ github.com/valyala/fasthttp/fasthttputil pdf 2026-05-12T14:36:10.728933381Z │ github.com/google/uuid pdf 2026-05-12T14:36:10.728936049Z │ net/textproto pdf 2026-05-12T14:36:10.729237285Z │ github.com/mitchellh/mapstructure pdf 2026-05-12T14:36:10.729255100Z │ crypto/x509 pdf 2026-05-12T14:36:10.730479820Z │ github.com/spf13/pflag pdf 2026-05-12T14:36:10.772981441Z │ github.com/valyala/fasthttp/reuseport pdf 2026-05-12T14:36:10.795381108Z │ vendor/golang.org/x/net/http/httpguts pdf 2026-05-12T14:36:10.796730297Z │ mime/multipart pdf 2026-05-12T14:36:10.827637824Z │ github.com/gofiber/fiber/v2/utils pdf 2026-05-12T14:36:11.168304542Z │ crypto/tls pdf 2026-05-12T14:36:11.810479770Z │ net/http/httptrace pdf 2026-05-12T14:36:11.841520220Z │ net/http/internal/httpcommon pdf 2026-05-12T14:36:11.889196958Z │ net/http pdf 2026-05-12T14:36:13.003130470Z │ net/http/httputil pdf 2026-05-12T14:36:13.003390469Z │ github.com/spf13/afero pdf 2026-05-12T14:36:13.004386681Z │ github.com/magiconair/properties pdf 2026-05-12T14:36:13.004657458Z │ github.com/pdfcpu/pdfcpu/pkg/pdfcpu/primitives pdf 2026-05-12T14:36:13.012871306Z │ github.com/andybalholm/brotli pdf 2026-05-12T14:36:13.171837974Z │ github.com/spf13/viper/internal/encoding/javaproperties pdf 2026-05-12T14:36:13.233062694Z │ github.com/spf13/viper pdf 2026-05-12T14:36:13.426917294Z │ github.com/s0ngkran/pdf_watermark_process/internal/config pdf 2026-05-12T14:36:13.516495606Z │ github.com/pdfcpu/pdfcpu/pkg/pdfcpu/create pdf 2026-05-12T14:36:13.516699728Z │ github.com/pdfcpu/pdfcpu/pkg/pdfcpu/form pdf 2026-05-12T14:36:13.518114710Z │ github.com/pdfcpu/pdfcpu/pkg/pdfcpu pdf 2026-05-12T14:36:14.417305983Z │ github.com/valyala/fasthttp pdf 2026-05-12T14:36:14.517202559Z │ github.com/pdfcpu/pdfcpu/pkg/pdfcpu/validate pdf 2026-05-12T14:36:15.097631978Z │ github.com/pdfcpu/pdfcpu/pkg/api pdf 2026-05-12T14:36:15.286231543Z │ github.com/gofiber/fiber/v2 pdf 2026-05-12T14:36:15.399855066Z │ github.com/s0ngkran/pdf_watermark_process/internal/pdf pdf 2026-05-12T14:36:15.499476170Z │ github.com/s0ngkran/pdf_watermark_process/internal/service pdf 2026-05-12T14:36:15.724313169Z │ github.com/gofiber/fiber/v2/middleware/cors pdf 2026-05-12T14:36:15.724838909Z │ github.com/gofiber/fiber/v2/middleware/recover pdf 2026-05-12T14:36:15.725189112Z │ github.com/s0ngkran/pdf_watermark_process/internal/middleware pdf 2026-05-12T14:36:15.725197242Z │ github.com/s0ngkran/pdf_watermark_process/internal/handler pdf 2026-05-12T14:36:15.725222599Z │ github.com/gofiber/fiber/v2/middleware/logger pdf 2026-05-12T14:36:15.878660114Z │ github.com/s0ngkran/pdf_watermark_process/cmd/server pdf 2026-05-12T14:36:16.970509972Z │ INFO[0098] Taking snapshot of files... pdf 2026-05-12T14:36:20.829821216Z │ INFO[0102] Pushing layer to cache now pdf 2026-05-12T14:36:20.831411264Z │ INFO[0102] Pushing image to pdf 2026-05-12T14:36:24.850542469Z │ INFO[0106] Pushed pdf 2026-05-12T14:36:24.851464471Z │ INFO[0106] Saving file app/dist/server for later use pdf 2026-05-12T14:36:24.864372643Z │ INFO[0106] Deleting filesystem... pdf 2026-05-12T14:36:25.787232356Z │ INFO[0107] Retrieving image manifest debian:bookworm-slim pdf 2026-05-12T14:36:25.787258689Z │ INFO[0107] Returning cached image manifest pdf 2026-05-12T14:36:25.787260850Z │ INFO[0107] Retrieving image manifest debian:bookworm-slim pdf 2026-05-12T14:36:25.787262791Z │ INFO[0107] Returning cached image manifest pdf 2026-05-12T14:36:25.787264680Z │ INFO[0107] Executing 0 build triggers pdf 2026-05-12T14:36:25.787269653Z │ INFO[0107] Building stage 'debian:bookworm-slim' [idx: '1', base-idx: '-1'] pdf 2026-05-12T14:36:25.787271744Z │ INFO[0107] Applying label maintainer=Chatchanan Panyaprasirtkit pdf 2026-05-12T14:36:25.787844448Z │ INFO[0107] Checking for cached layer pdf 2026-05-12T14:36:25.904517753Z │ INFO[0107] Using caching version of cmd: RUN apt-get update && apt-get install -y --no-install-recommends tini ca-certificates && apt-get clean && rm -rf /var/lib/apt/lists/* pdf 2026-05-12T14:36:25.904542489Z │ INFO[0107] Checking for cached layer pdf 2026-05-12T14:36:26.009308687Z │ INFO[0107] Using caching version of cmd: RUN useradd -u 1000 -m -s /bin/bash appuser pdf 2026-05-12T14:36:26.039327118Z │ INFO[0107] Checking for cached layer pdf 2026-05-12T14:36:26.070279399Z │ INFO[0107] No cached layer found for cmd RUN mkdir -p /app/.pdfcpu pdf 2026-05-12T14:36:26.070329166Z │ INFO[0107] Cmd: USER pdf 2026-05-12T14:36:26.070332132Z │ INFO[0107] Cmd: EXPOSE pdf 2026-05-12T14:36:26.070335105Z │ INFO[0107] Adding exposed port: 8080/tcp pdf 2026-05-12T14:36:26.070337803Z │ INFO[0107] Adding exposed port: 8443/tcp pdf 2026-05-12T14:36:26.070340987Z │ INFO[0107] Unpacking rootfs as cmd COPY --from=builder /app/dist/server /app/server requires it. pdf 2026-05-12T14:36:26.841882211Z │ INFO[0108] Initializing snapshotter ... pdf 2026-05-12T14:36:26.841910121Z │ INFO[0108] Taking snapshot of full filesystem... pdf 2026-05-12T14:36:27.617609317Z │ INFO[0109] LABEL maintainer="Chatchanan Panyaprasirtkit " pdf 2026-05-12T14:36:27.617634888Z │ INFO[0109] Applying label maintainer=Chatchanan Panyaprasirtkit pdf 2026-05-12T14:36:27.618326926Z │ INFO[0109] No files changed in this command, skipping snapshotting. pdf 2026-05-12T14:36:27.618347113Z │ INFO[0109] ARG timezone=Asia/Bangkok pdf 2026-05-12T14:36:27.618349706Z │ INFO[0109] No files changed in this command, skipping snapshotting. pdf 2026-05-12T14:36:27.618371958Z │ INFO[0109] ENV LANG C.UTF-8 pdf 2026-05-12T14:36:27.618373756Z │ INFO[0109] No files changed in this command, skipping snapshotting. pdf 2026-05-12T14:36:27.618375323Z │ INFO[0109] ENV LC_ALL C.UTF-8 pdf 2026-05-12T14:36:27.618376967Z │ INFO[0109] No files changed in this command, skipping snapshotting. pdf 2026-05-12T14:36:27.618378724Z │ INFO[0109] ENV TZ $timezone pdf 2026-05-12T14:36:27.618589977Z │ INFO[0109] No files changed in this command, skipping snapshotting. pdf 2026-05-12T14:36:27.618605757Z │ INFO[0109] RUN apt-get update && apt-get install -y --no-install-recommends tini ca-certificates && apt-get clean && rm -rf /var/lib/apt/lists/* pdf 2026-05-12T14:36:27.618608465Z │ INFO[0109] Found cached layer, extracting to filesystem pdf 2026-05-12T14:36:28.319411115Z │ INFO[0110] RUN useradd -u 1000 -m -s /bin/bash appuser pdf 2026-05-12T14:36:28.319467027Z │ INFO[0110] Found cached layer, extracting to filesystem pdf 2026-05-12T14:36:28.458010160Z │ INFO[0110] WORKDIR /app pdf 2026-05-12T14:36:28.458039396Z │ INFO[0110] Cmd: workdir pdf 2026-05-12T14:36:28.458042131Z │ INFO[0110] Changed working directory to /app pdf 2026-05-12T14:36:28.458044614Z │ INFO[0110] Creating directory /app with uid -1 and gid -1 pdf 2026-05-12T14:36:28.458058048Z │ INFO[0110] Taking snapshot of files... pdf 2026-05-12T14:36:28.489195864Z │ INFO[0110] COPY --from=builder /app/dist/server /app/server pdf 2026-05-12T14:36:28.500072444Z │ INFO[0110] Taking snapshot of files... pdf 2026-05-12T14:36:28.780721656Z │ INFO[0110] RUN mkdir -p /app/.pdfcpu pdf 2026-05-12T14:36:28.835479946Z │ INFO[0110] Cmd: /bin/sh pdf 2026-05-12T14:36:28.835502571Z │ INFO[0110] Args: [-c mkdir -p /app/.pdfcpu] pdf 2026-05-12T14:36:28.835504766Z │ INFO[0110] Running: [/bin/sh -c mkdir -p /app/.pdfcpu] pdf 2026-05-12T14:36:28.885990769Z │ INFO[0110] Taking snapshot of files... pdf 2026-05-12T14:36:28.894670559Z │ INFO[0110] Pushing layer to cache now pdf 2026-05-12T14:36:28.895062854Z │ INFO[0110] Pushing image to pdf 2026-05-12T14:36:28.895394253Z │ INFO[0110] RUN chown -R appuser:nogroup /app pdf 2026-05-12T14:36:28.943117145Z │ INFO[0110] Cmd: /bin/sh pdf 2026-05-12T14:36:28.943386652Z │ INFO[0110] Args: [-c chown -R appuser:nogroup /app] pdf 2026-05-12T14:36:28.943826065Z │ INFO[0110] Running: [/bin/sh -c chown -R appuser:nogroup /app] pdf 2026-05-12T14:36:28.996133518Z │ INFO[0110] Taking snapshot of files... pdf 2026-05-12T14:36:29.293337902Z │ INFO[0110] Pushing layer to cache now pdf 2026-05-12T14:36:29.293363214Z │ INFO[0110] Pushing image to pdf 2026-05-12T14:36:29.306760398Z │ INFO[0111] USER appuser pdf 2026-05-12T14:36:29.306783338Z │ INFO[0111] Cmd: USER pdf 2026-05-12T14:36:29.307952655Z │ INFO[0111] No files changed in this command, skipping snapshotting. pdf 2026-05-12T14:36:29.307959032Z │ INFO[0111] ENV PDFCPU_CONF_DIR=/app/.pdfcpu pdf 2026-05-12T14:36:29.307961078Z │ INFO[0111] No files changed in this command, skipping snapshotting. pdf 2026-05-12T14:36:29.307962853Z │ INFO[0111] EXPOSE 8080 8443 pdf 2026-05-12T14:36:29.307964912Z │ INFO[0111] Cmd: EXPOSE pdf 2026-05-12T14:36:29.307966572Z │ INFO[0111] Adding exposed port: 8080/tcp pdf 2026-05-12T14:36:29.307968192Z │ INFO[0111] Adding exposed port: 8443/tcp pdf 2026-05-12T14:36:29.308216159Z │ INFO[0111] No files changed in this command, skipping snapshotting. pdf 2026-05-12T14:36:29.308219521Z │ INFO[0111] ENTRYPOINT ["tini", "--", "/app/server"] pdf 2026-05-12T14:36:29.308222597Z │ INFO[0111] No files changed in this command, skipping snapshotting. pdf 2026-05-12T14:36:29.308224423Z │ INFO[0111] CMD ["--env=prd"] pdf 2026-05-12T14:36:29.308226236Z │ INFO[0111] No files changed in this command, skipping snapshotting. pdf 2026-05-12T14:36:29.563572936Z │ INFO[0111] Pushed pdf 2026-05-12T14:36:30.290903264Z │ INFO[0111] Pushed pdf 2026-05-12T14:36:30.291416187Z │ INFO[0111] Pushing image to pdf 2026-05-12T14:36:31.389936427Z │ INFO[0113] Pushed pdf 2026-05-12T14:36:31.425621531Z │ pdf 2026-05-12T14:36:31.561515261Z │  ✔ built and uploaded app container image to DOCR pdf 2026-05-12T14:36:31.563480198Z ╰──────────────────────────────────────────╼ pdf 2026-05-12T14:36:31.563487000Z pdf 2026-05-12T14:36:31.569729708Z  ✔  build complete  pdf 2026-05-12T14:36:31.569745709Z