Every pull request to Xolo API Hub must pass a three-step CI quality gate before it can be merged. The gate exists to keep a mobile codebase maintainable at speed: strict formatting eliminates style debates in reviews, zero-tolerance static analysis catches real bugs before runtime, and a 100% coverage requirement ensures that every line of production logic is exercised by at least one test. These constraints apply equally to contributors and maintainers — no exceptions are made for hotfixes or small patches.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JonathanHerSa/xolo-api-hub/llms.txt
Use this file to discover all available pages before exploring further.
CI Pipeline
The quality gate is defined in.github/workflows/qa.yml and runs automatically on every pull request and every push to the main branch. It can also be triggered manually via workflow_dispatch. Flutter is pinned to version 3.32.0 across all CI jobs.
Formatting check
lib/ and test/ for formatting compliance and exits with a non-zero
code if any file differs from the canonical dart format output. The CI step will fail
immediately if formatting is inconsistent — no files are modified in CI. Run
dart format lib test locally to auto-fix formatting before pushing.Static analysis
analysis_options.yaml at the repository root, which extends flutter_lints with additional
rules (including the prohibition on print statements).Coverage Gate
Afterflutter test --coverage completes, the pipeline strips excluded paths from the coverage
report using lcov and then checks that 100% of the remaining lines are covered. The gate
is implemented directly in qa.yml using a short Python script:
LF: (lines found) and LH: (lines hit) totals from
coverage/lcov.info, computes the percentage, and raises a SystemExit if the result is
below 100%. A passing run prints output like:
Coverage Exclusions
The following paths are stripped from the coverage report before the gate is evaluated. Code in these paths is not required to have test coverage:| Excluded path | Reason |
|---|---|
**/*.g.dart | Drift-generated code — auto-generated from tables.dart by build_runner; not hand-authored logic |
lib/data/local/tables.dart | Drift schema definitions — declarative table structures with no executable business logic |
lib/l10n/* | Generated localization files — produced by flutter gen-l10n from ARB sources |
lib/ — must be covered at 100%.
Test Organization
Thetest/ directory mirrors the lib/ source structure. Tests are organized by architectural
layer:
test/core/ — Core utilities and services
test/core/ — Core utilities and services
Tests for pure, framework-independent logic at the heart of Xolo’s request pipeline:
VariableParser—{{variable}}substitution, dynamic built-ins ($timestamp,$guid,$randomInt), and edge casesScriptExecutor— pre-request and post-request script execution, variable upsert behaviorAuthResolverService— inherited auth resolution up the collection/folder hierarchy for all auth types (Bearer, Basic, API Key, OAuth2, AWS Signature, etc.)EncryptionService— AES encryption and decryption used for local backup filesCurlParser— cURL command string parsing into structured request objectsCodeGenerators— code-snippet generation (Dart, Python, JavaScript, etc.) from request modelsSecurityService— security profile enforcement (Standard / Hardened / Paranoid)
test/data/ — Data layer and persistence
test/data/ — Data layer and persistence
Tests for the repository implementation, database migrations, and import services:
DriftXoloRepository— all repository methods against an in-memory SQLite database- Database migration — schema version upgrade paths verified with Drift’s
verifyDatabase - Entity mappers — round-trip conversion between Drift row types and domain
*Entityobjects (lib/data/mappers/entity_mappers.dart) PostmanService— Postman Collection v2.1 import, folder/request hierarchy reconstructionOpenApiService— OpenAPI 3.x and Swagger 2.x import, endpoint-to-request mappingImportManager— format auto-detection and delegation to the appropriate import service
test/domain/ — Domain logic
test/domain/ — Domain logic
Tests for pure domain services introduced as part of the automation roadmap:
AssertionEvaluator— all assertion types (status_code,response_time_ms,json_path_exists,json_path_equals,body_contains) including edge cases such as non-JSON response bodiesRunPlanBuilder— collection flattening to an orderedRunPlanItemlist for flat, nested, empty, and folder-only collectionsKeyValuePair— domain value-object equality and serialization
test/presentation/ — Providers and controllers
test/presentation/ — Providers and controllers
Tests for Riverpod providers and the request execution controller:
- Provider state transitions — loading, data, and error states for collections, environments, and workspace providers
RequestController— request send flow, variable interpolation, script execution order, and history persistence via mockedXoloRepository
Running Tests Locally
Release Pipeline
The release workflow is defined in.github/workflows/release.yml and triggers on any tag push
matching v* (e.g., v1.0.0). It is structured as two dependent jobs:
-
quality— calls theqa.ymlworkflow as a reusable workflow. The release cannot proceed unless every QA step (format, analyze, test, coverage gate) passes first. -
build— runs only afterqualitysucceeds. It sets up Java 17 (Zulu distribution), installs Flutter 3.32.0, and builds the release APK:The resultingapp-release.apk(written tobuild/app/outputs/flutter-apk/) is then attached to a GitHub Release created bysoftprops/action-gh-release@v2using the tag name as the release title.
Completed Hardening
The following quality improvements are already in place and are maintained by the CI gate on every PR (sourced fromdocs/quality-gate-plan.md):
Repository layer
XoloRepository / DriftXoloRepository sits between the presentation tier and Drift. No direct
Drift access from screens or providers.Domain entities
*Entity types and round-trip mappers in lib/data/mappers/entity_mappers.dart decouple domain
logic from Drift row types.Modular files
request_tabs, auth_tab, and database.dart have been split into focused, single-responsibility
modules.Internationalization
Full UI coverage via
app_en.arb / app_es.arb and AppLocalizations. All user-visible strings
are externalized.221+ unit tests
Core services, providers, DB queries, import/sync flows, and code generators are all covered.
AppLogger
AppLogger replaces all ad-hoc print calls in core services. print is prohibited by lint rules.go_router navigation
Declarative routing with
HomeShell and named routes throughout the app.CI enforced
The release workflow depends on
qa.yml; Flutter is pinned to 3.32.0 in both workflows.