/
/
Find the GitHub commits that may have broken a Ghost Inspector test
For developers who want to know what changed between a test's last pass and first failure, by asking their AI assistant.
On this page
Connector
Connect Ghost Inspector, pick your AI tool and paste the prompt.
The problem
What changed between the last pass and the first failure
When a Ghost Inspector test starts failing, the first question is what changed. Answering it means finding the last pass and first failure, then listing GitHub commits and runs in that gap while allowing for time zones.
Without PopdockAI
- Find the last pass and first failure by hand
- Convert times between the two systems
- List GitHub commits and workflow runs in the gap
- Assume the nearest commit is to blame
With PopdockAI
- The failing streak and the last pass before it are found
- Commits and workflow runs in the gap are listed, compared in UTC
- Commits mentioning the tested page are marked as likely suspects
- Suspects are labelled as inference, and nothing is changed
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Find the code changes most likely to have broken the Ghost Inspector test named `{test-name}`, searching back `{lookback-days}` days (default 14).
**Step 1: Find the test (Ghost Inspector)**
Call `ghost-inspector-get-test` with `name.contains` set to `{test-name}`. If nothing matches, report that and stop. If more than one test matches, list them with their suite name and id and stop so the user can choose.
**Step 2: Find the break point (Ghost Inspector)**
Call `ghost-inspector-get-test-result` with `test-id` set to the test's id and `date-created.from` set to `{lookback-days}` days ago. Order the results by `date-execution-started` yourself. Find the earliest failing result that is not followed by a pass (the first failure of the current failing streak) and the last passing result before it.
* If the test is currently passing, say so and stop.
* If there is no passing result in the window, report that the test has failed for the whole window, suggest a longer `{lookback-days}`, and continue using the start of the window as the lower bound.
**Step 3: Carry the window across (GitHub)**
The window is from the last passing result's `date-execution-started` to the first failing result's `date-execution-started`. Call `github-get-commit` with `commit-date.from` and `commit-date.to` set to those two times. Then call `github-get-workflow-run` with `created-date.from` and `created-date.to` set to the same window to see which builds and deploys ran.
Ghost Inspector and GitHub may report times in different time zones. Compare them in UTC, and if either side has no zone, widen the window by one hour on each side and say that you did.
**Step 4: Report**
* The test: name, suite, id, and the last-pass and first-fail times.
* Commits in the window: sha (short), author, date and first line of the message, newest first.
* Workflow runs in the window: name, branch, conclusion, created date and url.
* A short judgement of which commits are the strongest suspects, based on whether the message mentions the page, feature or URL the test covers (its `start-url` and name). Label this as inference.
**Rules & Guidelines:**
* `ghost-inspector-get-test` and `ghost-inspector-get-test-result` are on the ghost-inspector server; `github-get-commit` and `github-get-workflow-run` are on the github server.
* This prompt is read-only. Do NOT call `ghost-inspector-execute-test`, `ghost-inspector-add-test-result-comment`, `github-add-issue` or `github-add-issue-comment`.
**Validation:**
* If no commits fall in the window, say so plainly: the cause is more likely data, environment or the test itself than code, and point the user at the failing result's steps and console log.
* Never claim a commit caused the failure. Report correlation only.Who it's for
One answer, three teams that use it
Developers
Find the commit to look at first
Commits mentioning the page or feature the test covers are marked as likely suspects.
What GitHub commits landed between the last pass and first failure of the Cart update test?
QA engineers
Rule out code changes
When no commit falls in the window, you know to look at data, environment or the test.
Did anything change in GitHub before the Wishlist test started failing in Ghost Inspector?
Tech leads
Triage a broken test quickly
A short suspect list helps you assign the investigation to the right person.
List the GitHub workflow runs and commits around the first failure of the Payment test.
How it works
What PopdockAI does when you ask
You name the test, and your AI assistant lists the GitHub changes between its last pass and first failure. When nothing falls in the window, it points to data, environment or the test itself.
01
Ask
You name the test.
02
Find
It finds the start of the failing streak and the last pass before it.
03
Compare
It lists GitHub commits and workflow runs in that gap, comparing times in UTC.
04
Report
You get likely suspects labelled as inference, never as proven cause.
What PopdockAI provides
The tools behind the answer
Ready made tools for Ghost Inspector and one secure connection to your AI tool. No code, no exports.
ghost-inspector-get-test
ghost-inspector-get-test-result
github-get-commit
github-get-workflow-run
This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.
The outcome
Suspect commits, with correlation kept separate from cause
Related use cases
More ways to put this data to work
One prompt template with infinite possibilities.
Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.
Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

.webp)
