next-issue 7.8.0 → 7.8.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/README.md +14 -7
- package/dist/watch.mjs +0 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -838,7 +838,7 @@ The watch stops:
|
|
|
838
838
|
|
|
839
839
|
## Hunt for bugs
|
|
840
840
|
|
|
841
|
-
With `next-issue start --hunt`, which turns on `--watch`, the harness runs a hunter agent at the same time as the issues. Before each hunt it reads the open issues with the `labels.ready` label and counts those that are ready to claim and are not running. An issue that failed earlier in the run does not count, since the watch does not try it again. It counts a blocked issue only when each of its open blockers is in the same repository and is running or ready to claim, since those blockers can land and close; a blocker that cannot move, such as one with `labels.needsHuman`, `labels.skip` or `labels.done`, one without `labels.ready`, or one in another repository, leaves it out. It looks only at the direct blockers, and reads them one issue at a time, so it runs one `gh` call at a time. It hunts only while that count is less than `huntCap`, 1 by default. Otherwise it waits and checks again, with the same back-off as the watch: 1, 2, 3, 5, 10, then 10 minutes,
|
|
841
|
+
With `next-issue start --hunt`, which turns on `--watch`, the harness runs a hunter agent at the same time as the issues. Before each hunt it reads the open issues with the `labels.ready` label and counts those that are ready to claim and are not running. An issue that failed earlier in the run does not count, since the watch does not try it again. It counts a blocked issue only when each of its open blockers is in the same repository and is running or ready to claim, since those blockers can land and close; a blocker that cannot move, such as one with `labels.needsHuman`, `labels.skip` or `labels.done`, one without `labels.ready`, or one in another repository, leaves it out. It looks only at the direct blockers, and reads them one issue at a time, so it runs one `gh` call at a time. It hunts only while that count is less than `huntCap`, 1 by default. Otherwise it waits and checks again, with the same back-off as the watch: 1, 2, 3, 5, 10, then 10 minutes. After a hunt that files an issue, it waits 1 minute before it checks the count again, even when the count is still less than `huntCap`, for example when `labels.hunt` shares a name with `labels.skip` so the filed issues never count. Each wait writes a `hunt.wait` event with the `minutes` to the run log. A hunt that files nothing backs off like a failed one. When the harness claims an issue, the hunter wakes: it ends its wait at once, or skips the wait after a hunt that is going, and checks the count again. A wake keeps the back-off where it was. The hunter:
|
|
842
842
|
|
|
843
843
|
- 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;
|
|
844
844
|
- follows `next-issue.hunt.md` in the repository root, or a short built-in prompt when the file is missing;
|
|
@@ -995,23 +995,30 @@ previous tag, grouped by type, and end with the compare link from that tag.
|
|
|
995
995
|
The release is the `release` job of the `ci` workflow, and it runs only after
|
|
996
996
|
the `check` job of the same commit passes. A commit that fails the typecheck,
|
|
997
997
|
lint, format check, tests or build releases nothing. As the release is part of
|
|
998
|
-
the `push` run, the harness waits for it like any other check.
|
|
998
|
+
the `push` run, the harness waits for it like any other check. Release jobs run
|
|
999
|
+
one at a time, in the order their `check` jobs finish, which is not always push
|
|
1000
|
+
order. When a later commit releases first, its tag holds the earlier commit and
|
|
1001
|
+
its version counts the commits of both, so the release job of the earlier commit
|
|
1002
|
+
only repairs and does nothing else.
|
|
999
1003
|
|
|
1000
1004
|
The workflow then gives `next-issue` and `@ravshansbox/pi-next-issue` the same
|
|
1001
1005
|
new version and publishes both packages to npm with a
|
|
1002
1006
|
[trusted publish](https://docs.npmjs.com/trusted-publishers), so no token is
|
|
1003
1007
|
stored. It pushes the tag before the publish and makes the GitHub release after
|
|
1004
1008
|
it, so the next release always counts from the new tag and never tries to
|
|
1005
|
-
publish a version that npm already holds
|
|
1009
|
+
publish a version that npm already holds, and no release job counts from a tag
|
|
1010
|
+
before one that already holds its commit. npm makes a new version live a few
|
|
1006
1011
|
minutes after the publish, and not always in the order it got them, so before
|
|
1007
1012
|
it publishes, the job waits until npm serves both packages at the version of the
|
|
1008
1013
|
last tag, for up to 10 minutes. Thus a new version never goes live before the
|
|
1009
|
-
one that came before it. Every run first repairs the last tag
|
|
1010
|
-
of that tag it publishes each package that npm does not serve at the tag
|
|
1014
|
+
one that came before it. Every run first repairs the last tag before its own
|
|
1015
|
+
commit: from a checkout of that tag it publishes each package that npm does not serve at the tag
|
|
1011
1016
|
version, and makes the GitHub release if it is missing. A package that npm
|
|
1012
1017
|
refuses as a version it already holds, but does not serve yet, counts as
|
|
1013
|
-
published. So when a step fails after the tag push, the next run
|
|
1014
|
-
release before it makes a new one.
|
|
1018
|
+
published. So when a step fails after the tag push, the next run of a later
|
|
1019
|
+
commit finishes that release before it makes a new one. The release job of an
|
|
1020
|
+
earlier commit that runs after it does not, as it repairs the tag before its
|
|
1021
|
+
own commit. To repair a release without a new commit,
|
|
1015
1022
|
run the `ci` workflow by hand; after the checks pass, the release job only
|
|
1016
1023
|
repairs and does nothing else.
|
|
1017
1024
|
The job uses the npm that comes with Node 24 and never installs another one.
|
package/dist/watch.mjs
CHANGED
|
@@ -74,7 +74,6 @@ async function huntIssues(hunter, hunting, running, failed, claims, refreshes, s
|
|
|
74
74
|
if (waiting !== undefined && waiting < hunter.cap && hunting.on()) {
|
|
75
75
|
if (await hunter.hunt(hunter.cap - waiting)) {
|
|
76
76
|
step = 0;
|
|
77
|
-
continue;
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
79
|
if (claims.take() || stopped() || !hunting.on()) {
|