@intentius/chant 0.62.0 → 0.63.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/dist/cli/handlers/operator.d.ts +13 -0
- package/dist/cli/handlers/operator.d.ts.map +1 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +2 -0
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/cli-support.d.ts +3 -0
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/driver-output.d.ts.map +1 -1
- package/dist/components/driver.d.ts +12 -0
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/fold/fold.d.ts.map +1 -1
- package/dist/fold/subset.d.ts +10 -0
- package/dist/fold/subset.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts +61 -0
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/index.d.ts +1 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/plan-digest.d.ts +33 -0
- package/dist/lifecycle/plan-digest.d.ts.map +1 -0
- package/dist/lifecycle/run-ledger.d.ts.map +1 -1
- package/dist/op/activities/lexicon-upgrade.d.ts +14 -2
- package/dist/op/activities/lexicon-upgrade.d.ts.map +1 -1
- package/dist/op/activities/lifecycle.d.ts +27 -0
- package/dist/op/activities/lifecycle.d.ts.map +1 -1
- package/dist/op/activities/reconcile.d.ts +196 -27
- package/dist/op/activities/reconcile.d.ts.map +1 -1
- package/dist/op/builders.d.ts +6 -0
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/composites/apply-op.d.ts +6 -0
- package/dist/op/composites/apply-op.d.ts.map +1 -1
- package/dist/op/composites/reconcile-op.d.ts.map +1 -1
- package/dist/op/gate-summary.d.ts +16 -0
- package/dist/op/gate-summary.d.ts.map +1 -1
- package/dist/op/gate.d.ts +104 -13
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/index.d.ts +3 -2
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/local-executor.d.ts +17 -0
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/local-output.d.ts.map +1 -1
- package/dist/op/op-ir.d.ts +8 -1
- package/dist/op/op-ir.d.ts.map +1 -1
- package/dist/op/runtime.d.ts +2 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/types.d.ts +19 -0
- package/dist/op/types.d.ts.map +1 -1
- package/dist/terraform/__fixtures__/build-graph.d.ts +8 -0
- package/dist/terraform/__fixtures__/build-graph.d.ts.map +1 -1
- package/dist/terraform/graph.d.ts +18 -2
- package/dist/terraform/graph.d.ts.map +1 -1
- package/dist/terraform/parse.d.ts.map +1 -1
- package/dist/terraform/types.d.ts +7 -0
- package/dist/terraform/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cli/handlers/operator.test.ts +130 -0
- package/src/cli/handlers/operator.ts +56 -2
- package/src/cli/handlers/run.ts +19 -0
- package/src/cli/main.ts +2 -0
- package/src/cli/registry.ts +2 -0
- package/src/components/cli-support.ts +29 -4
- package/src/components/driver-output.ts +10 -0
- package/src/components/driver.test.ts +31 -0
- package/src/components/driver.ts +54 -8
- package/src/discovery/fold-import.test.ts +55 -0
- package/src/fold/fold.test.ts +152 -0
- package/src/fold/fold.ts +102 -2
- package/src/fold/subset-doc-parity.test.ts +35 -1
- package/src/fold/subset.ts +10 -0
- package/src/lifecycle/gate-ledger.test.ts +133 -1
- package/src/lifecycle/gate-ledger.ts +108 -0
- package/src/lifecycle/index.ts +1 -0
- package/src/lifecycle/plan-digest.test.ts +49 -0
- package/src/lifecycle/plan-digest.ts +86 -0
- package/src/lifecycle/run-ledger.ts +1 -0
- package/src/op/activities/lexicon-upgrade.test.ts +24 -12
- package/src/op/activities/lexicon-upgrade.ts +19 -3
- package/src/op/activities/lifecycle.ts +51 -2
- package/src/op/activities/reconcile.test.ts +512 -26
- package/src/op/activities/reconcile.ts +307 -34
- package/src/op/builders.ts +7 -1
- package/src/op/composites/apply-op.ts +16 -0
- package/src/op/composites/composites.test.ts +15 -2
- package/src/op/composites/reconcile-op.test.ts +18 -0
- package/src/op/composites/reconcile-op.ts +7 -1
- package/src/op/gate-summary.test.ts +33 -0
- package/src/op/gate-summary.ts +31 -0
- package/src/op/gate.test.ts +111 -1
- package/src/op/gate.ts +181 -23
- package/src/op/index.ts +5 -2
- package/src/op/local-executor.test.ts +226 -3
- package/src/op/local-executor.ts +61 -12
- package/src/op/local-output.test.ts +38 -0
- package/src/op/local-output.ts +24 -1
- package/src/op/op-ir.test.ts +22 -0
- package/src/op/op-ir.ts +9 -0
- package/src/op/runtime.ts +2 -0
- package/src/op/types.ts +19 -0
- package/src/terraform/__fixtures__/build-graph.ts +42 -0
- package/src/terraform/__fixtures__/carve-locals-data.test.ts +138 -0
- package/src/terraform/__fixtures__/depth-estate/main.tf +141 -0
- package/src/terraform/__fixtures__/depth-estate/terraform.tfstate +17 -0
- package/src/terraform/__fixtures__/depth-estate.test.ts +162 -0
- package/src/terraform/graph.test.ts +148 -1
- package/src/terraform/graph.ts +144 -6
- package/src/terraform/parse.ts +4 -1
- package/src/terraform/types.ts +7 -0
|
@@ -31,16 +31,46 @@
|
|
|
31
31
|
* sets `GITHUB_REPOSITORY`. Both are sticky now (chant #2292, #2297): each
|
|
32
32
|
* finds and edits the OPEN issue it already owns by a hidden marker, the same
|
|
33
33
|
* recipe `comment` mode's note uses, and opens a new one only when it finds
|
|
34
|
+
* none. Which is why that marker has to name the Op (chant #2319) and why
|
|
35
|
+
* this mode refuses a step that supplies neither an `op` nor a `marker` — see
|
|
36
|
+
* {@link issueMarker} and {@link noIssueIdentityMessage}.
|
|
37
|
+
*
|
|
34
38
|
* none. See {@link postOrUpdateGithubIssue} for the GitHub/GHES/Forgejo half
|
|
35
39
|
* — including why it does not use GitHub's Search API, and the decision that
|
|
36
40
|
* this mode never closes the issue itself. Only a run outside any known CI
|
|
37
41
|
* job — no `CI_PROJECT_ID`, no `GITHUB_REPOSITORY` — falls back to `gh issue
|
|
38
42
|
* create`'s own ambient repo detection, still marker-prefixed so a later CI
|
|
39
|
-
* run of the same Op finds and edits it instead of opening a second one.
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
43
|
+
* run of the same Op finds and edits it instead of opening a second one.
|
|
44
|
+
*
|
|
45
|
+
* The credential did not always travel (chant #2320). The URL and the
|
|
46
|
+
* GET/PATCH/POST triple matched `postOrUpdateComment`'s, but that function
|
|
47
|
+
* resolved a token through {@link commentTokenFrom} and forwarded it as
|
|
48
|
+
* `GH_TOKEN` while the issue path forwarded no environment at all, so
|
|
49
|
+
* `CHANT_FORGEJO_TOKEN` never reached `gh`. Both paths now resolve the same
|
|
50
|
+
* way, in the same order, and forward the same variable, with the two
|
|
51
|
+
* refusals differing only in what they name ({@link noCommentTokenMessage},
|
|
52
|
+
* {@link noIssueTokenMessage}). The one deliberate exception is the `gh issue
|
|
53
|
+
* create` fallback above, which runs outside every CI job and so leaves the
|
|
54
|
+
* credential to `gh auth login` — see the comment on that branch. Parity with
|
|
55
|
+
* `comment` mode is not a working Forgejo write, as the next paragraph says.
|
|
56
|
+
*
|
|
57
|
+
* Settled against a real Forgejo 12.0.4+gitea-1.22.0 instance under chant
|
|
58
|
+
* #2315, the way `comment` mode's endpoints were under #2291: the *read*
|
|
59
|
+
* half works — plain paginated listing (no `/search/issues`, confirmed
|
|
60
|
+
* absent from Forgejo's own OpenAPI spec) and the `.pull_request == null`
|
|
61
|
+
* filter both behave exactly as they do against github.com. The *write*
|
|
62
|
+
* half does not, for a reason no mock could have caught: `gh`'s own
|
|
63
|
+
* `GH_TOKEN`/`GITHUB_TOKEN` only authenticate a request to github.com or a
|
|
64
|
+
* ghe.com subdomain (`gh help environment`), never a self-hosted Forgejo,
|
|
65
|
+
* and this function's POST/PATCH calls (like `postOrUpdateComment`'s) carry
|
|
66
|
+
* only `GH_TOKEN` — no `GH_HOST`, no `GH_ENTERPRISE_TOKEN`. Every write this
|
|
67
|
+
* mode makes on a real Forgejo instance fails with `{"message":"token is
|
|
68
|
+
* required"}` (HTTP 401), confirmed with `GH_DEBUG=api` sending no
|
|
69
|
+
* `Authorization` header at all. The forgejo Op generator refuses
|
|
70
|
+
* `findingMode: "issue"` by name for this reason (chant #2315); this
|
|
71
|
+
* activity's own behavior is unchanged; a hand-authored (non-generated)
|
|
72
|
+
* workflow that calls it directly against a Forgejo host will hit the same
|
|
73
|
+
* 401 the generator now refuses to produce.
|
|
44
74
|
*/
|
|
45
75
|
export type ReconcileMode = "pull-request" | "issue" | "report" | "comment";
|
|
46
76
|
/** A change-set entry that triggered reconciliation. */
|
|
@@ -71,13 +101,33 @@ export interface ReconcilePrArgs {
|
|
|
71
101
|
owned?: boolean;
|
|
72
102
|
/** PR / issue title. Default derived from env. */
|
|
73
103
|
title?: string;
|
|
104
|
+
/**
|
|
105
|
+
* The name of the Op this step belongs to, which is what makes an `issue`
|
|
106
|
+
* mode marker unique (#2319) — see {@link issueMarker}. Set it to the
|
|
107
|
+
* enclosing `Op`'s own `name`; both in-tree composites do, and a
|
|
108
|
+
* hand-written step should too.
|
|
109
|
+
*
|
|
110
|
+
* `issue` mode needs this or an explicit `marker`, and refuses by name
|
|
111
|
+
* ({@link noIssueIdentityMessage}) with neither: without one the marker
|
|
112
|
+
* falls back to naming only the env, two Ops over one env collide on it,
|
|
113
|
+
* and each nightly run silently overwrites the other's report.
|
|
114
|
+
*
|
|
115
|
+
* `comment` mode ignores it. That mode's marker is scoped to one pull
|
|
116
|
+
* request rather than to the repository, so its collision (two `comment`
|
|
117
|
+
* Ops over one env, both triggered by one pull request) is bounded by that
|
|
118
|
+
* pull request's life and leaves nothing behind. Tracked separately rather
|
|
119
|
+
* than folded in here, because changing `commentMarker` would orphan the
|
|
120
|
+
* comments already sitting on open pull requests.
|
|
121
|
+
*/
|
|
122
|
+
op?: string;
|
|
74
123
|
/**
|
|
75
124
|
* Hidden marker identifying this Op's own comment or issue. The activity
|
|
76
125
|
* writes it as the first line and finds it again by it on the next run, so
|
|
77
126
|
* a re-run edits one comment/issue instead of stacking a new one. Default:
|
|
78
|
-
* {@link commentMarker} for `comment` mode, {@link
|
|
79
|
-
* mode,
|
|
80
|
-
*
|
|
127
|
+
* {@link commentMarker} for `comment` mode, keyed on `env`; {@link
|
|
128
|
+
* issueMarker} for `issue` mode, keyed on `op` and `env` together. Supply
|
|
129
|
+
* it directly to own uniqueness yourself — in `issue` mode that is the one
|
|
130
|
+
* way to satisfy the identity requirement without passing `op`.
|
|
81
131
|
*/
|
|
82
132
|
marker?: string;
|
|
83
133
|
/**
|
|
@@ -140,16 +190,96 @@ export interface PullRequestContext {
|
|
|
140
190
|
*/
|
|
141
191
|
export declare function commentMarker(env: string): string;
|
|
142
192
|
/**
|
|
143
|
-
* The hidden marker that makes an `issue`-mode
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
* different resources and a caller may
|
|
149
|
-
*
|
|
150
|
-
*
|
|
193
|
+
* The hidden marker that makes an `issue`-mode finding findable across re-runs
|
|
194
|
+
* (#2292, #2297): written as the issue description's first line, matched on
|
|
195
|
+
* the next run by a `startswith` check (GitHub/Forgejo) or a server-side
|
|
196
|
+
* `search` plus the same check (GitLab). The same recipe {@link commentMarker}
|
|
197
|
+
* names for the `comment` mode's note, kept as its own function (rather than
|
|
198
|
+
* reused) because the two modes write to different resources and a caller may
|
|
199
|
+
* run both against the same `env`.
|
|
200
|
+
*
|
|
201
|
+
* Keyed on the owning Op *and* the env, not the env alone (#2319). An
|
|
202
|
+
* env-keyed marker was not unique, and once #2311 made this mode edit in place
|
|
203
|
+
* that stopped being merely untidy: `postOrUpdateGithubIssue` PATCHes both the
|
|
204
|
+
* title and the body of whatever it matches, so two Ops resolving to one
|
|
205
|
+
* marker rewrite each other's report on every run and the issue alternates
|
|
206
|
+
* between two unrelated findings. Two in-tree pairings hit it — a stock
|
|
207
|
+
* `TerraformWatchOp` and a `live: true` one over the same root (both pass the
|
|
208
|
+
* root as `env`), and a `ReconcileOp` for a chant environment whose name
|
|
209
|
+
* matches some terraform root — and both are ordinary configurations, not
|
|
210
|
+
* abuse. The Op name is the identifier closest to unique that this activity
|
|
211
|
+
* can be handed: it names the Op's output directory and is what `chant run`
|
|
212
|
+
* takes, so two Ops in a project do not share a raw name.
|
|
213
|
+
* `lexicons/github`'s gate notice reached the same conclusion first, keying
|
|
214
|
+
* its own sticky marker on `$CHANT_OP` alone.
|
|
215
|
+
*
|
|
216
|
+
* Both halves are slugified the same way {@link reconcileBranchName} slugifies
|
|
217
|
+
* an env, which also keeps the value free of the quotes and backslashes it is
|
|
218
|
+
* interpolated next to and of anything URL-encoding should have to escape out
|
|
219
|
+
* of. `/` cannot survive that slugify, so it separates the two halves
|
|
220
|
+
* unambiguously: the marker parses back to exactly one `op` slug and one `env`
|
|
221
|
+
* slug.
|
|
222
|
+
*
|
|
223
|
+
* What that leaves, and what is accepted rather than solved (#2319 pre-merge
|
|
224
|
+
* review): the slug is not injective. {@link markerSlug} collapses every run
|
|
225
|
+
* of characters outside `[A-Za-z0-9._-]` to a single `-`, so `"app watch"` and
|
|
226
|
+
* `"app:watch"` share a slug, and so do `"café"` and `"caf€"`. Two Ops named
|
|
227
|
+
* that way in one project over one env would still collide. Nothing in this
|
|
228
|
+
* repository constrains an Op name's character set today, so this cannot be
|
|
229
|
+
* closed here — it wants a charset rule on `OpConfig.name` (which would also
|
|
230
|
+
* settle the output directory and the branch name, both of which slugify the
|
|
231
|
+
* same way and have the same aliasing). Until then the residual is: distinct
|
|
232
|
+
* raw names, distinct markers, unless the names differ only in characters the
|
|
233
|
+
* slug does not keep.
|
|
151
234
|
*/
|
|
152
|
-
export declare function issueMarker(env: string): string;
|
|
235
|
+
export declare function issueMarker(op: string, env: string): string;
|
|
236
|
+
/**
|
|
237
|
+
* What any mode says about a supplied `marker` it cannot use safely (#2319
|
|
238
|
+
* pre-merge review).
|
|
239
|
+
*
|
|
240
|
+
* The marker is interpolated raw into the `--jq` filter that finds this Op's
|
|
241
|
+
* own comment or issue, inside a jq string literal: `startswith("<marker>")`.
|
|
242
|
+
* Only the whole filter is shell-quoted, so a `"` or a `\` in the marker
|
|
243
|
+
* closes or escapes past that literal — at best a jq syntax error, at worst a
|
|
244
|
+
* filter that matches something other than what the caller wrote. A control
|
|
245
|
+
* character does the same to the jq program's own line structure.
|
|
246
|
+
*
|
|
247
|
+
* Markers this activity builds itself cannot contain any of the three:
|
|
248
|
+
* {@link markerSlug} keeps them to `[A-Za-z0-9._-]` plus the fixed `<!-- … -->`
|
|
249
|
+
* frame. This checks the one that comes in from outside, and refuses rather
|
|
250
|
+
* than escaping, because a marker is an identity a caller has to be able to
|
|
251
|
+
* predict — silently rewriting it would move the issue this run owns.
|
|
252
|
+
*/
|
|
253
|
+
export declare function unsafeMarkerMessage(marker: string): string;
|
|
254
|
+
/**
|
|
255
|
+
* The caller's `marker` as this activity will actually use it, or `undefined`
|
|
256
|
+
* when the caller supplied nothing usable (#2319 pre-merge review).
|
|
257
|
+
*
|
|
258
|
+
* Blank is not a marker. `""` and `" "` used to satisfy the `issue`-mode
|
|
259
|
+
* identity check — `args.marker === undefined` is false for both, and `??`
|
|
260
|
+
* only falls through on nullish — and then built `startswith("")`, which is
|
|
261
|
+
* true of every issue body in the repository. So the step took whichever OPEN
|
|
262
|
+
* non-pull-request issue the forge listed first, very possibly a human's, and
|
|
263
|
+
* PATCHed its title and body. That is the precise failure #2319 exists to
|
|
264
|
+
* close, reachable through the escape hatch #2319 added, which is why the
|
|
265
|
+
* check lives on the field rather than in one mode's branch.
|
|
266
|
+
*
|
|
267
|
+
* Trimming rather than only rejecting: a marker with a trailing space is
|
|
268
|
+
* written and matched consistently either way, and normalizing it here means
|
|
269
|
+
* one definition of "blank" for both modes.
|
|
270
|
+
*/
|
|
271
|
+
export declare function suppliedMarker(marker: string | undefined): string | undefined;
|
|
272
|
+
/**
|
|
273
|
+
* What an `issue`-mode step says when it was given no identity to key its
|
|
274
|
+
* marker on (#2319).
|
|
275
|
+
*
|
|
276
|
+
* A refusal rather than a fall back to the pre-#2319 env-only marker, because
|
|
277
|
+
* the fallback is the bug: it is silent, it looks like it worked, and what it
|
|
278
|
+
* costs is the *other* Op's report, which nobody is watching the log of. The
|
|
279
|
+
* step that has to change is the one being refused, and the message names the
|
|
280
|
+
* two ways to change it.
|
|
281
|
+
*/
|
|
282
|
+
export declare function noIssueIdentityMessage(env: string): string;
|
|
153
283
|
/** What a `comment`-mode step says when the run it is in has no pull request and no merge request. */
|
|
154
284
|
export declare function noPullRequestContextMessage(): string;
|
|
155
285
|
/**
|
|
@@ -217,16 +347,28 @@ export interface CommentToken {
|
|
|
217
347
|
export declare function commentTokenFrom(env: Record<string, string | undefined>): CommentToken | undefined;
|
|
218
348
|
/** What a `comment`-mode step says on a pull request it has no credential for. */
|
|
219
349
|
export declare function noCommentTokenMessage(repo: string, number: number): string;
|
|
350
|
+
/** What an `issue`-mode step says on a repository it has no credential for (#2320). */
|
|
351
|
+
export declare function noIssueTokenMessage(repo: string): string;
|
|
220
352
|
/**
|
|
221
353
|
* Minimal `gh` invocation shape {@link postOrUpdateGithubIssue} threads its
|
|
222
354
|
* calls through. `reconcilePr` wraps `execAsync` (carrying its own `signal`)
|
|
223
355
|
* to this shape; `lexiconUpgrade` passes its injectable `GhRunner` straight
|
|
224
|
-
* through, since the two already share
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
356
|
+
* through, since the two already share this signature. One function, not two
|
|
357
|
+
* copies, because the recipe below — search, then PATCH or POST — is
|
|
358
|
+
* identical for both callers; only the issue's title/body and the marker that
|
|
359
|
+
* owns it differ.
|
|
360
|
+
*
|
|
361
|
+
* The `opts` argument exists so `postOrUpdateGithubIssue` can hand `gh` the
|
|
362
|
+
* token it resolved (chant #2320) rather than leaving `gh` to find one
|
|
363
|
+
* ambiently. A caller that adds nothing of its own can ignore it and pass it
|
|
364
|
+
* straight to `exec`; `reconcilePr` merges it with the `signal` it already
|
|
365
|
+
* carries. It is deliberately not a whole `ExecOptions`: an implementation
|
|
366
|
+
* that had to honour `cwd` or `shell` too would be a second exec wrapper, and
|
|
367
|
+
* the point of this type is that there is only one.
|
|
228
368
|
*/
|
|
229
|
-
export type GhExec = (cmd: string
|
|
369
|
+
export type GhExec = (cmd: string, opts?: {
|
|
370
|
+
env?: NodeJS.ProcessEnv;
|
|
371
|
+
}) => Promise<{
|
|
230
372
|
stdout: string;
|
|
231
373
|
stderr: string;
|
|
232
374
|
}>;
|
|
@@ -243,6 +385,21 @@ export type GhExec = (cmd: string) => Promise<{
|
|
|
243
385
|
* same as `postOrUpdateComment` (#2291) — so this reaches GitHub Enterprise
|
|
244
386
|
* Server the same way it reaches github.com.
|
|
245
387
|
*
|
|
388
|
+
* The credential is resolved and forwarded the same way too (chant #2320),
|
|
389
|
+
* through {@link commentTokenFrom} and out as `GH_TOKEN` on every call. It
|
|
390
|
+
* did not used to be: `reconcilePr` handed this `(cmd) => execAsync(cmd, {
|
|
391
|
+
* signal })` with no `env` at all, so `CHANT_FORGEJO_TOKEN` never reached
|
|
392
|
+
* `gh` and the one case that variable exists for — posting to a Forgejo
|
|
393
|
+
* instance other than the one the job runs on, where `github.token`'s scope
|
|
394
|
+
* stops at its own instance — failed with a 401 or a 404 that named nothing.
|
|
395
|
+
* With no token at all the operator got `gh`'s own error rather than chant's.
|
|
396
|
+
* The refusal here is {@link noIssueTokenMessage}, not the `comment` mode's
|
|
397
|
+
* {@link noCommentTokenMessage}: same resolution order, same advice, but that
|
|
398
|
+
* message names a pull request this mode does not have, and this function is
|
|
399
|
+
* shared with `lexiconUpgrade`, which is not `reconcilePr` at all. The same
|
|
400
|
+
* split GitLab already makes between `noGitlabNoteTokenMessage` and
|
|
401
|
+
* `noGitlabIssueTokenMessage`.
|
|
402
|
+
*
|
|
246
403
|
* ## Why plain pagination instead of GitHub's Search API
|
|
247
404
|
*
|
|
248
405
|
* GitHub offers real server-side full-text search — `gh issue list --search`
|
|
@@ -256,9 +413,9 @@ export type GhExec = (cmd: string) => Promise<{
|
|
|
256
413
|
* read-after-write the sticky recipe depends on — a false "not found"
|
|
257
414
|
* means a duplicate issue, which is the bug this activity exists to fix.
|
|
258
415
|
* 2. **The marker itself.** The hidden marker is deliberately punctuation-
|
|
259
|
-
* heavy (`<!-- chant-reconcile-issue:app -->`) so it renders
|
|
260
|
-
* GitHub's search tokenizer is not documented to preserve that
|
|
261
|
-
* through `in:body` matching, and a wrong query would either miss the
|
|
416
|
+
* heavy (`<!-- chant-reconcile-issue:nightly/app -->`) so it renders
|
|
417
|
+
* invisibly. GitHub's search tokenizer is not documented to preserve that
|
|
418
|
+
* shape through `in:body` matching, and a wrong query would either miss the
|
|
262
419
|
* marker (a duplicate, the same failure mode as above) or over-match and
|
|
263
420
|
* still need the same client-side `startswith` check this function
|
|
264
421
|
* already does — at which point the search bought nothing but risk.
|
|
@@ -269,7 +426,15 @@ export type GhExec = (cmd: string) => Promise<{
|
|
|
269
426
|
* endpoint does carry a real `q` search parameter, but that is a
|
|
270
427
|
* different endpoint shape than GitHub's, which would mean forking this
|
|
271
428
|
* function by forge — exactly what the `comment` path (#2291)
|
|
272
|
-
* deliberately does not do).
|
|
429
|
+
* deliberately does not do). Chant #2315 confirmed this against a live
|
|
430
|
+
* call rather than only the spec: plain paginated `GET .../issues?state=
|
|
431
|
+
* open` on a real Forgejo 12.0.4+gitea-1.22.0 instance interleaves pull
|
|
432
|
+
* requests with issues exactly as GitHub's endpoint does, and the
|
|
433
|
+
* `.pull_request == null` filter below excludes them correctly. The write
|
|
434
|
+
* calls this function makes do not clear the same instance — see the
|
|
435
|
+
* module doc's `issue` bullet for why, and why the forgejo Op generator
|
|
436
|
+
* refuses this mode rather than generating a job that would 401 on every
|
|
437
|
+
* run.
|
|
273
438
|
*
|
|
274
439
|
* So this reuses the recipe `postOrUpdateComment` already proved for PR
|
|
275
440
|
* comments: list, `--paginate`, filter with `--jq` by an exact `startswith`
|
|
@@ -407,7 +572,11 @@ export declare function entriesFromPlan(planJson: string): ReconcileEntry[];
|
|
|
407
572
|
* CI job (any trigger — the point of this mode is a cron run that has no
|
|
408
573
|
* merge request), the same recipe against one GitLab issue (#2292). Neither
|
|
409
574
|
* branch ever closes the issue itself — see {@link postOrUpdateGithubIssue}
|
|
410
|
-
* for that decision and why.
|
|
575
|
+
* for that decision and why. The marker names the Op as well as the env
|
|
576
|
+
* (#2319), so the step needs `op` or an explicit `marker` and fails by name
|
|
577
|
+
* with neither; an issue left over from the pre-#2319 env-only marker
|
|
578
|
+
* matches no Op's marker now and is left where it is, unedited, rather than
|
|
579
|
+
* adopted by whichever Op happens to run first.
|
|
411
580
|
* - `comment` — post the body as one comment on the pull request that
|
|
412
581
|
* triggered the run, editing that same comment on every re-run rather than
|
|
413
582
|
* stacking a new one (#2231) — on GitHub and on Forgejo alike (#2291), the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reconcile.d.ts","sourceRoot":"","sources":["../../../src/op/activities/reconcile.ts"],"names":[],"mappings":"AAMA
|
|
1
|
+
{"version":3,"file":"reconcile.d.ts","sourceRoot":"","sources":["../../../src/op/activities/reconcile.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE5E,wDAAwD;AACxD,MAAM,WAAW,cAAc;IAC7B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,uEAAuE;IACvE,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,OAAO,CAA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: Record<string, unknown>, opt
|
|
|
63
63
|
* that reaches this step with no resolution newer than its pending fact
|
|
64
64
|
* records the pending fact and ends `gated`. `chant approve <op> <gate>`
|
|
65
65
|
* writes the resolution, and the next run walks through carrying the approver.
|
|
66
|
+
*
|
|
67
|
+
* Pass `plan` to bind the approval to a specific plan (#2300) — normally the
|
|
68
|
+
* Plan phase's own digest, `plan.out.planDigest`. Then a resolution counts
|
|
69
|
+
* only for that plan, and a run whose fresh plan differs is refused by name
|
|
70
|
+
* instead of applying a change nobody approved. See {@link GateStep.plan}.
|
|
66
71
|
*/
|
|
67
72
|
export declare function gate(name: string, opts?: {
|
|
68
73
|
timeout?: string;
|
|
69
74
|
description?: string;
|
|
75
|
+
plan?: GateStep["plan"];
|
|
70
76
|
}): GateStep;
|
|
71
77
|
/**
|
|
72
78
|
* Wrap nested steps in read-compare-run-write over an effect receipt (#1834,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../src/op/builders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7G,OAAO,EAAmB,KAAK,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAEnF,OAAO,EAAgB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,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ACH,eAAO,MAAM,UAAU,GAAI,OAAO,YAAY,CAAC,cAAc,CAAC,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,iBAQlF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GACxB,OAAO,MAAM,EACb,OAAO,YAAY,CAAC,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,KACtE,iBAGF,CAAC"}
|
|
@@ -19,6 +19,12 @@
|
|
|
19
19
|
* approve <op> <gate>` line to run. Approve, run again, and the same Op
|
|
20
20
|
* converges — no durable workflow engine is involved.
|
|
21
21
|
*
|
|
22
|
+
* The gate binds the plan (#2300). The Plan phase's `lifecycleDiff` publishes
|
|
23
|
+
* a digest of its change set, the gate step references it, and a resolution
|
|
24
|
+
* counts only for that digest. Approve, change the declared source, re-run,
|
|
25
|
+
* and the run stops again with both digests named rather than applying a
|
|
26
|
+
* change set the approver never saw.
|
|
27
|
+
*
|
|
22
28
|
* @example
|
|
23
29
|
* ```typescript
|
|
24
30
|
* // additive, local executor
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-op.d.ts","sourceRoot":"","sources":["../../../src/op/composites/apply-op.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"apply-op.d.ts","sourceRoot":"","sources":["../../../src/op/composites/apply-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAoC,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE1G,MAAM,WAAW,aAAa;IAC5B,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb;yCACqC;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,kD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AE,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,wDAAwD;IACxD,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC7B;AAED,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,EAAE,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;CACrC;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,oBAAoB,
|
|
1
|
+
{"version":3,"file":"reconcile-op.d.ts","sourceRoot":"","sources":["../../../src/op/composites/reconcile-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,MAAM,WAAW,iBAAiB;IAChC,2FAA2F;IAC3F,IAAI,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,wDAAwD;IACxD,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC7B;AAED,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,EAAE,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;CACrC;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,oBAAoB,CAyD3E"}
|
|
@@ -29,6 +29,22 @@ export interface GatedRunSummary {
|
|
|
29
29
|
expiresAt?: string;
|
|
30
30
|
/** The approval surface the run resolved, when it knew one. */
|
|
31
31
|
url?: string;
|
|
32
|
+
/**
|
|
33
|
+
* False when this run's own append reached only the local chant/lifecycle
|
|
34
|
+
* branch, not the remote (#2310) — the reason lives in `pushWarning`.
|
|
35
|
+
* Absent when this run left an already-standing pending fact alone, or when
|
|
36
|
+
* the push landed.
|
|
37
|
+
*/
|
|
38
|
+
pushed?: boolean;
|
|
39
|
+
/** Set when `pushed` is false. */
|
|
40
|
+
pushWarning?: string;
|
|
41
|
+
/**
|
|
42
|
+
* The plan the pending fact was recorded against (#2300), when the gate
|
|
43
|
+
* binds one. Shown because it is what the `chant approve` line below
|
|
44
|
+
* approves — and because a reader who comes back to a stale summary needs
|
|
45
|
+
* to see that the digest has moved on.
|
|
46
|
+
*/
|
|
47
|
+
planDigest?: string;
|
|
32
48
|
}
|
|
33
49
|
/**
|
|
34
50
|
* The markdown block itself. Pure, so a test reads what CI would render
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate-summary.d.ts","sourceRoot":"","sources":["../../src/op/gate-summary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,2DAA2D;AAC3D,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,GAAG,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"gate-summary.d.ts","sourceRoot":"","sources":["../../src/op/gate-summary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,2DAA2D;AAC3D,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,CAsCxE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,eAAe,EACxB,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,GAAG,SAAS,CASpB"}
|
package/dist/op/gate.d.ts
CHANGED
|
@@ -19,25 +19,56 @@
|
|
|
19
19
|
* pre-authorize a future run's gate that has since been recorded pending; a
|
|
20
20
|
* resolution from last month does not answer the fact this run just wrote.
|
|
21
21
|
*
|
|
22
|
+
* Since #2300 a gate can also bind a plan. `GateCheckInput.planDigest` is
|
|
23
|
+
* what this run's Plan phase produced (`../lifecycle/plan-digest.ts`), and a
|
|
24
|
+
* resolution counts only when it was recorded for that same plan — recency
|
|
25
|
+
* demoted from the criterion to the tiebreak. Approve, edit the root, re-run,
|
|
26
|
+
* and the gate refuses by name instead of applying something no approver saw,
|
|
27
|
+
* which is what INTENTIUS/choudoufu#1026 measured it doing. A gate with no
|
|
28
|
+
* `planDigest` decides exactly as it did before.
|
|
29
|
+
*
|
|
22
30
|
* Ledger access goes through {@link GateLedgerPort} rather than straight to
|
|
23
31
|
* git, so a test (and the operator's own in-memory paths) can drive the
|
|
24
32
|
* decision without an orphan branch on disk.
|
|
25
33
|
*/
|
|
26
34
|
import { type GateResolutionRecord, type PendingGateInput, type PendingGateRecord } from "../lifecycle/gate-ledger.js";
|
|
35
|
+
/**
|
|
36
|
+
* What appending a pending fact learned about reaching the remote.
|
|
37
|
+
*
|
|
38
|
+
* The append to the local `chant/lifecycle` branch always lands — that half
|
|
39
|
+
* was fixed by #2309's fetch-before-append. This is the other half: whether
|
|
40
|
+
* the push that follows it did, and why not when it didn't, in one line a
|
|
41
|
+
* renderer can show directly (#2310).
|
|
42
|
+
*/
|
|
43
|
+
export interface PendingGatePush {
|
|
44
|
+
record: PendingGateRecord;
|
|
45
|
+
/**
|
|
46
|
+
* True when the push reached the remote. False when there was no remote
|
|
47
|
+
* configured, or the push was rejected — `pushWarning` says which.
|
|
48
|
+
*/
|
|
49
|
+
pushed: boolean;
|
|
50
|
+
/** Set when `pushed` is false. */
|
|
51
|
+
pushWarning?: string;
|
|
52
|
+
}
|
|
27
53
|
/** The gate ledger, as the two executors need it: read both kinds of line, append a pending fact. */
|
|
28
54
|
export interface GateLedgerPort {
|
|
29
55
|
read(op: string): Promise<{
|
|
30
56
|
resolutions: GateResolutionRecord[];
|
|
31
57
|
pending: PendingGateRecord[];
|
|
32
58
|
}>;
|
|
33
|
-
appendPending(input: PendingGateInput): Promise<
|
|
59
|
+
appendPending(input: PendingGateInput): Promise<PendingGatePush>;
|
|
34
60
|
}
|
|
35
61
|
/**
|
|
36
|
-
* The real port: the `chant/lifecycle` orphan branch.
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* a
|
|
62
|
+
* The real port: the `chant/lifecycle` orphan branch.
|
|
63
|
+
*
|
|
64
|
+
* Appending is always local-first and always lands (#2309's fetch-before-
|
|
65
|
+
* append). The push that follows is reported rather than swallowed (#2310):
|
|
66
|
+
* a pending fact that never reaches the remote is still a correct local
|
|
67
|
+
* answer — the run is right to gate, and does — but an operator elsewhere
|
|
68
|
+
* cannot approve a gate whose pending record they cannot see, so the caller
|
|
69
|
+
* gets `pushed: false` and a reason instead of silence. Mirrors the shape
|
|
70
|
+
* `chant approve` reports through (`../cli/handlers/operator.ts`'s
|
|
71
|
+
* `reportedPush`, #2309 review).
|
|
41
72
|
*/
|
|
42
73
|
export declare function gitGateLedgerPort(opts?: {
|
|
43
74
|
cwd?: string;
|
|
@@ -60,9 +91,47 @@ export interface GateCheckInput {
|
|
|
60
91
|
timeout?: string;
|
|
61
92
|
/** Identifies the run that reached the gate, when the caller has one. */
|
|
62
93
|
runId?: string;
|
|
94
|
+
/**
|
|
95
|
+
* The plan this run reached the gate with (#2300) — `computePlanDigest`'s
|
|
96
|
+
* output (`../lifecycle/plan-digest.ts`), from the Plan phase that ran a
|
|
97
|
+
* moment ago.
|
|
98
|
+
*
|
|
99
|
+
* Supplying it makes the gate plan-bound: only a resolution recorded for
|
|
100
|
+
* this exact digest satisfies it, and one recorded for a different plan (or
|
|
101
|
+
* for no plan at all) is reported as a {@link GateDigestMismatch} instead.
|
|
102
|
+
* Omitting it keeps the pre-#2300 rule, where the newest resolution since
|
|
103
|
+
* the standing pending fact satisfies the gate whatever has changed since.
|
|
104
|
+
*/
|
|
105
|
+
planDigest?: string;
|
|
63
106
|
/** ISO-8601 "now" — supplied by the caller, so the decision is deterministic under test. */
|
|
64
107
|
now?: string;
|
|
65
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* A standing resolution that answers this gate but not this plan (#2300) —
|
|
111
|
+
* what a refusal names.
|
|
112
|
+
*/
|
|
113
|
+
export interface GateDigestMismatch {
|
|
114
|
+
/** The plan that was approved. `undefined` for a resolution written before #2300, which recorded no plan at all. */
|
|
115
|
+
approved?: string;
|
|
116
|
+
/** The plan this run's Plan phase produced. */
|
|
117
|
+
planned: string;
|
|
118
|
+
/** Who recorded the approval that does not apply here. */
|
|
119
|
+
resolvedBy: string;
|
|
120
|
+
/** When they recorded it. */
|
|
121
|
+
timestamp: string;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The refusal line for a {@link GateDigestMismatch}: which plan was approved,
|
|
125
|
+
* which was planned, and what closes the gap. One function so the executor's
|
|
126
|
+
* step record, the human render and the CI summary say the same thing.
|
|
127
|
+
*
|
|
128
|
+
* The two cases get different prose because they are different facts. A
|
|
129
|
+
* resolution for another plan means something changed between the approval
|
|
130
|
+
* and this run. A resolution with no plan on it means nothing is known to
|
|
131
|
+
* have changed — the record simply never said what it approved, which is
|
|
132
|
+
* every record written before #2300.
|
|
133
|
+
*/
|
|
134
|
+
export declare function describeGateMismatch(op: string, gate: string, mismatch: GateDigestMismatch): string;
|
|
66
135
|
/** Either the gate is answered, or it is a standing fact. */
|
|
67
136
|
export type GateCheck = {
|
|
68
137
|
satisfied: true;
|
|
@@ -71,18 +140,40 @@ export type GateCheck = {
|
|
|
71
140
|
satisfied: false;
|
|
72
141
|
pending: PendingGateRecord;
|
|
73
142
|
recorded: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Whether this run's own append reached the remote — set only when
|
|
145
|
+
* `recorded` is true. A gate left standing from an earlier run pushed
|
|
146
|
+
* (or didn't) on that run; this one wrote nothing, so it has nothing
|
|
147
|
+
* new to report (#2310).
|
|
148
|
+
*/
|
|
149
|
+
pushed?: boolean;
|
|
150
|
+
/** Set when `pushed` is false. */
|
|
151
|
+
pushWarning?: string;
|
|
152
|
+
/** Present when a resolution stands for this gate but for another plan (#2300). */
|
|
153
|
+
mismatch?: GateDigestMismatch;
|
|
74
154
|
};
|
|
75
155
|
/**
|
|
76
156
|
* Decide a gate against the ledger, recording the pending fact when it isn't
|
|
77
157
|
* answered.
|
|
78
158
|
*
|
|
79
|
-
* - A resolution
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* -
|
|
84
|
-
*
|
|
85
|
-
*
|
|
159
|
+
* - A resolution recorded for this run's own plan, newer than the newest
|
|
160
|
+
* pending fact, satisfies the gate. On a gate that binds no plan
|
|
161
|
+
* (`input.planDigest` absent) the plan half of that drops out and the rule
|
|
162
|
+
* is the pre-#2300 one: any resolution newer than the pending fact.
|
|
163
|
+
* - A resolution that stands for the gate but for a different plan does not
|
|
164
|
+
* satisfy it (#2300). The run is gated, `mismatch` names both plans, and a
|
|
165
|
+
* fresh pending fact is recorded for the plan that actually ran — so
|
|
166
|
+
* `chant approve` has something current to approve and the loop closes in
|
|
167
|
+
* one more command rather than needing the digest typed out.
|
|
168
|
+
* - Otherwise, a pending fact that hasn't expired *and was recorded for this
|
|
169
|
+
* same plan* stands as it is: the run ends `gated` and the ledger is left
|
|
170
|
+
* alone, so an operator ticking every minute against an unapproved gate
|
|
171
|
+
* does not append a line a minute. A pending fact for a different plan is
|
|
172
|
+
* stale in the way that matters and is replaced.
|
|
173
|
+
* - Otherwise (no pending fact, or the newest one has expired, or it is for
|
|
174
|
+
* another plan) a fresh pending fact is appended and the run ends `gated`.
|
|
175
|
+
* `recorded` says which of the two happened, so a renderer can tell "just
|
|
176
|
+
* recorded" from "still standing".
|
|
86
177
|
*/
|
|
87
178
|
export declare function evaluateGate(port: GateLedgerPort, input: GateCheckInput): Promise<GateCheck>;
|
|
88
179
|
/** The line every renderer prints to say how a pending gate is cleared. */
|
package/dist/op/gate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../../src/op/gate.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../../src/op/gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAQL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;AAKlC;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qGAAqG;AACrG,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;QAAC,OAAO,EAAE,iBAAiB,EAAE,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