Skip to content

update-aqua-checksum: build the commit payload on disk, never on a command line - #84

Merged
apostasie merged 1 commit into
mainfrom
claudio/20260908-commit-payload
Sep 8, 2026
Merged

apostasie merged 1 commit into
mainfrom
claudio/20260908-commit-payload

Conversation

@closer-claudio

Copy link
Copy Markdown
Contributor

The failure

ossein-kernel#43 came out of this workflow with a bumped limen pin, no checksum for it, and a pipeline that died before its first recipe:

▶ lint: limen
aqua failed … package_version=v0.2.1 error="checksum is required"

Because the job that writes the checksum had already died:

/usr/bin/jq: Argument list too long
##[error]Process completed with exit code 126

Why

Converging the baseline across a limen release rewrites the whole .limen/ tree. Measured in ossein-kernel:

.limen/** + aqua-checksums.json 118,635 bytes
as base64 in one --argjson argument ~158,180 bytes
Linux MAX_ARG_STRLEN 131,072 bytes
1.2× over

The same data then went through argv a second time as curl -d "${payload}", so fixing only the first site would have moved the failure one line down.

The fix — three sites, all now reading from disk

was is
--arg contents "$(base64 -w0 …)" --rawfile contents
--argjson additions "${additions}" --slurpfile additions
curl -d "${payload}" curl --data-binary @file

Only short scalars stay on a command line — a path, a branch, a commit oid. The payload no longer has a size ceiling at all, rather than a larger one.

Why limen never saw it

The convergence step is skipped in this repository by design:

# Skipped in the limen repository itself: there the working tree IS
# the next baseline …
if: github.repository != 'farcloser/limen'

So limen's own aqua-bump commits one small file (aqua-checksums.json, ~18 kB of base64) and never approaches the limit — #79 is green for that reason, not because the mechanism works. The failure needs a repository that both pins limen and has drifted far enough for the convergence to be large, which is every governed repository once its limen gap is wide enough.

Verification

Simulated a 173 kB dirty tree of 21 entries (20 modified/added, 1 deleted):

  • 20/20 additions decode byte-identically through base64, and the deletion is carried
  • the array that used to become one argument measures 232,235 bytes; the largest single file's base64 is 23 kB
  • just lint and just test green

The overflow itself cannot be reproduced on darwin, which has no per-argument limit — the old logic passes locally at 232 kB. On Linux it is the difference between 232 kB and 128 kB.

…mmand line

An aqua-bump branch in ossein-kernel came out of the workflow with a bumped
limen pin, no checksum for it, and a red pipeline that never reached its
first recipe:

    ▶ lint: limen
    aqua failed … package_version=v0.2.1 error="checksum is required"

The checksum was missing because the job that writes it had already died:

    /usr/bin/jq: Argument list too long

Converging the baseline across a limen release rewrites the whole .limen/
tree. In that repository it is ~120 kB of configuration, ~160 kB once
base64-encoded, and it was passed to jq as a single `--argjson` argument.
Linux caps one argument at 128 kB (MAX_ARG_STRLEN), so the payload was 1.2x
over and the mutation was never built. The same data then went through argv
a second time as `curl -d "${payload}"`, so fixing only the first site would
have moved the failure a line further down.

Three sites, all now reading from disk: the per-file accumulation takes the
base64 through `--rawfile` instead of `--arg "$(base64 …)"`, the mutation is
assembled with `--slurpfile` instead of `--argjson`, and the request body is
uploaded with `--data-binary @file` instead of `-d`. Only short scalars —
a path, a branch, a commit oid — remain on a command line, so the payload no
longer has a size ceiling at all rather than a larger one.

This is why the same bump was green in limen and red everywhere else. The
convergence step is skipped in this repository by design (the working tree
IS the next baseline), so limen's own aqua-bump commits one small file and
never approaches the limit. The failure needs a repository that both pins
limen and has drifted far enough for the convergence to be large — which is
every governed repository, the moment its limen gap is wide enough.

Verified against a simulated 173 kB dirty tree, 21 entries: 20 additions
round-trip byte-identically through base64 and the deletion is carried,
with the array that used to go into one argument measuring 232 kB. The
overflow itself cannot be reproduced on darwin, which has no per-argument
limit; on Linux it is the difference between 232 kB and 128 kB.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: closer-claudio <claudio@farcloser.world>
@apostasie
apostasie merged commit 28e60e7 into main Sep 8, 2026
11 checks passed
@apostasie
apostasie deleted the claudio/20260908-commit-payload branch September 8, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants