next-issue 6.6.46 → 6.6.48
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/README.md +3 -2
- package/dist/labels.mjs +7 -4
- package/dist/lock.mjs +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -594,7 +594,7 @@ With `--hunt`, which turns on `--watch`, the harness runs a hunter agent at the
|
|
|
594
594
|
|
|
595
595
|
- works in its own worktree at `.worktrees/hunt`, on a detached `HEAD` at the remote base branch, which the harness fetches and checks out before each hunt. A branch that the hunter checks out keeps its commits, and an issue that resumes never uses the hunt worktree as its own;
|
|
596
596
|
- follows `next-issue.hunt.md` in the repository root, or a short built-in prompt when the file is missing;
|
|
597
|
-
- files up to `huntCap` less that count, worked out just before the hunt, its most serious findings first, each with the `labels.ready` label, the `labels.hunt` label and the sections of the [issue format](#issue-format), after a search for duplicates. It files and searches with `gh --repo <owner>/<name>` of the configured `remote`, so another GitHub remote, such as `upstream` in a fork, never gets its issues. The `labels.hunt` label, `source:hunt` by default, marks the issue as one the hunter filed. The harness creates the `labels.ready` and `labels.hunt` labels before the hunt when they are missing. It files nothing when it finds no real problem or a duplicate exists;
|
|
597
|
+
- files up to `huntCap` less that count, worked out just before the hunt, its most serious findings first, each with the `labels.ready` label, the `labels.hunt` label and the sections of the [issue format](#issue-format), after a search for duplicates. It files and searches with `gh --repo <owner>/<name>` of the configured `remote`, so another GitHub remote, such as `upstream` in a fork, never gets its issues. The `labels.hunt` label, `source:hunt` by default, marks the issue as one the hunter filed. The harness creates the `labels.ready` and `labels.hunt` labels before the hunt when they are missing. It compares label names without case, as GitHub does, so a label that exists in another case, such as `Source:Hunt`, counts as there and keeps its name. When the create fails, it reads the labels again, so a label that someone else created meanwhile counts as there too. It files nothing when it finds no real problem or a duplicate exists;
|
|
598
598
|
- runs no test suite and changes no file. It gets the tools of the reviewer.
|
|
599
599
|
|
|
600
600
|
With `huntCap` at 1 and no ready issue, a hunt files at most one issue. The hunter ends its reply with one `issue:` line for each issue it filed, or one `issue: none` line; a url that is not an issue of the repository of `remote` does not count as filed, and the run log holds one `hunt.issue` event with the `url` for each, or one with `none`. A hunt that fails writes a `hunt.error` event and the watch goes on. The hunter then waits before the next hunt, with a `hunt.wait` event and the same back-off, so a failure, or a hunt that files nothing, that repeats waits 1, 2, 3, 5, 10, then 10 minutes, and the back-off goes back to 1 minute after a hunt that files at least one issue. The next pass claims the new issues like any other. At the first `Ctrl-C` the hunter stops after its current hunt, and the watch ends once the hunt and the running issues end. A first `Ctrl-C` during the watch wait tells you so while a hunt runs, and the third press stops the hunter at once. The hunter stops too when the watch ends for another reason.
|
|
@@ -619,7 +619,8 @@ affect another. The worker:
|
|
|
619
619
|
lock is stale, and is taken over, when no process has that id or the process
|
|
620
620
|
with that id started at another time, for example because the system gave
|
|
621
621
|
the id of a worker that was killed or lost in a reboot to another process.
|
|
622
|
-
A lock without a start time, from an older version, is
|
|
622
|
+
A lock without a start time, from an older version, is held while a process
|
|
623
|
+
with that id is alive, and stale otherwise. A worker
|
|
623
624
|
that cannot read its own start time exits with an error and takes no lock.
|
|
624
625
|
When several workers start at once, one takes the lock and the others exit
|
|
625
626
|
with `another worker is running`. A worker that stops removes the lock file
|
package/dist/labels.mjs
CHANGED
|
@@ -23,7 +23,10 @@ export async function setLabel(repo, kind, number, add, remove) {
|
|
|
23
23
|
export async function ensureLabel(repo, label) {
|
|
24
24
|
const created = await createUnknownLabel(repo, label);
|
|
25
25
|
if (created instanceof Error) {
|
|
26
|
-
|
|
26
|
+
KNOWN_LABELS.delete(slug(repo));
|
|
27
|
+
if (!(await knownLabels(repo)).has(label.toLowerCase())) {
|
|
28
|
+
throw created;
|
|
29
|
+
}
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
async function retryWithLabel(repo, args, label, error) {
|
|
@@ -51,13 +54,13 @@ async function knownLabels(repo) {
|
|
|
51
54
|
'--json',
|
|
52
55
|
'name',
|
|
53
56
|
]);
|
|
54
|
-
const known = new Set(names(listed));
|
|
57
|
+
const known = new Set(names(listed).map((name) => name.toLowerCase()));
|
|
55
58
|
KNOWN_LABELS.set(repoSlug, known);
|
|
56
59
|
return known;
|
|
57
60
|
}
|
|
58
61
|
async function createUnknownLabel(repo, label) {
|
|
59
62
|
const known = await knownLabels(repo);
|
|
60
|
-
if (known.has(label)) {
|
|
63
|
+
if (known.has(label.toLowerCase())) {
|
|
61
64
|
return 'known';
|
|
62
65
|
}
|
|
63
66
|
try {
|
|
@@ -66,6 +69,6 @@ async function createUnknownLabel(repo, label) {
|
|
|
66
69
|
catch (error) {
|
|
67
70
|
return asError(error);
|
|
68
71
|
}
|
|
69
|
-
known.add(label);
|
|
72
|
+
known.add(label.toLowerCase());
|
|
70
73
|
return 'created';
|
|
71
74
|
}
|
package/dist/lock.mjs
CHANGED
|
@@ -34,9 +34,12 @@ async function holderOf(text) {
|
|
|
34
34
|
const [first = '', ...rest] = text.trim().split(' ');
|
|
35
35
|
const pid = Number(first);
|
|
36
36
|
const started = rest.join(' ');
|
|
37
|
-
if (!(pid > 0)
|
|
37
|
+
if (!(pid > 0)) {
|
|
38
38
|
return undefined;
|
|
39
39
|
}
|
|
40
|
+
if (started === '') {
|
|
41
|
+
return isAlive(pid) ? pid : undefined;
|
|
42
|
+
}
|
|
40
43
|
return (await processStart(pid)) === started ? pid : undefined;
|
|
41
44
|
}
|
|
42
45
|
export async function lockHolder(lockPath) {
|