lastlight-core 0.23.3 → 0.23.4
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.
|
@@ -118,11 +118,30 @@ export declare function readHarvestedMarkers(run: Pick<WorkflowRun, "scratch"> |
|
|
|
118
118
|
*
|
|
119
119
|
* Resolved from the run row exactly as `createTaskSandbox` / `reapSandboxWorkspace`
|
|
120
120
|
* resolve it — `<sandboxes root>/<taskId>/<repo>` — so the three never disagree.
|
|
121
|
-
* `taskId` and `repo` are both persisted on `workflow_runs.context` at creation.
|
|
122
121
|
* A taskId that escapes the sandboxes root is refused rather than followed, the
|
|
123
122
|
* same guard the reaper applies.
|
|
123
|
+
*
|
|
124
|
+
* ## Where the two halves come from
|
|
125
|
+
*
|
|
126
|
+
* `taskId` is on `context` (written at creation). **`repo` is on the run ROW,
|
|
127
|
+
* not on `context`** — and that asymmetry is load-bearing enough to have broken
|
|
128
|
+
* this function for its whole life. `dispatchWorkflow` reads `context.repo` as
|
|
129
|
+
* a QUALIFIED `owner/repo`, splits it into the row's `owner` + bare `repo`
|
|
130
|
+
* columns, and the persisted context keeps only `owner`. So reading the repo
|
|
131
|
+
* off `context` resolved to `""` on every real run, this returned `null`, and
|
|
132
|
+
* BOTH callers — the push-gate read and the journal drain — were silently
|
|
133
|
+
* skipped: `scratch.fixMarkers.verifyScript` was `null` and `notes` was `[]` on
|
|
134
|
+
* every fix run ever recorded, while the files sat on disk in the workspace.
|
|
135
|
+
* The unit tests missed it by hand-building `context: { taskId, repo }`, a
|
|
136
|
+
* shape production never produces.
|
|
137
|
+
*
|
|
138
|
+
* The row's column is also the RIGHT source independent of that bug: it is
|
|
139
|
+
* documented as the bare, path-safe name, which is exactly what
|
|
140
|
+
* `prePopulateWorkspace` uses for the checkout dir. The `context` fallback is
|
|
141
|
+
* kept for callers that synthesize a run without a row (tests, the evals
|
|
142
|
+
* harness) and is de-qualified so either shape resolves.
|
|
124
143
|
*/
|
|
125
|
-
export declare function prNotesRepoDir(run: Pick<WorkflowRun, "context"> | null | undefined, overrides?: {
|
|
144
|
+
export declare function prNotesRepoDir(run: Pick<WorkflowRun, "context" | "repo"> | null | undefined, overrides?: {
|
|
126
145
|
stateDir?: string;
|
|
127
146
|
sandboxDir?: string;
|
|
128
147
|
}): string | null;
|
|
@@ -139,14 +139,37 @@ function isWithin(parent, child) {
|
|
|
139
139
|
*
|
|
140
140
|
* Resolved from the run row exactly as `createTaskSandbox` / `reapSandboxWorkspace`
|
|
141
141
|
* resolve it — `<sandboxes root>/<taskId>/<repo>` — so the three never disagree.
|
|
142
|
-
* `taskId` and `repo` are both persisted on `workflow_runs.context` at creation.
|
|
143
142
|
* A taskId that escapes the sandboxes root is refused rather than followed, the
|
|
144
143
|
* same guard the reaper applies.
|
|
144
|
+
*
|
|
145
|
+
* ## Where the two halves come from
|
|
146
|
+
*
|
|
147
|
+
* `taskId` is on `context` (written at creation). **`repo` is on the run ROW,
|
|
148
|
+
* not on `context`** — and that asymmetry is load-bearing enough to have broken
|
|
149
|
+
* this function for its whole life. `dispatchWorkflow` reads `context.repo` as
|
|
150
|
+
* a QUALIFIED `owner/repo`, splits it into the row's `owner` + bare `repo`
|
|
151
|
+
* columns, and the persisted context keeps only `owner`. So reading the repo
|
|
152
|
+
* off `context` resolved to `""` on every real run, this returned `null`, and
|
|
153
|
+
* BOTH callers — the push-gate read and the journal drain — were silently
|
|
154
|
+
* skipped: `scratch.fixMarkers.verifyScript` was `null` and `notes` was `[]` on
|
|
155
|
+
* every fix run ever recorded, while the files sat on disk in the workspace.
|
|
156
|
+
* The unit tests missed it by hand-building `context: { taskId, repo }`, a
|
|
157
|
+
* shape production never produces.
|
|
158
|
+
*
|
|
159
|
+
* The row's column is also the RIGHT source independent of that bug: it is
|
|
160
|
+
* documented as the bare, path-safe name, which is exactly what
|
|
161
|
+
* `prePopulateWorkspace` uses for the checkout dir. The `context` fallback is
|
|
162
|
+
* kept for callers that synthesize a run without a row (tests, the evals
|
|
163
|
+
* harness) and is de-qualified so either shape resolves.
|
|
145
164
|
*/
|
|
146
165
|
export function prNotesRepoDir(run, overrides = {}) {
|
|
147
166
|
const ctx = run?.context;
|
|
148
167
|
const taskId = typeof ctx?.taskId === "string" ? ctx.taskId : "";
|
|
149
|
-
const
|
|
168
|
+
const rowRepo = typeof run?.repo === "string" ? run.repo : "";
|
|
169
|
+
const ctxRepo = typeof ctx?.repo === "string" ? ctx.repo : "";
|
|
170
|
+
// `.split("/").pop()` de-qualifies an `owner/repo` fallback and is a no-op on
|
|
171
|
+
// an already-bare name; the path-escape guard below still has the last word.
|
|
172
|
+
const repo = (rowRepo || ctxRepo).split("/").pop() ?? "";
|
|
150
173
|
if (!taskId || !repo)
|
|
151
174
|
return null;
|
|
152
175
|
const rt = getRuntimeConfig();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fix-harvest.js","sourceRoot":"","sources":["../../src/engine/fix-harvest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACnF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAG1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EACL,mBAAmB,GAIpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EACL,UAAU,EACV,WAAW,EACX,aAAa,GAGd,MAAM,eAAe,CAAC;AAEvB;;;;;;GAMG;AACH,MAAM,CAAC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ANGED
package/skills/fixing/SKILL.md
CHANGED
|
@@ -179,10 +179,16 @@ your cwd, which is the checkout. The right command is whatever CI runs, with the
|
|
|
179
179
|
package manager detected from the lockfile, so it is knowable only at runtime,
|
|
180
180
|
by you. Exit 0 means green.
|
|
181
181
|
|
|
182
|
-
|
|
182
|
+
Four rules about that file:
|
|
183
183
|
|
|
184
184
|
- **Write it first, before you start repairing.** The harness runs it after each
|
|
185
185
|
fix iteration; with no script there is no gate, and no gate means no push.
|
|
186
|
+
- **Make it a bash script.** The harness runs it with `bash`, so `set -euo
|
|
187
|
+
pipefail` and the rest of bash is available to you — but a script written for
|
|
188
|
+
another interpreter will not be run the way you intended, however correct its
|
|
189
|
+
shebang. Whatever you write here, run it yourself the same way before you
|
|
190
|
+
trust it: a gate the harness scores differently than you did is worse than no
|
|
191
|
+
gate, because you will report green on a red one.
|
|
186
192
|
- **It is yours alone.** The harness deletes it at the start of every attempt, so
|
|
187
193
|
a stale script from a superseded diagnosis can never gate this one. Write it
|
|
188
194
|
fresh; never assume one is already there. (The same is true of
|
|
@@ -148,9 +148,23 @@ phases:
|
|
|
148
148
|
# is treated as red and never authorises a push (09-state-machine.md §S1).
|
|
149
149
|
# `max_iterations` reads `fix.localIterations`, same as `timeout_seconds`
|
|
150
150
|
# above; `2` is the packaged fallback, not the operative value.
|
|
151
|
+
#
|
|
152
|
+
# Run the gate with `bash`, NOT `sh`. `/bin/sh` in the sandbox image is
|
|
153
|
+
# dash, and the script the agent writes is the one the `fixing` skill asks
|
|
154
|
+
# for — a shell script that opens `set -euo pipefail`. dash rejects
|
|
155
|
+
# `-o pipefail` on line 2 and exits 2 before the first real command, so
|
|
156
|
+
# `sh <script>` made the gate a CONSTANT RED in milliseconds: every loop
|
|
157
|
+
# burned all its iterations, no iteration could ever satisfy the condition,
|
|
158
|
+
# and the harness's half of "no green gate ⇒ no push" never fired — leaving
|
|
159
|
+
# the agent's own self-reported `gate=green` (it runs the script directly,
|
|
160
|
+
# so its shebang IS honoured) as the only thing gating a push. `sh` also
|
|
161
|
+
# discards the script's `#!` line, which is precisely what let the harness
|
|
162
|
+
# and the agent disagree about the same file; `bash` is a superset of the
|
|
163
|
+
# shell any gate script here targets, so it agrees with a `#!/bin/sh`,
|
|
164
|
+
# `#!/usr/bin/env bash`, or shebang-less script alike.
|
|
151
165
|
generic_loop:
|
|
152
166
|
max_iterations: { from: fix.localIterations, default: 2 }
|
|
153
|
-
until_bash: "if [ -f .git/lastlight-verify.sh ]; then
|
|
167
|
+
until_bash: "if [ -f .git/lastlight-verify.sh ]; then bash .git/lastlight-verify.sh; else echo 'no .git/lastlight-verify.sh — gate=skipped, treated as RED'; exit 1; fi"
|
|
154
168
|
fresh_context: false
|
|
155
169
|
messages:
|
|
156
170
|
on_start: "On it — investigating the failing checks on PR #{{prNumber}}..."
|
package/workflows/pr-fix.yaml
CHANGED
|
@@ -89,9 +89,14 @@ phases:
|
|
|
89
89
|
# is treated as red and never authorises a push (09-state-machine.md §S1).
|
|
90
90
|
# `max_iterations` reads `fix.localIterations`, same as `timeout_seconds`
|
|
91
91
|
# above; `2` is the packaged fallback, not the operative value.
|
|
92
|
+
#
|
|
93
|
+
# Run the gate with `bash`, NOT `sh` — see the same loop in
|
|
94
|
+
# `dependabot-ci-fix.yaml` for the full story. Short version: `/bin/sh` is
|
|
95
|
+
# dash, the agent writes `set -euo pipefail`, dash rejects `-o pipefail` and
|
|
96
|
+
# exits 2 on line 2, and the gate was a constant red in milliseconds.
|
|
92
97
|
generic_loop:
|
|
93
98
|
max_iterations: { from: fix.localIterations, default: 2 }
|
|
94
|
-
until_bash: "if [ -f .git/lastlight-verify.sh ]; then
|
|
99
|
+
until_bash: "if [ -f .git/lastlight-verify.sh ]; then bash .git/lastlight-verify.sh; else echo 'no .git/lastlight-verify.sh — gate=skipped, treated as RED'; exit 1; fi"
|
|
95
100
|
fresh_context: false
|
|
96
101
|
messages:
|
|
97
102
|
on_start: "On it — fixing PR #{{prNumber}}..."
|