lastlight-core 0.18.1 → 0.18.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lastlight-core",
3
- "version": "0.18.1",
3
+ "version": "0.18.2",
4
4
  "description": "GitHub repository maintenance agent — Agent SDK harness",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -63,9 +63,9 @@
63
63
  "octokit": "^5.0.5",
64
64
  "yaml": "^2.8.3",
65
65
  "zod": "^4.3.6",
66
+ "lastlight-workflow-engine": "0.1.0",
66
67
  "lastlight-shared": "0.1.0",
67
- "agentic-pi": "0.2.18",
68
- "lastlight-workflow-engine": "0.1.0"
68
+ "agentic-pi": "0.2.18"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@types/better-sqlite3": "^7.6.0",
@@ -30,8 +30,11 @@ phases:
30
30
  # Single phase. Runs under this workflow's repo-write profile, so agentic-pi's
31
31
  # `github_enable_auto_merge` tool is available. Conservative by design: enable
32
32
  # auto-merge ONLY for trivial, non-functional dependency bumps; anything with
33
- # runtime-logic impact is left for a human. No repo checkout — the agent reads
34
- # each diff via the `github_get_pull_request_diff` tool.
33
+ # runtime-logic impact is left for a human. No repo checkout — the agent
34
+ # inspects each PR via `github_list_pull_request_files` (file list + line
35
+ # counts) and skips lockfile diffs, only pulling `github_get_pull_request_diff`
36
+ # for a small non-lockfile source change. Reading full lockfile diffs used to
37
+ # overflow the model context in scan mode; see prompts/dependabot-pr-merge.md.
35
38
  - name: assess
36
39
  label: Assess & maybe auto-merge
37
40
  prompt: prompts/dependabot-pr-merge.md
@@ -20,15 +20,38 @@ STEP 0 — Find candidate PRs.
20
20
  List open PRs with `github_list_pull_requests` ({ owner: "{{owner}}",
21
21
  repo: "{{repo}}", state: "open" }). Keep only those authored by a dependency
22
22
  bot — `user.login` is `dependabot[bot]` or `renovate[bot]` (or a title like
23
- "Bump …", "chore(deps): …", "Update … requirement"). Skip drafts. Then run the
24
- procedure below for EACH candidate PR. If there are none, say so and stop.
23
+ "Bump …", "chore(deps): …", "Update … requirement"). Skip drafts. Assess at
24
+ most 10 candidates in one run, oldest first; if there are more, say so and stop
25
+ — the daily cron scan picks up the rest next tick. If there are none, say so and
26
+ stop.
25
27
  {{/if}}
26
28
 
27
29
  For each PR you assess (call it `pull_number`):
28
30
 
29
- STEP 1 — Inspect the change.
30
- Read the full diff with `github_get_pull_request_diff` ({ owner: "{{owner}}",
31
- repo: "{{repo}}", pull_number }). Apply the **code-review** skill's rubric.
31
+ STEP 1 — Inspect the change WITHOUT pulling giant diffs.
32
+ Dependency PRs are dominated by lockfile churn (`package-lock.json`,
33
+ `pnpm-lock.yaml`, `yarn.lock`, `Cargo.lock`, `go.sum`, …). A single lockfile diff
34
+ can run to tens of thousands of lines — reading it burns the whole context
35
+ window, and on repos with several open bumps it has overflowed the model outright
36
+ (the run then dies mid-assessment). So NEVER call `github_get_pull_request_diff`
37
+ as your first move. Inspect in tiers instead:
38
+
39
+ a. Call `github_list_pull_request_files` ({ owner: "{{owner}}", repo: "{{repo}}",
40
+ pull_number }) to get the changed files with per-file `additions`/`deletions`.
41
+ This file list — plus the PR title — is your primary signal.
42
+ b. A lockfile / `go.sum` change is expected noise for a version bump. NEVER read
43
+ its diff; judge the bump from the PR title and the manifest change alone.
44
+ c. If the only NON-lockfile files touched are the manifest (`package.json`,
45
+ `pyproject.toml`, `go.mod`, `Cargo.toml`) or a GitHub Actions workflow
46
+ tag/SHA, you already have enough to classify — do NOT fetch the diff.
47
+ d. Only when a non-lockfile *source* file changed AND the non-lockfile change is
48
+ small (a handful of lines) may you read it — prefer `github_get_file_contents`
49
+ for that one file, or `github_get_pull_request_diff` only if the whole diff
50
+ excluding lockfiles is clearly small. If the non-lockfile change is large, or
51
+ you can't cheaply bound it, treat the PR as **FUNCTIONAL** and leave it for a
52
+ human — do NOT force the diff into context.
53
+
54
+ Apply the **code-review** skill's rubric to whatever you inspected.
32
55
 
33
56
  STEP 2 — Classify the change, conservatively.
34
57
  Call it **TRIVIAL** only if ALL of these hold:
@@ -56,6 +79,12 @@ STEP 3 — Act on the classification.
56
79
  per functional PR is enough, and skip PRs you have clearly already commented
57
80
  on.
58
81
 
82
+ You MUST reach an explicit outcome for every PR you assess — enable auto-merge,
83
+ post a comment, or note it was already handled (e.g. you already commented, or
84
+ auto-merge is already enabled). Do NOT end the run having only read files with no
85
+ verdict and no action; a run that inspects diffs and then stops silently is a
86
+ failure, not a success.
87
+
59
88
  OUTPUT: For each PR, state its number, your verdict (TRIVIAL or FUNCTIONAL), a
60
89
  one-line justification, and whether you enabled auto-merge or left it for a
61
90
  human.