lastlight 0.21.14 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,13 +60,45 @@ Datasets are discovered from (overlay > user > built-in): `<overlay>/evals/datas
60
60
  "issue_closed": false,
61
61
  "comment_matches": "(?i)thanks",
62
62
  "pr_opened": { "base": "main", "head_is_branch": true, "title_matches": "(?i)fix" },
63
+ "pr_merged": false, // dependency-merge: merged outright?
64
+ "auto_merge_enabled": true, // …or the CI-gated route (a different decision)
63
65
  "review_submitted": {} // pr-review: proxy check that a review was posted
66
+ },
67
+
68
+ // ── PR-scoped workflows (fix / dependency-merge) ──
69
+ "pr_state": { // the snapshot a dispatch would have resolved
70
+ "head_sha": "a41f0c8",
71
+ "checks_state": "failing", // passing | failing | pending | none
72
+ "settled_check_count": 1,
73
+ "base_checks_state": "passing", // the fact that separates "this PR broke it"
74
+ "attempt": 3, // drives "{{attempt}} of {{maxAttempts}}"
75
+ "flaky_deferrals": 2, // 2 ⇒ {{flakyPromoted}} is true
76
+ "prior_attempts": ["DIAGNOSIS_COMPLETE: … class=flaky …"],
77
+ "notes": [{ "kind": "ruled-out", "text": "not the lockfile" }],
78
+ "ci_jobs": [ // feeds BOTH {{ciSection}} and the Actions tools
79
+ { "name": "CI / test", "log_excerpt": "…", "failing_step": "npm test" }
80
+ ],
81
+ "fix": { "maxAttempts": 2 }, // overrides on the policy blocks; rest = shipped defaults
82
+ "dependencies": { "autoMergeMaxImpact": "low" }
83
+ },
84
+ "expect_markers": { // the marker line the run signed off with
85
+ "diagnosis_class": "reproducible", // or diagnosis_class_any_of: [...]
86
+ "fix_outcome": "pushed", "fix_gate": "green",
87
+ "assessment_impact": "high", "assessment_action_any_of": ["comment"]
64
88
  }
65
89
  }
66
90
  ```
67
91
 
68
92
  Every `expect_github` field is optional — only the present ones are checked.
69
93
 
94
+ **`pr_state` is not optional in practice for a PR-scoped workflow.** In production
95
+ those workflows are *dispatched*, and everything their prompts reason with —
96
+ `{{ciSection}}`, `{{attempt}}`, `{{mayMerge}}`, `{{priorNotes}}` — is
97
+ `renderContext`'s projection of that snapshot. The harness hands your seed to
98
+ core's own projection; a case without one runs the workflow with every `{{#if}}`
99
+ guard on the empty branch, which is not a smaller version of production but a
100
+ different one.
101
+
70
102
  ## Add a triage case
71
103
 
72
104
  Append a `SweBenchInstance` to `datasets/triage/instances.json` with `issue`,
@@ -114,6 +146,21 @@ Don't hand-build these — use `lastlight-evals add-case --pr <url> --review` (s
114
146
  `review_gold` from the PR's human review for you to curate. Or bulk-import the
115
147
  Martian Code Review Bench with `npx tsx scripts/import-martian.ts`.
116
148
 
149
+ ## Add a fix / dependency-merge case
150
+
151
+ Give the case a `pr` seed, a `pr_state` block and an `expect_markers` verdict. For a
152
+ `fix` case that also needs a checkout, `repos/<id>/` is the tree at the **base**
153
+ commit and `repos-head/<id>/` is the PR's own commit applied on the branch — both
154
+ are needed, or base and head are identical and a diagnosing agent correctly
155
+ answers that `main` is broken too, turning every red-dependency case into
156
+ `upstream-broken`.
157
+
158
+ Calibrate the expectation against the **shipped skill**, not intuition:
159
+ `skills/fixing/SKILL.md` defines the five diagnosis classes (a network blip is
160
+ `flaky`, not `infra-dependent`), and `skills/dependency-impact/SKILL.md` gives
161
+ `low` to any dev-only dependency. When a case and the skill disagree, the skill
162
+ wins — otherwise the eval measures the fixture author.
163
+
117
164
  ## Add a custom tier
118
165
 
119
166
  Create `datasets/<tier-name>/` with `tier.json` (`name`, `defaultWorkflow`,
@@ -125,6 +172,11 @@ and `tests/<id>/`. Discovery auto-finds it — no code change. Run it with
125
172
 
126
173
  - **Behavioral:** did the workflow take the expected GitHub actions
127
174
  (`expect_github`)?
175
+ - **Markers (fix / dependency-merge):** did the run sign off with the verdict the
176
+ case expects (`expect_markers`)? For those tiers this is the primary signal —
177
+ a diagnosis that reaches the wrong class misroutes the whole retry loop while
178
+ touching no GitHub state, so behavioral grading alone would score it green.
179
+ Parsed with core's own marker parsers, so a bare mention of a tag never counts.
128
180
  - **Triage:** did the decision match `triage_gold`?
129
181
  - **Review (pr-review):** an LLM judge matches the posted review's findings against
130
182
  `review_gold` → **precision / recall / F-beta** (β via `EVAL_F_BETA` or
@@ -39,8 +39,11 @@ Ask for each of these (don't guess). Group the questions; explain what each is f
39
39
  Settings → Developer settings → GitHub Apps; it needs webhook + repo
40
40
  contents/issues/pull-requests/checks permissions, plus **workflows** (read &
41
41
  write) so it can merge/push PRs that touch `.github/workflows/` — e.g.
42
- dependency PRs bumping GitHub Actions versions. They install it on their repos
43
- to get the Installation ID.)
42
+ dependency PRs bumping GitHub Actions versions. Recommend **actions** (read)
43
+ too — a different permission from workflows: it lets the fix workflow read
44
+ the actual Actions job logs instead of only check annotations. It is optional,
45
+ so an app without it still works; the CI evidence is just weaker, and the
46
+ prompt says so. They install it on their repos to get the Installation ID.)
44
47
  - **Domain** — the public hostname for webhooks/dashboard, e.g.
45
48
  `lastlight.example.com`. Ask whether to use the bundled **Caddy** for
46
49
  automatic TLS (default yes). The GitHub App webhook URL will be