You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(test-classifier): make OBSERVED the default; add --no-run-suite opt-out (#77)
Running the suite when one exists is the high-signal path, so it is now the
default for every run (local, CI, Jenkins) rather than CI-only. Flip the
AI_RUN_SUITE default 0 -> 1 in the lib and in the dispatcher's prompt branch.
The skill still falls back to INFERRED on its own when there is no suite, the
toolchain is missing, or it would apply real infra with no teardown.
OBSERVED executes branch code, so add an easy opt-out for untrusted diffs:
the new --no-run-suite flag (exports AI_RUN_SUITE=0 before the lib loads) and
the existing AI_RUN_SUITE=0 env var. Reframe SKILL.md, SETUP.md, and the local
docs around 'OBSERVED by default, opt out for untrusted code'. CI/Jenkins keep
their explicit AI_RUN_SUITE=1 (now redundant but self-documenting).
test-classifier # everything unpushed: runs the suite, triages REAL failures (OBSERVED)
114
117
test-classifier origin/main # the committed range origin/main..HEAD
115
118
test-classifier HEAD~1 # just the last commit
116
119
117
-
AI_RUN_SUITE=1 test-classifier # run the suite locally and triage REAL failures (OBSERVED)
120
+
test-classifier --no-run-suite# read-only: predict from the diff, don't run the suite (INFERRED)
118
121
119
122
# Post the result as a PR comment (needs an open PR + gh authed):
120
123
test-classifier --post-comment # auto-discovers the current branch's PR
121
124
test-classifier --pr 42 --post-comment # explicit PR number
122
-
AI_RUN_SUITE=1 test-classifier --pr 42 --post-comment #OBSERVED + post
125
+
test-classifier --pr 42 --no-run-suite --post-comment #INFERRED + post
123
126
124
127
# Streamlined: post AND record the metric in one shot (see --submit below):
125
128
test-classifier --pr 42 --submit
@@ -151,8 +154,8 @@ Events** tab — verdict, file context, confidence, and your 👍/👎 (with an
151
154
one-line reason on a 👎). No GitHub round-trip, no separate harvest.
152
155
153
156
```bash
154
-
test-classifier --pr 42 --submit # classify (INFERRED) → post → ask → record
155
-
AI_RUN_SUITE=1 test-classifier --pr 42 --submit #OBSERVED → post → ask → record
157
+
test-classifier --pr 42 --submit # classify (OBSERVED) → post → ask → record
158
+
test-classifier --pr 42 --no-run-suite --submit #INFERRED → post → ask → record
156
159
test-classifier --submit # auto-discovers the current branch's PR
157
160
```
158
161
@@ -200,11 +203,11 @@ The row lands in the **Testing Events** tab by default; override with
200
203
`→ Fix the CODE`, `→ Re-run / deflake`, `→ Fix the ENV`). That's the punchline:
201
204
the classifier is **diagnostic** — it tells you which side to fix, never writes
202
205
the patch. Read the summary, then make the change yourself.
203
-
-**INFERRED vs OBSERVED.**Without `AI_RUN_SUITE=1` the agent predicts failures
204
-
from the diff (INFERRED) and never touches your toolchain. With it, the agent
205
-
runs your suite (OBSERVED) — the only mode in which `FLAKY_FAILURE` /
206
-
`ENVIRONMENT_ISSUE` are reliably reachable, since you can't see a timeout or
207
-
non-determinism from a diff.
206
+
-**OBSERVED vs INFERRED.**By default the agent runs your suite (OBSERVED) —
207
+
the only mode in which `FLAKY_FAILURE` / `ENVIRONMENT_ISSUE` are reliably
208
+
reachable, since you can't see a timeout or non-determinism from a diff. With
209
+
`--no-run-suite` (`AI_RUN_SUITE=0`) it predicts failures from the diff
210
+
(INFERRED) and never touches your toolchain.
208
211
-**Live progress.** On a local interactive run the dispatcher streams the
209
212
agent's steps (each `⏺` reasoning line and `⏎` tool call) to your terminal as
210
213
they happen, so it isn't a blinking cursor while it works. The final report is
@@ -240,7 +243,7 @@ run (Path B) is still the recorded, metrics-feeding pass; this is your preview.
240
243
|`--unpushed: couldn't determine what's been pushed`| No upstream and no remote default branch (e.g. brand-new branch, no remote). Pass an explicit base: `test-classifier origin/main`. |
241
244
|`AI_REVIEW_TOOL … not set`| Export `AI_REVIEW_TOOL=claude` (or `codex`/`copilot`); see `README.md`. |
242
245
| Classification seems to miss recent edits |`--unpushed` excludes *unstaged* changes. `git add` or commit them first. |
243
-
|Everything lands in INFERRED |That's the default. Add `AI_RUN_SUITE=1`to run the suite (OBSERVED). Suites needing services may still fall back to INFERRED, by design.|
246
+
|Expected OBSERVED but got INFERRED |OBSERVED is the default, but the agent falls back to INFERRED when it can't run the suite — no test command found, missing toolchain, suite needs services (DB), it times out, or it would apply real infra with no teardown. Check the `summary`, which states the reason. (And confirm you didn't pass `--no-run-suite` / set `AI_RUN_SUITE=0`.)|
244
247
| Posted to / recorded the wrong repo (e.g. the upstream of your fork) | The repo is resolved from your `origin` remote. On a fork whose `origin` isn't the repo the PR lives in, export `AI_REVIEW_REPO=owner/name` to set it explicitly. |
0 commit comments