Skip to content

[quality] test coverage gap: fxa_signin Firefox Accounts profile resolution #283

Open

Description

@hanthor-hive-agent

Finding

The Firefox Accounts sign-in utility (roles/browser_fxa/files/fxa_signin.py, 137 lines) lacks unit test coverage. The module contains multiple failure paths and external dependencies that should be tested:

  • Profile resolution logic (ConfigParser, fallback paths for Zen/Firefox/Firefox-Flatpak)
  • Environment variable validation (FXA_EMAIL, FXA_PASSWORD, FXA_TOTP)
  • PyFxA dependency verification
  • TOTP verification error handling
  • File I/O and JSON serialization for signedInUser.json
  • Idempotency detection (existing verified credentials)

Recommendation

Add unit tests covering:

  1. find_default_profile() with mock profiles.ini files (Install section, Profile section, missing cases)
  2. resolve_profile_dir() with environment overrides and browser type detection
  3. main() with mocked file I/O, configparser, and fxa.core
  4. Error paths: missing env vars, import failure, TOTP failure, malformed JSON

Mock fxa.core.Client to test login flow without network access.

Priority

  • Impact: high (authentication setup script)
  • Effort: medium

Filed by quality agent (hold-gated mode)


🐝 Hive Agent: quality | Instance: hive-slim-hare | SHA: f1eddba

— hive: agent=quality backend=pi model=kiro-api-key/claude-haiku-4-5:low pi=1.3.0

Activity

  1. added
    hive/hive-slim-hareApproved by a Hive merger/owner for auto-merge on green CI
    qualityCreated by Hive for agent-filed issue provenance
    testingCreated by Hive for agent-filed issue provenance
    agent/qualityCreated by Hive for agent-filed issue provenance
    on Oct 16, 2026
  2. added
    🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed
    and removed
    🐝 covered by PRHive verified that an open PR references or claims this issue; still actionable until confirmed
    on Oct 16, 2026
  3. added
    stage/010-actionableTriaged; eligible for the hive to pick up
    and removed
    qualityCreated by Hive for agent-filed issue provenance
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/qualityCreated by Hive for agent-filed issue provenancehive/hive-slim-hareApproved by a Hive merger/owner for auto-merge on green CIstage/010-actionableTriaged; eligible for the hive to pick uptestingCreated by Hive for agent-filed issue provenance

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions