Skip to content

ci: green main — fix forge install + flask test dep + scrypt mem limit#92

Merged
abhicris merged 5 commits into
mainfrom
kcolb/ci-fix-2026-06-03
Jun 3, 2026
Merged

ci: green main — fix forge install + flask test dep + scrypt mem limit#92
abhicris merged 5 commits into
mainfrom
kcolb/ci-fix-2026-06-03

Conversation

@abhicris
Copy link
Copy Markdown
Contributor

@abhicris abhicris commented Jun 3, 2026

Main went red at `c4f5638` (right after #23 merge). Three independent regressions from yesterday's merge wave:

1. `forge install` tag resolution

Foundry 1.7.1 fails on `OpenZeppelin/openzeppelin-contracts@v5.0.2` with "Tag: v5.0.2 not found for repo" — even though the tag exists upstream. The installer's API-tag lookup misses tags that aren't in the first page of results (OZ is at v5.6.1 now, so v5.0.x sits well past the default page).

Switching to the explicit `--tag` flag clones-and-checks-out directly and works.

2. pytest missing flask

#91 (`feat(x402): propagate x402 envelopes through the agent HTTP surface`) added `tests/test_x402_server.py::test_flask_app_creation` which hits the `from flask import Flask` inside `server.py:230`. CI only installed `.[dev]` (pytest+asyncio+ruff), no flask.

Bumped the install to `.[dev,flask,fastapi]` — both web-server adapters are now covered.

3. scrypt memory ceiling

#73 (persistent PQ key storage) sets `_SCRYPT_N = 32768` with `r = 8`. Memory needed is `128·N·r = 32 MiB`, which hits OpenSSL's default 32 MiB ceiling on Ubuntu CI runners → `ValueError: [digital envelope routines] memory limit exceeded` on all three save/load tests.

Lowered to 16384 (`16 MiB`). That's the floor `cryptography.hazmat.Scrypt` accepts and still well above the OWASP interactive-auth scrypt recommendation (`N >= 2^14`).

Tests now expected green

  • forge: clone-and-build OZ v5.0.2 + run forge test
  • pytest: 170 passing including the 4 that broke (test_flask_app_creation + 3 pq_keys envelope tests)

abhicris added 5 commits June 3, 2026 21:12
1. forge install: switch to --tag flag (foundry 1.7.1 fails to
   resolve OZ tags via the @-suffix form even though the tag exists)
2. pytest: install flask + fastapi extras so the new x402 server
   test from #91 can import Flask
3. pq_keys: lower scrypt N from 32768 to 16384 — 32768·128·8 hits
   OpenSSL's 32MiB default memory ceiling on CI runners; 16384 is
   the floor cryptography.hazmat.Scrypt accepts and still well above
   industry-standard interactive thresholds
@abhicris abhicris merged commit 92a8081 into main Jun 3, 2026
2 checks passed
@abhicris abhicris deleted the kcolb/ci-fix-2026-06-03 branch June 3, 2026 15:50
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.

1 participant