ci: real CI for the Tier A require-all gate (python tests, secret scan, forge) #5

Merged
buddysan merged 1 commit from release/ci-workflow into main 2026-09-16 13:35:46 +00:00
Owner

Summary

Tracks OpenProject WP 7920 (CI workflows + Makefile, release-director wave 1). Implements the test/CI conventions in docs/architecture.md §6 (offline unittest < 60 s, fixtures under bot/tests/fixtures/<module>/, fork tests gated behind ARC_RPC_URL — verified a vm.skip inside forge test still exits 0, so the job reports success, never a skipped status).

Gives `fortiblox/arc-mev-bot` real CI so the Tier A "all reported checks must pass" gate means something.

  • `.forgejo/workflows/ci.yml` — two unconditional jobs on every PR + push to main:
    • python-tests (`ubuntu-latest`): `make lint` (py_compile + secret/token scan that fails the build — the prevention gate for the token-in-config class found on LXC 140) then `make test` (offline stdlib unittest).
    • forge-tests (`ghcr.io/foundry-rs/foundry:v1.8.1`, the exact forge on LXC 140): git checkout of the PR SHA, version pin assertion, `forge build && forge test -vv`, zero-tests guard (fails once any `.sol` exists with no tests).
  • No `paths:` filters, no `if:`, no label gates, only `actions/*` — a `skipped` status permanently blocks auto-merge in require-all mode.
  • `Makefile` — `test`, `lint`, `forge-test`, `probe` (placeholder for `bot/rpc_probe.py`, devops lane), `ci`. Local == CI.
  • `docs/ci.md` — the CI contract.
  • `bot/tests/test_smoke.py` — seeds the offline suite.

No `contracts/foundry.toml` bootstrap was needed: `forge build && forge test` exit 0 on an empty tree (verified on runner 120 and on LXC 140).

Test plan

  • `make lint test` green locally and inside the fleet runner image (runner 120)
  • secret-scan proven to FAIL on planted fakes for every rule, without echoing the secret; `.env.example` correctly exempt
  • forge recipe lines green on LXC 140 (forge 1.8.1, empty tree)
  • both CI jobs green on a real Forgejo runner: run 1 on head fdf86bd — python-tests 4 s on forgejo-runner-d (LXC 120), forge-tests 23 s on forgejo-runner-lxc112 (tasks 171282/171283)

🤖 Generated with Claude Code

## Summary Tracks OpenProject **WP 7920** (CI workflows + Makefile, release-director wave 1). Implements the test/CI conventions in `docs/architecture.md` §6 (offline unittest < 60 s, fixtures under `bot/tests/fixtures/<module>/`, fork tests gated behind `ARC_RPC_URL` — verified a `vm.skip` inside `forge test` still exits 0, so the job reports `success`, never a `skipped` status). Gives \`fortiblox/arc-mev-bot\` real CI so the Tier A "all reported checks must pass" gate means something. - \`.forgejo/workflows/ci.yml\` — two unconditional jobs on every PR + push to main: - **python-tests** (\`ubuntu-latest\`): \`make lint\` (py_compile + secret/token scan that fails the build — the prevention gate for the token-in-config class found on LXC 140) then \`make test\` (offline stdlib unittest). - **forge-tests** (\`ghcr.io/foundry-rs/foundry:v1.8.1\`, the exact forge on LXC 140): git checkout of the PR SHA, version pin assertion, \`forge build && forge test -vv\`, zero-tests guard (fails once any \`.sol\` exists with no tests). - No \`paths:\` filters, no \`if:\`, no label gates, only \`actions/*\` — a \`skipped\` status permanently blocks auto-merge in require-all mode. - \`Makefile\` — \`test\`, \`lint\`, \`forge-test\`, \`probe\` (placeholder for \`bot/rpc_probe.py\`, devops lane), \`ci\`. Local == CI. - \`docs/ci.md\` — the CI contract. - \`bot/tests/test_smoke.py\` — seeds the offline suite. No \`contracts/foundry.toml\` bootstrap was needed: \`forge build && forge test\` exit 0 on an empty tree (verified on runner 120 and on LXC 140). ## Test plan - [x] \`make lint test\` green locally and inside the fleet runner image (runner 120) - [x] secret-scan proven to FAIL on planted fakes for every rule, without echoing the secret; \`.env.example\` correctly exempt - [x] forge recipe lines green on LXC 140 (forge 1.8.1, empty tree) - [x] both CI jobs green on a real Forgejo runner: run 1 on head fdf86bd — python-tests 4 s on forgejo-runner-d (LXC 120), forge-tests 23 s on forgejo-runner-lxc112 (tasks 171282/171283) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ci: real CI for the Tier A require-all gate (python tests, secret scan, forge)
All checks were successful
ci / python-tests (pull_request) Successful in 4s
ci / forge-tests (pull_request) Successful in 23s
fdf86bd13e
Adds .forgejo/workflows/ci.yml with two unconditional jobs on every PR and
push to main:

- python-tests (ubuntu-latest): make lint (py_compile over bot/**/*.py +
  secret/token scan that FAILS the build on credential URLs, 40-hex tokens,
  PEM key blocks, 64-hex EVM keys in key context, keystore JSON, known token
  prefixes, and forbidden tracked files such as .env / *.key /
  config/rpc-pool.toml) then make test (offline stdlib unittest discover).
- forge-tests (ghcr.io/foundry-rs/foundry:v1.8.1 = exact forge on LXC 140,
  commit 982849d): git checkout of the PR SHA (image has no node), version
  pin assertion, forge build + forge test -vv, plus a zero-tests guard so
  the job cannot stay vacuously green once Solidity sources exist.

No paths: filters, no if:, no label gates, only actions/* — a skipped
status permanently blocks auto-merge in require-all mode on this instance.

Makefile gives local == CI (test, lint, forge-test, probe placeholder for
bot/rpc_probe.py from the devops lane). docs/ci.md is the contract: what
runs, why it is shaped this way, how to read a red check, automerger flow.

bot/tests/test_smoke.py seeds the offline suite (import, stdlib-only,
PairCreated decode on a synthetic log).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: BuddySan <[email protected]>
buddysan force-pushed release/ci-workflow from fdf86bd13e
All checks were successful
ci / python-tests (pull_request) Successful in 4s
ci / forge-tests (pull_request) Successful in 23s
to ba4a69d591
All checks were successful
ci / forge-tests (pull_request) Successful in 2s
ci / python-tests (pull_request) Successful in 3s
ci / forge-tests (push) Successful in 2s
ci / python-tests (push) Successful in 3s
2026-09-16 13:33:08 +00:00
Compare
buddysan changed title from WIP: ci: real CI for the Tier A require-all gate (python tests, secret scan, forge) to ci: real CI for the Tier A require-all gate (python tests, secret scan, forge) 2026-09-16 13:33:34 +00:00
fortiblox-dev left a comment

automerger v2 auto-approved: all 7 gates pass. Approver: fortiblox-dev (opposite-identity rule). Gates: mergeable=true,label=auto-merge,author=buddysan,identity=ok,status_checks=not_required,signatures=upstream_BP_only,opt_in=repo_marker.

automerger v2 auto-approved: all 7 gates pass. Approver: fortiblox-dev (opposite-identity rule). Gates: mergeable=true,label=auto-merge,author=buddysan,identity=ok,status_checks=not_required,signatures=upstream_BP_only,opt_in=repo_marker.
buddysan deleted branch release/ci-workflow 2026-09-16 13:35:46 +00:00
Author
Owner

Auto-merged by forgejo-automerger at 2026-09-16 13:35:47 UTC. Approver: fortiblox-dev (opposite-identity rule, Option C upgrade 2026-05-13). Merger: buddysan via fast-forward-only (NOT admin force_merge). Criteria passed: mergeable=true,label=auto-merge,author=buddysan,identity=ok,status_checks=not_required,signatures=upstream_BP_only,opt_in=repo_marker. Branch ba4a69d591 merged onto main and feature branch deleted. See project_forgejo_automerger memory for rationale.

Auto-merged by **forgejo-automerger** at 2026-09-16 13:35:47 UTC. **Approver:** `fortiblox-dev` (opposite-identity rule, Option C upgrade 2026-05-13). **Merger:** `buddysan` via `fast-forward-only` (NOT admin `force_merge`). **Criteria passed:** `mergeable=true,label=auto-merge,author=buddysan,identity=ok,status_checks=not_required,signatures=upstream_BP_only,opt_in=repo_marker`. Branch `ba4a69d591` merged onto `main` and feature branch deleted. See `project_forgejo_automerger` memory for rationale.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
fortiblox/arc-mev-bot!5
No description provided.