Skip to content

feat: add safe login profile research tool - #433

Merged
subzeroid merged 9 commits into
mainfrom
chore/research-login-matrix
Aug 26, 2026
Merged

feat: add safe login profile research tool#433
subzeroid merged 9 commits into
mainfrom
chore/research-login-matrix

Conversation

@subzeroid

Copy link
Copy Markdown
Owner

Summary

  • Add an opt-in maintainer script for comparing reused and fresh device profiles across controlled login accounts, with separate-account and crossover pairing modes.
  • Bound all experiments to ten sequential attempts, enforce a minimum cooldown and per-login timeout, require a verified HTTPS account pool without redirects, and validate every account record before use.
  • Keep results pseudonymous and secret-safe through per-run keyed profile digests, sanitized error classes, muted client/request loggers, session cleanup, and owner-only JSONL output protected against symlink and path-swap attacks.
  • Add 56 network-free regressions and document the controlled workflow in the development guide.

Safety

  • Requires both IG_RUN_LOGIN_MATRIX=1 and TEST_ACCOUNTS_URL; GitHub Actions never invokes the script.
  • Never records usernames, passwords, TOTP data, sessions, proxy values, pool URLs, exception messages, or response bodies; generated login-matrix*.jsonl files are ignored by Git.
  • No live Instagram experiment was run for this PR. The remaining real pool-to-login flow is intentionally manual-only because repeated logins can trigger checkpoints or restrictions.

Test Coverage

  • AI-assisted branch audit: 28 of 30 paths covered (93%).
  • Covered paths include configuration bounds, fetch and payload failures, separate/crossover planning, stable/fresh isolation, TOTP, success/false/error/timeout/cancellation outcomes, logger suppression, session cleanup, secure output permissions and races, sequential orchestration, and continuation after an error result.
  • Known gaps: injected write()/flush() failure cleanup and the manual-only live login flow.

Verification

  • uv run --extra test python -m pytest -q tests/regression/test_research_login_matrix.py — 56 passed.
  • uv run --extra test python -m pytest -q tests/regression — 655 passed, 3 skipped, 35 subtests passed.
  • uv run --extra test pre-commit run --all-files — passed.
  • uv run --extra test bandit -q -c pyproject.toml -r aiograpi scripts/research_login_matrix.py — passed.
  • uv run --extra test mkdocs build --strict — passed.
  • Independent final review: no Critical, Important, or Minor findings.

Documentation

  • docs/development-guide.md documents the controlled login-profile research command, modes, safeguards, limits, sanitized output, failure behavior, and non-CI status.
  • Maintainer entry points already link to the development guide; no README, migration, diagram, changelog, or version update is needed.
  • Strict MkDocs build passes; documentation debt: none.

@subzeroid
subzeroid merged commit eb5bb08 into main Aug 26, 2026
13 checks passed
@subzeroid
subzeroid deleted the chore/research-login-matrix branch August 26, 2026 14:00
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