lastlight-core 0.28.2 → 0.30.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.
- package/config/default.yaml +77 -0
- package/dist/config/config.d.ts +8 -0
- package/dist/config/config.js +101 -0
- package/dist/config/config.js.map +1 -1
- package/dist/config/provider-registry.d.ts +57 -0
- package/dist/config/provider-registry.js +73 -0
- package/dist/config/provider-registry.js.map +1 -0
- package/dist/engine/agent-executor.js +19 -6
- package/dist/engine/agent-executor.js.map +1 -1
- package/dist/engine/chat/chat-runner.d.ts +14 -0
- package/dist/engine/chat/chat-runner.js +55 -6
- package/dist/engine/chat/chat-runner.js.map +1 -1
- package/dist/engine/executors/orchestrator.js +4 -2
- package/dist/engine/executors/orchestrator.js.map +1 -1
- package/dist/engine/github/github.d.ts +25 -0
- package/dist/engine/github/github.js +50 -0
- package/dist/engine/github/github.js.map +1 -1
- package/dist/engine/llm.d.ts +1 -1
- package/dist/engine/llm.js +18 -11
- package/dist/engine/llm.js.map +1 -1
- package/dist/engine/pr-decisions.js +99 -0
- package/dist/engine/pr-decisions.js.map +1 -1
- package/dist/engine/pr-state.d.ts +18 -0
- package/dist/engine/pr-state.js +36 -7
- package/dist/engine/pr-state.js.map +1 -1
- package/dist/engine/review-triage.d.ts +98 -0
- package/dist/engine/review-triage.js +122 -0
- package/dist/engine/review-triage.js.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/sandbox/egress-allowlist.d.ts +20 -8
- package/dist/sandbox/egress-allowlist.js +25 -13
- package/dist/sandbox/egress-allowlist.js.map +1 -1
- package/dist/sandbox/egress-firewall-config.js +3 -3
- package/dist/sandbox/egress-firewall-config.js.map +1 -1
- package/dist/sandbox/k8s/kubernetes-sandbox.js +2 -2
- package/dist/sandbox/k8s/kubernetes-sandbox.js.map +1 -1
- package/dist/sandbox/sandbox.d.ts +8 -0
- package/dist/sandbox/sandbox.js +3 -0
- package/dist/sandbox/sandbox.js.map +1 -1
- package/dist/workflows/resume.js +3 -0
- package/dist/workflows/resume.js.map +1 -1
- package/dist/workflows/runner.d.ts +0 -6
- package/dist/workflows/runner.js +52 -0
- package/dist/workflows/runner.js.map +1 -1
- package/package.json +4 -4
- package/workflows/answer.yaml +4 -30
- package/workflows/build.yaml +0 -12
- package/workflows/cron-dependabot-ci-fix.yaml +3 -23
- package/workflows/cron-dependabot-merge.yaml +3 -18
- package/workflows/cron-digest.yaml +0 -7
- package/workflows/cron-review.yaml +10 -24
- package/workflows/demo.yaml +4 -31
- package/workflows/dependabot-ci-fix.yaml +57 -161
- package/workflows/dependabot-pr-merge.yaml +24 -72
- package/workflows/explore.yaml +4 -13
- package/workflows/issue-comment.yaml +2 -9
- package/workflows/issue-triage.yaml +1 -18
- package/workflows/pr-comment.yaml +2 -9
- package/workflows/pr-fix.yaml +0 -80
- package/workflows/pr-review.yaml +164 -478
- package/workflows/prompts/review-triage.md +86 -0
- package/workflows/prompts/review.md +47 -2
- package/workflows/qa-test.yaml +8 -41
- package/workflows/repo-health.yaml +1 -9
- package/workflows/security-feedback.yaml +7 -18
- package/workflows/security-review.yaml +4 -22
- package/workflows/verify.yaml +8 -38
package/workflows/pr-fix.yaml
CHANGED
|
@@ -1,43 +1,20 @@
|
|
|
1
1
|
kind: pr-fix
|
|
2
2
|
name: pr-fix
|
|
3
|
-
# PR-scoped (09-state-machine.md §S1/§S4): this workflow runs against a pull
|
|
4
|
-
# request, so it crosses the PR-scoped dispatch gate — the run lock shared with
|
|
5
|
-
# every other PR-scoped workflow, the per-head-SHA dedup, escalation, and the
|
|
6
|
-
# resolved `PrState` snapshot on `context.prState`. A fork of this workflow that
|
|
7
|
-
# drops the key silently loses all four; `validateAssets` warns when a
|
|
8
|
-
# `routes.github.pr_*` target is missing it.
|
|
9
3
|
pr_scoped: true
|
|
10
|
-
# Runtime policy (issue #368) — pushes a fix to the PR's head branch, through
|
|
11
|
-
# `handlePrFix`. Shares the fix family's one workspace per PR
|
|
12
|
-
# (`${repo}-${N}-fix`). Full prose for each key is in the workflow schema
|
|
13
|
-
# (packages/workflow-engine/src/core/schema.ts).
|
|
14
4
|
git_access: repo-write
|
|
15
5
|
workspace: per-target-reuse
|
|
16
6
|
pr_fix_shaped: true
|
|
17
7
|
description: "Lightweight PR fix — no architect/reviewer, just fix and push"
|
|
18
8
|
trigger: pr-fix
|
|
19
|
-
# Single in-place task-list comment/message instead of a comment per phase.
|
|
20
9
|
status_checklist: true
|
|
21
10
|
|
|
22
11
|
phases:
|
|
23
|
-
# Diagnose before repairing: classify the failure against the pre-cloned
|
|
24
|
-
# workspace (cheap) BEFORE the install + test cycle (expensive), so a failure
|
|
25
|
-
# no amount of fixing can address costs one short call. See the `fixing` skill.
|
|
26
12
|
- name: diagnose
|
|
27
13
|
label: Diagnose the failure
|
|
28
14
|
prompt: prompts/diagnose-ci.md
|
|
29
15
|
skill: fixing
|
|
30
|
-
# Cheap by intent — it reads logs and reproduces a command, it doesn't write
|
|
31
|
-
# code. Unset in config/default.yaml, so this falls through to models.default
|
|
32
|
-
# until an operator pins a cheaper model for it.
|
|
33
16
|
model: "{{models.diagnose}}"
|
|
34
17
|
output_var: diagnosis
|
|
35
|
-
# The tag WITH its colon, which is what the parser looks for
|
|
36
|
-
# (`lastMarkerLine`). The engine enforces the postcondition as a plain
|
|
37
|
-
# substring, so the bare tag let an output that merely MENTIONS
|
|
38
|
-
# `DIAGNOSIS_COMPLETE` pass a gate it then parsed to nothing — a green phase,
|
|
39
|
-
# a null diagnosis, and an attempt counter that never advanced. Pinned to
|
|
40
|
-
# `DIAGNOSIS_MARKER_POSTCONDITION` in src/engine/fix-markers.ts by test.
|
|
41
18
|
on_output:
|
|
42
19
|
requires_marker: "DIAGNOSIS_COMPLETE:"
|
|
43
20
|
messages:
|
|
@@ -47,72 +24,15 @@ phases:
|
|
|
47
24
|
- name: fix
|
|
48
25
|
label: Fix
|
|
49
26
|
prompt: prompts/pr-fix.md
|
|
50
|
-
# `fixing` is primary (minimal repair + push discipline + the markers);
|
|
51
|
-
# `building` stays available for the install / gate mechanics.
|
|
52
27
|
skills: [fixing, building]
|
|
53
28
|
model: "{{models.pr-fix}}"
|
|
54
|
-
# The three stopping classes: there is nothing here for a fix phase to do,
|
|
55
|
-
# so it must not provision a sandbox and run a 900-second gate for one. A
|
|
56
|
-
# non-failing skip — the RUN still records `succeeded`, because correctly
|
|
57
|
-
# determining the PR can't be fixed here IS the job. One expression per
|
|
58
|
-
# class, so the list reads as the class list it is.
|
|
59
|
-
#
|
|
60
|
-
# Read off the PARSED class the marker harvest persisted
|
|
61
|
-
# (`scratch.fixMarkers.diagnosis.class`), not off the diagnose phase's whole
|
|
62
|
-
# output. Substring-matching the output was wrong three ways: prose like
|
|
63
|
-
# "this is not class=flaky, it's reproducible" skipped the fix; a replayed
|
|
64
|
-
# `{{priorAttempts}}` line from an earlier attempt matched too; and
|
|
65
|
-
# `phaseOutputs` is EMPTY across a resume boundary, so the guard failed open
|
|
66
|
-
# and ran the full sandbox + gate on a verdict that said not to. `scratch`
|
|
67
|
-
# is reloaded from the run row, so it survives resume.
|
|
68
|
-
#
|
|
69
|
-
# `class=flaky` is the one BOUNDED row: after `fix.maxFlakyDeferrals` (2)
|
|
70
|
-
# consecutive `flaky` verdicts on the same problem the harness drops this
|
|
71
|
-
# expression for that run, so the third one is attempted as `reproducible`
|
|
72
|
-
# (09-state-machine.md §S1 — three flaky reports running is an intermittent
|
|
73
|
-
# real failure, and an unbounded series of free full runs otherwise).
|
|
74
|
-
# `promoteFlakyDiagnosis` in src/workflows/simple.ts matches the expression
|
|
75
|
-
# below LITERALLY; the other two rows always apply.
|
|
76
29
|
skip_if:
|
|
77
30
|
- "scratch.fixMarkers.diagnosis.class == 'flaky'"
|
|
78
31
|
- "scratch.fixMarkers.diagnosis.class == 'infra-dependent'"
|
|
79
32
|
- "scratch.fixMarkers.diagnosis.class == 'upstream-broken'"
|
|
80
|
-
# Load-bearing, not cosmetic: `runUntilBash` defaults to
|
|
81
|
-
# `timeout_seconds ?? 30`, and thirty seconds kills any real test suite
|
|
82
|
-
# mid-run and reports a false red. READ from `fix.gateTimeoutSeconds` — the
|
|
83
|
-
# run's effective, repo-clamped config block — with the packaged value as
|
|
84
|
-
# the fallback for a context that carries no `fix:` at all (#256). The two
|
|
85
|
-
# no longer have to be kept in step by hand.
|
|
86
33
|
timeout_seconds: { from: fix.gateTimeoutSeconds, default: 900 }
|
|
87
|
-
# The tag WITH its colon — see the `diagnose` phase above.
|
|
88
34
|
on_output:
|
|
89
35
|
requires_marker: "CI_FIX_COMPLETE:"
|
|
90
|
-
# The within-run local gate loop (04-retry.md §4.5). The gate command isn't
|
|
91
|
-
# statically knowable — package manager from the lockfile, commands from the
|
|
92
|
-
# repo's CI workflow — so the `fixing` skill has the agent write it to
|
|
93
|
-
# `.git/lastlight-verify.sh` inside the checkout (under `.git/`, so no
|
|
94
|
-
# `git add -A` can ever commit it, and deleted at the start of every attempt
|
|
95
|
-
# so a superseded diagnosis can't gate this one). No script yet ⇒ an EXPLICIT non-zero exit: `gate=skipped`
|
|
96
|
-
# is treated as red and never authorises a push (09-state-machine.md §S1).
|
|
97
|
-
# `max_iterations` reads `fix.localIterations`, same as `timeout_seconds`
|
|
98
|
-
# above; `2` is the packaged fallback, not the operative value.
|
|
99
|
-
#
|
|
100
|
-
# Run the gate with `bash`, NOT `sh` — see the same loop in
|
|
101
|
-
# `dependabot-ci-fix.yaml` for the full story. Short version: `/bin/sh` is
|
|
102
|
-
# dash, the agent writes `set -euo pipefail`, dash rejects `-o pipefail` and
|
|
103
|
-
# exits 2 on line 2, and the gate was a constant red in milliseconds.
|
|
104
|
-
#
|
|
105
|
-
# `until:` short-circuits `until_bash` — again see `dependabot-ci-fix.yaml`
|
|
106
|
-
# for the full argument, since the two loops are one family and must not
|
|
107
|
-
# diverge. Short version: `outcome=pushed` means the commit is on the branch
|
|
108
|
-
# and GitHub's checks are now the better authority, so re-running a slower
|
|
109
|
-
# copy of them in a fresh container buys nothing and costs minutes. It fires
|
|
110
|
-
# on `pushed` only — `no-change` / `gave-up` pushed nothing, so no external
|
|
111
|
-
# check exists, the local gate is the only evidence there is, and its red
|
|
112
|
-
# verdict is what earns the agent the next iteration (short-circuiting those
|
|
113
|
-
# too would make `fix.localIterations` dead config). `tried=` is in the
|
|
114
|
-
# needle so a replayed `{{priorAttempts}}` line — which `renderAttemptLine`
|
|
115
|
-
# writes WITHOUT `tried=` — cannot match.
|
|
116
36
|
generic_loop:
|
|
117
37
|
max_iterations: { from: fix.localIterations, default: 2 }
|
|
118
38
|
until: "output.contains('outcome=pushed tried=')"
|