Files
Vlad Gothbreach af292ff15d
checks / pytest (push) Has been cancelled
checks / moderation (push) Has been cancelled
checks / node (push) Has been cancelled
Harden entry safety, unify runtime config, bound document unpacking
Shared-IP safety: entry autoban and entry notifications default off, and a
shared IP is treated as review evidence only. ban_user/ban_cluster refuse
reason=entry_ip_collision (also with the legacy flag set to 1), so token status
and quota are never touched; explicit admin moderation still works.

Reproducible startup: new bot/runtime_config.py and scripts/run.py load the
repository .env (or --env-file) without shell interpolation, normalize
config/DB/upstream aliases, and make the bot, Mini App, gateway, econ cap,
account admin, mk_daemon, entry admin and key notifications resolve the same
paths. "run.py <target> --check" is an offline preflight that starts nothing
and reports placeholders, missing upstream DB and invalid data directories.

Resource limits: aggregate Office decompression, a 400 read-entry cap and a
per-row XLSX cell budget stop early; truncated or corrupt archives are
reported instead of raising.

Deploy and docs: only source-backed systemd units remain, and
deploy/runtime.env.example documents the environment contract including the
0600 session-secret file rules. Removed the destructive
"cp bot/iishko_bot.py bot/grok_bot.py" instruction, the unused generated site/
snapshot and the unsupported iishko-ts staging unit; corrected .env.example,
README, ARCHITECTURE, SECURITY, docs/native-gateway.md and iishko-ts/README.md.

Tests: entry safety, runtime bootstrap, economy paths, file intake, deploy
contract, abilities_guard CLI, and a startup smoke that launches all three
components through scripts/run.py with non-loopback network blocked. Every
config reader, selfcheck included, accepts a UTF-8 BOM.

Verified on this tree: pytest 716 passed + 322 subtests, node --test 73/73,
go test and go vet clean, selfcheck --source-only ok, gitleaks worktree and
history 0 findings. No production or live-split changes are included.
2026-10-31 00:39:35 +03:00

63 lines
1.7 KiB
YAML

name: checks
on:
push:
branches: ["**"]
pull_request:
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dev requirements
run: python -m pip install --disable-pip-version-check -r requirements-dev.txt
- name: Source-only selfcheck (no credentials, no imports)
run: python scripts/selfcheck.py --source-only
- name: Root pytest suite (loopback/fakes only, no real endpoints)
run: python -m pytest -q
env:
# Purchases are config-gated (empty commerce_offers + empty payment token),
# not flag-gated: there is no IISHKO_WALLET_ENABLED / PAID_OFFERS switch.
IISHKO_ADMIN_IDS: ""
IISHKO_SANDBOX_ENABLED: "0"
moderation:
runs-on: ubuntu-latest
defaults:
run:
working-directory: moderation
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: moderation/go.mod
- name: Go moderation contracts and static analysis
run: |
go test ./...
go vet ./...
- name: Linux static binary
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -o ../iishko-moderation .
node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Node tests (no real endpoints)
shell: bash
run: |
shopt -s nullglob
files=(tests/*.mjs)
if [ ${#files[@]} -eq 0 ]; then
echo "no Node tests present yet"
else
node --test "${files[@]}"
fi