| name | quarantine-age |
| version | 1.0 |
| last_updated | 2026-07-20 |
| id | quarantine-age |
| one_line_purpose | Apply quarantine expiry policy to stale scenarios. |
| entry_point | docs/skills/test-authoring/quarantine-age/SKILL.md |
| category | test-authoring |
| mcp_compliance_level | partial |
| status | active |
| dependencies | [] |
| tags | ["quarantine","policy","flaky"] |
| description | Quarantine policy and age limits for stale tests. Load when deciding whether to quarantine, unquarantine, or remove a scenario. |
| metadata | {"type":"pattern","audience":"agents","maturity":"stable"} |
Quarantine age enforcement
When to Use
- Changing
scripts/check_quarantine_age.py
- Changing the
quarantine-age job in .github/workflows/pr-validate.yml
- Debugging CI failures caused by expired
@quarantine scenarios
When NOT to Use
- Editing runtime skip behavior for
@quarantine or @pending tags in behave hooks
- Writing or debugging the quarantined scenarios themselves
- Changing reusable VM/e2e pipeline behavior unrelated to quarantine expiry
Core Process
- Scan current
tests/**/*.feature files and collect scenarios tagged @quarantine.
- For each feature file, walk
git log --follow --reverse and inspect file snapshots with git show <sha>:<path>.
- Record the first commit where each scenario appears with
@quarantine; if history cannot prove it, fall back to the file's last git modification date.
- Calculate age in days and fail when
age_days > (--max-days + --grace-days).
- Print an actionable report with feature path, scenario name, quarantine date, age, and the required next action.
- Use
--json only for informational consumers (for example an Actions job summary); keep default CLI mode as the enforcement path that exits non-zero on expired quarantines.
What it does
scripts/check_quarantine_age.py scans current .feature files for @quarantine scenarios, walks git log --follow history for each feature file, and records the first commit where each scenario appears with the @quarantine tag.
The script fails when a quarantine age exceeds the configured threshold:
effective threshold = --max-days + --grace-days
default threshold = 30 + 0 = 30 days
CI rollout threshold = 30 + 30 = 60 days
JSON mode (--json) emits every current quarantine entry, including days, quarantined_on, threshold_days, and date_source, and always exits 0 so workflow summaries can render counts without turning a reporting call into a job failure.
Workflow requirements