HTTP verification
aftergreen http
Checks the response status and, optionally, literal text in the body. Use a unique build ID so a stale release cannot pass.
CLI and GitHub Action
Post-deployment verification Open source Early preview
Your pipeline says success. AfterGreen checks whether the expected outcome actually happened.
deploy → productionIllustration
AfterGreenFAILED
A green pipeline confirms that the automation ran to completion. It says nothing about what users are now being served or what the database now contains.
| The automation reports | What can still be true |
|---|---|
| deploy succeeded | The application is still serving the previous version: a rollout that never switched traffic, a stale cache, the wrong target. |
| Endpoint returns 200 | The 200 comes from an old build or a maintenance page. A status code does not identify a release. |
| Database job completed | The row it was meant to write is missing or holds the wrong values. |
AfterGreen does not read your pipeline’s status. It observes the outcome directly — the response at a URL, a row in a table — and compares it with what you expected.
Every check ends in exactly one explicit verdict, printed as a word and returned as an exit code.
VERIFIED
exit 0
The expected outcome was observed and every assertion holds.
FAILED
exit 1
The outcome was observed and it contradicts what was expected.
UNKNOWN
exit 3
The outcome could not be reliably observed: no response, a timeout, a truncated body.
UNKNOWN is never treated as success. If AfterGreen cannot see the outcome, it does not claim it. In the GitHub Action, UNKNOWN fails the step just as FAILED does.
Verify a deployment over HTTP
go run ./cmd/aftergreen http \
--url https://app.example.com/version \
--status 200 \
--contains "$GIT_COMMIT_SHA" \
--timeout 10s
Output when the old build is still live
FAILED HTTP outcome (HTTP 200)
- response body did not contain the expected text
$ echo $?
1
Run from a clone of the repository with Go 1.26 or later. No prebuilt binaries are published yet. Output never prints the URL, the response body or the expected text.
AfterGreen is deliberately small. These are the checks that ship in the repository now; nothing on this page is planned work.
aftergreen http
Checks the response status and, optionally, literal text in the body. Use a unique build ID so a stale release cannot pass.
CLI and GitHub Action
aftergreen postgres
Confirms that the row an automation claims to have written exists with the expected values. One read-only, parameterized SELECT that AfterGreen builds itself; it never runs SQL from configuration.
CLI only
aftergreen check
Evaluates a JSON evidence file of expected and actual values and returns a verdict per event. A demo and evaluation format.
CLI only
foldnine/aftergreen-action
Runs the HTTP check inside a workflow, with no dependencies and no token. Kept in step with the CLI by shared conformance tests.
HTTP checks only
| Check | Go CLI | GitHub Action |
|---|---|---|
| HTTP status and body text | Yes | Yes |
| PostgreSQL row state | Yes | No |
| Local JSON evidence | Yes | No |
Not built: other databases, workflow-tool integrations, a hosted service, a UI, retries or scheduling.
Add one step after your deploy. The job only stays green if the deployed endpoint really serves the new build.
.github/workflows/deploy.yml
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
# ... your deploy steps ...
- name: Verify the deployed build is live
id: aftergreen
# No release yet: pin a full commit SHA.
uses: foldnine/aftergreen-action@13d5dc2f86e766511b67b478079d4b44100e1633
with:
url: https://app.example.com/version
expected-status: '200'
contains: ${{ github.sha }}
timeout-seconds: '10'
| Verdict | Step |
|---|---|
| VERIFIED | succeeds |
| FAILED | fails the job |
| UNKNOWN | fails the job |
| Invalid inputs | fails, no verdict |
Outputs verdict and observed-status are available to later steps. To react to a verdict instead of stopping, set continue-on-error: true and read steps.aftergreen.outputs.verdict.
The Action has no release, version tag or Marketplace listing yet. The SHA above is the current main of the Action repository.
View the Action on GitHubAfterGreen is an open-source engineering tool built by FoldNine, licensed under Apache-2.0. The verdict semantics are the product: a behaviour change needs a test that shows why.