@intentius/chant 0.64.0 → 0.66.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.
Files changed (66) hide show
  1. package/dist/behaviour-delta.d.ts +181 -0
  2. package/dist/behaviour-delta.d.ts.map +1 -0
  3. package/dist/behaviour-http.d.ts +106 -0
  4. package/dist/behaviour-http.d.ts.map +1 -0
  5. package/dist/behaviour-overlay.d.ts +61 -0
  6. package/dist/behaviour-overlay.d.ts.map +1 -0
  7. package/dist/behaviour.d.ts +1174 -0
  8. package/dist/behaviour.d.ts.map +1 -0
  9. package/dist/cli/handlers/scenario.d.ts.map +1 -1
  10. package/dist/identity.d.ts +28 -0
  11. package/dist/identity.d.ts.map +1 -1
  12. package/dist/index.d.ts +3 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/lexicon.d.ts +45 -0
  15. package/dist/lexicon.d.ts.map +1 -1
  16. package/dist/lifecycle/scenario-eval.d.ts +23 -5
  17. package/dist/lifecycle/scenario-eval.d.ts.map +1 -1
  18. package/dist/lifecycle/scenario.d.ts +45 -3
  19. package/dist/lifecycle/scenario.d.ts.map +1 -1
  20. package/dist/lifecycle/types.d.ts +17 -0
  21. package/dist/lifecycle/types.d.ts.map +1 -1
  22. package/dist/op/activities/activity-contracts.d.ts +42 -0
  23. package/dist/op/activities/activity-contracts.d.ts.map +1 -1
  24. package/dist/op/activities/index.d.ts +2 -0
  25. package/dist/op/activities/index.d.ts.map +1 -1
  26. package/dist/op/activities/predict-behaviour.d.ts +207 -0
  27. package/dist/op/activities/predict-behaviour.d.ts.map +1 -0
  28. package/dist/op/activities/reconcile.d.ts +86 -16
  29. package/dist/op/activities/reconcile.d.ts.map +1 -1
  30. package/dist/op/composites/behaviour-op.d.ts +57 -0
  31. package/dist/op/composites/behaviour-op.d.ts.map +1 -0
  32. package/dist/op/composites/index.d.ts +2 -0
  33. package/dist/op/composites/index.d.ts.map +1 -1
  34. package/dist/op/index.d.ts +2 -2
  35. package/dist/op/index.d.ts.map +1 -1
  36. package/package.json +1 -1
  37. package/src/behaviour-delta.test.ts +331 -0
  38. package/src/behaviour-delta.ts +564 -0
  39. package/src/behaviour-http.test.ts +456 -0
  40. package/src/behaviour-http.ts +252 -0
  41. package/src/behaviour-overlay.test.ts +149 -0
  42. package/src/behaviour-overlay.ts +76 -0
  43. package/src/behaviour.test.ts +2011 -0
  44. package/src/behaviour.ts +2127 -0
  45. package/src/cli/handlers/scenario.test.ts +108 -0
  46. package/src/cli/handlers/scenario.ts +63 -16
  47. package/src/fold/subset-doc-parity.test.ts +60 -0
  48. package/src/identity.ts +31 -2
  49. package/src/index.ts +3 -0
  50. package/src/lexicon.ts +46 -0
  51. package/src/lifecycle/scenario-cost.test.ts +183 -0
  52. package/src/lifecycle/scenario-eval.ts +133 -6
  53. package/src/lifecycle/scenario.ts +72 -4
  54. package/src/lifecycle/types.ts +17 -0
  55. package/src/lint/rules/op/ops012-activity-contract.test.ts +31 -0
  56. package/src/op/activities/activity-contracts.ts +49 -0
  57. package/src/op/activities/index.ts +24 -0
  58. package/src/op/activities/predict-behaviour.test.ts +255 -0
  59. package/src/op/activities/predict-behaviour.ts +468 -0
  60. package/src/op/activities/reconcile.test.ts +84 -0
  61. package/src/op/activities/reconcile.ts +97 -24
  62. package/src/op/activity-contract-registry.test.ts +3 -0
  63. package/src/op/composites/behaviour-op.test.ts +56 -0
  64. package/src/op/composites/behaviour-op.ts +99 -0
  65. package/src/op/composites/index.ts +2 -0
  66. package/src/op/index.ts +2 -0
@@ -0,0 +1,207 @@
1
+ /**
2
+ * The `predictBehaviour` activity and the pull-request finding built on it
3
+ * (#2358, epic #2355).
4
+ *
5
+ * Two activities, because they answer two questions:
6
+ *
7
+ * - {@link predictBehaviour} asks the project's predicting lexicon what the
8
+ * declared estate would do at a stated traffic level, and returns the
9
+ * {@link BehaviourResult} as the contract defines it — a report, or a named
10
+ * refusal. It builds the project in-process, assembles the request from the
11
+ * build the way `lifecycle plan` assembles a deep read's, and hands it to
12
+ * the one configured lexicon that implements the fourth observation method.
13
+ * `isBehaviourRefusalReport` is the branch every consumer of its result
14
+ * takes first.
15
+ * - {@link behaviourFinding} runs that prediction twice — once on the
16
+ * checkout the run is in (the pull request's head) and once on the base
17
+ * branch it targets — differences the two under the rules in
18
+ * `../../behaviour-delta.ts`, and posts the finding in `comment` mode
19
+ * through {@link reconcilePr}. Same sticky comment on GitHub and Forgejo,
20
+ * same merge-request note on GitLab, same marker recipe: nothing here
21
+ * posts anything itself.
22
+ *
23
+ * ## The base side is a checkout, not a snapshot
24
+ *
25
+ * The finding is declared-versus-declared: the graph the pull request
26
+ * proposes against the graph its base branch already holds. Both sides are
27
+ * built from source, so the base branch is checked out into a detached git
28
+ * worktree under the repository's own root (module resolution walks up from
29
+ * there to the same `node_modules` the head build uses) and removed again
30
+ * whether the prediction succeeded or not. A shallow CI clone does not carry
31
+ * the base branch, so it is fetched at depth one first — the same reason
32
+ * `converge.ts` fetches `chant/lifecycle` before reading it.
33
+ *
34
+ * The base branch name comes off the run's own event, the way the pull
35
+ * request itself does in `reconcile.ts`: `GITHUB_BASE_REF` on a GitHub
36
+ * Actions or Forgejo Actions `pull_request` job, `CI_MERGE_REQUEST_TARGET_BRANCH_NAME`
37
+ * on a GitLab `merge_request_event` pipeline. A run with neither and no
38
+ * explicit `base` fails by name rather than guessing `main`.
39
+ *
40
+ * ## What the marker names
41
+ *
42
+ * The comment's hidden marker names the Op and the env together
43
+ * ({@link behaviourFindingMarker}), for #2319's reason: a `comment`-mode
44
+ * `reconcilePr` step on the same pull request keys its marker on the env
45
+ * alone, and a behaviour finding over `prod` sharing a marker with a plan
46
+ * finding over `prod` would edit the wrong comment on every push.
47
+ *
48
+ * ## Edge coverage on the declared path
49
+ *
50
+ * `buildGraphIr` produces reference edges and is exhaustive for them. It
51
+ * produces no containment — a subnet's membership of a VPC is not a reference
52
+ * — and #2360's third comment records that nothing on the declared path does
53
+ * yet. So the request never claims `complete`: that would be a true claim
54
+ * about references and a false one about the graph. It cannot honestly claim
55
+ * `partial` either, because `partial` has to name a gap as `dangling` or
56
+ * `unresolvedKinds`, and the gap here is neither — every reference resolved,
57
+ * and the generic builder has no vocabulary for "this kind is a boundary
58
+ * whose containment is missing" (augur's own fixture names its boundary
59
+ * kinds by hand, which is lexicon knowledge core does not have). An earlier
60
+ * draft named every kind no reference touched, and named a queue nobody
61
+ * references as "unresolved", which it is not. So the claim is `unknown`,
62
+ * which the contract tells a consumer to treat exactly as it treats
63
+ * `partial`, and the finding shows each side's coverage and does not compare
64
+ * resilience verdicts across it — see `renderBehaviourFinding`.
65
+ */
66
+ import { type BehaviourEdgeCoverage, type BehaviourResult } from "../../behaviour.js";
67
+ import { type BehaviourDelta } from "../../behaviour-delta.js";
68
+ import { reconcilePr } from "./reconcile.js";
69
+ export interface PredictBehaviourArgs {
70
+ /** The environment the prediction is for, mirroring the deep read's `environment`. */
71
+ environment: string;
72
+ /** The traffic level to predict at, verbatim: `100 rps, p50`. Never parsed here. */
73
+ traffic: string;
74
+ /** Deployed stack, for a multi-stack project. */
75
+ stack?: string;
76
+ /** Region the stack is deployed in. */
77
+ region?: string;
78
+ /** Restrict to chant-owned resources; a withheld entity is `filtered`, not absent. */
79
+ owned?: boolean;
80
+ }
81
+ /** What the activity says when no configured lexicon implements the fourth method. */
82
+ export declare function noPredictingLexiconMessage(lexicons: readonly string[]): string;
83
+ /** What the activity says when more than one configured lexicon predicts. */
84
+ export declare function ambiguousPredictorMessage(names: readonly string[]): string;
85
+ /**
86
+ * The declared path's honest coverage claim. See the module doc: reference
87
+ * edges are exhaustive and containment is absent, and the contract has a
88
+ * field for a missing reference and none for missing containment, so the
89
+ * claim is `unknown`. Never `complete`, and not `partial` naming a kind the
90
+ * generic builder has no basis to name. A function rather than a constant so
91
+ * the day the declared path produces containment edges (#2360), the claim
92
+ * changes here and nowhere else.
93
+ */
94
+ export declare function declaredEdgeCoverage(): BehaviourEdgeCoverage;
95
+ /**
96
+ * Predict the estate declared under `projectPath`. The in-process half of
97
+ * {@link predictBehaviour}, taking the project root explicitly so the
98
+ * finding can run it on the base checkout too.
99
+ *
100
+ * Imports are dynamic so this module carries no load-time edge into the CLI
101
+ * or the build: `cli/plugins` reaches back into the root index, and the
102
+ * activity registry imports this module statically.
103
+ */
104
+ export declare function predictDeclared(projectPath: string, args: PredictBehaviourArgs): Promise<BehaviourResult>;
105
+ /**
106
+ * Predict the declared estate in the working directory at `args.traffic`.
107
+ * Returns the contract's result as it is; a refusal is a result, not a
108
+ * thrown error, and `isBehaviourRefusalReport` is the branch to take first.
109
+ * Uses the `fastIdempotent` profile: the build is offline and the engine call
110
+ * is read-only.
111
+ */
112
+ export declare function predictBehaviour(args: PredictBehaviourArgs): Promise<BehaviourResult>;
113
+ /** How the finding leaves the run. Only the two modes a pull request can carry. */
114
+ export type BehaviourFindingMode = "comment" | "report";
115
+ export interface BehaviourFindingArgs extends PredictBehaviourArgs {
116
+ /**
117
+ * The name of the Op this step belongs to — it keys the sticky comment's
118
+ * marker together with `environment` ({@link behaviourFindingMarker}), so
119
+ * two Ops over one env own two comments. Required for the same reason
120
+ * `reconcilePr`'s `issue` mode requires it (#2319).
121
+ */
122
+ op: string;
123
+ /** `comment` posts on the triggering pull or merge request; `report` returns the body only. Default: `comment`. */
124
+ mode?: BehaviourFindingMode;
125
+ /**
126
+ * The base branch to predict the other side from. Read off the run's own
127
+ * event when omitted — `GITHUB_BASE_REF`, then `CI_MERGE_REQUEST_TARGET_BRANCH_NAME`
128
+ * — and refused by name when neither is set.
129
+ */
130
+ base?: string;
131
+ /** Comment title, unused on a sticky comment but carried for `reconcilePr`'s result. */
132
+ title?: string;
133
+ }
134
+ export interface BehaviourFindingResult {
135
+ mode: BehaviourFindingMode;
136
+ /** The base branch the other side was predicted from. */
137
+ base: string;
138
+ /** What the head side was called in the finding. */
139
+ head: string;
140
+ /** The structured delta, before rendering. */
141
+ finding: BehaviourDelta;
142
+ /** True when either side refused, so the finding says "no prediction". */
143
+ refused: boolean;
144
+ /** The rendered Markdown, whether or not it was posted. */
145
+ summary: string;
146
+ /** The posted or updated comment / note URL (comment mode). */
147
+ commentUrl?: string;
148
+ /** `owner/repo#number` (comment mode, GitHub and Forgejo). */
149
+ pullRequest?: string;
150
+ /** `group/project!iid` (comment mode, GitLab). */
151
+ mergeRequest?: string;
152
+ }
153
+ /**
154
+ * The hidden marker a behaviour finding is found by across re-runs. Keyed on
155
+ * the Op *and* the env, both slugified the same way `reconcilePr`'s markers
156
+ * are, and distinct from both of those by its prefix: a `comment`-mode
157
+ * `reconcilePr` step and this step on one pull request must never match each
158
+ * other's comment.
159
+ */
160
+ export declare function behaviourFindingMarker(op: string, env: string): string;
161
+ /** What the finding says when the run names no base branch to predict against. */
162
+ export declare function noBaseRefMessage(): string;
163
+ /** Where the base branch name comes from, most specific first. Pure — exported for testing. */
164
+ export declare function baseRefFrom(env: Record<string, string | undefined>, explicit?: string): string | undefined;
165
+ /** What the head side is called in the finding: the source branch when the run names one, else the short commit. */
166
+ export declare function headRefFrom(env: Record<string, string | undefined>, shortSha?: string): string;
167
+ /** A checked-out base branch: where its project root is, and how to remove it. */
168
+ export interface BaseCheckout {
169
+ /** The base branch's counterpart of the working directory. */
170
+ projectPath: string;
171
+ cleanup(): Promise<void>;
172
+ }
173
+ /**
174
+ * Check `base` out into a detached worktree beside the repository. Fetches it
175
+ * at depth one first, because a CI clone carries only the pull request's own
176
+ * ref; a branch already present locally (a full clone, a developer's own
177
+ * checkout) is used as it stands after the fetch fails.
178
+ */
179
+ export declare function checkoutBase(base: string, signal?: AbortSignal): Promise<BaseCheckout>;
180
+ /** What {@link createBehaviourFinding} takes instead of reaching for the process. */
181
+ export interface BehaviourFindingDeps {
182
+ /** Predict one project root. Default: {@link predictDeclared}. */
183
+ predict?: (projectPath: string, args: PredictBehaviourArgs) => Promise<BehaviourResult>;
184
+ /** Check the base branch out. Default: {@link checkoutBase}. */
185
+ checkout?: (base: string, signal?: AbortSignal) => Promise<BaseCheckout>;
186
+ /** Post the finding. Default: {@link reconcilePr}, whose `comment` mode does the forge split. */
187
+ post?: typeof reconcilePr;
188
+ /** The environment the base and head refs are read from. Default: the process's. */
189
+ env?: Record<string, string | undefined>;
190
+ /** The short commit the head side is named by when the run names no branch. Default: `git rev-parse --short HEAD`. */
191
+ shortSha?: () => Promise<string | undefined>;
192
+ }
193
+ /**
194
+ * Build the finding activity, with its four side effects injected so a test
195
+ * can drive the whole thing — predict twice, difference, render, post —
196
+ * against fixtures and a stubbed poster.
197
+ */
198
+ export declare function createBehaviourFinding(deps?: BehaviourFindingDeps): (args: BehaviourFindingArgs, signal?: AbortSignal) => Promise<BehaviourFindingResult>;
199
+ /**
200
+ * Predict the pull request's declared estate and its base branch's, and post
201
+ * the delta as one sticky comment on the pull request — or one note on the
202
+ * merge request — that triggered the run. Needs a pull-request-triggered
203
+ * run; fails by name without one, the same way `reconcilePr`'s `comment`
204
+ * mode does, because that is the function that posts.
205
+ */
206
+ export declare const behaviourFinding: (args: BehaviourFindingArgs, signal?: AbortSignal) => Promise<BehaviourFindingResult>;
207
+ //# sourceMappingURL=predict-behaviour.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predict-behaviour.d.ts","sourceRoot":"","sources":["../../../src/op/activities/predict-behaviour.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAMH,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EAErB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAc,WAAW,EAAwC,MAAM,aAAa,CAAC;AAY5F,MAAM,WAAW,oBAAoB;IACnC,sFAAsF;IACtF,WAAW,EAAE,MAAM,CAAC;IACpB,oFAAoF;IACpF,OAAO,EAAE,MAAM,CAAC;IAChB,iDAAiD;IACjD,KAAK,CAAC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,oFAAoF;IACpF,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,sHAAsH;IACtH,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC9C;AAWD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,GAAE,oBAAyB,GAC9B,CAAC,IAAI,EAAE,oBAAoB,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,sBAAsB,CAAC,CAiEvF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,SA1EnB,oBAAoB,WAAW,WAAW,KAAK,OAAO,CAAC,sBAAsB,CA0E/B,CAAC"}
@@ -59,18 +59,22 @@
59
59
  * half works — plain paginated listing (no `/search/issues`, confirmed
60
60
  * absent from Forgejo's own OpenAPI spec) and the `.pull_request == null`
61
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
62
+ * half did not, for a reason no mock could have caught: `gh`'s own
63
63
  * `GH_TOKEN`/`GITHUB_TOKEN` only authenticate a request to github.com or a
64
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.
65
+ * and both this function's POST/PATCH calls and `postOrUpdateComment`'s
66
+ * carried only `GH_TOKEN`. Every write either made on a real Forgejo
67
+ * instance failed with `{"message":"token is required"}` (HTTP 401), with
68
+ * `GH_DEBUG=api` showing no `Authorization` header at all — which is what
69
+ * shipped in 0.62.0 and 0.63.0, `comment` mode included.
70
+ *
71
+ * Both paths now forward that credential as `GH_ENTERPRISE_TOKEN` as well as
72
+ * `GH_TOKEN`, which is the variable `gh` reads for a host in neither of those
73
+ * two classes (chant #2333). Re-run against the same live instance from a
74
+ * shell with no stored `gh auth login`, the identical POST now sends
75
+ * `Authorization: token …` and returns HTTP 201. See {@link ghCredentialEnv}
76
+ * for the whole probe, for why `GH_HOST` turned out not to be needed
77
+ * alongside it, and for why github.com's own behavior is untouched.
74
78
  */
75
79
  export type ReconcileMode = "pull-request" | "issue" | "report" | "comment";
76
80
  /** A change-set entry that triggered reconciliation. */
@@ -233,6 +237,13 @@ export declare function commentMarker(env: string): string;
233
237
  * slug does not keep.
234
238
  */
235
239
  export declare function issueMarker(op: string, env: string): string;
240
+ /**
241
+ * The slugify every marker shares: everything outside `[A-Za-z0-9._-]`
242
+ * collapses to `-`. Exported for the behaviour finding's own marker
243
+ * (`./predict-behaviour.ts`), so a third marker cannot slugify differently
244
+ * from the two here.
245
+ */
246
+ export declare function markerSlug(s: string): string;
236
247
  /**
237
248
  * What any mode says about a supplied `marker` it cannot use safely (#2319
238
249
  * pre-merge review).
@@ -345,6 +356,66 @@ export interface CommentToken {
345
356
  * named failure before the shell-out, in place of `gh`'s own opaque 401.
346
357
  */
347
358
  export declare function commentTokenFrom(env: Record<string, string | undefined>): CommentToken | undefined;
359
+ /**
360
+ * The environment a `gh api` call carries {@link commentTokenFrom}'s resolved
361
+ * credential in (chant #2333).
362
+ *
363
+ * `GH_TOKEN` alone is not enough, and that is `gh`'s documented behavior
364
+ * rather than a bug in it. `gh` picks the token per *request host*:
365
+ * `GH_TOKEN`/`GITHUB_TOKEN` are scoped to github.com and `ghe.com`
366
+ * subdomains, and every other host — a self-hosted Forgejo, a self-hosted
367
+ * GitHub Enterprise Server — reads `GH_ENTERPRISE_TOKEN`/
368
+ * `GITHUB_ENTERPRISE_TOKEN` instead (`gh help environment`). #2291 fixed the
369
+ * *URL* half of reaching a non-github.com host and left this half untouched,
370
+ * so 0.62.0 and 0.63.0 both shipped a `comment` mode that posts to Forgejo
371
+ * with no `Authorization` header at all.
372
+ *
373
+ * Confirmed against a real Forgejo 12.0.4+gitea-1.22.0 instance under #2333,
374
+ * from a shell whose `GH_CONFIG_DIR` held no `gh auth login` — the condition
375
+ * a fresh Actions checkout starts from, and the one #2304's verification did
376
+ * not reproduce. Driving this function's own POST with `GH_DEBUG=api`:
377
+ * `GH_TOKEN` alone sent no `Authorization` header and got HTTP 401
378
+ * `{"message":"token is required"}`, `GH_TOKEN` with `GITHUB_TOKEN` beside it
379
+ * got the same 401, and `GH_TOKEN` with `GH_HOST` beside it got the same 401
380
+ * again. `GH_ENTERPRISE_TOKEN` sent `Authorization: token …` and got HTTP 201.
381
+ *
382
+ * So the fix is one variable, set to the same value: whichever class `gh`
383
+ * decides the host falls into, the credential it finds there is the one
384
+ * {@link commentTokenFrom} resolved. That is why this does not branch on the
385
+ * forge, and why it needs no host detection of chant's own — the thing that
386
+ * broke was `gh`'s host classification, and setting both classes to one value
387
+ * is what stops chant depending on it.
388
+ *
389
+ * ## Why `GH_HOST` is deliberately not set
390
+ *
391
+ * #2333 proposed `GH_ENTERPRISE_TOKEN` *plus* a `GH_HOST` derived from
392
+ * `GITHUB_API_URL`, on the reading that the pair was needed. It is not: the
393
+ * live instance took `GH_ENTERPRISE_TOKEN` on its own, with no `GH_HOST`
394
+ * anywhere in the environment, because {@link githubApiBaseFrom} already
395
+ * hands `gh api` a full URL and `gh` reads the host off that URL rather than
396
+ * off its default. `GH_HOST` sets the *default* host for calls that name no
397
+ * host — which is what `gh issue create`'s ambient fallback below relies on —
398
+ * so setting it would buy nothing here and put a variable into the
399
+ * environment of calls that do not want one.
400
+ *
401
+ * ## Why github.com is unchanged
402
+ *
403
+ * Both variables carry the same value, so the question is only which one
404
+ * `gh` reads, and github.com reads `GH_TOKEN`. Probed against the real
405
+ * api.github.com the same way: a valid `GH_TOKEN` with a deliberately
406
+ * garbage `GH_ENTERPRISE_TOKEN` beside it succeeded, and a garbage `GH_TOKEN`
407
+ * with a valid `GH_ENTERPRISE_TOKEN` beside it failed `Bad credentials`.
408
+ * `GH_TOKEN` wins on github.com whatever the enterprise variable holds, so
409
+ * the header a github.com call sends is byte-identical to the one it sent
410
+ * before this change.
411
+ *
412
+ * A *self-hosted* GHES host is in the same class as Forgejo and was equally
413
+ * broken — same `gh` code path, same missing header — so it is fixed by the
414
+ * same variable rather than merely preserved. That was inferred from `gh`'s
415
+ * documented scoping in #2332 and is not exercised here: no GHES instance was
416
+ * available to test against.
417
+ */
418
+ export declare function ghCredentialEnv(base: NodeJS.ProcessEnv, token: CommentToken): NodeJS.ProcessEnv;
348
419
  /** What a `comment`-mode step says on a pull request it has no credential for. */
349
420
  export declare function noCommentTokenMessage(repo: string, number: number): string;
350
421
  /** What an `issue`-mode step says on a repository it has no credential for (#2320). */
@@ -386,8 +457,8 @@ export type GhExec = (cmd: string, opts?: {
386
457
  * Server the same way it reaches github.com.
387
458
  *
388
459
  * 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, {
460
+ * through {@link commentTokenFrom} and out through {@link ghCredentialEnv} on
461
+ * every call. It did not used to be: `reconcilePr` handed this `(cmd) => execAsync(cmd, {
391
462
  * signal })` with no `env` at all, so `CHANT_FORGEJO_TOKEN` never reached
392
463
  * `gh` and the one case that variable exists for — posting to a Forgejo
393
464
  * instance other than the one the job runs on, where `github.token`'s scope
@@ -431,10 +502,9 @@ export type GhExec = (cmd: string, opts?: {
431
502
  * open` on a real Forgejo 12.0.4+gitea-1.22.0 instance interleaves pull
432
503
  * requests with issues exactly as GitHub's endpoint does, and the
433
504
  * `.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.
505
+ * calls this function makes did not clear the same instance until chant
506
+ * #2333 gave them a credential `gh` would apply to that host — see the
507
+ * module doc's `issue` bullet and {@link ghCredentialEnv}.
438
508
  *
439
509
  * So this reuses the recipe `postOrUpdateComment` already proved for PR
440
510
  * comments: list, `--paginate`, filter with `--jq` by an exact `startswith`
@@ -1 +1 @@
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,8CAA8C;IAC9C,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;;;;;OAiBG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;;;;;;;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;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"}
@@ -0,0 +1,57 @@
1
+ /**
2
+ * BehaviourOp composite — the predicted delta of a pull request as a review
3
+ * finding (#2358, epic #2355).
4
+ *
5
+ * One phase, one step: `behaviourFinding` predicts the declared estate on the
6
+ * pull request's head and on its base branch, differences the two under the
7
+ * contract's rules, and posts the finding in `comment` mode on the pull
8
+ * request (GitHub, Forgejo) or as a note on the merge request (GitLab) that
9
+ * triggered the run. There is no `schedule` here and there never will be: the
10
+ * cadence is the pull request, and the trigger lives on the `ScheduledOpSpec`
11
+ * handed to `generateOpsPipeline` (`{ kind: "pull_request" }`), the way
12
+ * `TerraformWatchOp`'s does.
13
+ *
14
+ * `findingMode: "report"` returns the body without posting, for a `chant run`
15
+ * on a developer's machine with `base` named by hand.
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * export const { op } = BehaviourOp({
20
+ * name: "pr-behaviour",
21
+ * env: "prod",
22
+ * traffic: "1000 rps, p99",
23
+ * });
24
+ * ```
25
+ */
26
+ import type { OpResource } from "../resource.js";
27
+ import type { BehaviourFindingMode } from "../activities/predict-behaviour.js";
28
+ export interface BehaviourOpConfig {
29
+ /** Op name (kebab-case). Names the Op's output directory, is what `chant run` takes, and keys the comment's marker. */
30
+ name: string;
31
+ /** Environment the prediction is for. */
32
+ env: string;
33
+ /** The traffic level to predict at, verbatim: `1000 rps, p99`. */
34
+ traffic: string;
35
+ /**
36
+ * What to do with the finding. `comment` posts it on the triggering pull or
37
+ * merge request; `report` returns the body only.
38
+ * @default "comment"
39
+ */
40
+ findingMode?: BehaviourFindingMode;
41
+ /** The base branch, when the run cannot read it off its own event (a local `chant run`). */
42
+ base?: string;
43
+ /** Deployed stack, for a multi-stack project. */
44
+ stack?: string;
45
+ /** Region the stack is deployed in. */
46
+ region?: string;
47
+ /** Restrict to chant-owned resources. */
48
+ scope?: {
49
+ owned?: boolean;
50
+ };
51
+ }
52
+ export interface BehaviourOpResources {
53
+ /** Op resource — the predict-both-sides-and-post Op. */
54
+ op: InstanceType<typeof OpResource>;
55
+ }
56
+ export declare function BehaviourOp(config: BehaviourOpConfig): BehaviourOpResources;
57
+ //# sourceMappingURL=behaviour-op.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"behaviour-op.d.ts","sourceRoot":"","sources":["../../../src/op/composites/behaviour-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAwB,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAElG,MAAM,WAAW,iBAAiB;IAChC,uHAAuH;IACvH,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC,4FAA4F;IAC5F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,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,CAwC3E"}
@@ -23,4 +23,6 @@ export { PipelineAuditOp } from "./pipeline-audit-op.js";
23
23
  export type { PipelineAuditOpConfig, PipelineAuditOpResources } from "./pipeline-audit-op.js";
24
24
  export { LexiconUpgradeOp, IN_SCOPE_LEXICONS } from "./lexicon-upgrade-op.js";
25
25
  export type { LexiconUpgradeOpConfig, LexiconUpgradeOpResources } from "./lexicon-upgrade-op.js";
26
+ export { BehaviourOp } from "./behaviour-op.js";
27
+ export type { BehaviourOpConfig, BehaviourOpResources } from "./behaviour-op.js";
26
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/op/composites/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC3E,YAAY,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/op/composites/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC3E,YAAY,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -8,8 +8,8 @@ export type { FreshnessResult } from "./emulator-freshness.js";
8
8
  export type { OpConfig, OpSchedule, PhaseDefinition, StepDefinition, ActivityStep, GateStep, EffectStep, OutcomeAttribute } from "./types.js";
9
9
  export { outcomeAttributesOf } from "./types.js";
10
10
  export { isValidCronExpression, cronSyntaxMessage, cronMatches, cronDueBetween } from "./cron.js";
11
- export { WatchOp, ReconcileOp, ApplyOp, ConvergeOp, WorkflowAuditOp, PipelineAuditOp, LexiconUpgradeOp, IN_SCOPE_LEXICONS, } from "./composites/index.js";
12
- export type { WatchOpConfig, WatchOpResources, ReconcileOpConfig, ReconcileOpResources, ApplyOpConfig, ApplyOpResources, ConvergeOpConfig, ConvergeOpResources, ConvergeDial, WorkflowAuditOpConfig, WorkflowAuditOpResources, PipelineAuditOpConfig, PipelineAuditOpResources, LexiconUpgradeOpConfig, LexiconUpgradeOpResources, } from "./composites/index.js";
11
+ export { WatchOp, ReconcileOp, ApplyOp, ConvergeOp, WorkflowAuditOp, PipelineAuditOp, LexiconUpgradeOp, IN_SCOPE_LEXICONS, BehaviourOp, } from "./composites/index.js";
12
+ export type { WatchOpConfig, WatchOpResources, ReconcileOpConfig, ReconcileOpResources, ApplyOpConfig, ApplyOpResources, ConvergeOpConfig, ConvergeOpResources, ConvergeDial, WorkflowAuditOpConfig, WorkflowAuditOpResources, PipelineAuditOpConfig, PipelineAuditOpResources, LexiconUpgradeOpConfig, LexiconUpgradeOpResources, BehaviourOpConfig, BehaviourOpResources, } from "./composites/index.js";
13
13
  export { receiptActivities, receiptCheckInput } from "./receipt-store.js";
14
14
  export type { ReceiptStore, EffectReceiptRef, ReceiptCheckInput, ReceiptActivities, ReceiptActivityOptions, ReceiptReadArgs, ReceiptReadResult, ReceiptWriteArgs, ReceiptStalenessArgs, ReceiptStalenessResult, ReceiptStaleFinding, } from "./receipt-store.js";
15
15
  export { discoverOps } from "./discover.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/op/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAA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AAM,EACX,IAAI,EAAE,gBAAgB,EACtB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,iBAAiB,EAAE,iBAAiB,EACpC,wBAAwB,EAAE,wBAAwB,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EACpG,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,GAClD,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,mBAAmB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,eAAe,EAC1E,gBAAgB,EAAE,4BAA4B,GAC/C,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,iBAAiB,EAAE,oBAAoB,EAAE,mBAAmB,EAC5D,gBAAgB,EAAE,mBAAmB,GACtC,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAClF,YAAY,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/D,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant",
3
- "version": "0.64.0",
3
+ "version": "0.66.0",
4
4
  "description": "Declarative infrastructure-as-code toolkit — TypeScript on Node.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",