@intentius/chant 0.61.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 -18
- 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/lexicon.d.ts +51 -0
- package/dist/lexicon.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/git.d.ts +117 -0
- package/dist/lifecycle/git.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 +33 -3
- 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 +394 -14
- 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 +34 -2
- 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/operator.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/runtimes/local.d.ts.map +1 -1
- package/dist/op/types.d.ts +19 -0
- package/dist/op/types.d.ts.map +1 -1
- package/dist/runtime-adapter.d.ts +8 -0
- package/dist/runtime-adapter.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 +232 -1
- package/src/cli/handlers/operator.ts +130 -6
- 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/lexicon.ts +51 -0
- package/src/lifecycle/gate-ledger.test.ts +133 -1
- package/src/lifecycle/gate-ledger.ts +108 -0
- package/src/lifecycle/git.test.ts +49 -5
- package/src/lifecycle/git.ts +312 -11
- 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 +134 -39
- package/src/op/activities/lexicon-upgrade.ts +74 -12
- package/src/op/activities/lifecycle.ts +51 -2
- package/src/op/activities/reconcile.test.ts +1013 -1
- package/src/op/activities/reconcile.ts +721 -25
- 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 +614 -0
- package/src/op/gate.ts +190 -24
- package/src/op/index.ts +5 -2
- package/src/op/local-executor.test.ts +340 -2
- package/src/op/local-executor.ts +190 -32
- 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/operator.test.ts +20 -0
- package/src/op/operator.ts +39 -1
- package/src/op/runtime.ts +2 -0
- package/src/op/runtimes/local.ts +11 -0
- package/src/op/types.ts +19 -0
- package/src/runtime-adapter.ts +17 -3
- 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
|
@@ -13,6 +13,64 @@
|
|
|
13
13
|
* `merge_request_event` pipeline sets `CI_MERGE_REQUEST_IID`, a GitHub
|
|
14
14
|
* `pull_request` event sets `GITHUB_REPOSITORY`, and no run sets both. See
|
|
15
15
|
* {@link mergeRequestContextFrom}.
|
|
16
|
+
*
|
|
17
|
+
* On Forgejo the same mode posts the same GitHub-shaped comment (chant
|
|
18
|
+
* #2291): no forge split at all, because a Forgejo Actions job already sets
|
|
19
|
+
* `GITHUB_REPOSITORY`, `GITHUB_API_URL` and `github.token` the same way a
|
|
20
|
+
* GitHub Actions job does, and Forgejo's own `/api/v1` takes the identical
|
|
21
|
+
* GET/POST/PATCH triple. The one thing that needed fixing was the URL: `gh
|
|
22
|
+
* api` resolves a *relative* path against `/api/v3` for any host other than
|
|
23
|
+
* `github.com`, and Forgejo does not serve `/api/v3` — verified on a real
|
|
24
|
+
* Forgejo 12.0.4+gitea-1.22.0 instance during INTENTIUS/choudoufu#1027. See
|
|
25
|
+
* {@link postOrUpdateComment} and {@link githubApiBaseFrom}.
|
|
26
|
+
*
|
|
27
|
+
* `issue` needs no merge/pull request — its whole point is a cron trigger
|
|
28
|
+
* that has none — so its forge split reads off a wider signal: any GitLab CI
|
|
29
|
+
* job sets `CI_PROJECT_ID`, not only a merge-request one (see {@link
|
|
30
|
+
* gitlabProjectContextFrom}), and any GitHub Actions or Forgejo Actions job
|
|
31
|
+
* sets `GITHUB_REPOSITORY`. Both are sticky now (chant #2292, #2297): each
|
|
32
|
+
* finds and edits the OPEN issue it already owns by a hidden marker, the same
|
|
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
|
+
*
|
|
38
|
+
* none. See {@link postOrUpdateGithubIssue} for the GitHub/GHES/Forgejo half
|
|
39
|
+
* — including why it does not use GitHub's Search API, and the decision that
|
|
40
|
+
* this mode never closes the issue itself. Only a run outside any known CI
|
|
41
|
+
* job — no `CI_PROJECT_ID`, no `GITHUB_REPOSITORY` — falls back to `gh issue
|
|
42
|
+
* create`'s own ambient repo detection, still marker-prefixed so a later CI
|
|
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.
|
|
16
74
|
*/
|
|
17
75
|
export type ReconcileMode = "pull-request" | "issue" | "report" | "comment";
|
|
18
76
|
/** A change-set entry that triggered reconciliation. */
|
|
@@ -44,11 +102,32 @@ export interface ReconcilePrArgs {
|
|
|
44
102
|
/** PR / issue title. Default derived from env. */
|
|
45
103
|
title?: string;
|
|
46
104
|
/**
|
|
47
|
-
*
|
|
48
|
-
* mode
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
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;
|
|
123
|
+
/**
|
|
124
|
+
* Hidden marker identifying this Op's own comment or issue. The activity
|
|
125
|
+
* writes it as the first line and finds it again by it on the next run, so
|
|
126
|
+
* a re-run edits one comment/issue instead of stacking a new one. Default:
|
|
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`.
|
|
52
131
|
*/
|
|
53
132
|
marker?: string;
|
|
54
133
|
/**
|
|
@@ -74,7 +153,7 @@ export interface ReconcileResult {
|
|
|
74
153
|
branch?: string;
|
|
75
154
|
/** Opened PR URL (pull-request mode). */
|
|
76
155
|
prUrl?: string;
|
|
77
|
-
/** Opened issue URL (issue mode). */
|
|
156
|
+
/** Opened or edited issue URL (issue mode; sticky on every forge — #2292, #2297). */
|
|
78
157
|
issueUrl?: string;
|
|
79
158
|
/** The posted or updated PR comment / MR note URL (comment mode). */
|
|
80
159
|
commentUrl?: string;
|
|
@@ -110,6 +189,97 @@ export interface PullRequestContext {
|
|
|
110
189
|
* environments own two comments and each updates in place.
|
|
111
190
|
*/
|
|
112
191
|
export declare function commentMarker(env: string): string;
|
|
192
|
+
/**
|
|
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.
|
|
234
|
+
*/
|
|
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;
|
|
113
283
|
/** What a `comment`-mode step says when the run it is in has no pull request and no merge request. */
|
|
114
284
|
export declare function noPullRequestContextMessage(): string;
|
|
115
285
|
/**
|
|
@@ -128,6 +298,174 @@ export declare function pullRequestContextFrom(env: Record<string, string | unde
|
|
|
128
298
|
* for it.
|
|
129
299
|
*/
|
|
130
300
|
export declare function resolvePullRequestContext(env?: Record<string, string | undefined>): Promise<PullRequestContext>;
|
|
301
|
+
/**
|
|
302
|
+
* The REST base a GitHub-shaped `gh api` call should target, read the same
|
|
303
|
+
* way the runner itself reads it (chant #2291). `GITHUB_API_URL` is a default
|
|
304
|
+
* environment variable every GitHub Actions *and* Forgejo Actions job carries
|
|
305
|
+
* — `https://api.github.com` on github.com, `<host>/api/v3` on GitHub
|
|
306
|
+
* Enterprise Server, and `<host>/api/v1` on Forgejo, which already advertises
|
|
307
|
+
* it correctly (confirmed on a real Forgejo 12.0.4+gitea-1.22.0 instance
|
|
308
|
+
* during INTENTIUS/choudoufu#1027: `$GITHUB_API_URL` read
|
|
309
|
+
* `http://forgejo:3000/api/v1` inside the job).
|
|
310
|
+
*
|
|
311
|
+
* Building the full URL from this rather than handing `gh api` a bare
|
|
312
|
+
* relative path (`repos/…`) is the fix itself: `gh` resolves a relative path
|
|
313
|
+
* by guessing a host-specific prefix of its own — `api.<host>` for
|
|
314
|
+
* `github.com`, `<host>/api/v3` for anything else — and that guess is `/api/v3`
|
|
315
|
+
* for a Forgejo host too, which Forgejo answers 404 for both GET and POST.
|
|
316
|
+
* Handed a full URL, `gh api` uses it verbatim and skips the guess entirely,
|
|
317
|
+
* which is what let the same `gh` binary reach Forgejo's `/api/v1` in the
|
|
318
|
+
* same session, over plain HTTP and over TLS. No Forgejo-specific branch is
|
|
319
|
+
* needed: every host in play (github.com, GHES, Forgejo) sets
|
|
320
|
+
* `GITHUB_API_URL` to the base its own `/repos/...` paths actually live
|
|
321
|
+
* under, so building the URL from it is correct everywhere `gh` already ran,
|
|
322
|
+
* not only on Forgejo.
|
|
323
|
+
*/
|
|
324
|
+
export declare function githubApiBaseFrom(env: Record<string, string | undefined>): string;
|
|
325
|
+
/** The credential a GitHub- or Forgejo-shaped comment call is made with. */
|
|
326
|
+
export interface CommentToken {
|
|
327
|
+
value: string;
|
|
328
|
+
/** The variable it came from, so a refusal or a log line can name it. */
|
|
329
|
+
source: string;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Resolve the token `postOrUpdateComment` sends with, most specific first
|
|
333
|
+
* (chant #2291). `gh` itself already resolves `GH_TOKEN`/`GITHUB_TOKEN`
|
|
334
|
+
* ambiently from the process environment, and the generated workflow sets
|
|
335
|
+
* both to `${{ github.token }}` for every non-`report` finding mode — on
|
|
336
|
+
* Forgejo the same way as on GitHub, and the real-instance read confirmed
|
|
337
|
+
* `github.token` is populated there and good for a 200 read and a 201 write,
|
|
338
|
+
* authored as `forgejo-actions`. So the common case needs nothing set beyond
|
|
339
|
+
* what the generator already emits.
|
|
340
|
+
*
|
|
341
|
+
* `CHANT_FORGEJO_TOKEN` is checked first for the case that ambient token
|
|
342
|
+
* cannot cover: a run posting to a Forgejo instance other than the one the
|
|
343
|
+
* job executes on, where `github.token`'s scope stops at its own instance.
|
|
344
|
+
* Resolving explicitly (rather than leaving it entirely to `gh`) also buys a
|
|
345
|
+
* named failure before the shell-out, in place of `gh`'s own opaque 401.
|
|
346
|
+
*/
|
|
347
|
+
export declare function commentTokenFrom(env: Record<string, string | undefined>): CommentToken | undefined;
|
|
348
|
+
/** What a `comment`-mode step says on a pull request it has no credential for. */
|
|
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;
|
|
352
|
+
/**
|
|
353
|
+
* Minimal `gh` invocation shape {@link postOrUpdateGithubIssue} threads its
|
|
354
|
+
* calls through. `reconcilePr` wraps `execAsync` (carrying its own `signal`)
|
|
355
|
+
* to this shape; `lexiconUpgrade` passes its injectable `GhRunner` straight
|
|
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.
|
|
368
|
+
*/
|
|
369
|
+
export type GhExec = (cmd: string, opts?: {
|
|
370
|
+
env?: NodeJS.ProcessEnv;
|
|
371
|
+
}) => Promise<{
|
|
372
|
+
stdout: string;
|
|
373
|
+
stderr: string;
|
|
374
|
+
}>;
|
|
375
|
+
/**
|
|
376
|
+
* Open `title`/`body` as one GitHub-shaped issue in `repo`, or edit the issue
|
|
377
|
+
* this caller already owns there (#2297) — `postOrUpdateComment`'s issue
|
|
378
|
+
* counterpart, and the GitHub/GHES/Forgejo sibling of GitLab's
|
|
379
|
+
* `postOrUpdateIssue` (#2292): find by marker, PATCH when found, POST when
|
|
380
|
+
* not, so a nightly finding carries one issue holding the current state
|
|
381
|
+
* instead of stacking a new one every run. Shared by `reconcilePr`'s own
|
|
382
|
+
* `issue` mode and `lexiconUpgrade`'s per-lexicon upgrade-status issue.
|
|
383
|
+
*
|
|
384
|
+
* Every call targets a full URL built from {@link githubApiBaseFrom}, the
|
|
385
|
+
* same as `postOrUpdateComment` (#2291) — so this reaches GitHub Enterprise
|
|
386
|
+
* Server the same way it reaches github.com.
|
|
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
|
+
*
|
|
403
|
+
* ## Why plain pagination instead of GitHub's Search API
|
|
404
|
+
*
|
|
405
|
+
* GitHub offers real server-side full-text search — `gh issue list --search`
|
|
406
|
+
* and `GET /search/issues?q=...` both use it, and chant #2297 (the issue that
|
|
407
|
+
* asked for this) names both as candidates. Neither is used here, for three
|
|
408
|
+
* reasons found while building this:
|
|
409
|
+
*
|
|
410
|
+
* 1. **Consistency.** GitHub's search index is documented as eventually
|
|
411
|
+
* consistent: an issue this function just wrote is not guaranteed to be
|
|
412
|
+
* findable by search immediately afterward. That is exactly the
|
|
413
|
+
* read-after-write the sticky recipe depends on — a false "not found"
|
|
414
|
+
* means a duplicate issue, which is the bug this activity exists to fix.
|
|
415
|
+
* 2. **The marker itself.** The hidden marker is deliberately punctuation-
|
|
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
|
|
419
|
+
* marker (a duplicate, the same failure mode as above) or over-match and
|
|
420
|
+
* still need the same client-side `startswith` check this function
|
|
421
|
+
* already does — at which point the search bought nothing but risk.
|
|
422
|
+
* 3. **Forgejo.** `gh issue list --search` and `/search/issues` are both
|
|
423
|
+
* absent from Forgejo's API — checked against a live Forgejo instance's
|
|
424
|
+
* own OpenAPI spec while building this: no `/search/issues`, no
|
|
425
|
+
* `/repos/issues/search` path anywhere in it (Forgejo's own issues-list
|
|
426
|
+
* endpoint does carry a real `q` search parameter, but that is a
|
|
427
|
+
* different endpoint shape than GitHub's, which would mean forking this
|
|
428
|
+
* function by forge — exactly what the `comment` path (#2291)
|
|
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.
|
|
438
|
+
*
|
|
439
|
+
* So this reuses the recipe `postOrUpdateComment` already proved for PR
|
|
440
|
+
* comments: list, `--paginate`, filter with `--jq` by an exact `startswith`
|
|
441
|
+
* prefix match, which is correct no matter how many pages it takes. The cost
|
|
442
|
+
* is real — a repository with many thousands of issues pays for every page
|
|
443
|
+
* on every run — and is the accepted trade-off here; narrowing further with
|
|
444
|
+
* GitHub's `creator` filter was considered and left alone, because the
|
|
445
|
+
* identity a `GH_TOKEN` posts as cannot be assumed reliably across a
|
|
446
|
+
* generated workflow and a hand-run one, and a wrong `creator` is a false
|
|
447
|
+
* negative — a duplicate — not just a slower search.
|
|
448
|
+
*
|
|
449
|
+
* ## The close decision (#2297)
|
|
450
|
+
*
|
|
451
|
+
* This never closes the issue, in either branch, matching both GitLab paths
|
|
452
|
+
* (#2256, #2292) — neither of which closes anything either. The search is
|
|
453
|
+
* scoped to `state=open` rather than `state=all`, which makes that decision
|
|
454
|
+
* concrete rather than implicit: a human closing the issue by hand, once the
|
|
455
|
+
* drift it named is actually fixed, is what tells the *next* run to open a
|
|
456
|
+
* fresh issue for a fresh finding instead of silently rewriting the closed
|
|
457
|
+
* one back open-in-substance-but-not-in-state. The alternative — searching
|
|
458
|
+
* `state=all` and reopening on write — would need this activity to guess
|
|
459
|
+
* when a finding is "resolved" with no reliable signal for that (an empty
|
|
460
|
+
* change set this run says nothing about whether the *last* finding was
|
|
461
|
+
* fixed or just not evaluated), and would turn a deliberate human "done" into
|
|
462
|
+
* something the bot silently reverses on its next run.
|
|
463
|
+
*
|
|
464
|
+
* `.pull_request == null` is filtered out of the search because GitHub's
|
|
465
|
+
* issues-list endpoint also returns pull requests, which this function must
|
|
466
|
+
* never mistake for an issue it owns.
|
|
467
|
+
*/
|
|
468
|
+
export declare function postOrUpdateGithubIssue(repo: string, marker: string, title: string, body: string, exec: GhExec): Promise<string>;
|
|
131
469
|
/**
|
|
132
470
|
* The merge request a `comment`-mode run posts its note onto (#2256), as a
|
|
133
471
|
* GitLab CI job knows it. The GitLab counterpart of {@link
|
|
@@ -161,6 +499,34 @@ export interface MergeRequestContext {
|
|
|
161
499
|
* Returns undefined rather than throwing, so the caller owns the message.
|
|
162
500
|
*/
|
|
163
501
|
export declare function mergeRequestContextFrom(env: Record<string, string | undefined>): MergeRequestContext | undefined;
|
|
502
|
+
/**
|
|
503
|
+
* The GitLab project an `issue`-mode run opens or updates its issue on (#2292),
|
|
504
|
+
* as any GitLab CI job knows it — the counterpart of {@link
|
|
505
|
+
* mergeRequestContextFrom} for a mode that needs no merge request.
|
|
506
|
+
*/
|
|
507
|
+
export interface GitlabProjectContext {
|
|
508
|
+
/** REST v4 base, from `CI_API_V4_URL` or derived from `CI_SERVER_URL`. */
|
|
509
|
+
api: string;
|
|
510
|
+
/** The project holding the issue — its numeric id, or a `group/project` path. */
|
|
511
|
+
project: string;
|
|
512
|
+
/** `group/project`, for a human-readable result. */
|
|
513
|
+
path?: string;
|
|
514
|
+
/** The project's web URL, used to build the issue's own URL. */
|
|
515
|
+
webUrl?: string;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Derive the GitLab project an `issue`-mode run is in, from the job's own CI
|
|
519
|
+
* variables. Pure — exported for testing, and the whole forge detection:
|
|
520
|
+
* `CI_PROJECT_ID` is set on every GitLab CI job, merge request or not, and
|
|
521
|
+
* nothing outside GitLab CI sets it — a GitHub Actions run never reaches this
|
|
522
|
+
* branch. Unlike {@link mergeRequestContextFrom}, no `CI_MERGE_REQUEST_IID`
|
|
523
|
+
* is required, since `issue` mode's whole point is a cron trigger that has
|
|
524
|
+
* none.
|
|
525
|
+
*
|
|
526
|
+
* Returns undefined rather than throwing, so the caller owns the fallback:
|
|
527
|
+
* a run with no GitLab signal falls through to `gh issue create`.
|
|
528
|
+
*/
|
|
529
|
+
export declare function gitlabProjectContextFrom(env: Record<string, string | undefined>): GitlabProjectContext | undefined;
|
|
164
530
|
/** The credential a merge-request note is written with, and the header GitLab reads it from. */
|
|
165
531
|
export interface GitlabNoteToken {
|
|
166
532
|
/** `PRIVATE-TOKEN` for a personal/project/group access token, `JOB-TOKEN` for `CI_JOB_TOKEN`. */
|
|
@@ -188,6 +554,8 @@ export interface GitlabNoteToken {
|
|
|
188
554
|
export declare function gitlabNoteTokenFrom(env: Record<string, string | undefined>): GitlabNoteToken | undefined;
|
|
189
555
|
/** What a `comment`-mode step says on a merge request it has no credential for. */
|
|
190
556
|
export declare function noGitlabNoteTokenMessage(iid: number): string;
|
|
557
|
+
/** What an `issue`-mode step says on a GitLab project it has no credential for (#2292). */
|
|
558
|
+
export declare function noGitlabIssueTokenMessage(project: string): string;
|
|
191
559
|
/**
|
|
192
560
|
* Map a `chant lifecycle plan --json` ChangeSet to reconcile entries, dropping
|
|
193
561
|
* `noop` entries (nothing to reconcile). Pure — exported for testing.
|
|
@@ -197,16 +565,28 @@ export declare function entriesFromPlan(planJson: string): ReconcileEntry[];
|
|
|
197
565
|
* Reconcile activity: turn regenerated TypeScript into a reviewable artifact.
|
|
198
566
|
*
|
|
199
567
|
* - `report` — return the summary only; no git, no network.
|
|
200
|
-
* - `issue` — open
|
|
568
|
+
* - `issue` — open or edit one issue describing the drift (no code change).
|
|
569
|
+
* On a GitHub Actions or Forgejo Actions job, or GitHub Enterprise Server,
|
|
570
|
+
* the OPEN issue already carrying this Op's hidden marker is edited in
|
|
571
|
+
* place and a new one opened only when there is none (#2297). On a GitLab
|
|
572
|
+
* CI job (any trigger — the point of this mode is a cron run that has no
|
|
573
|
+
* merge request), the same recipe against one GitLab issue (#2292). Neither
|
|
574
|
+
* branch ever closes the issue itself — see {@link postOrUpdateGithubIssue}
|
|
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.
|
|
201
580
|
* - `comment` — post the body as one comment on the pull request that
|
|
202
581
|
* triggered the run, editing that same comment on every re-run rather than
|
|
203
|
-
* stacking a new one (#2231)
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
*
|
|
582
|
+
* stacking a new one (#2231) — on GitHub and on Forgejo alike (#2291), the
|
|
583
|
+
* same GitHub-shaped `issues/{n}/comments` calls against each host's own
|
|
584
|
+
* API base — or, on a GitLab `merge_request_event` pipeline, as one note on
|
|
585
|
+
* that merge request by the same recipe (#2256). Needs a pull-request- or
|
|
586
|
+
* merge-request-triggered run; fails by name when there is none. No code
|
|
587
|
+
* change, and the `pull-requests: write` the generated workflow already
|
|
588
|
+
* grants on that trigger is the whole scope it spends on GitHub and
|
|
589
|
+
* Forgejo; on GitLab the scope is whatever the token it is given carries.
|
|
210
590
|
* - `pull-request` — create a branch, regenerate source via
|
|
211
591
|
* `chant import --from <env>`, commit, push, and open a PR whose diff is the
|
|
212
592
|
* regenerated TypeScript. Never commits to the main branch.
|
|
@@ -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,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B,8CA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,CA2BjC;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,0EAA0E;IAC1E,GAAG,EAAE,MAAM,CAAC;IACZ,iFAAiF;IACjF,OAAO,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GACtC,oBAAoB,GAAG,SAAS,CAgBlC;AAED,gGAAgG;AAChG,MAAM,WAAW,eAAe;IAC9B,iGAAiG;IACjG,MAAM,EAAE,eAAe,GAAG,WAAW,CAAC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GACtC,eAAe,GAAG,SAAS,CAQ7B;AAED,mFAAmF;AACnF,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO5D;AAED,2FAA2F;AAC3F,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAOjE;AAoMD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,EAAE,CAOlE;AA8CD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,eAAe,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC,CA6HvG"}
|
package/dist/op/builders.d.ts
CHANGED
|
@@ -63,10 +63,16 @@ export declare function activity(fn: string, args?: 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,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,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Y,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,kDAAkD;IAClD,MAAM,CAAC,EAAE,WAAW,C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AO,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"}
|