@afaik-lab/weigh 0.0.0-stage → 0.6.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/.env.example +49 -0
- package/LICENSE +373 -0
- package/README.md +102 -2
- package/dist/agent.d.ts +83 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +204 -0
- package/dist/agent.js.map +1 -0
- package/dist/ceilings.d.ts +32 -0
- package/dist/ceilings.d.ts.map +1 -0
- package/dist/ceilings.js +61 -0
- package/dist/ceilings.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +530 -0
- package/dist/cli.js.map +1 -0
- package/dist/config-cli.d.ts +15 -0
- package/dist/config-cli.d.ts.map +1 -0
- package/dist/config-cli.js +132 -0
- package/dist/config-cli.js.map +1 -0
- package/dist/config.d.ts +198 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +373 -0
- package/dist/config.js.map +1 -0
- package/dist/context-cli.d.ts +35 -0
- package/dist/context-cli.d.ts.map +1 -0
- package/dist/context-cli.js +251 -0
- package/dist/context-cli.js.map +1 -0
- package/dist/context.d.ts +118 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +159 -0
- package/dist/context.js.map +1 -0
- package/dist/corrections/correction-set.d.ts +67 -0
- package/dist/corrections/correction-set.d.ts.map +1 -0
- package/dist/corrections/correction-set.js +104 -0
- package/dist/corrections/correction-set.js.map +1 -0
- package/dist/corrections/correction.d.ts +74 -0
- package/dist/corrections/correction.d.ts.map +1 -0
- package/dist/corrections/correction.js +154 -0
- package/dist/corrections/correction.js.map +1 -0
- package/dist/corrections/follow-up.d.ts +69 -0
- package/dist/corrections/follow-up.d.ts.map +1 -0
- package/dist/corrections/follow-up.js +217 -0
- package/dist/corrections/follow-up.js.map +1 -0
- package/dist/corrections/index.d.ts +31 -0
- package/dist/corrections/index.d.ts.map +1 -0
- package/dist/corrections/index.js +31 -0
- package/dist/corrections/index.js.map +1 -0
- package/dist/corrections/ledger.d.ts +78 -0
- package/dist/corrections/ledger.d.ts.map +1 -0
- package/dist/corrections/ledger.js +117 -0
- package/dist/corrections/ledger.js.map +1 -0
- package/dist/corrections/promotion.d.ts +119 -0
- package/dist/corrections/promotion.d.ts.map +1 -0
- package/dist/corrections/promotion.js +221 -0
- package/dist/corrections/promotion.js.map +1 -0
- package/dist/corrections/schema.d.ts +125 -0
- package/dist/corrections/schema.d.ts.map +1 -0
- package/dist/corrections/schema.js +100 -0
- package/dist/corrections/schema.js.map +1 -0
- package/dist/corrections-cli.d.ts +28 -0
- package/dist/corrections-cli.d.ts.map +1 -0
- package/dist/corrections-cli.js +157 -0
- package/dist/corrections-cli.js.map +1 -0
- package/dist/diff.d.ts +105 -0
- package/dist/diff.d.ts.map +1 -0
- package/dist/diff.js +202 -0
- package/dist/diff.js.map +1 -0
- package/dist/doctor.d.ts +38 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +197 -0
- package/dist/doctor.js.map +1 -0
- package/dist/events.d.ts +21 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +5 -0
- package/dist/events.js.map +1 -0
- package/dist/findings.d.ts +510 -0
- package/dist/findings.d.ts.map +1 -0
- package/dist/findings.js +645 -0
- package/dist/findings.js.map +1 -0
- package/dist/follow-up-cli.d.ts +88 -0
- package/dist/follow-up-cli.d.ts.map +1 -0
- package/dist/follow-up-cli.js +208 -0
- package/dist/follow-up-cli.js.map +1 -0
- package/dist/harness.d.ts +64 -0
- package/dist/harness.d.ts.map +1 -0
- package/dist/harness.js +71 -0
- package/dist/harness.js.map +1 -0
- package/dist/help/command-help.d.ts +9 -0
- package/dist/help/command-help.d.ts.map +1 -0
- package/dist/help/command-help.js +21 -0
- package/dist/help/command-help.js.map +1 -0
- package/dist/help/commands/answer.d.ts +3 -0
- package/dist/help/commands/answer.d.ts.map +1 -0
- package/dist/help/commands/answer.js +39 -0
- package/dist/help/commands/answer.js.map +1 -0
- package/dist/help/commands/config.d.ts +3 -0
- package/dist/help/commands/config.d.ts.map +1 -0
- package/dist/help/commands/config.js +25 -0
- package/dist/help/commands/config.js.map +1 -0
- package/dist/help/commands/context.d.ts +3 -0
- package/dist/help/commands/context.d.ts.map +1 -0
- package/dist/help/commands/context.js +44 -0
- package/dist/help/commands/context.js.map +1 -0
- package/dist/help/commands/corrections.d.ts +3 -0
- package/dist/help/commands/corrections.d.ts.map +1 -0
- package/dist/help/commands/corrections.js +30 -0
- package/dist/help/commands/corrections.js.map +1 -0
- package/dist/help/commands/doctor.d.ts +3 -0
- package/dist/help/commands/doctor.d.ts.map +1 -0
- package/dist/help/commands/doctor.js +12 -0
- package/dist/help/commands/doctor.js.map +1 -0
- package/dist/help/commands/index.d.ts +4 -0
- package/dist/help/commands/index.d.ts.map +1 -0
- package/dist/help/commands/index.js +27 -0
- package/dist/help/commands/index.js.map +1 -0
- package/dist/help/commands/memory.d.ts +3 -0
- package/dist/help/commands/memory.d.ts.map +1 -0
- package/dist/help/commands/memory.js +33 -0
- package/dist/help/commands/memory.js.map +1 -0
- package/dist/help/commands/models.d.ts +3 -0
- package/dist/help/commands/models.d.ts.map +1 -0
- package/dist/help/commands/models.js +17 -0
- package/dist/help/commands/models.js.map +1 -0
- package/dist/help/commands/options.d.ts +4 -0
- package/dist/help/commands/options.d.ts.map +1 -0
- package/dist/help/commands/options.js +13 -0
- package/dist/help/commands/options.js.map +1 -0
- package/dist/help/commands/review.d.ts +3 -0
- package/dist/help/commands/review.d.ts.map +1 -0
- package/dist/help/commands/review.js +50 -0
- package/dist/help/commands/review.js.map +1 -0
- package/dist/help/commands/sessions.d.ts +3 -0
- package/dist/help/commands/sessions.d.ts.map +1 -0
- package/dist/help/commands/sessions.js +23 -0
- package/dist/help/commands/sessions.js.map +1 -0
- package/dist/help/commands/show.d.ts +3 -0
- package/dist/help/commands/show.d.ts.map +1 -0
- package/dist/help/commands/show.js +18 -0
- package/dist/help/commands/show.js.map +1 -0
- package/dist/help/help.d.ts +16 -0
- package/dist/help/help.d.ts.map +1 -0
- package/dist/help/help.js +68 -0
- package/dist/help/help.js.map +1 -0
- package/dist/help/index.d.ts +4 -0
- package/dist/help/index.d.ts.map +1 -0
- package/dist/help/index.js +7 -0
- package/dist/help/index.js.map +1 -0
- package/dist/index.d.ts +80 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/knowledge/block.d.ts +65 -0
- package/dist/knowledge/block.d.ts.map +1 -0
- package/dist/knowledge/block.js +89 -0
- package/dist/knowledge/block.js.map +1 -0
- package/dist/knowledge/claim.d.ts +143 -0
- package/dist/knowledge/claim.d.ts.map +1 -0
- package/dist/knowledge/claim.js +297 -0
- package/dist/knowledge/claim.js.map +1 -0
- package/dist/knowledge/index.d.ts +32 -0
- package/dist/knowledge/index.d.ts.map +1 -0
- package/dist/knowledge/index.js +29 -0
- package/dist/knowledge/index.js.map +1 -0
- package/dist/knowledge/novelty.d.ts +65 -0
- package/dist/knowledge/novelty.d.ts.map +1 -0
- package/dist/knowledge/novelty.js +94 -0
- package/dist/knowledge/novelty.js.map +1 -0
- package/dist/knowledge/recall.d.ts +134 -0
- package/dist/knowledge/recall.d.ts.map +1 -0
- package/dist/knowledge/recall.js +229 -0
- package/dist/knowledge/recall.js.map +1 -0
- package/dist/knowledge/recalled-claim.d.ts +35 -0
- package/dist/knowledge/recalled-claim.d.ts.map +1 -0
- package/dist/knowledge/recalled-claim.js +67 -0
- package/dist/knowledge/recalled-claim.js.map +1 -0
- package/dist/knowledge/recalled.d.ts +70 -0
- package/dist/knowledge/recalled.d.ts.map +1 -0
- package/dist/knowledge/recalled.js +149 -0
- package/dist/knowledge/recalled.js.map +1 -0
- package/dist/knowledge/schema.d.ts +83 -0
- package/dist/knowledge/schema.d.ts.map +1 -0
- package/dist/knowledge/schema.js +96 -0
- package/dist/knowledge/schema.js.map +1 -0
- package/dist/knowledge/staleness.d.ts +48 -0
- package/dist/knowledge/staleness.d.ts.map +1 -0
- package/dist/knowledge/staleness.js +85 -0
- package/dist/knowledge/staleness.js.map +1 -0
- package/dist/knowledge/store.d.ts +100 -0
- package/dist/knowledge/store.d.ts.map +1 -0
- package/dist/knowledge/store.js +184 -0
- package/dist/knowledge/store.js.map +1 -0
- package/dist/memory/compose-file.d.ts +14 -0
- package/dist/memory/compose-file.d.ts.map +1 -0
- package/dist/memory/compose-file.js +25 -0
- package/dist/memory/compose-file.js.map +1 -0
- package/dist/memory/index.d.ts +43 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +119 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/oss.d.ts +62 -0
- package/dist/memory/oss.d.ts.map +1 -0
- package/dist/memory/oss.js +230 -0
- package/dist/memory/oss.js.map +1 -0
- package/dist/memory/platform.d.ts +37 -0
- package/dist/memory/platform.d.ts.map +1 -0
- package/dist/memory/platform.js +131 -0
- package/dist/memory/platform.js.map +1 -0
- package/dist/memory/scope.d.ts +49 -0
- package/dist/memory/scope.d.ts.map +1 -0
- package/dist/memory/scope.js +70 -0
- package/dist/memory/scope.js.map +1 -0
- package/dist/memory/types.d.ts +113 -0
- package/dist/memory/types.d.ts.map +1 -0
- package/dist/memory/types.js +18 -0
- package/dist/memory/types.js.map +1 -0
- package/dist/memory-cli.d.ts +17 -0
- package/dist/memory-cli.d.ts.map +1 -0
- package/dist/memory-cli.js +107 -0
- package/dist/memory-cli.js.map +1 -0
- package/dist/models-cli.d.ts +12 -0
- package/dist/models-cli.d.ts.map +1 -0
- package/dist/models-cli.js +54 -0
- package/dist/models-cli.js.map +1 -0
- package/dist/models.d.ts +111 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +227 -0
- package/dist/models.js.map +1 -0
- package/dist/paths.d.ts +35 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +65 -0
- package/dist/paths.js.map +1 -0
- package/dist/profile.d.ts +28 -0
- package/dist/profile.d.ts.map +1 -0
- package/dist/profile.js +154 -0
- package/dist/profile.js.map +1 -0
- package/dist/progress.d.ts +70 -0
- package/dist/progress.d.ts.map +1 -0
- package/dist/progress.js +132 -0
- package/dist/progress.js.map +1 -0
- package/dist/quiet.d.ts +2 -0
- package/dist/quiet.d.ts.map +1 -0
- package/dist/quiet.js +21 -0
- package/dist/quiet.js.map +1 -0
- package/dist/reconcile/continuation.d.ts +132 -0
- package/dist/reconcile/continuation.d.ts.map +1 -0
- package/dist/reconcile/continuation.js +306 -0
- package/dist/reconcile/continuation.js.map +1 -0
- package/dist/reconcile/index.d.ts +26 -0
- package/dist/reconcile/index.d.ts.map +1 -0
- package/dist/reconcile/index.js +28 -0
- package/dist/reconcile/index.js.map +1 -0
- package/dist/reconcile/outcome-set.d.ts +53 -0
- package/dist/reconcile/outcome-set.d.ts.map +1 -0
- package/dist/reconcile/outcome-set.js +124 -0
- package/dist/reconcile/outcome-set.js.map +1 -0
- package/dist/reconcile/outcome.d.ts +56 -0
- package/dist/reconcile/outcome.d.ts.map +1 -0
- package/dist/reconcile/outcome.js +60 -0
- package/dist/reconcile/outcome.js.map +1 -0
- package/dist/reconcile/reconciliation.d.ts +49 -0
- package/dist/reconcile/reconciliation.d.ts.map +1 -0
- package/dist/reconcile/reconciliation.js +88 -0
- package/dist/reconcile/reconciliation.js.map +1 -0
- package/dist/reconcile/schema.d.ts +157 -0
- package/dist/reconcile/schema.d.ts.map +1 -0
- package/dist/reconcile/schema.js +97 -0
- package/dist/reconcile/schema.js.map +1 -0
- package/dist/record/index.d.ts +23 -0
- package/dist/record/index.d.ts.map +1 -0
- package/dist/record/index.js +25 -0
- package/dist/record/index.js.map +1 -0
- package/dist/record/review-record.d.ts +28 -0
- package/dist/record/review-record.d.ts.map +1 -0
- package/dist/record/review-record.js +78 -0
- package/dist/record/review-record.js.map +1 -0
- package/dist/record/schema.d.ts +153 -0
- package/dist/record/schema.d.ts.map +1 -0
- package/dist/record/schema.js +87 -0
- package/dist/record/schema.js.map +1 -0
- package/dist/record/store.d.ts +83 -0
- package/dist/record/store.d.ts.map +1 -0
- package/dist/record/store.js +162 -0
- package/dist/record/store.js.map +1 -0
- package/dist/record/stored-review.d.ts +36 -0
- package/dist/record/stored-review.d.ts.map +1 -0
- package/dist/record/stored-review.js +90 -0
- package/dist/record/stored-review.js.map +1 -0
- package/dist/refute.d.ts +318 -0
- package/dist/refute.d.ts.map +1 -0
- package/dist/refute.js +513 -0
- package/dist/refute.js.map +1 -0
- package/dist/render.d.ts +212 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +544 -0
- package/dist/render.js.map +1 -0
- package/dist/review-cli.d.ts +181 -0
- package/dist/review-cli.d.ts.map +1 -0
- package/dist/review-cli.js +598 -0
- package/dist/review-cli.js.map +1 -0
- package/dist/reviewer.d.ts +297 -0
- package/dist/reviewer.d.ts.map +1 -0
- package/dist/reviewer.js +580 -0
- package/dist/reviewer.js.map +1 -0
- package/dist/session-cli.d.ts +17 -0
- package/dist/session-cli.d.ts.map +1 -0
- package/dist/session-cli.js +62 -0
- package/dist/session-cli.js.map +1 -0
- package/dist/session.d.ts +36 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +105 -0
- package/dist/session.js.map +1 -0
- package/dist/settings.d.ts +68 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +175 -0
- package/dist/settings.js.map +1 -0
- package/dist/show-cli.d.ts +39 -0
- package/dist/show-cli.d.ts.map +1 -0
- package/dist/show-cli.js +56 -0
- package/dist/show-cli.js.map +1 -0
- package/dist/stdout.d.ts +28 -0
- package/dist/stdout.d.ts.map +1 -0
- package/dist/stdout.js +44 -0
- package/dist/stdout.js.map +1 -0
- package/dist/target.d.ts +58 -0
- package/dist/target.d.ts.map +1 -0
- package/dist/target.js +96 -0
- package/dist/target.js.map +1 -0
- package/dist/tools/index.d.ts +93 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +146 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/root.d.ts +62 -0
- package/dist/tools/root.d.ts.map +1 -0
- package/dist/tools/root.js +51 -0
- package/dist/tools/root.js.map +1 -0
- package/dist/usage.d.ts +75 -0
- package/dist/usage.d.ts.map +1 -0
- package/dist/usage.js +100 -0
- package/dist/usage.js.map +1 -0
- package/dist/version.d.ts +14 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +26 -0
- package/dist/version.js.map +1 -0
- package/dist/workspace.d.ts +48 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +126 -0
- package/dist/workspace.js.map +1 -0
- package/docker-compose.yml +61 -0
- package/package.json +70 -4
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* What a human can say about a finding, and what each answer is allowed to do.
|
|
4
|
+
*
|
|
5
|
+
* The taxonomy is the whole slice. Four of these are a "no" and they do not
|
|
6
|
+
* mean the same thing: two say the finding was never true, and two concede it
|
|
7
|
+
* is true and decline to act on it now. Collapsing them is the single most
|
|
8
|
+
* expensive mistake available here — a `wont-fix` accepted as grounds for
|
|
9
|
+
* refutation teaches the reviewer to stop mentioning known defects, which is
|
|
10
|
+
* the one failure in this design that nobody ever finds out about.
|
|
11
|
+
*
|
|
12
|
+
* Agreement is a label too. It changes no future review, and it is what the
|
|
13
|
+
* eval set is made of: a finding a human called right is a labelled example,
|
|
14
|
+
* and nothing else in this project produces one.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CORRECTION_LABELS: readonly ['incorrect', 'intentional', 'wont-fix', 'out-of-scope', 'confirmed'];
|
|
17
|
+
export type CorrectionLabel = (typeof CORRECTION_LABELS)[number];
|
|
18
|
+
/** What one label is, said once, where every consumer reads it. */
|
|
19
|
+
export interface LabelRule {
|
|
20
|
+
/** What the person is saying. Printed in refusals and in `weigh corrections`. */
|
|
21
|
+
means: string;
|
|
22
|
+
/**
|
|
23
|
+
* May a refuter kill a finding because this is on record?
|
|
24
|
+
*
|
|
25
|
+
* Two labels, and only two. The ruling has to be about the finding being
|
|
26
|
+
* untrue — a misreading, or code that is deliberate — because a kill leaves
|
|
27
|
+
* no trace in the next review.
|
|
28
|
+
*/
|
|
29
|
+
grounds: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Does the finding stop being reported?
|
|
32
|
+
*
|
|
33
|
+
* Reporting only, and belief not at all: Weigh goes on holding that the
|
|
34
|
+
* defect is real, which is what lets a `wont-fix` resurface when the
|
|
35
|
+
* severity rises. That resurfacing is the consumer's business, not this
|
|
36
|
+
* table's — what is recorded here is that the human declined, and when.
|
|
37
|
+
*/
|
|
38
|
+
silences: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* How far it carries.
|
|
41
|
+
*
|
|
42
|
+
* `repo` — the claim is about code, and the same misreading on another
|
|
43
|
+
* branch is still a misreading. `branch` — the claim is about this change,
|
|
44
|
+
* and carrying "not in this PR" to the next PR would silence a real finding
|
|
45
|
+
* nobody declined.
|
|
46
|
+
*/
|
|
47
|
+
reach: 'repo' | 'branch';
|
|
48
|
+
/**
|
|
49
|
+
* May it become a claim the reviewer is told up front?
|
|
50
|
+
*
|
|
51
|
+
* The two that dispute the finding, because what is promoted is the reason
|
|
52
|
+
* rather than the ruling. Both labels were made to supply one: an
|
|
53
|
+
* `intentional` states how the repository does things, and an `incorrect`
|
|
54
|
+
* had to point at the code that shows the misreading. "You misread line 8"
|
|
55
|
+
* generalises to nothing — but the sentence the person wrote under it is a
|
|
56
|
+
* fact about the code, and that is what `Promotion` writes.
|
|
57
|
+
*
|
|
58
|
+
* The three that concede the finding is real teach nothing, and that is not
|
|
59
|
+
* an omission. The defect is there; the review should go on finding it, and
|
|
60
|
+
* only the report stays quiet.
|
|
61
|
+
*
|
|
62
|
+
* Whether, not what. The claim's kind and how far it is globbed are the
|
|
63
|
+
* promoter's business — a convention is a rule of the house, a corrected
|
|
64
|
+
* misreading is a fact about particular files.
|
|
65
|
+
*/
|
|
66
|
+
teaches: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* What the person has to supply, beyond the label.
|
|
69
|
+
*
|
|
70
|
+
* Cite-or-die, and the burden follows the power. A correction that can kill
|
|
71
|
+
* a finding carries what the finding carried: a reason, and for a misreading
|
|
72
|
+
* the code that shows it — "you misread this" is answerable only by pointing
|
|
73
|
+
* at what it says. The three that concede the finding is real justify
|
|
74
|
+
* nothing, because they take nothing away from a later review.
|
|
75
|
+
*/
|
|
76
|
+
needs: 'a reason and a citation' | 'a reason' | 'nothing';
|
|
77
|
+
}
|
|
78
|
+
export declare const LABEL_RULES: Record<CorrectionLabel, LabelRule>;
|
|
79
|
+
/** The record's version, so a reader refuses what it cannot read. */
|
|
80
|
+
export declare const CORRECTION_VERSION = 1;
|
|
81
|
+
export declare const correctionSchema: z.ZodObject<{
|
|
82
|
+
version: z.ZodLiteral<1>;
|
|
83
|
+
at: z.ZodString;
|
|
84
|
+
by: z.ZodString;
|
|
85
|
+
label: z.ZodEnum<{
|
|
86
|
+
confirmed: "confirmed";
|
|
87
|
+
incorrect: "incorrect";
|
|
88
|
+
intentional: "intentional";
|
|
89
|
+
"out-of-scope": "out-of-scope";
|
|
90
|
+
"wont-fix": "wont-fix";
|
|
91
|
+
}>;
|
|
92
|
+
fingerprint: z.ZodString;
|
|
93
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
94
|
+
citations: z.ZodArray<z.ZodString>;
|
|
95
|
+
review: z.ZodString;
|
|
96
|
+
repo: z.ZodObject<{
|
|
97
|
+
target: z.ZodString;
|
|
98
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
finding: z.ZodObject<{
|
|
101
|
+
path: z.ZodString;
|
|
102
|
+
line: z.ZodNumber;
|
|
103
|
+
title: z.ZodString;
|
|
104
|
+
severity: z.ZodEnum<{
|
|
105
|
+
critical: "critical";
|
|
106
|
+
high: "high";
|
|
107
|
+
low: "low";
|
|
108
|
+
medium: "medium";
|
|
109
|
+
nit: "nit";
|
|
110
|
+
}>;
|
|
111
|
+
category: z.ZodEnum<{
|
|
112
|
+
"api-contract": "api-contract";
|
|
113
|
+
concurrency: "concurrency";
|
|
114
|
+
correctness: "correctness";
|
|
115
|
+
"error-handling": "error-handling";
|
|
116
|
+
maintainability: "maintainability";
|
|
117
|
+
performance: "performance";
|
|
118
|
+
security: "security";
|
|
119
|
+
style: "style";
|
|
120
|
+
testing: "testing";
|
|
121
|
+
}>;
|
|
122
|
+
}, z.core.$strip>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
export type CorrectionJson = z.infer<typeof correctionSchema>;
|
|
125
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/corrections/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,YAAI,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,CAAU,CAAC;AAChH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,mEAAmE;AACnE,MAAM,WAAW,SAAS;IACxB,iFAAiF;IACjF,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;;;OAOG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAC;IACzB;;;;;;;;;;;;;;;;;OAiBG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;;;;;;;OAQG;IACH,KAAK,EAAE,yBAAyB,GAAG,UAAU,GAAG,SAAS,CAAC;CAC3D;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,eAAe,EAAE,SAAS,CAyC1D,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAkBpC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmB3B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { CATEGORIES, SEVERITIES } from '../findings.js';
|
|
6
|
+
/**
|
|
7
|
+
* What a human can say about a finding, and what each answer is allowed to do.
|
|
8
|
+
*
|
|
9
|
+
* The taxonomy is the whole slice. Four of these are a "no" and they do not
|
|
10
|
+
* mean the same thing: two say the finding was never true, and two concede it
|
|
11
|
+
* is true and decline to act on it now. Collapsing them is the single most
|
|
12
|
+
* expensive mistake available here — a `wont-fix` accepted as grounds for
|
|
13
|
+
* refutation teaches the reviewer to stop mentioning known defects, which is
|
|
14
|
+
* the one failure in this design that nobody ever finds out about.
|
|
15
|
+
*
|
|
16
|
+
* Agreement is a label too. It changes no future review, and it is what the
|
|
17
|
+
* eval set is made of: a finding a human called right is a labelled example,
|
|
18
|
+
* and nothing else in this project produces one.
|
|
19
|
+
*/
|
|
20
|
+
export const CORRECTION_LABELS = ['incorrect', 'intentional', 'wont-fix', 'out-of-scope', 'confirmed'];
|
|
21
|
+
export const LABEL_RULES = {
|
|
22
|
+
incorrect: {
|
|
23
|
+
means: 'the review misread the code',
|
|
24
|
+
grounds: true,
|
|
25
|
+
silences: false,
|
|
26
|
+
reach: 'repo',
|
|
27
|
+
teaches: true,
|
|
28
|
+
needs: 'a reason and a citation',
|
|
29
|
+
},
|
|
30
|
+
intentional: {
|
|
31
|
+
means: 'the code is deliberate; this is how the repository does it',
|
|
32
|
+
grounds: true,
|
|
33
|
+
silences: false,
|
|
34
|
+
reach: 'repo',
|
|
35
|
+
teaches: true,
|
|
36
|
+
needs: 'a reason',
|
|
37
|
+
},
|
|
38
|
+
'wont-fix': {
|
|
39
|
+
means: 'a real defect, deprioritised',
|
|
40
|
+
grounds: false,
|
|
41
|
+
silences: true,
|
|
42
|
+
reach: 'branch',
|
|
43
|
+
teaches: false,
|
|
44
|
+
needs: 'nothing',
|
|
45
|
+
},
|
|
46
|
+
'out-of-scope': {
|
|
47
|
+
means: 'real, but not this change',
|
|
48
|
+
grounds: false,
|
|
49
|
+
silences: true,
|
|
50
|
+
reach: 'branch',
|
|
51
|
+
teaches: false,
|
|
52
|
+
needs: 'nothing',
|
|
53
|
+
},
|
|
54
|
+
confirmed: {
|
|
55
|
+
means: 'the finding is right',
|
|
56
|
+
grounds: false,
|
|
57
|
+
silences: false,
|
|
58
|
+
reach: 'branch',
|
|
59
|
+
teaches: false,
|
|
60
|
+
needs: 'nothing',
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
/** The record's version, so a reader refuses what it cannot read. */
|
|
64
|
+
export const CORRECTION_VERSION = 1;
|
|
65
|
+
/**
|
|
66
|
+
* Enough of the finding to read the ledger without opening the review.
|
|
67
|
+
*
|
|
68
|
+
* A copy, deliberately. The fingerprint is the join key and the review is
|
|
69
|
+
* named beside it, so nothing here is load-bearing — but a list of corrections
|
|
70
|
+
* that said only `6c349617bd72d368 · intentional` would be unreadable, and a
|
|
71
|
+
* record a human cannot check is a record a human cannot correct.
|
|
72
|
+
*/
|
|
73
|
+
const correctedFindingSchema = z.object({
|
|
74
|
+
path: z.string().min(1),
|
|
75
|
+
line: z.number().int().positive(),
|
|
76
|
+
title: z.string().min(1),
|
|
77
|
+
severity: z.enum(SEVERITIES),
|
|
78
|
+
category: z.enum(CATEGORIES),
|
|
79
|
+
});
|
|
80
|
+
export const correctionSchema = z.object({
|
|
81
|
+
version: z.literal(CORRECTION_VERSION),
|
|
82
|
+
/** When it was said. Two rulings on one finding are resolved by this. */
|
|
83
|
+
at: z.string().min(1),
|
|
84
|
+
/** Who said it. A suppression nobody signed is not auditable. */
|
|
85
|
+
by: z.string().min(1),
|
|
86
|
+
label: z.enum(CORRECTION_LABELS),
|
|
87
|
+
/** `Finding.id` — the content anchor, which is why this survives a rebase. */
|
|
88
|
+
fingerprint: z.string().min(1),
|
|
89
|
+
reason: z.string().nullable(),
|
|
90
|
+
/** `path` or `path:line`, as the claim contract writes evidence. */
|
|
91
|
+
citations: z.array(z.string().min(1)),
|
|
92
|
+
/** The review that printed the number this was typed against. */
|
|
93
|
+
review: z.string().min(1),
|
|
94
|
+
repo: z.object({
|
|
95
|
+
target: z.string().min(1),
|
|
96
|
+
branch: z.string().nullable(),
|
|
97
|
+
}),
|
|
98
|
+
finding: correctedFindingSchema,
|
|
99
|
+
});
|
|
100
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/corrections/schema.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,sEAAsE;AACtE,4DAA4D;AAE5D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAExD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,CAAU,CAAC;AAgEhH,MAAM,CAAC,MAAM,WAAW,GAAuC;IAC7D,SAAS,EAAE;QACT,KAAK,EAAE,6BAA6B;QACpC,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE,MAAM;QACb,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,yBAAyB;KACjC;IACD,WAAW,EAAE;QACX,KAAK,EAAE,4DAA4D;QACnE,OAAO,EAA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yEAAyE;IACzE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,iEAAiE;IACjE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC;IAChC,8EAA8E;IAC9E,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,oEAAoE;IACpE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACrC,iEAAiE;IACjE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACzB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC9B,CAAC;IACF,OAAO,EAAE,sBAAsB;CAChC,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { AgentConfig } from './config.js';
|
|
2
|
+
export declare const CORRECTION_VERBS: readonly ['list', 'promote'];
|
|
3
|
+
export type CorrectionVerb = (typeof CORRECTION_VERBS)[number];
|
|
4
|
+
export declare function isCorrectionVerb(value: string | undefined): value is CorrectionVerb;
|
|
5
|
+
export interface CorrectionCommandOptions {
|
|
6
|
+
json: boolean;
|
|
7
|
+
/** Which repository's rulings. Default: the working directory. */
|
|
8
|
+
repo?: string;
|
|
9
|
+
/** Every ruling ever made, not only the ones in force on this branch. */
|
|
10
|
+
all?: boolean;
|
|
11
|
+
limit?: number;
|
|
12
|
+
/** `promote`: show what would be written and write nothing. */
|
|
13
|
+
dryRun?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* `weigh corrections list` — what people have ruled, and what it does.
|
|
17
|
+
*
|
|
18
|
+
* Here for the same reason `weigh context list` is: a record nobody can read
|
|
19
|
+
* back is a liability rather than an asset, and these records silence findings.
|
|
20
|
+
* Anyone surprised by a finding that did not appear needs one command that
|
|
21
|
+
* says why, without opening a JSON file.
|
|
22
|
+
*
|
|
23
|
+
* In force on this branch by default. The ledger keeps every ruling ever made,
|
|
24
|
+
* including the ones a later ruling replaced, and a list that mixed them would
|
|
25
|
+
* answer "what is in effect" with "what has ever been said".
|
|
26
|
+
*/
|
|
27
|
+
export declare function runCorrectionsCommand(verb: CorrectionVerb, _args: string[], config: AgentConfig, options: CorrectionCommandOptions): Promise<number>;
|
|
28
|
+
//# sourceMappingURL=corrections-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corrections-cli.d.ts","sourceRoot":"","sources":["../src/corrections-cli.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM/C,eAAO,MAAM,gBAAgB,YAAI,MAAM,EAAE,SAAS,CAAU,CAAC;AAC7D,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,KAAK,IAAI,cAAc,CAEnF;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,cAAc,EACpB,KAAK,EAAE,MAAM,EAAE,EACf,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,MAAM,CAAC,CA0BjB"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
4
|
+
import { Corrections, FollowUp, Promotion } from './corrections/index.js';
|
|
5
|
+
import { Knowledge } from './knowledge/index.js';
|
|
6
|
+
import { createMemoryStore } from './memory/index.js';
|
|
7
|
+
import { resolveTarget } from './target.js';
|
|
8
|
+
export const CORRECTION_VERBS = ['list', 'promote'];
|
|
9
|
+
export function isCorrectionVerb(value) {
|
|
10
|
+
return CORRECTION_VERBS.includes(value);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* `weigh corrections list` — what people have ruled, and what it does.
|
|
14
|
+
*
|
|
15
|
+
* Here for the same reason `weigh context list` is: a record nobody can read
|
|
16
|
+
* back is a liability rather than an asset, and these records silence findings.
|
|
17
|
+
* Anyone surprised by a finding that did not appear needs one command that
|
|
18
|
+
* says why, without opening a JSON file.
|
|
19
|
+
*
|
|
20
|
+
* In force on this branch by default. The ledger keeps every ruling ever made,
|
|
21
|
+
* including the ones a later ruling replaced, and a list that mixed them would
|
|
22
|
+
* answer "what is in effect" with "what has ever been said".
|
|
23
|
+
*/
|
|
24
|
+
export async function runCorrectionsCommand(verb, _args, config, options) {
|
|
25
|
+
const target = resolveTarget({ ...(options.repo && { repo: options.repo }) });
|
|
26
|
+
const ledger = new Corrections();
|
|
27
|
+
if (verb === 'promote')
|
|
28
|
+
return promote(target.root, target.branch, ledger, config, options);
|
|
29
|
+
const everything = ledger.all(target.root);
|
|
30
|
+
const inForce = ledger.inForce(target.root, target.branch);
|
|
31
|
+
const shown = (options.all ? everything : inForce).slice(0, options.limit ?? Infinity);
|
|
32
|
+
if (options.json) {
|
|
33
|
+
process.stdout.write(JSON.stringify({
|
|
34
|
+
repo: target.root,
|
|
35
|
+
branch: target.branch,
|
|
36
|
+
path: ledger.fileFor(target.root),
|
|
37
|
+
count: shown.length,
|
|
38
|
+
recorded: everything.length,
|
|
39
|
+
corrections: shown.map((one) => one.toJSON()),
|
|
40
|
+
}) + '\n');
|
|
41
|
+
return 0;
|
|
42
|
+
}
|
|
43
|
+
process.stdout.write(render(shown, everything, inForce, target.branch, options) + '\n');
|
|
44
|
+
return 0;
|
|
45
|
+
}
|
|
46
|
+
function render(shown, everything, inForce, branch, options) {
|
|
47
|
+
const where = branch ?? 'a detached HEAD';
|
|
48
|
+
if (everything.length === 0) {
|
|
49
|
+
return [
|
|
50
|
+
'Nobody has ruled on a finding in this repository yet.',
|
|
51
|
+
` weigh answer "${FollowUp.example()}"`,
|
|
52
|
+
].join('\n');
|
|
53
|
+
}
|
|
54
|
+
if (shown.length === 0) {
|
|
55
|
+
return `${everything.length} ruling(s) recorded, none of them in force on ${where} — see them with --all.`;
|
|
56
|
+
}
|
|
57
|
+
const lines = shown.flatMap((one) => [one.describe(), '']);
|
|
58
|
+
const head = options.all
|
|
59
|
+
? `${shown.length} of ${everything.length} ruling(s) ever recorded here:`
|
|
60
|
+
: `${shown.length} ruling(s) in force on ${where}:`;
|
|
61
|
+
const tail = !options.all && everything.length > inForce.length
|
|
62
|
+
? [
|
|
63
|
+
`${everything.length - inForce.length} other ruling(s) were superseded or belong to another branch — weigh corrections list --all`,
|
|
64
|
+
]
|
|
65
|
+
: [];
|
|
66
|
+
return [head, '', ...lines, ...tail].join('\n');
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* `weigh corrections promote` — teach what the ledger already knows.
|
|
70
|
+
*
|
|
71
|
+
* `weigh answer` promotes as it records, so this is the repair path, and it
|
|
72
|
+
* exists because the common case is a machine with no backend configured: every
|
|
73
|
+
* ruling made before one appears teaches nothing, and the ledger is the only
|
|
74
|
+
* record that they were ever meant to. Run once after configuring a store and
|
|
75
|
+
* the repository knows what it was told months ago.
|
|
76
|
+
*
|
|
77
|
+
* Idempotent, so running it twice is not a way to write a claim twice. With
|
|
78
|
+
* `--dry-run` it needs no backend at all and prints what each ruling would
|
|
79
|
+
* teach, which is the only way to read the shaping without a store.
|
|
80
|
+
*/
|
|
81
|
+
async function promote(root, branch, ledger, config, options) {
|
|
82
|
+
const knowledge = new Knowledge(createMemoryStore(config.memory), config);
|
|
83
|
+
const promotion = new Promotion(knowledge, (message) => process.stderr.write(`Warning: ${message}\n`));
|
|
84
|
+
const inForce = ledger.inForce(root, branch);
|
|
85
|
+
if (options.dryRun) {
|
|
86
|
+
const would = inForce.flatMap((one) => {
|
|
87
|
+
const claim = Promotion.claimFor(one);
|
|
88
|
+
return claim ? [{ correction: one, claim }] : [];
|
|
89
|
+
});
|
|
90
|
+
if (options.json) {
|
|
91
|
+
process.stdout.write(JSON.stringify({
|
|
92
|
+
repo: root,
|
|
93
|
+
dryRun: true,
|
|
94
|
+
would: would.map(({ correction, claim }) => ({
|
|
95
|
+
fingerprint: correction.fingerprint,
|
|
96
|
+
label: correction.label,
|
|
97
|
+
kind: claim.kind,
|
|
98
|
+
statement: claim.statement,
|
|
99
|
+
evidence: claim.evidence,
|
|
100
|
+
applies: claim.applies,
|
|
101
|
+
})),
|
|
102
|
+
}) + '\n');
|
|
103
|
+
return 0;
|
|
104
|
+
}
|
|
105
|
+
if (would.length === 0) {
|
|
106
|
+
process.stdout.write(`None of the ${inForce.length} ruling(s) in force teach anything.\n`);
|
|
107
|
+
return 0;
|
|
108
|
+
}
|
|
109
|
+
process.stdout.write([
|
|
110
|
+
`${would.length} of ${inForce.length} ruling(s) in force would be written as claims:`,
|
|
111
|
+
'',
|
|
112
|
+
...would.flatMap(({ correction, claim }) => [
|
|
113
|
+
` ${claim.kind}: ${claim.statement}`,
|
|
114
|
+
` from ${correction.label} on ${correction.fingerprint} · cites ${claim.evidence.join(' ')}`,
|
|
115
|
+
` applies to ${claim.applies.length ? claim.applies.join(' ') : 'wherever it is found by meaning'}`,
|
|
116
|
+
'',
|
|
117
|
+
]),
|
|
118
|
+
].join('\n'));
|
|
119
|
+
return 0;
|
|
120
|
+
}
|
|
121
|
+
// Said rather than warned, and a failure rather than an empty answer: this
|
|
122
|
+
// command is about the store, so "nothing to promote" and "nothing could be
|
|
123
|
+
// written" must not print the same thing.
|
|
124
|
+
if (!promotion.enabled) {
|
|
125
|
+
process.stderr.write(`Cannot promote — memory is off: ${promotion.reason ?? 'no backend'}.\n` +
|
|
126
|
+
'The rulings are safe in the ledger. See what they would teach: weigh corrections promote --dry-run\n');
|
|
127
|
+
return 1;
|
|
128
|
+
}
|
|
129
|
+
const pending = await promotion.pending(inForce, root);
|
|
130
|
+
if (pending.length === 0) {
|
|
131
|
+
if (options.json) {
|
|
132
|
+
process.stdout.write(JSON.stringify({ repo: root, promoted: [], inForce: inForce.length }) + '\n');
|
|
133
|
+
return 0;
|
|
134
|
+
}
|
|
135
|
+
process.stdout.write(`Nothing to promote — ${inForce.length} ruling(s) in force, all of them already taught.\n`);
|
|
136
|
+
return 0;
|
|
137
|
+
}
|
|
138
|
+
const written = await promotion.of(pending, root);
|
|
139
|
+
if (options.json) {
|
|
140
|
+
process.stdout.write(JSON.stringify({
|
|
141
|
+
repo: root,
|
|
142
|
+
promoted: written.map((claim) => ({ kind: claim.kind, statement: claim.statement, evidence: claim.evidence })),
|
|
143
|
+
}) + '\n');
|
|
144
|
+
return 0;
|
|
145
|
+
}
|
|
146
|
+
// Against the claims offered, not the rulings: two rulings that give the
|
|
147
|
+
// same reason are one claim, and one write of it is the whole of a success.
|
|
148
|
+
const offered = Promotion.claimsFor(pending).length;
|
|
149
|
+
process.stdout.write([
|
|
150
|
+
`Promoted ${written.length} of ${offered} claim(s), from ${pending.length} ruling(s), into what this repository is like:`,
|
|
151
|
+
'',
|
|
152
|
+
...written.map((claim) => ` ${claim.kind}: ${claim.statement}`),
|
|
153
|
+
'',
|
|
154
|
+
].join('\n'));
|
|
155
|
+
return written.length === offered ? 0 : 1;
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=corrections-cli.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corrections-cli.js","sourceRoot":"","sources":["../src/corrections-cli.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,sEAAsE;AACtE,4DAA4D;AAG5D,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAmB,MAAM,wBAAwB,CAAC;AAC3F,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,SAAS,CAAU,CAAC;AAG7D,MAAM,UAAU,gBAAgB,CAAC,KAAyB;IACxD,OAAO,gBAAgB,CAAC,QAAQ,CAAC,KAAuB,CAAC,CAAC;AAC5D,CAAC;AAaD;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,IAAoB,EACpB,KAAe,EACf,MAAmB,EACnB,OAAiC;IAEjC,MAAM,MAAM,GAAG,aAAa,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;IAC9E,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;IAEjC,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAE5F,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,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line mapping is the part that matters downstream: a finding has to point
|
|
5
|
+
* at a line in the tree being reviewed, so it can be turned into a permalink
|
|
6
|
+
* and anchored to content that survives a rebase.
|
|
7
|
+
*/
|
|
8
|
+
export type FileStatus = 'added' | 'modified' | 'deleted' | 'renamed';
|
|
9
|
+
export interface Hunk {
|
|
10
|
+
/** The @@ header, verbatim. */
|
|
11
|
+
header: string;
|
|
12
|
+
oldStart: number;
|
|
13
|
+
oldLines: number;
|
|
14
|
+
newStart: number;
|
|
15
|
+
newLines: number;
|
|
16
|
+
/** Lines in the head file this hunk introduced. Empty for a pure deletion. */
|
|
17
|
+
addedLines: number[];
|
|
18
|
+
/** The hunk as text, including its header — what a prompt gets shown. */
|
|
19
|
+
text: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ChangedFile {
|
|
22
|
+
/** Path in the head tree. For a deletion, the path it had. */
|
|
23
|
+
path: string;
|
|
24
|
+
/** Set only for a rename, giving the path it came from. */
|
|
25
|
+
previousPath: string | null;
|
|
26
|
+
status: FileStatus;
|
|
27
|
+
additions: number;
|
|
28
|
+
deletions: number;
|
|
29
|
+
/** No hunks to read. Reported so it is skipped deliberately, not silently. */
|
|
30
|
+
binary: boolean;
|
|
31
|
+
hunks: Hunk[];
|
|
32
|
+
}
|
|
33
|
+
export interface Diff {
|
|
34
|
+
/** The ref as asked for, before resolution. */
|
|
35
|
+
base: string;
|
|
36
|
+
baseSha: string;
|
|
37
|
+
/** Null when the head is the working tree rather than a commit. */
|
|
38
|
+
headSha: string | null;
|
|
39
|
+
/** Where the branch left the base. The diff is taken from here. */
|
|
40
|
+
mergeBase: string;
|
|
41
|
+
/** True when the working tree, not a commit, is being reviewed. */
|
|
42
|
+
uncommitted: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* The commit the files were diffed from, when it is not the merge base.
|
|
45
|
+
*
|
|
46
|
+
* Set on a continuation, where only what changed since the last review is
|
|
47
|
+
* shown. `mergeBase` still names where the branch left the base, because
|
|
48
|
+
* that is what decides whether two reviews are of the same change.
|
|
49
|
+
*/
|
|
50
|
+
since?: string;
|
|
51
|
+
files: ChangedFile[];
|
|
52
|
+
}
|
|
53
|
+
export interface WorkingState {
|
|
54
|
+
staged: string[];
|
|
55
|
+
unstaged: string[];
|
|
56
|
+
untracked: string[];
|
|
57
|
+
get clean(): boolean;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* The branch this work would merge into.
|
|
61
|
+
*
|
|
62
|
+
* origin/HEAD is the honest answer when it exists — it is what the remote says
|
|
63
|
+
* its default branch is. The rest is a guess, so the guess is narrow and its
|
|
64
|
+
* failure is a clear message rather than an empty diff.
|
|
65
|
+
*/
|
|
66
|
+
export declare function defaultBase(root: string): string;
|
|
67
|
+
/** What is in the working tree but not yet in a commit. */
|
|
68
|
+
export declare function workingState(root: string): WorkingState;
|
|
69
|
+
/**
|
|
70
|
+
* Resolves a ref to the commit it names, or explains why it cannot.
|
|
71
|
+
*
|
|
72
|
+
* Exported because the workspace has to be checked out at the same commit the
|
|
73
|
+
* diff is taken against, and it is built before `collectDiff` runs — so the
|
|
74
|
+
* resolution happens once, here, rather than twice with a chance of differing.
|
|
75
|
+
*/
|
|
76
|
+
export declare function resolveCommit(root: string, ref: string, label: string): string;
|
|
77
|
+
export interface DiffRequest {
|
|
78
|
+
/** Repository to read. Usually a workspace root, not the user's checkout. */
|
|
79
|
+
root: string;
|
|
80
|
+
/** Ref to compare against. Defaults to the repository's default branch. */
|
|
81
|
+
base?: string;
|
|
82
|
+
/** Commit to review. Defaults to HEAD; ignored when reviewing the tree. */
|
|
83
|
+
head?: string;
|
|
84
|
+
/** Review the working tree, uncommitted changes included. */
|
|
85
|
+
includeUncommitted?: boolean;
|
|
86
|
+
/** Lines of context per hunk. */
|
|
87
|
+
context?: number;
|
|
88
|
+
/**
|
|
89
|
+
* Diff from this commit instead of the merge base.
|
|
90
|
+
*
|
|
91
|
+
* A tree-to-tree comparison, so it does not need to be an ancestor of the
|
|
92
|
+
* head: an amended or force-pushed branch still shows what differs.
|
|
93
|
+
*/
|
|
94
|
+
since?: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Collects the changes to review.
|
|
98
|
+
*
|
|
99
|
+
* The comparison is three-dot — against the merge base, not the tip of the base
|
|
100
|
+
* branch — so commits that landed on the base after this branch left it are not
|
|
101
|
+
* attributed to it. That is the same thing GitHub renders on a pull request, so
|
|
102
|
+
* a local review and a PR review are looking at the same set of changes.
|
|
103
|
+
*/
|
|
104
|
+
export declare function collectDiff(req: DiffRequest): Diff;
|
|
105
|
+
//# sourceMappingURL=diff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff.d.ts","sourceRoot":"","sources":["../src/diff.ts"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAEtE,MAAM,WAAW,IAAI;IACnB,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,2DAA2D;IAC3D,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,EAAE,UAAU,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED,MAAM,WAAW,IAAI;IACnB,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAA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