| name | record-fix |
| description | Import a verified fix from a merged PR into the knowledge base |
| user-invocable | true |
Record Fix
Import a verified fix from a merged GitHub PR into the houston knowledge base. This grows the corpus of past fixes that /analyze-failures uses as reference when writing reports.
Usage
/record-fix <PR-URL> [--test-id TEST_ID] [--component COMPONENT]
<PR-URL> (required) — full GitHub PR URL (e.g. https://github.com/SatelliteQE/robottelo/pull/1234)
--test-id (optional) — the test ID this fix resolves (e.g. test_iop_recommendations_host_details_e2e)
--component (optional) — the CaseComponent (e.g. Insights-Advisor)
Examples:
/record-fix https://github.com/SatelliteQE/robottelo/pull/1234
/record-fix https://github.com/SatelliteQE/airgun/pull/567 --test-id test_iop_recommendations_host_details_e2e --component Insights-Advisor
Instructions
Step 1: Fetch the PR
Run the following to get PR metadata and diff:
gh pr view <PR-URL> --json title,body,files,state,mergedAt,labels,number,url 2>&1
gh pr diff <PR-URL> 2>&1
If the PR is not merged, warn the user and ask if they still want to record it.
Step 2: Analyze the fix
Read the PR diff and description to extract:
- What test failure this fixes — look for test IDs, Jira tickets (SAT-xxxxx), error messages, or exception classes in the PR title/body/diff
- The root cause — summarize why the test was failing (e.g., "tab renamed in UI", "locator xpath outdated", "API response format changed")
- The fix description — what the PR actually changed to fix it
- Fix type — classify as one of:
test_update, upstream_bug, environment, flaky, skip, unknown
- Error pattern — the exception or error string that this fix would match against (e.g.,
NoSuchElementException.*Recommendations)
- Component — the CaseComponent if detectable from the test file or PR context
- Tags — relevant keywords for search (e.g.,
["airgun", "locator", "host_details", "recommendations"])
If --test-id or --component were provided as arguments, use those values.
Step 3: Save to the knowledge base
Run the CLI command to save the fix:
houston record-fix "<PR-URL>" \
--test-id "<test_id>" \
--error-pattern "<error_pattern>" \
--root-cause "<root_cause>" \
--fix-description "<fix_description>" \
--fix-type "<fix_type>" \
--component "<component>" \
--tags "<tag1>,<tag2>,<tag3>" \
2>&1
The diff is captured automatically from the PR.
Step 4: Confirm to the user
Print:
- Fix ID that was saved
- Test ID and component it maps to
- Root cause summary
- Path to the JSON file in
resources/fixes/
Remind the user they can search for it with:
houston search "<error pattern or test name>"