๐ง Test Coverage Validator Agent Specification¶
๐ฏ Purpose¶
The Test Coverage Validator Agent is the coverage watchdog of the ConnectSoft QA Engineering Cluster.
Its mission is to evaluate the completeness, correctness, and relevance of tests across all services, ensuring that:
โ Every blueprint, handler, and scenario is sufficiently tested ๐ Role-based access is covered and validated ๐ Edition-specific and tenant-specific behaviors are included ๐ Trace IDs are linked to real executions ๐งช No test is missing, orphaned, or outdated
๐งฉ What It Validates¶
| Dimension | Description |
|---|---|
| Trace ID Coverage | All testable blueprints have corresponding tests |
| Edition Awareness | All product tiers (lite, pro, enterprise) are represented |
| Role Matrix | All allowed roles for a handler/use case are tested |
| Scenario Completeness | Happy path, edge case, negative case, and access control scenarios exist |
| Prompt Backfill | Tests generated from QA prompts have been executed and logged |
| Regression Resilience | Bug fixes are protected by reproducible regression tests |
| Coverage Delta | Test coverage trends per trace over time (baseline โ now) |
๐ง Position in the Factory¶
The agent acts as:
- ๐งช A QA auditor
- ๐ A coverage reporter
- ๐ A trigger for test regeneration or augmentation
- ๐ฃ A notifier for QA engineers and Studio dashboards
- ๐ค A feedback partner to Test Generator and Automation Engineer agents
๐ Example Validation Scenario¶
Trace: cancel-2025-0142
Handler: CancelInvoiceHandler
Agent checks:
- โ
Unit test exists for
Handlemethod - โ
BDD
.featureincludes normal and access-denied scenarios - โ Edition
litedoes not include Guest role scenario - โ Prompt from QA: โWhat if CFO cancels after approval?โ was not covered
โ Result: Triggers regeneration + QA warning
๐ฆ Impact of the Agent¶
Without this agent:
- ๐ Uncovered roles go unnoticed
- โ ๏ธ Editions may ship with missing test paths
- ๐ Coverage may degrade silently over time
- ๐งฑ Security, resilience, or localization bugs could sneak into production
โ Summary¶
The Test Coverage Validator Agent ensures that test generation is:
- ๐ง Strategic, not reactive
- ๐ Complete, not just happy-path focused
- ๐ Traceable, with cross-edition and multi-role verification
- ๐ Actionable, surfacing real gaps to QA engineers and other agents
This agent turns ConnectSoftโs testing architecture into a continuous quality assurance engine, not just a one-time generator.
๐งฑ Strategic Positioning¶
The Test Coverage Validator Agent is strategically positioned as the QA intelligence layer responsible for:
- ๐ Monitoring overall test completeness
- ๐ Auditing trace, edition, and role coverage per use case
- ๐ Feeding gaps and insights back into Studio, the QA team, and generator agents
- ๐งช Ensuring all automated tests executed by the Test Automation Engineer Agent actually fulfill the coverage requirements defined in the blueprint and QA plan
๐ง Functional Positioning in the QA Engineering Cluster¶
flowchart TD
A[TestCaseGeneratorAgent] --> C[TestAutomationEngineerAgent]
B[TestGeneratorAgent] --> C
C --> D[TestCoverageValidatorAgent]
D --> E[QAEngineerAgent]
D --> F[Studio]
D --> G[TestGeneratorAgent]
D --> H[Trace Coverage Reports]
The Validator Agent is invoked:
- After test generation
- After test execution
- At periodic checkpoints (e.g., before merge, during regression, nightly audits)
๐งฉ Position Across the Factory Lifecycle¶
| Factory Phase | Validator Agent Role |
|---|---|
| ๐ฆ Blueprint Finalization | Loads expected coverage matrix from handler/role/edition mappings |
| โ๏ธ Test Generation | Validates whether generated tests fulfill expected dimensions |
| ๐งช Test Execution | Verifies whether tests ran as planned, and passed for all required combinations |
| ๐ Post-Execution Feedback | Identifies and logs missing, flaky, or skipped scenarios |
| ๐ Studio Visualization | Provides trace-based coverage scores and heatmaps |
| ๐ CI/CD & QA Notifications | Flags failing gates, missing role/edition pairs, test regression |
๐ Strategic Goals It Supports¶
The agent supports the following ConnectSoft platform goals:
- โ Observability-First QA โ by tracing execution and coverage spans
- โ Edition- and Role-Aware Testing โ by enforcing matrix coverage
- โ Security-First Development โ by validating RBAC scenario completeness
- โ Autonomous QA โ by automatically triggering Generator Agent and retries
- โ Studio-Driven QA Oversight โ by producing coverage summaries for QA and PMs
๐ง Studio and CI Feedback Loop¶
sequenceDiagram
participant ValidatorAgent
participant Studio
participant QAEngineer
participant GeneratorAgent
ValidatorAgent->>Studio: Emit trace coverage score
Studio->>QAEngineer: Display heatmap
ValidatorAgent->>GeneratorAgent: Trigger missing scenario regen
ValidatorAgent->>QAEngineer: Notify uncovered edition path
โ Summary¶
The Test Coverage Validator Agent is the coverage assurance nerve center of the QA cluster. It:
- ๐ Sits between generation and execution
- ๐ Feeds gaps to generator and automation layers
- ๐ฃ Alerts QA teams through Studio and dashboards
- ๐ Ensures that all test cases reflect the real-world complexity of roles, editions, prompts, and tenants
Itโs not just watching for gaps โ it closes the loop to fill and prevent them.
๐ Responsibilities¶
The Test Coverage Validator Agent owns the measurement, validation, and assurance of test coverage across all executable software blueprints in the ConnectSoft AI Software Factory.
It is not responsible for generating or executing tests, but for validating:
- Whether enough of the right tests exist
- Whether they executed as expected
- Whether they cover the blueprintโs functional dimensions
โ Key Responsibilities Breakdown¶
| Responsibility | Description |
|---|---|
| 1. Trace-Level Coverage Validation | Confirms that every trace_id has test coverage for all required paths |
| 2. Edition Matrix Verification | Checks that lite, pro, and enterprise variants are covered |
| 3. Role Coverage Mapping | Ensures that all roles with access are tested for both success and failure cases |
| 4. Scenario Completeness Check | Confirms that each blueprint contains at least: happy path, failure, edge, and security scenarios |
| 5. Prompt Coverage Enforcement | Verifies that QA-initiated prompts resulted in generated + executed tests |
| 6. Test Result Verification | Verifies that tests ran and passed for required scenarios in Test Automation reports |
| 7. Regression Readiness Auditing | Ensures all fixed bugs are covered by traceable regression tests |
| 8. Coverage Drift Detection | Compares current coverage vs. baseline (i.e., regressions in scope) |
| 9. Studio Heatmap Updates | Publishes per-trace coverage status to QA dashboards |
| 10. Triggering Generator Agent | Emits gap alerts to regenerate missing test paths |
| 11. Quarantine and Retry Enforcement | Flags unstable or flaky tests for QA triage |
| 12. CI/CD Gate Evaluation | Decides if coverage threshold allows merge/release |
| 13. QA Alerting and Reports | Notifies QA Engineer Agent of gap clusters, regressions, and quality risks |
| 14. Test Blueprint vs. Artifact Mapping | Maps blueprint inputs (e.g., ports, use_cases) to test artifacts and evaluates completeness |
| 15. Coverage Metadata Emission | Produces machine-readable coverage stats for analytics and trend monitoring |
๐ Example Responsibilities in Action¶
Trace: capture-2025-0143
Handler: CapturePaymentHandler
Blueprint roles: Cashier, Guest
Editions: lite, enterprise
Responsibilities Fulfilled:¶
- โ Unit test exists and ran for both editions
- โ
.featurescenario exists forCashiersuccess - โ Missing
Guestaccess denial scenario - โ
liteedition has no negative or security tests - ๐ Result: Trigger
Test Generator Agentโ regenerate - ๐ Result: Studio trace view shows
Coverage = 67%
๐ Collaboration Summary¶
| Collaborator Agent | Type of Collaboration |
|---|---|
| Test Generator Agent | Suggests specific role ร edition ร scenario tests to generate |
| Test Automation Engineer Agent | Confirms what was executed, passed, skipped, or retried |
| QA Engineer Agent | Shares coverage gap reports and delta insights |
| Studio Agent | Feeds per-trace, per-role, and per-edition coverage status for dashboards |
| Bug Resolver Agent | Validates whether bugs are protected by regression test coverage |
โ Summary¶
The Test Coverage Validator Agent is responsible for transforming raw test generation and execution into a measurable quality assurance surface, ensuring:
- ๐ฏ Every role-edition combination is validated
- ๐ Prompt-based and bug-related tests exist and are linked
- ๐ Dashboards reflect accurate trace-to-test mappings
- ๐ Coverage gaps are visible and recoverable
It acts as the quality checkpoint, coverage enforcer, and validation auditor of the entire QA process.
๐ฅ Inputs¶
The Test Coverage Validator Agent collects and correlates inputs from blueprints, test metadata, execution logs, Studio actions, and QA plans to measure and validate software test coverage across all dimensions.
These inputs allow it to:
- ๐งญ Understand what should be covered
- ๐งช Compare it to what was actually tested and executed
- ๐ Detect omissions, regressions, or misalignments
๐ฆ Primary Input Categories¶
| Input Type | Description | Source |
|---|---|---|
| Blueprints / Microservice Manifests | Contains trace_id, roles, edition, and handler data |
agent-microservice-standard-blueprint.md |
| Trace Metadata | Maps test artifacts (unit, BDD, validator) to functional traces | test-metadata.yaml, test-augmentation-metadata.yaml |
| Execution Summaries | Test results with role/edition success status | test-execution-summary.yaml from Test Automation Engineer Agent |
| Studio QA Prompts | QA-entered prompts that require test generation | Studio โ Prompt log entries |
| Bug Trace Logs | Bug IDs linked to blueprints and test validation markers | Bug Resolver Agent |
| QA Plan Requirements | Required editions, roles, tags, or scenarios per blueprint | qa-plan.yaml |
| Feature Tags & Roles | Annotated scenario tags (@role:, @edition:, @security) |
.feature files, scenario metadata |
| Retried / Quarantined Tests | Tests marked flaky or unstable | retry-history.yaml, quarantine index |
| Historical Coverage Baseline | Previous validated test coverage for deltas | coverage-snapshots.json |
| Edition Config | Determines which editions are active and their expected flows | edition-config.json, tenant manifests |
๐ Example: Blueprint Input (from generator)¶
trace_id: capture-2025-0143
handler: CapturePaymentHandler
roles_allowed:
- Cashier
- Guest
editions_supported:
- lite
- enterprise
required_scenarios:
- success
- duplicate
- unauthorized
๐ Example: Test Execution Summary (per trace)¶
trace_id: capture-2025-0143
executed:
- edition: enterprise
role: Cashier
result: passed
- edition: enterprise
role: Guest
result: failed
- edition: lite
role: Guest
result: missing
๐ Prompt Log Input (from QA)¶
{
"prompt": "What if Guest tries to approve payment?",
"trace_id": "capture-2025-0143",
"status": "generated",
"executed": false
}
โ Agent detects prompt exists but no .feature scenario was generated or executed โ triggers Generator Agent.
๐ฆ Tags and Scenario Input¶
From .feature:
โ Agent validates:
- โ Correct edition present
- โ Role-specific security case exists
- โ If edition
proorGuestis missing โ gap reported
๐ง Inputs Used for Diff & Delta Analysis¶
| Snapshot | Use |
|---|---|
coverage-snapshots.json |
Compares what was covered last week vs. now |
trace-coverage-history.yaml |
Tracks per-trace evolution of coverage quality |
qa-backlog.yaml |
Stores unfulfilled prompts or uncovered scenarios |
โ Summary¶
The Test Coverage Validator Agent relies on rich, multi-source input streams to:
- ๐ง Understand expected test coverage per trace, edition, role, and prompt
- ๐งช Analyze actual test execution and validate completeness
- ๐ Detect and surface unexecuted, under-tested, or missing paths
- ๐ Provide all downstream agents with actionable insights
This input model transforms coverage from a code metric to a business-aligned quality score.
๐ค Outputs¶
The Test Coverage Validator Agent produces a rich set of machine-readable, human-readable, and dashboard-integrated outputs that power:
- ๐ Studio dashboards and trace-level coverage views
- ๐ QA notifications and decision support
- ๐ Automated triggers for Generator, Automation, and Bug Resolver agents
- ๐ Historical tracking and observability logs
These outputs turn raw coverage data into actionable QA insights.
๐ฆ Primary Output Artifacts¶
| Output | Format | Description |
|---|---|---|
trace-coverage-report.yaml |
YAML | Coverage result per trace ID |
coverage-gap-matrix.yaml |
YAML | List of missing roles, editions, and scenarios |
qa-coverage-summary.md |
Markdown | Human-readable QA overview |
coverage-deltas.json |
JSON | Before/after coverage comparison |
trace-execution-matrix.json |
JSON | Detailed result matrix by edition ร role ร scenario |
unfulfilled-prompts.yaml |
YAML | QA prompts that havenโt been converted or executed |
gap-alert-events.jsonl |
JSONL | Streaming event log for dashboard and agent listeners |
studio-coverage-feed.json |
JSON | Sent to Studio for heatmaps and trace views |
regression-risk-report.md |
Markdown | Highlights handlers with unstable or decreasing coverage |
๐ Example: trace-coverage-report.yaml¶
trace_id: cancel-2025-0142
handler: CancelInvoiceHandler
status: partial
total_required: 6
covered: 4
missing:
- role: Guest
edition: lite
scenario: AccessDenied
- role: CFO
edition: pro
scenario: AfterApproval
๐ Example: Studio Coverage Feed¶
{
"trace_id": "invoice-2025-0147",
"coverage_score": 72,
"roles_tested": ["CFO", "FinanceManager"],
"roles_missing": ["Guest"],
"editions_tested": ["enterprise"],
"editions_missing": ["lite", "pro"],
"status": "incomplete"
}
โ Enables per-trace heatmaps and dashboard status indicators.
๐ QA Markdown Summary¶
### ๐งช Coverage Report: CancelInvoiceHandler
๐ Trace ID: cancel-2025-0142
๐ฏ Required Roles: CFO, Guest
๐งฑ Editions: lite, pro, enterprise
โ
Covered:
- CFO in enterprise edition
- Guest in pro edition
โ Missing:
- CFO in pro edition (access denied case)
- Guest in lite edition (security scenario)
๐ Suggested Action:
- Trigger Test Generator for missing paths
- Schedule rerun via Studio
๐ Gap Alert Example (Event Log)¶
{
"event": "CoverageGapDetected",
"trace_id": "refund-2025-0183",
"role": "SupportAgent",
"edition": "lite",
"scenario": "Duplicate Refund",
"source": "ValidatorAgent",
"suggested_action": "TriggerTestGenerator"
}
๐ง Trigger Signals for Other Agents¶
| Agent | Trigger |
|---|---|
| ๐งช Test Generator Agent | Emit coverage-gap-matrix.yaml with missing roles/editions |
| โ๏ธ Test Automation Engineer Agent | Request re-run of unexecuted/unstable scenarios |
| ๐ค QA Engineer Agent | Push Markdown summaries to review dashboard |
| ๐ Studio Agent | Feed dashboard views with live coverage matrix and gap map |
| ๐ง Bug Resolver Agent | Notify when post-bug test has no regression trace coverage |
๐งพ Reporting Artifacts Timeline¶
| Artifact | When Emitted |
|---|---|
trace-coverage-report.yaml |
After every major test execution |
qa-coverage-summary.md |
After Studio-triggered QA audit |
unfulfilled-prompts.yaml |
Every 15 min or during gap scan cycle |
gap-alert-events.jsonl |
Streaming output during validation |
โ Summary¶
The Test Coverage Validator Agent outputs:
- ๐ YAML + JSON for traceable agent-to-agent collaboration
- ๐ Markdown summaries for QA and Studio review
- ๐ Coverage heatmap feeds to visualize test health
- ๐ Trigger artifacts to power regeneration, reruns, and retries
These outputs close the loop between test generation, execution, and quality validation โ turning test coverage into a governable, observable QA discipline.
๐ฏ Coverage Dimensions¶
The Test Coverage Validator Agent evaluates test quality across multiple dimensions, ensuring that ConnectSoftโs QA system goes beyond "did it run?" and answers:
"Did we test the right behavior in the right context โ for every user, edition, tenant, and condition?"
This cycle defines the coverage dimensions the agent analyzes and enforces.
๐ Key Dimensions of Coverage¶
| Dimension | Description |
|---|---|
| Trace ID | Unique identifier for a blueprint unit (e.g., handler, endpoint, service use case) |
| Role | RBAC roles allowed to access the feature (e.g., Admin, Guest, CFO) |
| Edition | Product tier or configuration variant (e.g., Lite, Pro, Enterprise) |
| Scenario Type | Happy path, edge case, security path, failure condition, retries |
| Test Type | Unit, integration, BDD, validation, regression |
| Tenant | Multi-tenant customization layer (rules, locales, feature toggles) |
| Locale/Language | Variants in UI strings or behavior per culture |
| Bug Trace ID | Ensures regression test exists for any fixed bug |
| Prompt Source | Whether QA promptโbased tests were fulfilled and executed |
| Execution Mode | Scheduled, CI-based, or manually triggered via Studio |
๐ Example: Trace Coverage Dimensions for CreateInvoiceHandler¶
| Dimension | Status |
|---|---|
| Trace ID | invoice-2025-0147 โ
|
| Roles Tested | CFO, Guest โ
/ โ |
| Editions Tested | lite โ, enterprise โ
|
| Scenario Types | happy โ , edge โ , failure โ |
| Prompt Fulfilled | โWhat if Guest submits duplicate invoice?โ โ โ not tested |
| Bug Trace | #INV-448 fixed, but no regression test found โ |
โ Coverage = 58% โ triggers generator + QA review
๐ฆ Internal Model: Coverage Matrix Object¶
{
"trace_id": "invoice-2025-0147",
"roles": ["CFO", "Guest"],
"editions": ["lite", "enterprise"],
"scenarios": ["happy", "failure", "security"],
"executed_matrix": [
{ "role": "CFO", "edition": "enterprise", "scenarios": ["happy", "failure"] },
{ "role": "Guest", "edition": "enterprise", "scenarios": ["security"] }
],
"missing": [
{ "role": "Guest", "edition": "lite", "scenario": "failure" }
]
}
๐ง How the Agent Intersects Dimensions¶
| Intersection | Example |
|---|---|
role ร edition |
CFO in lite edition triggers specific config |
trace ร bug_trace |
bug #INV-448 โ ensures regression test exists for trace_id = invoice-2025-0147 |
scenario ร prompt |
QA prompt: โWhat if Guest reuses same invoice ID?โ โ requires test generated & executed |
role ร scenario type |
Ensures Guest scenarios include access denied, not just positive paths |
trace ร tenant |
Tests must execute for tenant-specific rules (e.g., late fee rules in Israel vs US) |
๐ Studio Heatmap Visualization¶
The coverage matrix enables dashboard views like:
| Role โ Edition โ | Lite | Pro | Enterprise |
|---|---|---|---|
| CFO | โ | โ | โ |
| Guest | โ | โ | โ |
| Admin | โ | โ | โ |
Color-coded by:
- โ = tested and passed
- โ = missing or untested
- โ ๏ธ = failed or unstable
๐ Tags Used Per Dimension¶
| Tag | Purpose |
|---|---|
@edition:lite |
Marks a test as scoped to a specific edition |
@role:Admin |
Role injection for security validation |
@scenario:failure |
Required for failure case coverage |
@prompt_generated |
Tracks QA-initiated scenario requirement |
@bug:INV-448 |
Traceability for regression protection |
โ Summary¶
The Test Coverage Validator Agent defines and enforces QA coverage across a full matrix of meaningful dimensions, including:
- ๐
trace_id,edition,role,scenario type,prompt,bug,locale,tenant - ๐ง Gaps are detected per dimension, not just overall
- ๐ This model powers dashboards, regeneration flows, and CI/CD quality gates
Without multidimensional validation, you risk testing a product that no one actually uses โ and missing the one that matters.
๐ฏ Static vs. Dynamic Coverage Models¶
To ensure completeness and relevance, the Test Coverage Validator Agent evaluates test coverage using two complementary models:
๐ Static Coverage โ what should be tested based on design and blueprint ๐งช Dynamic Coverage โ what was actually tested at runtime, across all dimensions
This enables the agent to detect misalignments between design intent and execution reality โ and drive automated remediation.
๐ Static Coverage Model¶
โ What It Represents¶
-
Expected test coverage based on:
-
Blueprints
- QA plans
- Handler metadata
- Edition/role access rules
- Required scenario tags (
@security,@failure) - QA prompt and bug trace backlog
๐ Example (Expected State)¶
trace_id: invoice-2025-0147
required:
roles: [Admin, CFO, Guest]
editions: [lite, enterprise]
scenarios:
- happy
- failure
- access_denied
- regression:#INV-0442
๐ง Static Sources¶
agent-microservice-standard-blueprint.mdtest-metadata.yamlqa-plan.yamlunfulfilled-prompts.yamledition-config.json
๐งช Dynamic Coverage Model¶
โ What It Represents¶
-
Actual executed and passed test runs collected from:
-
test-execution-summary.yaml assertion-logs.jsonlretry-history.yaml- Studio-triggered test traces
๐ Example (Observed State)¶
executed:
- Admin in enterprise (happy, access_denied)
- CFO in enterprise (happy)
- Guest in enterprise (โ failed)
- Admin in lite (not run)
๐ Comparison: Static vs. Dynamic¶
| Trace ID | Role | Edition | Expected Scenario | Executed | Result |
|---|---|---|---|---|---|
| invoice-2025-0147 | Admin | enterprise | happy | โ | passed |
| invoice-2025-0147 | Guest | enterprise | access_denied | โ | โ failed |
| invoice-2025-0147 | CFO | lite | failure | โ | โ |
| invoice-2025-0147 | Admin | lite | regression:#INV-0442 | โ | โ |
๐ Coverage Delta Calculation¶
expected_matrix: 12
executed_matrix: 8
passed_matrix: 7
coverage_score: 66.6%
missing_combinations:
- Admin ร lite
- CFO ร lite
- Guest ร regression
Used in:
- ๐ CI quality gates
- ๐ Generator Agent triggers
- ๐ Studio dashboards
- ๐ QA markdown reports
๐ Feedback Actions¶
| Gap Type | Triggered Action |
|---|---|
| โ Static present, dynamic missing | Generator Agent task + retry suggestion |
| โ ๏ธ Static present, dynamic failed | QA alert + retry log + potential quarantine |
| โ Static matched dynamic | Marked as covered |
| ๐ Dynamic exists, not in static | Tagged as โunmappedโ โ QA triage (possibly orphaned or redundant test) |
๐ง Use Cases Enabled¶
- Nightly QA audits
- CI/CD coverage regression blockers
- Studio โWhy is this red?โ trace views
- Edition/role expansion checks
- Bug protection assurance for released versions
โ Summary¶
The Test Coverage Validator Agent uses a dual-model strategy to guarantee:
- ๐งฑ Design-time intent is fully realized at runtime
- ๐งช Runtime test results are validated against expectations
- ๐ Gaps are traceable, actionable, and automatically remediable
- ๐ QA metrics reflect reality, not assumption
This model bridges test design โ execution โ validation, and powers the closed-loop QA system at the heart of ConnectSoftโs AI Software Factory.
๐ฏ Studio Integration for Visualization¶
To make coverage insights immediately accessible and actionable, the Test Coverage Validator Agent integrates directly with Studio, enabling:
- ๐ Visual dashboards per trace ID, role, and edition
- ๐ Feedback on test gaps and retries
- ๐ง Smart QA triage for incomplete or unstable tests
- ๐ Interactive trace-to-test views for QA, PMs, and developers
This cycle defines how the agent feeds coverage results into Studio and how those are rendered and interacted with by QA users.
๐งฑ Core Studio Integration Points¶
| Studio Module | Data Supplied by Validator Agent |
|---|---|
| Trace View | trace_id, test status, gap matrix, scenario summary |
| Coverage Heatmap | Matrix of role ร edition ร scenario โ status (โ , โ, โ ๏ธ) |
| Prompt Audit Trail | Whether QA prompt was fulfilled, executed, passed |
| Edition/Role Filter | Role/edition-level coverage across all traces |
| Gap Alerts Panel | Missing or failed scenarios by severity |
| Test Status Timeline | Time-based pass/fail/retry record per trace or scenario |
| QA Review Queue | List of uncovered or failed required paths needing triage |
๐ Sample Feed: studio-coverage-feed.json¶
{
"trace_id": "invoice-2025-0147",
"status": "partial",
"coverage_score": 66.7,
"roles": ["Admin", "CFO", "Guest"],
"editions": ["lite", "enterprise"],
"matrix": [
{ "role": "Admin", "edition": "enterprise", "scenarios": ["happy"], "status": "passed" },
{ "role": "Guest", "edition": "enterprise", "scenarios": ["access_denied"], "status": "failed" },
{ "role": "CFO", "edition": "lite", "scenarios": ["failure"], "status": "missing" }
],
"last_run": "2025-05-17T13:44:00Z"
}
๐งฉ Visual Elements Enabled¶
1. ๐ฒ Coverage Matrix Grid¶
| Role Edition | lite | pro | enterprise |
|---|---|---|---|
| Admin | โ | โ ๏ธ | โ |
| Guest | โ | โ | โ |
| CFO | โ | โ | โ |
- โ = Covered and passed
- โ = Missing
- โ ๏ธ = Flaky, failed, or unstable
2. ๐ Trace QA View¶
Trace ID: invoice-2025-0147
Coverage: 66.7%
Gaps:
- Guest in lite edition (access denied scenario)
- CFO in lite edition (failure case)
- Prompt: โWhat if Guest reuses invoice ID?โ โ Not executed
[ Trigger Test Generator ] [ View Retry Logs ] [ Mark Flaky ]
3. ๐ Prompt Status Panel¶
| Prompt | Status | Test Generated | Executed | Result |
|---|---|---|---|---|
| โGuest cancels after approvalโ | โ | โ | โ | โ |
| โGuest retries after timeoutโ | โ | โ | โ | โ |
โ QA can approve, request generation, or edit prompt.
๐ Live Coverage Alerts¶
- Scenario fails or missing โ alerts appear in Studioโs QA inbox
- Bug trace lacks regression โ red warning in QA coverage view
- Edition or role not tested โ dropdown badge with โ
๐ง Interactive QA Actions Enabled¶
| Action | Result |
|---|---|
| Trigger scenario regeneration | Sends gap back to Test Generator Agent |
| Manually rerun a scenario | Dispatches job to Test Automation Engineer Agent |
| Mark scenario unstable | Tagged in Studio, deferred to nightly |
| Approve partially covered trace | Logs QA approval to override gate (manual exception) |
๐ Trace Metadata Displayed¶
trace_id- Test coverage score
- Role ร edition execution map
- Scenario list with pass/fail
- Execution date, retry count, root cause (if failed)
- QA prompts linked
- Regression trace tags (if applicable)
โ Summary¶
This cycle enables the Test Coverage Validator Agent to:
- ๐๏ธ Make coverage status visible, filterable, and actionable in Studio
- ๐ Show per-trace coverage heatmaps
- ๐ Highlight prompt fulfillment, bug coverage, and QA approval gaps
- ๐ Enable in-place actions: retry, regenerate, approve, defer
Studio becomes a QA command center, powered by the validatorโs multi-dimensional coverage insights.
๐ฏ Collaboration with Generator and Automation Agents¶
The Test Coverage Validator Agent ensures quality through intelligent collaboration with other QA Engineering Cluster agents โ especially:
- ๐ง Test Generator Agent โ to create missing tests
- โ๏ธ Test Automation Engineer Agent โ to rerun, quarantine, or validate scenarios
- ๐งโ๐ผ QA Engineer Agent โ to review and approve uncovered paths or unstable tests
This creates a closed-loop quality system โ where coverage gaps automatically trigger repair actions.
๐ค Collaboration with Test Generator Agent¶
| Triggered By | Action |
|---|---|
| Missing role ร edition ร scenario | Emit coverage-gap-matrix.yaml to trigger targeted generation |
| Unfulfilled QA prompt | Send prompt-reminder.json with suggested scenario and trace context |
| Uncovered bug trace | Suggest @bug: regression scenario generation |
| Studio-annotated gap | Send enriched prompt including QA rationale |
๐ API Trigger Example¶
{
"trace_id": "invoice-2025-0147",
"missing": [
{
"role": "Guest",
"edition": "lite",
"scenario": "access_denied"
}
],
"source": "coverage_validator",
"reason": "QA requirement not fulfilled"
}
โ Generator Agent responds by emitting .feature, .cs, and Markdown.
โ๏ธ Collaboration with Test Automation Engineer Agent¶
| Trigger | Action |
|---|---|
| Test missing in execution logs | Schedule on-demand rerun or next CI job |
| Test marked flaky | Send quarantine metadata, remove from gate checks |
| Retry exceeded | Create โregression candidateโ trace for QA triage |
| Edition/role mismatch | Inject corrected configuration and rerun variant |
| Nightly audit plan | Validate coverage compliance across full edition matrix |
๐ Execution Rerun Instruction¶
trace_id: refund-2025-0143
role: SupportAgent
edition: lite
scenario: duplicate refund
trigger: coverage_validator
reason: not executed in last 2 builds
action: rerun
โ Test Automation Engineer Agent reruns test with exact config and emits new result file.
๐งโ๐ผ Collaboration with QA Engineer Agent¶
| Data Sent | Purpose |
|---|---|
qa-coverage-summary.md |
Studio dashboards and approval queues |
gap-alert-events.jsonl |
Streaming list of failing/missing tests |
unfulfilled-prompts.yaml |
Prompts that need manual QA intervention |
regression-risk-report.md |
Areas with unstable or regressed coverage |
manual-approval-needed.yaml |
For exceptions in gates or pre-release coverage drop |
๐งฉ Workflow Diagram¶
flowchart TD
Validator -->|missing test| Generator
Validator -->|needs rerun| Automation
Validator -->|QA approval| QAEngineerAgent
Generator --> Validator
Automation --> Validator
QAEngineerAgent --> Validator
๐ Metadata Tags¶
Each collaboration step is logged with:
source_agent: coverage_validatortrigger_type: gap | prompt | edition_mismatch | regressionaffected_trace_id,role,edition,scenario_typeaction_taken: generate | rerun | quarantine | approve_required
Example:
source: coverage_validator
trace_id: capture-2025-0143
role: Guest
edition: enterprise
action: trigger_test_generator
reason: missing access_denied test
โ Summary¶
This cycle defines how the Test Coverage Validator Agent interlocks with the rest of the QA system by:
- ๐ง Triggering the Generator Agent to patch coverage holes
- โ๏ธ Requesting the Automation Agent to rerun or fix missed tests
- ๐ค Working with the QA Agent to review, approve, or defer test gaps
- ๐ Closing every QA loop โ from missing โ generated โ executed โ validated
This forms the autonomous QA feedback mesh at the core of ConnectSoftโs AI-driven testing strategy.
๐ฏ Test Gap Detection Algorithms¶
To ensure no scenario, role, edition, or prompt is left untested, the Test Coverage Validator Agent uses a set of intelligent, multi-layered algorithms to detect test coverage gaps.
These algorithms power:
- ๐งญ Blueprint-to-test mapping
- ๐ Role ร Edition matrix scanning
- ๐ง Prompt fulfillment tracking
- ๐ Execution vs. expectation deltas
- ๐ Test quality scoring
๐งฉ Core Gap Detection Layers¶
| Layer | Description | Trigger |
|---|---|---|
| 1๏ธโฃ Blueprint Gap Detection | Compares blueprint requirements to test metadata | On blueprint update or daily |
| 2๏ธโฃ Execution Gap Detection | Detects scenarios that were never executed or failed | After each test run |
| 3๏ธโฃ Prompt Fulfillment Scan | Detects QA prompts not backed by tests | Every 15 min or on save |
| 4๏ธโฃ Edition-Role Matrix Gap | Missing combinations of allowed roles ร editions | After plan or matrix generation |
| 5๏ธโฃ Regression Gap Detection | No test exists for fixed bugs | Post-release audit |
| 6๏ธโฃ Scenario Type Completeness | Missing happy, failure, access_denied, edge, chaos |
Weekly audit or PR premerge |
| 7๏ธโฃ Unlinked Prompt/Trace | Prompt exists but isnโt mapped to trace or scenario | On Studio QA review |
| 8๏ธโฃ Coverage Drift Comparison | Drop in test % from last known snapshot | Daily comparison |
| 9๏ธโฃ Unstable Test Detection | Flaky, quarantined, or inconsistent outputs | Via retry logs |
| ๐ Edition Divergence | Tests exist for one edition but not others | Edition diff scan |
๐ Blueprint Gap Detection Example¶
Blueprint says:
roles_allowed: [Admin, Guest]
editions: [lite, enterprise]
scenarios_required: [happy, access_denied]
Existing tests:
- โ Admin + enterprise (happy)
- โ Guest + lite (missing)
- โ ๏ธ No
access_deniedscenario
Gap output:
๐ง Edition-Role Matrix Scanner¶
Evaluates:
Triggers test-generator-agent with enriched prompt:
โGenerate scenario where Guest accesses invoice in enterprise edition โ access should be denied.โ
๐ Prompt Fulfillment Scanner¶
Scans:
prompt_log:
- prompt_id: 1133
text: "What if CFO cancels invoice twice?"
trace_id: cancel-2025-0142
generated: true
executed: false
โ Flags unfulfilled_prompts.yaml
โ Sends notification to Studio QA panel
โ May auto-trigger test generation
๐ Drift Detection Logic¶
Compares:
| Trace | Last Coverage | Current | ฮ |
|---|---|---|---|
| invoice-2025-0147 | 91% | 78% | -13% โ |
| cancel-2025-0142 | 88% | 88% | 0% โ |
| refund-2025-0143 | 93% | 95% | +2% โ |
Triggers alert if delta < -5%.
๐ Sample Gap Matrix Output¶
trace_id: refund-2025-0143
missing_roles:
- Guest
- SupportAgent
missing_editions:
- lite
missing_scenarios:
- duplicate refund
- access_denied
unfulfilled_prompts:
- "Guest retries a refund too soon"
flaky_tests:
- "Refund succeeds but retry fails"
๐ง Result Actions¶
| Gap Type | Response |
|---|---|
| โ Test missing | Trigger test generator |
| โ ๏ธ Flaky | Quarantine and mark for retry audit |
| โ Prompt unexecuted | QA notification and rerun option |
| ๐ Coverage drop | Alert Studio and add to audit queue |
โ Summary¶
The Test Coverage Validator Agent uses intelligent, proactive detection algorithms to:
- ๐ Identify missing or unstable test coverage
- ๐ Ensure role-edition-scenario matrices are complete
- ๐ง Connect QA prompts and bug fixes to trace executions
- ๐ Trigger repair loops via generation, retry, or review
It doesn't wait for QA to find gaps โ it finds, classifies, and acts on them before release.
๐ฏ Edition-Aware Coverage Validation¶
Modern SaaS products โ like those generated by ConnectSoft โ support multiple editions (e.g., lite, pro, enterprise) with distinct:
- ๐งฉ Features
- ๐ Access controls
- ๐ Workflow behaviors
- ๐ Configuration profiles
The Test Coverage Validator Agent ensures that tests validate each feature as it behaves across editions, guaranteeing:
Complete edition-specific scenario coverage and configuration validation across the factory-generated SaaS matrix.
๐งฉ Core Responsibilities in Edition Coverage¶
| Responsibility | Description |
|---|---|
| Edition Matrix Completeness | Validate that every handler/use case is tested in all supported editions |
| Edition-Differentiated Behavior | Ensure edition-specific behavior toggles are reflected in tests |
| Conditional Scenario Enforcement | Scenarios tagged @edition:enterprise must only execute in matching edition |
| Edition Configuration Drift Detection | Detect changes in edition settings that invalidate existing tests |
| Edition Gap Reporting | Identify untested or incorrectly mapped editions in the QA matrix |
๐ Example: Edition Matrix Snapshot¶
Blueprint:
trace_id: refund-2025-0143
editions_supported:
- lite
- pro
- enterprise
scenarios_required:
- happy
- failure
- duplicate_refund
Actual Test Coverage:
| Edition | Scenarios Tested | Status |
|---|---|---|
lite |
happy | โ ๏ธ partial (missing edge/failure) |
pro |
happy, failure | โ complete |
enterprise |
happy, failure, duplicate_refund | โ complete |
โ Gap detected: lite edition is under-tested
โ Result: triggers scenario expansion + edition config injection
๐ท๏ธ Scenario Tagging Enforcement¶
Scenarios in .feature files must include proper tags:
Validator ensures:
- This scenario runs only in
pro - Equivalent scenario exists in
liteorenterprise, if required - Edition toggle
EnablePostApprovalFlow=trueis present during execution
๐ Edition Behavior Validation Example¶
Handler: CreateInvoiceHandler
Edition config diff:
| Key | lite | pro | enterprise |
|---|---|---|---|
AllowDuplicateInvoices |
false | false | true |
EnableLateFee |
false | true | true |
Agent enforces:
duplicate invoicetest exists for enterprise (expected: allowed)- Same test fails for
liteandpro(expected: rejection)
๐ Detection Methods¶
| Method | Description |
|---|---|
| Test Execution Diff | Compares results across editions โ mismatch triggers flag |
| Tag Coverage Analysis | Parses .feature files for missing or misused edition tags |
| Edition-Specific Validator Triggers | Runs post-execution validation to enforce config-path alignment |
| Gap Comparison Engine | Ensures every edition/role/scenario cell in matrix is covered or justifiably excluded |
๐ Sample Coverage Gap Output¶
trace_id: capture-2025-0143
missing_editions:
- lite
missing_scenarios:
- access_denied (lite)
- retry_policy_fail (lite)
reason: Not tested with `EnableInvoiceLocking = false`
suggested_action:
- Trigger Generator Agent for edition variants
๐ฏ Output to Studio¶
| Edition | Status | Scenarios | Notes |
|---|---|---|---|
| lite | โ Incomplete | ⅓ | Missing retry test |
| pro | โ Full | 3/3 | โ |
| enterprise | โ Full | 3/3 | โ |
โ QA notified. Generator Agent triggered.
๐ Inter-Agent Impact¶
| Trigger | Response |
|---|---|
EnableRefundValidation enabled in pro |
Generator adds new refund validator tests |
| Enterprise-only scenario mis-tagged | Generator receives patch request |
| Edition matrix drops coverage | QA alerted; Generator regenerates edge cases |
โ Summary¶
The Test Coverage Validator Agent enforces edition-aware QA coverage by:
- ๐ Scanning all handler/use case tests for correct edition variants
- ๐งช Validating config-driven behavior differences (feature toggles, workflows)
- ๐ท๏ธ Ensuring tagged scenarios align with editions and toggle logic
- ๐ Triggering Generator and Automation agents to resolve edition gaps
This protects ConnectSoft SaaS outputs from misconfigured, under-tested, or drifted edition behaviors.
๐ฏ Role Matrix Analysis¶
In a multi-role SaaS platform, access and behavior often vary by user role โ CFO, Admin, Guest, Analyst, etc. To guarantee correct functionality and security, the Test Coverage Validator Agent performs role matrix validation:
๐งช Ensuring all allowed and disallowed roles are properly tested across all applicable editions, tenants, and scenarios.
This ensures RBAC correctness, access control validation, and functional behavior separation by role.
๐ฆ Core Responsibilities for Role Matrix Validation¶
| Responsibility | Description |
|---|---|
| Allowed Role Test Validation | Verifies that all roles allowed in a blueprint have matching tests |
| Denied Role Test Validation | Confirms that unauthorized roles are explicitly tested to fail |
| Edition ร Role Expansion | Cross-validates that all role-edition combinations are tested |
| Access Control Enforcement | Ensures 403 Forbidden, 401 Unauthorized, and other rejection cases are asserted |
| Role Tag Compliance | Validates @role: tags in .feature and metadata alignment |
| Prompt Coverage per Role | Confirms QA prompts targeting specific roles were fulfilled |
๐ Blueprint Example: Required Role Matrix¶
trace_id: cancel-2025-0142
handler: CancelInvoiceHandler
roles_allowed: [CFO, Admin]
roles_denied: [Guest, Analyst]
editions_supported: [lite, enterprise]
Expected Matrix¶
| Role | Edition | Expected Scenario |
|---|---|---|
| CFO | enterprise | happy + edge |
| Admin | lite | failure + success |
| Guest | enterprise | access_denied |
| Analyst | lite | access_denied |
๐งช Example Test Coverage Matrix¶
| Role | Edition | Executed? | Status |
|---|---|---|---|
| CFO | enterprise | โ | passed |
| Admin | lite | โ | passed |
| Guest | enterprise | โ | missing |
| Analyst | lite | โ | failed as expected |
โ Guest not tested โ triggers scenario generation + QA warning
๐ง Detection Methods¶
| Method | Behavior |
|---|---|
| Role-Based Scenario Parsing | Reads @role:Admin, @role:Guest, etc. from .feature files |
| Access Response Expectation | Requires assertions like Then system returns 403 Forbidden |
| Cross-Edition Role Scan | Confirms that role tests span all applicable editions |
| QA Prompt Trace Linkage | Verifies whether prompts like โWhat if Analyst tries to cancel?โ were fulfilled |
| Failure Path Assertions | Looks for Then response is Unauthorized or Assert.Forbidden() in .cs tests |
๐ Missing Role Coverage Output¶
trace_id: cancel-2025-0142
missing_roles:
- Guest (enterprise): no test for access denial
- Admin (lite): missing retry scenario
role_tags_present: true
status: partial
suggested_actions:
- Trigger Generator for Guest access_denied
- Add edition-aware Admin scenario in lite
๐ Studio Matrix View (Per Trace)¶
| Role โ / Edition โ | lite | enterprise |
|---|---|---|
| CFO | โ | โ |
| Admin | โ | โ ๏ธ partial |
| Guest | โ | โ |
| Analyst | โ | โ |
โ Color-coded:
- โ Fully tested
- โ ๏ธ Incomplete
- โ Missing
๐ Inter-Agent Actions¶
| Gap | Triggered Agent |
|---|---|
Missing @role:Guest scenario |
๐ง Test Generator Agent |
| Role-only test exists, not linked to edition | โ๏ธ Test Automation Engineer Agent for rerun |
| Prompt unfulfilled for Guest | ๐ค QA Engineer Agent approval required |
โ Summary¶
The Test Coverage Validator Agent enforces role-level test completeness by:
- ๐ Validating allowed + denied role execution paths
- ๐งช Ensuring
403,401, and rejection conditions are tested - ๐ Triggering test generation for missing or partial role coverage
- ๐ Supporting Studio heatmaps and QA trace insights
Without this, security, access control, and role separation may silently break across editions โ even if tests pass.
๐ฏ Scenario Completeness Check¶
To guarantee every use case is fully validated in depth, the Test Coverage Validator Agent checks that each trace (handler, feature, or endpoint) includes a comprehensive set of test scenarios:
๐งช Happy path, failure modes, negative paths, access denial, boundary cases, and edition-variant behaviors.
This ensures tests donโt just exist โ they reflect the real-world complexity of behavior, validation, and configuration.
๐งฉ Required Scenario Types¶
| Scenario Type | Description |
|---|---|
| โ Happy Path | The expected, successful behavior under valid conditions |
| โ Failure Path | Business logic failure (e.g., invoice already canceled) |
| ๐ Access Denied | User lacks permission โ must return 403/401 |
| โ ๏ธ Invalid Input | DTO fails validation, system rejects request |
| ๐งช Boundary/Edge Case | e.g., amount = 0, max items, null fields |
| ๐ Duplicate / Retry | Same action called twice, or replayed scenario |
| ๐ ๏ธ Feature-Flag Variant | Behavior changes under edition or toggle switch |
| ๐ Regression | Bug scenario captured as test after fix |
| ๐ฅ Unhandled Condition | Scenario hits error or guardrail in system |
๐ Scenario Type Mapping Example¶
Trace: cancel-2025-0142
| Scenario | Type | Covered? |
|---|---|---|
| Cancel invoice (success) | Happy Path | โ |
| Cancel already canceled invoice | Failure Path | โ |
| Guest tries to cancel | Access Denied | โ |
| Cancel invoice with missing ID | Invalid Input | โ |
| Cancel invoice twice | Duplicate | โ |
| Cancel under enterprise flag | Feature Toggle | โ |
| Bug #4881: Post-approval cancel | Regression | โ |
โ Result: Scenario completeness score = ⅝ = 62.5%
๐ง Detection Methods¶
| Method | Description |
|---|---|
.feature Tag Parser |
Scans for @scenario: and Gherkin title matches |
.cs Analyzer |
Uses naming conventions + test metadata to classify test cases |
| Prompt Backlink | Checks if QA-generated scenarios exist for edge/failure cases |
| Validator Rule Mapping | Ensures DTO rules are tested with negative values |
| Bug Trace Matcher | Ensures every @bug: tagged fix has test match |
| Config Flag Analyzer | Detects missing edition/toggle variations in behavior path tests |
๐ Sample Validator Output: Missing Scenarios¶
trace_id: cancel-2025-0142
scenarios_required:
- happy
- failure
- access_denied
- invalid_input
- retry
- edition_variant
- regression:#4881
coverage:
happy: โ
failure: โ
access_denied: โ
invalid_input: โ
retry: โ
edition_variant: โ
regression: โ
score: 62.5%
recommendations:
- Generate @access_denied for Guest
- Replay bug trace #4881
- Add retry scenario in .feature
๐ Studio View: Scenario Completeness Badge¶
Trace: cancel-2025-0142
๐งช Scenario Completeness: โ 62.5%
Missing:
- Guest access denied
- Retry after cancel
- Bug #4881 regression
Actions:
- [ Trigger Generator ]
- [ View Retry History ]
- [ QA Approve Exception ]
๐ Collaboration Triggers¶
| Gap Type | Triggered Agent |
|---|---|
| Missing edge/failure case | ๐ง Test Generator Agent |
| Missing bug-based regression test | ๐ Bug Resolver Agent |
| QA-reviewed prompt unfulfilled | ๐ค QA Engineer Agent |
| Unexecuted retry scenario | โ๏ธ Test Automation Engineer Agent |
โ Summary¶
The Test Coverage Validator Agent ensures completeness of testing per trace by:
- ๐ Classifying tests across all expected behavior types
- ๐ Detecting missing scenarios from prompts, bugs, blueprints, or QA plans
- ๐ Triggering agents to fill missing behavior coverage
- ๐ Providing trace-level โcompleteness scoresโ to QA dashboards and PRs
Without this, a trace might be โtestedโ โ but never truly validated.
๐ฏ Regression Coverage Assurance¶
Every bug or production issue fixed in ConnectSoft's platform must be protected by a dedicated regression test โ to ensure it never recurs silently.
The Test Coverage Validator Agent enforces this by:
๐ Detecting bug fixes without corresponding regression tests and ensuring all regression scenarios are trace-linked, executed, and observable.
๐งฑ Core Responsibilities for Regression Coverage¶
| Responsibility | Description |
|---|---|
| Bug Trace Validation | Ensures each bug fix (bug_id) is covered by a linked test |
| Post-Fix Test Execution | Confirms that regression tests were executed post-fix |
| Regression Assertion Detection | Checks that the test includes a strong assertion for the fixed condition |
| Studio + QA Linkage | Adds regression coverage status to Studio dashboards |
| Alerting for Unprotected Bugs | Warns QA and Generator agents if regressions are missing |
๐ Bug Trace Model¶
Bug entry:
bug_id: INV-448
trace_id: invoice-2025-0147
fixed_in: release-2025.05.12
expected_behavior:
role: Admin
scenario: Cannot cancel locked invoice
Validator looks for:
- A
.featureor.cstest tagged with@bug:INV-448 - Executed after fix date
- Contains a strong assertion (e.g. returns
403)
๐งช Regression Check Logic¶
| Check | Criteria |
|---|---|
| Test exists | At least one test references bug_id |
| Test executes | Was run and passed in post-fix build |
| Assertion present | Verifies symptom of original bug (status, output, etc.) |
| Edition/role match | Same role, edition, tenant as where bug occurred |
| Prompt match (optional) | Test derived from prompt like โWhat ifโฆโ logged by QA |
๐ Regression Audit Report¶
bug_id: INV-448
trace_id: invoice-2025-0147
status: โ not covered
reason: No regression scenario for "locked invoice cancellation"
recommendation:
- Generate test using scenario: "Admin cancels locked invoice โ fail"
- Assert status_code = 403
- Tag with @bug:INV-448
๐ Sample .feature Snippet (Valid Regression)¶
@bug:INV-448 @role:Admin @edition:enterprise
Scenario: Cancel locked invoice should be forbidden
Given an invoice is in Locked status
And the user is Admin
When they attempt to cancel it
Then the system returns 403 Forbidden
Validator:
- Confirms scenario exists
- Ran in build after
release-2025.05.12 - Passed โ โ marked as protected
๐ง Sources Used¶
bug-log.yamltest-execution-summary.yaml.featureand.csfiles- Prompt-to-scenario mapping
- Studio QA comments ("Please make sure this doesn't happen again")
๐ Studio View (Regression Protection)¶
| Bug ID | Trace | Status | Test Exists | Executed | Result |
|---|---|---|---|---|---|
| INV-448 | invoice-2025-0147 | โ Missing | โ | โ | โ |
| PAY-333 | capture-2025-0143 | โ Covered | โ | โ | โ Passed |
โ Red status triggers Generator + QA alert.
๐ค Generator Feedback Loop¶
If regression test is missing:
{
"trigger": "regression_gap",
"bug_id": "INV-448",
"trace_id": "invoice-2025-0147",
"scenario": "Admin cancels locked invoice",
"expected_result": "403 Forbidden",
"source": "coverage_validator"
}
โ Generator agent emits .feature + .cs โ Validator watches for next execution.
โ Summary¶
The Test Coverage Validator Agent guarantees regression-proof releases by:
- ๐ Auditing all fixed bugs for matching regression tests
- ๐งช Verifying proper assertion, role, edition, and trace alignment
- ๐ Closing gaps by triggering Generator Agent or rerun tasks
- ๐ Reporting regression test status in Studio and QA reviews
A bug without a test is a bug waiting to return.
๐ฏ Prompt & Bug Trace Backfill Validation¶
Many test scenarios in the ConnectSoft AI Software Factory originate from:
- ๐ค QA prompts (Studio or test plans)
- ๐ Bug reports or incident traces
The Test Coverage Validator Agent ensures that all such test requests are:
๐งช Properly fulfilled, executed, and traceable โ closing the loop between input (prompt/bug) and output (test scenario + result).
๐งฉ Core Responsibilities¶
| Source | Validation Task |
|---|---|
| QA Prompts | Was a test generated from the prompt? Was it executed? Did it pass? |
| Bug Traces | Was the issue converted into a regression scenario? Did it run? |
| Prompt-to-Trace Linking | Did the generated test clearly associate with the right trace/handler? |
| Execution Fulfillment | Was the scenario tested for all relevant editions, roles, and conditions? |
| Studio Sync | Does Studio reflect the status of prompt and bug fulfillment? |
๐ Prompt Fulfillment Example¶
QA Prompt:
โWhat if a Guest tries to cancel an already approved invoice?โ
Logged:
prompt_id: 1051
trace_id: cancel-2025-0142
source: studio.qa
status: generated
test_id: scenario-guest-approved-denied
executed: false
Validator Action:
- ๐ Triggers Generator Agent if test is missing
- โ๏ธ Triggers Automation Agent to rerun if not executed
- ๐ Alerts QA if unresolved after 1 day
๐ Bug Trace Fulfillment Example¶
Bug Report:
bug_id: PAY-333
issue: Retry on duplicate refund fails silently
required_regression:
trace_id: refund-2025-0143
scenario: Retry same refund ID twice
Test Coverage:
- โ No test named or tagged
@bug:PAY-333 - โ No execution record in
test-execution-summary.yaml
โ Agent emits regression_gap.yaml to Generator Agent
๐ Detection Process¶
| Check | Logic |
|---|---|
| Prompt exists โ no generated scenario | Unfulfilled โ trigger Generator |
| Scenario exists โ not executed | Schedule via Automation Agent |
| Executed โ no matching assertion | Incomplete โ Studio shows "Partial" |
| Executed โ passed | โ Fulfilled |
| Prompt covered โ role/edition missing | Partial fulfillment โ QA warning |
๐ Studio Prompt Backlog View¶
| Prompt | Status | Scenario | Executed | Result |
|---|---|---|---|---|
| โGuest cancels after approvalโ | โ | cancel_guest_approved | โ | โ Passed |
| โWhat if Guest retries?โ | โ | โ | โ | โ |
| โCFO retries failed refundโ | โ | refund_retry_cfo | โ | โ |
โ Studio shows badges and action buttons:
- [ Trigger Test Generation ]
- [ Schedule Execution ]
- [ Mark Complete ]
๐ Validator Output: unfulfilled-prompts.yaml¶
unfulfilled:
- prompt_id: 1051
trace_id: cancel-2025-0142
prompt_text: "Guest cancels approved invoice"
scenario: not generated
action: generator_trigger
- prompt_id: 1062
trace_id: refund-2025-0143
scenario: refund_retry_cfo
generated: true
executed: false
action: schedule_execution
๐ค Feedback Loop Triggers¶
| Source | Agent |
|---|---|
scenario: not generated |
๐ง Test Generator Agent |
executed: false |
โ๏ธ Test Automation Engineer Agent |
partial: edition missing |
๐ค QA Engineer Agent notified |
prompt not linked |
Studio flagged for QA input |
โ Summary¶
The Test Coverage Validator Agent closes the QA feedback loop by:
- ๐ Ensuring all prompts and bug traces are fulfilled
- ๐งช Verifying tests were generated, executed, and passed
- ๐ Triggering next actions if any link in the chain is missing
- ๐ Reflecting status in Studio dashboards for transparency
Without this cycle, prompts become suggestions, not guarantees โ and bugs may remain untested ghosts.
๐ฏ Coverage Scoring and Heatmap Calculation¶
To enable quantitative QA reporting and drive decisions in Studio, CI/CD, and release planning, the Test Coverage Validator Agent calculates:
๐ Coverage scores, ๐ trend deltas, and ๐บ๏ธ visual heatmaps for every trace, role, edition, and scenario.
These scores provide a measurable, comparable, and visual view of test health across the platform.
๐งฎ What Is a Coverage Score?¶
A coverage score is a numeric indicator (0โ100%) that reflects:
- โ How completely a trace is tested
- ๐งช Whether all roles, editions, and scenario types are covered
- ๐ If prompt-based or bug-related scenarios were executed
- ๐ If any test failed, was flaky, or missing
๐ Formula (Simplified)¶
Coverage Score =
(Weighted coverage of roles ร editions ร scenario types ร test types ร sources)
- Penalties for failures, quarantines, and gaps
๐ Example: Score Breakdown¶
Trace: cancel-2025-0142
| Metric | Value |
|---|---|
| Roles covered | 3 / 4 = 75% |
| Editions covered | 2 / 3 = 66% |
| Scenario types fulfilled | 5 / 7 = 71% |
| Prompt-based tests executed | 1 / 2 = 50% |
| Bug traces covered | 1 / 1 = 100% |
| No retries/quarantine | โ |
| โก๏ธ Final Score | 72.6% |
๐บ๏ธ Heatmap Calculation¶
The agent emits color-coded matrices per trace and global view:
| Role โ / Edition โ | lite | pro | enterprise |
|---|---|---|---|
| CFO | โ | โ | โ |
| Guest | โ | โ ๏ธ | โ |
| Admin | โ | โ | โ |
Legend:¶
- โ Tested and passed
- โ ๏ธ Tested, but failed or flaky
- โ Not tested or missing
โ Studio renders this in dashboards and PR views.
๐ Outputs for Coverage Scoring¶
| File | Description |
|---|---|
trace-coverage-score.yaml |
Per-trace score breakdown |
coverage-deltas.json |
Change in score since last run |
studio-heatmap.json |
Edition ร role coverage matrix |
qa-scoreboard.md |
Markdown summary for QA and release teams |
๐ Sample: trace-coverage-score.yaml¶
trace_id: refund-2025-0143
score: 81.3
roles:
- Guest: 100%
- Admin: 100%
- CFO: 66%
editions:
- lite: 50%
- enterprise: 100%
scenario_types:
- happy: โ
- failure: โ
- retry: โ
- access_denied: โ
penalties:
- retry_required: 1
- unexecuted_prompt: 1
coverage_trend: -2.7
๐ QA Scoreboard Sample¶
### ๐ QA Coverage Scoreboard
- Trace: cancel-2025-0142
- Score: 72.6%
- Trend: โฌ -4.3% since last release
- Gaps:
- Guest role in `lite`
- Scenario: duplicate cancellation
- Prompt: โWhat if canceled twice?โ not executed
Actions:
- [Regenerate Scenarios]
- [Schedule Execution]
- [QA Review Required]
๐๏ธ Studio & CI Integration¶
- Merge gate can block if score < threshold (e.g., 80%)
- Trend analysis helps detect silent regressions
- Heatmap + matrix visualizes trace health at a glance
- QA approval panel uses score to prioritize reviews
โ Summary¶
This cycle enables the Test Coverage Validator Agent to:
- ๐ Assign meaningful test quality scores
- ๐บ๏ธ Visualize edition ร role ร scenario completeness
- ๐ Detect trends and coverage regressions
- ๐ Drive dashboards, release decisions, and test priorities
Without scores and heatmaps, QA becomes intuition โ with them, it becomes governance.
๐ฏ Failure Risk Prediction Based on Coverage¶
Beyond scoring whatโs covered, the Test Coverage Validator Agent estimates:
๐ฎ How likely a trace is to fail or regress in production based on whatโs not covered.
This enables ConnectSoft to proactively:
- ๐ก๏ธ Strengthen weak areas before release
- ๐ Prioritize test effort where it matters most
- โ ๏ธ Flag features with high risk and low resilience
๐ง What Is Failure Risk?¶
Failure Risk = Likelihood ร Impact of Undetected Defect
The agent calculates risk using a multi-factor model:
| Factor | Contribution |
|---|---|
| โ Coverage gaps (roles, editions, scenarios) | High |
| ๐ Retry or flaky history | Medium |
| ๐ Past bug trace gaps | High |
| ๐งช Missing edge case or failure scenarios | High |
| ๐ Coverage delta (recent drops) | Medium |
| ๐ Complexity score (handler depth, DTO size) | Optional |
| ๐ Usage frequency (from telemetry) | Optional future enhancement |
๐ Risk Score Output¶
trace_id: cancel-2025-0142
coverage_score: 72.6%
missing_elements:
- Guest in lite
- Scenario: duplicate cancellation
- Bug #INV-488 not tested
flaky_tests: 1
retry_count: 3
regression_coverage: partial
failure_risk_score: 84.2 # out of 100
risk_level: HIGH
recommendations:
- Generate access_denied scenario
- Rerun failed prompt test
- Add regression test for #INV-488
๐ Risk Level Bands¶
| Score Range | Risk Level | Description |
|---|---|---|
| 0โ30 | ๐ข Low | Well-tested, stable |
| 31โ60 | ๐ก Medium | Some gaps or retries present |
| 61โ80 | ๐ Elevated | Weak paths or recent regressions |
| 81โ100 | ๐ด High | Missing critical coverage or frequent instability |
๐ Failure Risk Tags (Used in CI, Studio, QA)¶
risk:lowrisk:mediumrisk:elevatedrisk:high
โ Used to sort trace lists, prioritize test reviews, or block releases
๐บ๏ธ Studio Impact¶
QA Trace Panel¶
| Trace ID | Coverage | Risk | Missing |
|---|---|---|---|
cancel-2025-0142 |
72% | ๐ด High | Guest+lite, bug regression |
invoice-2025-0147 |
88% | ๐ก Medium | AccessDenied+CFO |
refund-2025-0143 |
96% | ๐ข Low | โ |
โ QA clicks [See Why] to view risk rationale and action buttons:
- [Generate Missing]
- [Request Rerun]
- [Mark Known Risk]
๐ฆ Outputs¶
| File | Description |
|---|---|
risk-prediction.yaml |
Per-trace failure risk with root causes |
qa-risk-dashboard.md |
Markdown view for Studio and QA report |
risk-tags.json |
Tagged list for CI/CD and gating |
risk-heatmap.json |
Clustered visualization data (future) |
๐ค Agent Actions Triggered¶
| Risk Factor | Triggered Agent |
|---|---|
| Role ร edition gap | ๐ง Test Generator |
| Retry history + unexecuted | โ๏ธ Test Automation |
| Bug trace uncovered | ๐ Bug Resolver |
| Risk > threshold before release | ๐ค QA approval + Studio warning |
โ Summary¶
This cycle equips the Validator Agent to:
- ๐ฎ Predict production failure risk per trace
- ๐ Add a risk dimension to coverage scores
- โ ๏ธ Warn QA and CI/CD when critical features are under-tested
- ๐๏ธ Drive smarter prioritization in testing, planning, and release
Without risk prediction, coverage is just a number โ with it, it's a shield.
๐ฏ Reporting and Alerts to QA Agents & Studio¶
The final value of the Validator Agentโs insights lies in how well theyโre communicated to QA engineers, product managers, and CI/CD pipelines.
This cycle defines how the agent delivers its findings through:
๐ฃ Dashboards, reports, alerts, and embedded feedback surfaces โ in Studio, QA queues, and DevOps pipelines.
๐ Reporting Responsibilities¶
| Output Channel | Used For |
|---|---|
| Studio Dashboards | Visualizing per-trace coverage, risk, and gaps |
| QA Notification Inbox | Listing missing tests, failed prompts, unprotected bugs |
| Pull Request Comments | Summary of test status, coverage score, risk level |
| Pre-Release Quality Report | Human-readable PDF/Markdown QA summary |
| Email/Slack Alerts | Push alerts on regressions, high-risk gaps, or prompt failures |
| CI/CD Output | Structured coverage gates + badges |
๐ Markdown Summary: qa-coverage-summary.md¶
### ๐งช QA Summary: Trace ID cancel-2025-0142
๐ Coverage Score: 72.6%
๐ด Risk Level: HIGH
โ Missing:
- Guest role in lite edition
- Scenario: duplicate cancellation
- Bug trace #INV-488 regression test
๐ง Recommendations:
- Trigger test generator for Guest
- Rerun failed prompt scenario
- QA approval required before release
๐งฉ Linked Prompt:
"Guest tries to cancel approved invoice" โ Not fulfilled
๐ฆ Generated Files¶
| File | Format | Description |
|---|---|---|
qa-coverage-summary.md |
Markdown | Human-readable report for QA/PM |
studio-gap-alerts.json |
JSON | Used in Studio to highlight incomplete traces |
ci-coverage-gate.yaml |
YAML | Feed for merge/release gate evaluation |
qa-inbox-alerts.jsonl |
JSONL | QAโs task queue (one alert per gap) |
risk-feed.json |
JSON | Dashboard risk metrics and heatmap matrix |
๐ฃ Studio Notifications¶
โ๐จ Coverage Alert:
cancel-2025-0142has untested scenarioaccess_deniedinliteedition. Risk Level: HIGH.โ
โ Appears in:
- ๐ฅ QA Studio Inbox
- ๐ Trace summary panel
- โ ๏ธ Merge block reason tooltip
- โ Action buttons: [Regenerate] [Rerun] [Mark Approved]
๐ง QA Alert Inbox Entry¶
{
"trace_id": "cancel-2025-0142",
"alert_type": "coverage_gap",
"severity": "high",
"missing": ["Guest ร lite ร access_denied"],
"recommendation": "Generate .feature scenario and execute before release"
}
โ Pull Request Comment¶
### QA Coverage Validator
- Trace: `cancel-2025-0142`
- ๐ Coverage: 72.6%
- ๐ด Risk: HIGH
- Missing:
- Guest in lite edition
- Prompt ID 1051 not fulfilled
- CI Gate: โ Blocked (coverage < 80%)
[See Studio Report] [Approve Exception]
๐ CI Badge Status (Optional)¶
- Hold "Alt" / "Option" to enable pan & zoom
- Hold "Alt" / "Option" to enable pan & zoom
- Hold "Alt" / "Option" to enable pan & zoom
โ Summary¶
This cycle defines how the Validator Agent:
- ๐ฃ Delivers findings in Studio, CI, QA, and PM workflows
- ๐ Produces actionable, role-aware, and edition-aware reports
- ๐ Sends gap alerts and regression warnings with direct links to fix them
- ๐ง Drives prompt fulfillment, bug test enforcement, and coverage improvement
Without alerts and reports, coverage data is just background noise. This cycle makes it operationally actionable.
๐ฏ Feedback Loop with QA, Generator, and Automation Agents¶
The Test Coverage Validator Agent is not a passive auditor โ it is an active participant in the software factoryโs closed-loop testing system.
This cycle defines how the agent:
๐ Triggers actions in other agents when coverage gaps, failures, or drift are detected โ enabling self-correcting, continuously improving QA.
๐ Feedback Loop Summary¶
| Condition Detected | Action Triggered | Target Agent |
|---|---|---|
| โ Scenario missing for role ร edition | Emit scenario plan | ๐ง Test Generator Agent |
| โ ๏ธ Test exists but not executed | Dispatch execution request | โ๏ธ Test Automation Engineer Agent |
| ๐ Bug fix without regression | Create regression_gap.yaml |
๐ง Generator / ๐ Bug Resolver Agent |
| ๐ Retry failure or flakiness | Flag retry & isolate | โ๏ธ Automation Agent |
| ๐ Coverage score dropped | Alert QA & Studio | ๐ค QA Engineer Agent |
| โ Prompt not linked or executed | Add to prompt backlog | ๐ง Generator Agent |
| ๐งช Execution unstable over time | Mark quarantine_pending |
โ๏ธ Automation / QA Engineer Agent |
๐ Feedback Artifact: coverage-gap-matrix.yaml¶
trace_id: cancel-2025-0142
missing:
- role: Guest
edition: lite
scenario: access_denied
- scenario: duplicate_cancellation
trigger_source: coverage_validator
suggested_action: trigger_generation
โ Received by Generator Agent โ emits .feature file
๐ Execution Trigger: execution-request.yaml¶
trace_id: refund-2025-0143
scenario_id: refund_retry_twice
role: CFO
edition: enterprise
reason: Prompt fulfilled, not executed
triggered_by: validator
โ Picked up by Test Automation Agent for execution run
๐ Regression Feedback to Bug Resolver¶
bug_id: INV-488
trace_id: invoice-2025-0147
status: regression_unprotected
recommendation:
- Generate scenario: "Locked invoice cannot be canceled"
- Tag with @bug:INV-488
โ Feeds into Generator and Studio QA prompt interface
๐ค QA Engineer Agent Feedback¶
| Type | Description |
|---|---|
qa-coverage-summary.md |
Human-readable report sent for review |
gap-alert-events.jsonl |
Event stream of gaps, flakiness, and missing prompts |
qa-approval-required.yaml |
Generated when high-risk test is missing before release |
| Studio push | Inbox + matrix updates for trace(s) needing review |
๐ Studio Action Sync¶
Feedback loop supports:
- [Trigger Test Generator]
- [Schedule Rerun]
- [Mark Quarantine]
- [Approve Without Full Coverage]
- [Regenerate Prompt]
๐ Feedback Flow Diagram¶
flowchart TD
Validator --> Generator
Validator --> Automation
Validator --> QAEngineer
Validator --> BugResolver
Validator --> Studio
Generator --> Studio
Automation --> Validator
QAEngineer --> Validator
Each loop includes:
- ๐ง Gap detection
- ๐ Context-aware action suggestion
- ๐ Execution + observation
- โ Revalidation
โ Summary¶
This cycle makes the Validator Agent:
- ๐ A continuous orchestrator of missing, failed, or flaky tests
- โ๏ธ A dispatcher of task requests to Generator and Automation agents
- ๐ง A source of contextual QA insight to Studio and QA teams
- ๐งพ A smart auditor with the power to trigger fixes
This feedback loop turns static test coverage into a living, self-healing QA system.
๐งญ Final Summary and Ecosystem Positioning¶
The Test Coverage Validator Agent is the QA intelligence core of the ConnectSoft AI Software Factory.
It ensures that:
๐งช Every use case, role, edition, scenario, prompt, and bug is not only tested โ but measurably, observably, and provably validated.
It transforms test generation and execution into a continuous quality governance loop.
๐งฑ Ecosystem Positioning in QA Cluster¶
flowchart TD
Blueprint --> Generator
Generator --> Automation
Automation --> Validator
Validator --> Studio
Validator --> Generator
Validator --> Automation
Validator --> QAEngineer
Validator --> BugResolver
- ๐ง Generator Agent: Produces new tests from gaps
- โ๏ธ Automation Agent: Executes and reruns missing cases
- ๐ค QA Engineer Agent: Reviews, approves, or escalates critical issues
- ๐ Bug Resolver Agent: Ensures regression tests are added
- ๐งญ Validator Agent: Ensures it all adds up
๐งช What It Validates¶
| Dimension | Scope |
|---|---|
| ๐ Trace IDs | All generated use cases |
| ๐ Roles | Allowed + denied behavior |
| ๐ Editions | Feature parity, flag-driven behavior |
| ๐ Scenario Types | Happy, failure, access_denied, edge, chaos, etc. |
| ๐ฅ QA Prompts | Prompt coverage and fulfillment |
| ๐ Bug Traces | Regression test enforcement |
| ๐ง Flakiness & Quarantine | Retry handling and test stability |
| ๐ Risk & Trend Deltas | Failure likelihood and score drops |
๐ Key Outputs¶
| Artifact | Purpose |
|---|---|
trace-coverage-report.yaml |
Gap report per use case |
coverage-deltas.json |
Trend regression detection |
risk-prediction.yaml |
Failure likelihood scoring |
studio-coverage-feed.json |
Studio matrix visualizations |
qa-coverage-summary.md |
Markdown report for QA decision-making |
gap-alert-events.jsonl |
Real-time notification stream |
execution-request.yaml |
Rerun trigger to Automation Agent |
prompt-reminder.yaml |
Prompt resolution reminder to Generator Agent |
โ Summary Statement¶
The Test Coverage Validator Agent transforms test coverage from a checklist into a strategic, risk-aware, role-edition-scenario matrix โ validating the factoryโs outputs, one trace at a time.
It is:
- ๐ The scorekeeper
- ๐ The gap closer
- โ ๏ธ The risk detector
- ๐ง The QA brainstem
It ensures every blueprint is battle-tested โ and if not, it triggers agents to make it so.