Repository navigation
feat(explore): explore what a pull request changed with --changed-since - #1711
Conversation
🟢 e2e web: 93 passedAll 93 tests in 42 files
Tested by e2e 0.23.0 · 1m 17s · web · run artifacts |
🟢 e2e web agent: 34 passed35 agent steps · 26 replayed from cache · 26 model calls · 125.6k tokens (93% cached) · $0.0055 All 34 tests in 5 files
Tested by e2e 0.23.0 · 1m 57s · web · run artifacts |
There was a problem hiding this comment.
2 issues found across 35 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/e2e/src/explore/change.ts">
<violation number="1" location="packages/e2e/src/explore/change.ts:133">
P2: `complete` ignores the commit log, but the doc on `readExploreChange` says a commit log left out makes the brief incomplete. When `git log` fails or times out, or the commit list is cut, the brief still reports complete, so the planner can skip with the intent missing. Have `commitMessages` report whether it was whole and include that in `complete`.</violation>
</file>
<file name="packages/e2e/src/explore/plan.ts">
<violation number="1" location="packages/e2e/src/explore/plan.ts:185">
P2: This rule tells the planner to cover docs and tests with steps and then finish, but `SKIP_RULES` says docs and tests are a `skip`. On a skippable docs- or test-only change, the prompt gives both instructions, so the planner may run steps instead of skipping. Scope this line to changes where skip is not offered, so the skip rule governs when it applies.</violation>
</file>
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Turn on auto-fix | Re-trigger cubic
🟢 e2e android agent: 20 passed24 agent steps · 15 replayed from cache · 34 model calls · 182.2k tokens (76% cached) · $0.0151 All 20 tests in 1 file
Tested by e2e 0.23.0 · 6m 33s · android-emulator · run artifacts |
🟢 e2e ios: 55 passed, 1 skippedAll 56 tests in 7 files
Tested by e2e 0.23.0 · 6m 44s · ios-simulator · run artifacts |
🟢 e2e android: 57 passed, 1 skippedAll 58 tests in 7 files
Tested by e2e 0.23.0 · 11m 47s · android-emulator · run artifacts |
…wn the docs on when it applies
b3ca352 to
820d36f
Compare
🟢 e2e ios agent: 21 passed, 1 skipped25 agent steps · 11 replayed from cache · 62 model calls · 396.1k tokens (82% cached) · $0.0263 All 22 tests in 1 file
Tested by e2e 0.23.0 · 9m 33s · ios-simulator · run artifacts |
There was a problem hiding this comment.
0 issues found across 10 files (changes from recent commits).
Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.
View guided diff | Turn on auto-fix | Re-trigger cubic
Each fact now has one home: docs/explore.mdx owns usage, the security reference owns what reaches the model. The CLI row, the skill row, the changesets and the --help line link there. Cut on purpose, as internals the planner follow-up will change: - path order, size budgets, the count of files that did not fit - the 16 KB brief ceiling and "redacted before anything is cut to fit" - the skip gates as patch-cut and line-shortened; the guide now says a large diff, a binary file, or an uncommitted file rules a skip out - "a change with no files can be skipped the same way" - the pnpm/action-setup detail behind the pnpm exec lockfile rewrite
e2e exploreonly knows the goal you type. On a pull request, that means the agent spends its steps on the whole app instead of the screens the branch touched, and a PR that changes only docs or tests still pays for a full exploration.e2e explore --changed-since <ref>hands the planner a brief of the branch's change, so it plans for the screens the change can affect, and lets it skip a change no user can see.The change brief
packages/e2e/src/explore/change.tsreads the change since the merge base: commit messages, the changed files in path order, and committed patches, each cut to a byte budget. The whole brief stays under the 16 KiB agent context limit.<change>data, never as instructions. Every commit message and patch line is quoted evidence.Explore what this change affects and find bugs in it. A goal you pass still works and the brief is added to it.issue. One elsewhere in the app was there before, so it's awarningand doesn't fail the run.run.explore.change(base,files) is in the report. The markdown and GitHub comment name the change under the goal.explore()one2e/runnertakeschangedSince.Skipping a change no user can see
The planner may answer "nothing to explore" on its first plan. The runner offers that only when all of these hold:
flowchart LR A[read change] --> B{default goal, whole change, clean tree?} B -- no --> D[plan steps] B -- yes --> C{planner: can a user see it?} C -- yes --> D C -- no --> E["ended: skipped, exit 0"]The run passes with no step,
run.explore.endedisskipped, and the assessment says why. The comment reads🟢 e2e explore: nothing to explore.The docs cover the CI recipe (
fetch-depth: 0,pull_requestonly, neverpull_request_target). One gotcha surfaced while testing this: on a runner where pnpm comes from npm (pnpm/action-setup),pnpm execrewritespnpm-lock.yaml. That dirty tree blocks every skip, so the docs say to run it withnpx.Verified
Ran it locally: yes
The test bed is a private Vite shop app with one branch per scenario. A harness runs
e2e explore --changed-since main --max-steps 4per branch and checks the exit code, how the run ended, and the findings.Full eval, 3 runs per scenario, on the reviewed build before the rebase. 15/15 scenarios passed, $0.66 total:
issueissueissueAfter the rebase and the review fixes, I packed the final build into the sandbox and ran tests-only, docs-only plus dirty tree, bulk-discount, and the injection scenario once each. All 4 passed, for $0.05. After Cubic's review changed the skip prompt, I ran the skip and no-skip scenarios twice each: docs-only, tests-only, and no-change skipped 2/2, an explicit goal and a dirty tree explored 2/2, and the bulk-discount bug was caught 2/2 ($0.08).
Real GitHub Actions on the sandbox, with the
@e2e-dev/githubreporter:🟢 e2e explore: nothing to explore, 1 model call, $0.0007. The assessment: "The only changed file is src/money.test.ts, which adds unit tests for formatMoney. Tests change what is checked, not what a user sees or does, so this change does not reach any screen."🔴 e2e explore: 1 issue, and the one issue is the planted bug: "Ceramic Mug offer is not applied at exactly three items ·/cart· step 1", $0.02.Known limits:
issuewhen they sit in a flow the change runs: the removed-field run above, and an unrelated search bug in one sort-bug run.run.explore.ended. The injection scenario never skipped.Review
bound()frominternal/text.ts, with a test.e2e explore --helpnow covers a skip.completeon purpose, because the skip never reads commit messages. That comment was wrong and is now fixed.Closes ENG-1078
Written by Claude Opus 5.5 in Claude Code, running in T3 Code.