Skip to content

test(aiograpi): live e2e for /info + CI live-test job#48

Merged
subzeroid merged 2 commits into
mainfrom
feat/aiograpi-info-live-e2e
Jun 20, 2026
Merged

test(aiograpi): live e2e for /info + CI live-test job#48
subzeroid merged 2 commits into
mainfrom
feat/aiograpi-info-live-e2e

Conversation

@subzeroid

Copy link
Copy Markdown
Owner

Summary

Adds the first true end-to-end live test for the aiograpi backend: from the
real CLI entrypoint all the way to a rendered /info profile. Closes the gap
left by the existing SDK-level audits, and wires it into CI behind a repo
secret.

Follows up #45 — the e2e exercises the TOTP login fix against live accounts.

What's new

  • tests/live/aiograpi_info_e2e.py — spawns insto @instagram -c info --json -
    for a pooled TEST_ACCOUNTS_URL account (full aiograpi login incl. TOTP) and
    asserts the JSON envelope (data.profile.username == "instagram",
    pk == "25025320"). Reuses each account's client_settings as a seeded
    session and only honours an explicit IG_PROXY (pooled account proxies are
    unreliable — AuthRequiredProxyError: 302 on CONNECT). Skips clean (exit 0)
    when the secret is unset.
  • tests/test_aiograpi_info_e2e.py — offline unit coverage for the pure
    helpers (skip-clean path, TOTP extraction from top-level/client_settings,
    subprocess-env wiring, session seeding, secret redaction). No network.
  • .github/workflows/ci.yml — new live-test job + workflow_dispatch
    trigger. Runs on push/dispatch to subzeroid/insto only (forks/PRs never get
    the secret), gated on secrets.TEST_ACCOUNTS_URL.

Verification

  • Offline: ruff / ruff format / mypy insto clean; pytest --cov → 925
    passed, 82.37% coverage.
  • Live (local): ran the script against real pooled accounts —
    account[1] info: ok (username=instagram pk=25025320)PASS, exit 0.
  • TEST_ACCOUNTS_URL secret configured on the repo; the live-test job runs
    on merge to main.

Note: CLAUDE.md is gitignored in this repo, so its "Live-smoke procedure"
update stays local.

🤖 Generated with Claude Code

subzeroid and others added 2 commits June 20, 2026 19:26
Add `tests/live/aiograpi_info_e2e.py`: spawns the real `insto` entrypoint
(`@instagram -c info --json -`) for a pooled TEST_ACCOUNTS_URL account,
performs a full aiograpi login (incl. TOTP, exercising the #45 fix), and
asserts the JSON profile (username==instagram, pk==25025320). Reuses each
account's client_settings as a seeded session and only honours an explicit
IG_PROXY (pooled account proxies are unreliable — 302 on CONNECT).

Add offline unit coverage in `tests/test_aiograpi_info_e2e.py` for the pure
helpers (skip-clean path, totp extraction, env wiring, session seeding).

Wire a `live-test` job into ci.yml (push/workflow_dispatch, canonical repo
only) gated on the TEST_ACCOUNTS_URL secret; the script self-skips when the
secret is absent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The accounts host (hikerapi.com) presents a valid certificate, so the
verify=False copied from the saved-feed audit is unnecessary. Drop it to
address the security review's TLS-verification finding; live e2e still
passes with default verification.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@subzeroid subzeroid merged commit 4ce8b2d into main Jun 20, 2026
4 checks passed
@subzeroid subzeroid deleted the feat/aiograpi-info-live-e2e branch June 20, 2026 16:29
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