@momentiq/dark-factory-cli 0.1.0-alpha.4
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/LICENSE +201 -0
- package/README.md +150 -0
- package/dist/adapters/_shared.d.ts +45 -0
- package/dist/adapters/_shared.d.ts.map +1 -0
- package/dist/adapters/_shared.js +200 -0
- package/dist/adapters/_shared.js.map +1 -0
- package/dist/adapters/codex-sdk.d.ts +279 -0
- package/dist/adapters/codex-sdk.d.ts.map +1 -0
- package/dist/adapters/codex-sdk.js +930 -0
- package/dist/adapters/codex-sdk.js.map +1 -0
- package/dist/adapters/critic-result-schema.d.ts +215 -0
- package/dist/adapters/critic-result-schema.d.ts.map +1 -0
- package/dist/adapters/critic-result-schema.js +153 -0
- package/dist/adapters/critic-result-schema.js.map +1 -0
- package/dist/adapters/critic.d.ts +62 -0
- package/dist/adapters/critic.d.ts.map +1 -0
- package/dist/adapters/critic.js +79 -0
- package/dist/adapters/critic.js.map +1 -0
- package/dist/adapters/cursor-sdk.d.ts +153 -0
- package/dist/adapters/cursor-sdk.d.ts.map +1 -0
- package/dist/adapters/cursor-sdk.js +818 -0
- package/dist/adapters/cursor-sdk.js.map +1 -0
- package/dist/adapters/gemini-sdk.d.ts +113 -0
- package/dist/adapters/gemini-sdk.d.ts.map +1 -0
- package/dist/adapters/gemini-sdk.js +532 -0
- package/dist/adapters/gemini-sdk.js.map +1 -0
- package/dist/adapters/grok-direct-sdk.d.ts +148 -0
- package/dist/adapters/grok-direct-sdk.d.ts.map +1 -0
- package/dist/adapters/grok-direct-sdk.js +694 -0
- package/dist/adapters/grok-direct-sdk.js.map +1 -0
- package/dist/branch-protection/audit_branch_protection.py +759 -0
- package/dist/branch-protection/index.d.ts +25 -0
- package/dist/branch-protection/index.d.ts.map +1 -0
- package/dist/branch-protection/index.js +70 -0
- package/dist/branch-protection/index.js.map +1 -0
- package/dist/branch-protection/spec-default.yaml +314 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +581 -0
- package/dist/cli.js.map +1 -0
- package/dist/cycle-doc-validator/index.d.ts +43 -0
- package/dist/cycle-doc-validator/index.d.ts.map +1 -0
- package/dist/cycle-doc-validator/index.js +69 -0
- package/dist/cycle-doc-validator/index.js.map +1 -0
- package/dist/cycle-doc-validator/validate_cycle_doc.py +1260 -0
- package/dist/cycle-tracker-sync/attribute_pr_cycle_ref.py +384 -0
- package/dist/cycle-tracker-sync/index.d.ts +20 -0
- package/dist/cycle-tracker-sync/index.d.ts.map +1 -0
- package/dist/cycle-tracker-sync/index.js +71 -0
- package/dist/cycle-tracker-sync/index.js.map +1 -0
- package/dist/cycle-tracker-sync/sync_cycle_trackers.py +1093 -0
- package/dist/evidence/audit-trail.d.ts +59 -0
- package/dist/evidence/audit-trail.d.ts.map +1 -0
- package/dist/evidence/audit-trail.js +283 -0
- package/dist/evidence/audit-trail.js.map +1 -0
- package/dist/evidence/index.d.ts +4 -0
- package/dist/evidence/index.d.ts.map +1 -0
- package/dist/evidence/index.js +29 -0
- package/dist/evidence/index.js.map +1 -0
- package/dist/evidence/per-sha.d.ts +13 -0
- package/dist/evidence/per-sha.d.ts.map +1 -0
- package/dist/evidence/per-sha.js +97 -0
- package/dist/evidence/per-sha.js.map +1 -0
- package/dist/evidence/quality-gates.d.ts +19 -0
- package/dist/evidence/quality-gates.d.ts.map +1 -0
- package/dist/evidence/quality-gates.js +212 -0
- package/dist/evidence/quality-gates.js.map +1 -0
- package/dist/git.d.ts +40 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +414 -0
- package/dist/git.js.map +1 -0
- package/dist/glob.d.ts +4 -0
- package/dist/glob.d.ts.map +1 -0
- package/dist/glob.js +99 -0
- package/dist/glob.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/paths.d.ts +12 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +42 -0
- package/dist/paths.js.map +1 -0
- package/dist/policy/baseline.d.ts +15 -0
- package/dist/policy/baseline.d.ts.map +1 -0
- package/dist/policy/baseline.js +115 -0
- package/dist/policy/baseline.js.map +1 -0
- package/dist/policy/config.d.ts +64 -0
- package/dist/policy/config.d.ts.map +1 -0
- package/dist/policy/config.js +363 -0
- package/dist/policy/config.js.map +1 -0
- package/dist/policy/gate.d.ts +80 -0
- package/dist/policy/gate.d.ts.map +1 -0
- package/dist/policy/gate.js +1019 -0
- package/dist/policy/gate.js.map +1 -0
- package/dist/policy/index.d.ts +7 -0
- package/dist/policy/index.d.ts.map +1 -0
- package/dist/policy/index.js +14 -0
- package/dist/policy/index.js.map +1 -0
- package/dist/policy/merge-queue.d.ts +183 -0
- package/dist/policy/merge-queue.d.ts.map +1 -0
- package/dist/policy/merge-queue.js +310 -0
- package/dist/policy/merge-queue.js.map +1 -0
- package/dist/policy/profile.d.ts +98 -0
- package/dist/policy/profile.d.ts.map +1 -0
- package/dist/policy/profile.js +156 -0
- package/dist/policy/profile.js.map +1 -0
- package/dist/policy/tdd-classifier.d.ts +18 -0
- package/dist/policy/tdd-classifier.d.ts.map +1 -0
- package/dist/policy/tdd-classifier.js +79 -0
- package/dist/policy/tdd-classifier.js.map +1 -0
- package/dist/prompt.d.ts +13 -0
- package/dist/prompt.d.ts.map +1 -0
- package/dist/prompt.js +175 -0
- package/dist/prompt.js.map +1 -0
- package/dist/report.d.ts +88 -0
- package/dist/report.d.ts.map +1 -0
- package/dist/report.js +376 -0
- package/dist/report.js.map +1 -0
- package/dist/runner.d.ts +30 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +456 -0
- package/dist/runner.js.map +1 -0
- package/dist/security.d.ts +2 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/security.js +19 -0
- package/dist/security.js.map +1 -0
- package/dist/trusted-surface/rebind.d.ts +10 -0
- package/dist/trusted-surface/rebind.d.ts.map +1 -0
- package/dist/trusted-surface/rebind.js +154 -0
- package/dist/trusted-surface/rebind.js.map +1 -0
- package/package.json +78 -0
package/dist/report.d.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { LoadedConfig } from "./policy/config.js";
|
|
2
|
+
import { type CriticResult, type ReviewArtifact, type ReviewSeverity, type ReviewVerdict } from "@momentiq/dark-factory-schemas";
|
|
3
|
+
export interface AggregateInputs {
|
|
4
|
+
loaded: LoadedConfig;
|
|
5
|
+
commit: string;
|
|
6
|
+
parent: string;
|
|
7
|
+
range: string;
|
|
8
|
+
diffHash: string;
|
|
9
|
+
criticResults: CriticResult[];
|
|
10
|
+
status: ReviewArtifact["status"];
|
|
11
|
+
createdAt: string;
|
|
12
|
+
quorumOverride?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function buildAggregate(inputs: AggregateInputs): ReviewArtifact;
|
|
15
|
+
/**
|
|
16
|
+
* Cycle 322.3 — does this critic count toward the quorum?
|
|
17
|
+
*
|
|
18
|
+
* Exported for `gate.ts` so the gate evaluator and the verdict
|
|
19
|
+
* computation see the same definition of "completed".
|
|
20
|
+
*/
|
|
21
|
+
export declare function isCriticCompleted(r: CriticResult): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Cycle 322.3 — does this completed critic veto the gate?
|
|
24
|
+
*
|
|
25
|
+
* Manifesto §11 "first principles veto": any rigorous critic with a
|
|
26
|
+
* blocking finding (or `requiresHumanJudgment`, or a
|
|
27
|
+
* CHANGES_REQUESTED verdict) blocks the gate regardless of how many
|
|
28
|
+
* other critics approved. Returns `false` for non-completed critics
|
|
29
|
+
* — only a completed critic can veto.
|
|
30
|
+
*/
|
|
31
|
+
export declare function criticVetoesGate(r: CriticResult, blockingSeverities: ReviewSeverity[]): boolean;
|
|
32
|
+
export interface QuorumAggregateOutcome {
|
|
33
|
+
verdict: ReviewVerdict;
|
|
34
|
+
/**
|
|
35
|
+
* Which gate-decision path drove the verdict. Distinct telemetry
|
|
36
|
+
* value so operators can route alerts differently:
|
|
37
|
+
* - `veto` — a completed critic raised a blocking finding /
|
|
38
|
+
* CHANGES_REQUESTED verdict / requiresHumanJudgment. The
|
|
39
|
+
* manifesto §11 invariant: a single rigorous critic vetoes
|
|
40
|
+
* regardless of quorum status.
|
|
41
|
+
* - `majority` — >= quorum critics completed and majority voted
|
|
42
|
+
* APPROVED (no veto). Ties favor CHANGES_REQUESTED.
|
|
43
|
+
* - `quorum_unmet` — < quorum critics completed (no veto).
|
|
44
|
+
* Distinct from a content block: a sustained spike correlated
|
|
45
|
+
* with `critic_run_error` on adapter X is a vendor-incident
|
|
46
|
+
* pattern operators page on.
|
|
47
|
+
*/
|
|
48
|
+
reason: "majority" | "veto" | "quorum_unmet";
|
|
49
|
+
completedCount: number;
|
|
50
|
+
totalCount: number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Cycle 322.3 — compute the aggregate verdict under
|
|
54
|
+
* `min-complete-quorum`. Pure: takes only the critic results, the
|
|
55
|
+
* blocking severities, and the quorum value; no config / I/O / time
|
|
56
|
+
* dependence. Used by both `aggregateVerdict` (writes the artifact)
|
|
57
|
+
* and `runner.runReview` (emits the `review_finished` telemetry
|
|
58
|
+
* with the reason for downstream alerting).
|
|
59
|
+
*
|
|
60
|
+
* Verdict rules, in priority order:
|
|
61
|
+
* 1. Any completed critic vetoes → CHANGES_REQUESTED, reason `veto`.
|
|
62
|
+
* 2. completedCount >= quorum → majority verdict among completed
|
|
63
|
+
* critics. Ties favor CHANGES_REQUESTED (conservative).
|
|
64
|
+
* 3. completedCount < quorum → CHANGES_REQUESTED, reason
|
|
65
|
+
* `quorum_unmet`. (The veto-preserves-quorum semantics in (1)
|
|
66
|
+
* ensures a single rigorous critic can still block even when
|
|
67
|
+
* quorum is unmet — §11 invariant.)
|
|
68
|
+
*
|
|
69
|
+
* The "veto wins over quorum_unmet" precedence is the key §11
|
|
70
|
+
* property: an outage that knocks out two critics doesn't paralyze
|
|
71
|
+
* the third critic's BLOCKER finding.
|
|
72
|
+
*/
|
|
73
|
+
export declare function quorumAggregateVerdict(results: CriticResult[], blockingSeverities: ReviewSeverity[], quorum: number): QuorumAggregateOutcome;
|
|
74
|
+
export interface WriteResult {
|
|
75
|
+
jsonPath: string;
|
|
76
|
+
markdownPath: string | null;
|
|
77
|
+
}
|
|
78
|
+
export declare function writeArtifacts(loaded: LoadedConfig, artifact: ReviewArtifact): Promise<WriteResult>;
|
|
79
|
+
export declare function readArtifact(loaded: LoadedConfig, commit: string): Promise<ReviewArtifact | null>;
|
|
80
|
+
export declare function renderMarkdown(artifact: ReviewArtifact): string;
|
|
81
|
+
export declare function writePending(loaded: LoadedConfig, inputs: Omit<AggregateInputs, "criticResults" | "status">): Promise<WriteResult>;
|
|
82
|
+
export interface AcquireLockResult {
|
|
83
|
+
acquired: boolean;
|
|
84
|
+
lockPath: string;
|
|
85
|
+
}
|
|
86
|
+
export declare function acquireCommitLock(loaded: LoadedConfig, commit: string): Promise<AcquireLockResult>;
|
|
87
|
+
export declare function releaseCommitLock(lockPath: string): void;
|
|
88
|
+
//# sourceMappingURL=report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../src/report.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAOvD,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,cAAc,EAEnB,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,gCAAgC,CAAC;AAExC,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IACjC,SAAS,EAAE,MA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MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,iBAAiB,CAAC,CAa5B;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAQxD"}
|
package/dist/report.js
ADDED
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { artifactJsonPath, artifactLockPath, artifactMarkdownPath, resolveArtifactDir, } from "./paths.js";
|
|
3
|
+
import { parseReviewArtifact, REVIEW_SEVERITIES, } from "@momentiq/dark-factory-schemas";
|
|
4
|
+
const SEVERITY_RANK = {
|
|
5
|
+
blocker: 0,
|
|
6
|
+
high: 1,
|
|
7
|
+
medium: 2,
|
|
8
|
+
low: 3,
|
|
9
|
+
note: 4,
|
|
10
|
+
};
|
|
11
|
+
export function buildAggregate(inputs) {
|
|
12
|
+
const { loaded, commit, parent, range, diffHash, criticResults, status, createdAt, quorumOverride } = inputs;
|
|
13
|
+
const repoName = loaded.repoRoot.split("/").pop() ?? loaded.repoRoot;
|
|
14
|
+
const aggregationPolicy = loaded.config.aggregation.policy;
|
|
15
|
+
const blockingSeverities = loaded.config.aggregation.blockingSeverities;
|
|
16
|
+
let gateVerdict;
|
|
17
|
+
if (status === "complete") {
|
|
18
|
+
gateVerdict = aggregateVerdict(criticResults, blockingSeverities, loaded, quorumOverride);
|
|
19
|
+
}
|
|
20
|
+
const artifact = {
|
|
21
|
+
version: 2,
|
|
22
|
+
status,
|
|
23
|
+
repo: repoName,
|
|
24
|
+
commit,
|
|
25
|
+
parent,
|
|
26
|
+
range,
|
|
27
|
+
diffHash,
|
|
28
|
+
artifactScope: loaded.config.git.artifactScope,
|
|
29
|
+
aggregationPolicy,
|
|
30
|
+
criticResults,
|
|
31
|
+
createdAt,
|
|
32
|
+
...(gateVerdict !== undefined ? { gateVerdict } : {}),
|
|
33
|
+
};
|
|
34
|
+
return artifact;
|
|
35
|
+
}
|
|
36
|
+
function aggregateVerdict(results, blockingSeverities, loaded, quorumOverride) {
|
|
37
|
+
// Cycle 322.3 — dispatch on policy. `min-complete-quorum` uses the
|
|
38
|
+
// quorum aggregator below; everything else falls through to the
|
|
39
|
+
// existing 322.2 `required`-flag-threaded `block-if-any` path.
|
|
40
|
+
if (loaded.config.aggregation.policy === "min-complete-quorum") {
|
|
41
|
+
// Cycle 322.7 — profile.quorum (when supplied) overrides root
|
|
42
|
+
// aggregation.quorum. Without this, a 1-of-2 local profile with
|
|
43
|
+
// one APPROVED + one ERRORED critic would have `gate --profile local`
|
|
44
|
+
// pass (uses quorumOverride=1) but `agent-review status/show`
|
|
45
|
+
// report CHANGES_REQUESTED (uses root quorum=2). Codex P2 caught
|
|
46
|
+
// this divergence on PR #1468.
|
|
47
|
+
const quorum = quorumOverride ?? loaded.config.aggregation.quorum;
|
|
48
|
+
// Schema validation guarantees `quorum` is set when the policy
|
|
49
|
+
// is `min-complete-quorum`; the defensive fallback to 2 is for
|
|
50
|
+
// hand-constructed configs in tests (the parser would already
|
|
51
|
+
// have rejected a real on-disk config without quorum).
|
|
52
|
+
return quorumAggregateVerdict(results, blockingSeverities, quorum ?? 2).verdict;
|
|
53
|
+
}
|
|
54
|
+
// Cycle 322.2 Component 4 — `required` flag threading.
|
|
55
|
+
//
|
|
56
|
+
// Optional (`required: false`) critics produce findings that appear in
|
|
57
|
+
// the artifact for inspection but cannot flip the aggregate verdict to
|
|
58
|
+
// CHANGES_REQUESTED. This implements the §11 "shadow mode" semantics
|
|
59
|
+
// correctly: an optional critic must produce inspectable findings AND
|
|
60
|
+
// disagreement metrics without blocking — anything else makes "shadow
|
|
61
|
+
// mode" a name only.
|
|
62
|
+
//
|
|
63
|
+
// Below-the-line: `required: false` critics are still inspected for
|
|
64
|
+
// disagreement metrics (computed in agent-review-stats), so the
|
|
65
|
+
// calibration window data accumulates even though the gate doesn't
|
|
66
|
+
// block on them.
|
|
67
|
+
const requiredIds = new Set(loaded.config.critics.filter((c) => c.required).map((c) => c.id));
|
|
68
|
+
for (const r of results) {
|
|
69
|
+
if (requiredIds.has(r.criticId) && (r.status === "error" || r.status === "running" || r.status === "pending")) {
|
|
70
|
+
return "CHANGES_REQUESTED";
|
|
71
|
+
}
|
|
72
|
+
if (r.status !== "complete")
|
|
73
|
+
continue;
|
|
74
|
+
// Optional critics' verdicts / human-judgment / blocking findings are
|
|
75
|
+
// informational only — they cannot flip the aggregate.
|
|
76
|
+
if (!requiredIds.has(r.criticId))
|
|
77
|
+
continue;
|
|
78
|
+
if (r.verdict === "CHANGES_REQUESTED")
|
|
79
|
+
return "CHANGES_REQUESTED";
|
|
80
|
+
if (r.requiresHumanJudgment)
|
|
81
|
+
return "CHANGES_REQUESTED";
|
|
82
|
+
if (hasBlockingFinding(r.findings, blockingSeverities))
|
|
83
|
+
return "CHANGES_REQUESTED";
|
|
84
|
+
}
|
|
85
|
+
return "APPROVED";
|
|
86
|
+
}
|
|
87
|
+
function hasBlockingFinding(findings, blockingSeverities) {
|
|
88
|
+
return findings.some((f) => blockingSeverities.includes(f.severity));
|
|
89
|
+
}
|
|
90
|
+
// ---------------------------------------------------------------------------
|
|
91
|
+
// Cycle 322.3 — `min-complete-quorum` aggregation.
|
|
92
|
+
//
|
|
93
|
+
// Shared with `gate.ts:evaluateQuorumCriticResults` via these
|
|
94
|
+
// exports so the verdict and the gate-block enforcement cannot
|
|
95
|
+
// drift: any change to the "what counts as a veto" or "what counts
|
|
96
|
+
// as completed" semantics lands in one place.
|
|
97
|
+
//
|
|
98
|
+
// Vocabulary:
|
|
99
|
+
// - **Completed**: `status === "complete"` AND has a verdict
|
|
100
|
+
// (i.e., not pending/running/error). The schema enforces verdict
|
|
101
|
+
// presence on completed results, so this is a single field check.
|
|
102
|
+
// - **Vetoer**: a completed critic that the gate must treat as
|
|
103
|
+
// blocking regardless of vote count. The veto condition is the
|
|
104
|
+
// same as the block-if-any single-critic block trigger:
|
|
105
|
+
// CHANGES_REQUESTED verdict, OR `requiresHumanJudgment`, OR a
|
|
106
|
+
// blocking-severity finding.
|
|
107
|
+
/**
|
|
108
|
+
* Cycle 322.3 — does this critic count toward the quorum?
|
|
109
|
+
*
|
|
110
|
+
* Exported for `gate.ts` so the gate evaluator and the verdict
|
|
111
|
+
* computation see the same definition of "completed".
|
|
112
|
+
*/
|
|
113
|
+
export function isCriticCompleted(r) {
|
|
114
|
+
return r.status === "complete";
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Cycle 322.3 — does this completed critic veto the gate?
|
|
118
|
+
*
|
|
119
|
+
* Manifesto §11 "first principles veto": any rigorous critic with a
|
|
120
|
+
* blocking finding (or `requiresHumanJudgment`, or a
|
|
121
|
+
* CHANGES_REQUESTED verdict) blocks the gate regardless of how many
|
|
122
|
+
* other critics approved. Returns `false` for non-completed critics
|
|
123
|
+
* — only a completed critic can veto.
|
|
124
|
+
*/
|
|
125
|
+
export function criticVetoesGate(r, blockingSeverities) {
|
|
126
|
+
if (!isCriticCompleted(r))
|
|
127
|
+
return false;
|
|
128
|
+
if (r.verdict === "CHANGES_REQUESTED")
|
|
129
|
+
return true;
|
|
130
|
+
if (r.requiresHumanJudgment)
|
|
131
|
+
return true;
|
|
132
|
+
if (hasBlockingFinding(r.findings, blockingSeverities))
|
|
133
|
+
return true;
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Cycle 322.3 — compute the aggregate verdict under
|
|
138
|
+
* `min-complete-quorum`. Pure: takes only the critic results, the
|
|
139
|
+
* blocking severities, and the quorum value; no config / I/O / time
|
|
140
|
+
* dependence. Used by both `aggregateVerdict` (writes the artifact)
|
|
141
|
+
* and `runner.runReview` (emits the `review_finished` telemetry
|
|
142
|
+
* with the reason for downstream alerting).
|
|
143
|
+
*
|
|
144
|
+
* Verdict rules, in priority order:
|
|
145
|
+
* 1. Any completed critic vetoes → CHANGES_REQUESTED, reason `veto`.
|
|
146
|
+
* 2. completedCount >= quorum → majority verdict among completed
|
|
147
|
+
* critics. Ties favor CHANGES_REQUESTED (conservative).
|
|
148
|
+
* 3. completedCount < quorum → CHANGES_REQUESTED, reason
|
|
149
|
+
* `quorum_unmet`. (The veto-preserves-quorum semantics in (1)
|
|
150
|
+
* ensures a single rigorous critic can still block even when
|
|
151
|
+
* quorum is unmet — §11 invariant.)
|
|
152
|
+
*
|
|
153
|
+
* The "veto wins over quorum_unmet" precedence is the key §11
|
|
154
|
+
* property: an outage that knocks out two critics doesn't paralyze
|
|
155
|
+
* the third critic's BLOCKER finding.
|
|
156
|
+
*/
|
|
157
|
+
export function quorumAggregateVerdict(results, blockingSeverities, quorum) {
|
|
158
|
+
const completed = results.filter(isCriticCompleted);
|
|
159
|
+
const vetoer = completed.find((r) => criticVetoesGate(r, blockingSeverities));
|
|
160
|
+
if (vetoer) {
|
|
161
|
+
return {
|
|
162
|
+
verdict: "CHANGES_REQUESTED",
|
|
163
|
+
reason: "veto",
|
|
164
|
+
completedCount: completed.length,
|
|
165
|
+
totalCount: results.length,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
if (completed.length < quorum) {
|
|
169
|
+
return {
|
|
170
|
+
verdict: "CHANGES_REQUESTED",
|
|
171
|
+
reason: "quorum_unmet",
|
|
172
|
+
completedCount: completed.length,
|
|
173
|
+
totalCount: results.length,
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
// Quorum met and no veto — vote the majority of completed critics.
|
|
177
|
+
// Without veto, every completed critic has APPROVED OR (no verdict
|
|
178
|
+
// — schema impossible, but defensive). Count APPROVED vs other.
|
|
179
|
+
const approveCount = completed.filter((r) => r.verdict === "APPROVED").length;
|
|
180
|
+
const changesCount = completed.length - approveCount;
|
|
181
|
+
// Ties favor CHANGES_REQUESTED (conservative). With 0 changes, all
|
|
182
|
+
// approved → APPROVED. With any changes >= approveCount → CHANGES_REQUESTED.
|
|
183
|
+
// (The veto path above caught CHANGES_REQUESTED via vetoer, so
|
|
184
|
+
// changesCount in practice will be 0 here unless a critic returned
|
|
185
|
+
// CHANGES_REQUESTED with no blocking findings + no requiresHumanJudgment
|
|
186
|
+
// — schema-legal but unusual; we still honor the verdict.)
|
|
187
|
+
const verdict = approveCount > changesCount ? "APPROVED" : "CHANGES_REQUESTED";
|
|
188
|
+
return {
|
|
189
|
+
verdict,
|
|
190
|
+
reason: "majority",
|
|
191
|
+
completedCount: completed.length,
|
|
192
|
+
totalCount: results.length,
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
// JSON is the authoritative gate-input; markdown is a presentation artifact.
|
|
196
|
+
// The write order is JSON-first, markdown best-effort, so a broken markdown
|
|
197
|
+
// path (e.g., a previously-created directory at the markdown filename) cannot
|
|
198
|
+
// turn a successful review into a terminal error via the runner's catch path,
|
|
199
|
+
// or leave a pending JSON stuck on disk via writePending. Without best-effort
|
|
200
|
+
// markdown handling, the runner's recovery either overwrites the completed
|
|
201
|
+
// JSON with status=error (for success-path failures) or skips the recovery
|
|
202
|
+
// entirely (for partial-write failures during writePending).
|
|
203
|
+
//
|
|
204
|
+
// `markdownPath` is `null` when markdown render or write fails so the
|
|
205
|
+
// degradation is observable to callers and the CLI — silently swallowing
|
|
206
|
+
// the failure while still returning the path would hide artifact-write
|
|
207
|
+
// failures from operators.
|
|
208
|
+
export async function writeArtifacts(loaded, artifact) {
|
|
209
|
+
const dir = await resolveArtifactDir(loaded);
|
|
210
|
+
mkdirSync(dir, { recursive: true });
|
|
211
|
+
const jsonPath = artifactJsonPath(dir, artifact.commit);
|
|
212
|
+
const markdownPath = artifactMarkdownPath(dir, artifact.commit);
|
|
213
|
+
writeFileSync(jsonPath, `${JSON.stringify(artifact, null, 2)}\n`, "utf8");
|
|
214
|
+
let writtenMarkdownPath = null;
|
|
215
|
+
try {
|
|
216
|
+
writeFileSync(markdownPath, renderMarkdown(artifact), "utf8");
|
|
217
|
+
writtenMarkdownPath = markdownPath;
|
|
218
|
+
}
|
|
219
|
+
catch (err) {
|
|
220
|
+
// Surface the degradation on stderr so operators see it instead of
|
|
221
|
+
// having a silent failure with a returned-but-empty markdown path.
|
|
222
|
+
process.stderr.write(`agent-review: markdown render/write failed for ${markdownPath} (${err.message}); JSON artifact at ${jsonPath} is authoritative.\n`);
|
|
223
|
+
}
|
|
224
|
+
return { jsonPath, markdownPath: writtenMarkdownPath };
|
|
225
|
+
}
|
|
226
|
+
export async function readArtifact(loaded, commit) {
|
|
227
|
+
const dir = await resolveArtifactDir(loaded);
|
|
228
|
+
const path = artifactJsonPath(dir, commit);
|
|
229
|
+
if (!existsSync(path))
|
|
230
|
+
return null;
|
|
231
|
+
let raw;
|
|
232
|
+
try {
|
|
233
|
+
raw = JSON.parse(readFileSync(path, "utf8"));
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
return null;
|
|
237
|
+
}
|
|
238
|
+
return parseReviewArtifact(raw, loaded.config.aggregation.blockingSeverities);
|
|
239
|
+
}
|
|
240
|
+
export function renderMarkdown(artifact) {
|
|
241
|
+
const lines = [];
|
|
242
|
+
lines.push(`# Local Critic Review — ${artifact.commit.slice(0, 12)}`);
|
|
243
|
+
lines.push("");
|
|
244
|
+
lines.push(`- **Status:** ${artifact.status}`);
|
|
245
|
+
lines.push(`- **Verdict:** ${artifact.gateVerdict ?? "(pending)"}`);
|
|
246
|
+
lines.push(`- **Range:** ${artifact.range}`);
|
|
247
|
+
lines.push(`- **Diff hash:** ${artifact.diffHash}`);
|
|
248
|
+
lines.push(`- **Aggregation:** ${artifact.aggregationPolicy}`);
|
|
249
|
+
lines.push(`- **Artifact scope:** ${artifact.artifactScope}`);
|
|
250
|
+
lines.push(`- **Created at:** ${artifact.createdAt}`);
|
|
251
|
+
if (artifact.bypass) {
|
|
252
|
+
lines.push(`- **Bypass:** ${artifact.bypass.reason} (at ${artifact.bypass.at})`);
|
|
253
|
+
}
|
|
254
|
+
lines.push("");
|
|
255
|
+
for (const result of artifact.criticResults) {
|
|
256
|
+
lines.push(`## Critic: ${result.criticId} (${result.reviewer.name})`);
|
|
257
|
+
lines.push("");
|
|
258
|
+
lines.push(`- **Adapter:** ${result.reviewer.adapter}`);
|
|
259
|
+
lines.push(`- **Model:** ${result.reviewer.model.id}`);
|
|
260
|
+
lines.push(`- **Runtime:** ${result.reviewer.runtime}`);
|
|
261
|
+
if (result.reviewer.agentId)
|
|
262
|
+
lines.push(`- **Agent ID:** ${result.reviewer.agentId}`);
|
|
263
|
+
if (result.reviewer.runId)
|
|
264
|
+
lines.push(`- **Run ID:** ${result.reviewer.runId}`);
|
|
265
|
+
lines.push(`- **Status:** ${result.status}`);
|
|
266
|
+
if (result.verdict)
|
|
267
|
+
lines.push(`- **Verdict:** ${result.verdict}`);
|
|
268
|
+
lines.push(`- **Confidence:** ${result.confidence}`);
|
|
269
|
+
if (result.requiresHumanJudgment)
|
|
270
|
+
lines.push(`- **Requires human judgment:** yes`);
|
|
271
|
+
if (typeof result.durationMs === "number") {
|
|
272
|
+
lines.push(`- **Duration:** ${result.durationMs} ms`);
|
|
273
|
+
}
|
|
274
|
+
if (result.error) {
|
|
275
|
+
lines.push(`- **Error:** ${result.error.message}${result.error.retryable ? " (retryable)" : ""}`);
|
|
276
|
+
// Cycle 322.1 — surface the SDK-supplied error code and total
|
|
277
|
+
// retries used so a reader can immediately tell whether the
|
|
278
|
+
// failure was a transient upstream outage (`code:
|
|
279
|
+
// capacity_exceeded, retries: 2`) or a permanent
|
|
280
|
+
// misconfiguration (`code: invalid_api_key, retries: 0`).
|
|
281
|
+
if (result.error.code) {
|
|
282
|
+
lines.push(`- **Error code:** \`${result.error.code}\``);
|
|
283
|
+
}
|
|
284
|
+
if (typeof result.error.retryCount === "number" && result.error.retryCount > 0) {
|
|
285
|
+
lines.push(`- **Retries used:** ${result.error.retryCount}`);
|
|
286
|
+
}
|
|
287
|
+
if (result.error.rawSamplePath) {
|
|
288
|
+
lines.push(`- **Raw sample:** ${result.error.rawSamplePath}`);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
if (result.summary) {
|
|
292
|
+
lines.push("");
|
|
293
|
+
lines.push("### Summary");
|
|
294
|
+
lines.push("");
|
|
295
|
+
lines.push(result.summary);
|
|
296
|
+
}
|
|
297
|
+
lines.push("");
|
|
298
|
+
lines.push("### Findings");
|
|
299
|
+
if (result.findings.length === 0) {
|
|
300
|
+
lines.push("");
|
|
301
|
+
lines.push("_No findings._");
|
|
302
|
+
}
|
|
303
|
+
else {
|
|
304
|
+
const sorted = [...result.findings].sort((a, b) => SEVERITY_RANK[a.severity] - SEVERITY_RANK[b.severity]);
|
|
305
|
+
for (const sev of REVIEW_SEVERITIES) {
|
|
306
|
+
const subset = sorted.filter((f) => f.severity === sev);
|
|
307
|
+
if (subset.length === 0)
|
|
308
|
+
continue;
|
|
309
|
+
lines.push("");
|
|
310
|
+
lines.push(`#### ${sev.toUpperCase()} (${subset.length})`);
|
|
311
|
+
for (const f of subset) {
|
|
312
|
+
lines.push("");
|
|
313
|
+
const tag = f.manifestoSection ? ` ${f.manifestoSection}` : "";
|
|
314
|
+
lines.push(`- **${f.category}${tag}** — \`${f.file ?? "(no file)"}\`${f.line !== undefined ? `:${f.line}` : ""}${f.symbol ? ` (\`${f.symbol}\`)` : ""}`);
|
|
315
|
+
lines.push(` - Evidence: ${f.evidence}`);
|
|
316
|
+
lines.push(` - Impact: ${f.impact}`);
|
|
317
|
+
lines.push(` - Required fix: ${f.requiredFix}`);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
lines.push("");
|
|
322
|
+
lines.push("### Validation evidence consumed");
|
|
323
|
+
if (result.validation.qualityGateResults.length === 0) {
|
|
324
|
+
lines.push("");
|
|
325
|
+
lines.push("_No quality-gate evidence consumed._");
|
|
326
|
+
}
|
|
327
|
+
else {
|
|
328
|
+
lines.push("");
|
|
329
|
+
lines.push("| Command | Exit | Duration |");
|
|
330
|
+
lines.push("|---------|------|----------|");
|
|
331
|
+
for (const r of result.validation.qualityGateResults) {
|
|
332
|
+
lines.push(`| ${r.command} | ${r.exitCode} | ${r.durationMs} ms |`);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
if (result.validation.qualityGatesMissing.length > 0) {
|
|
336
|
+
lines.push("");
|
|
337
|
+
lines.push(`**Missing required gates:** ${result.validation.qualityGatesMissing.join(", ")}`);
|
|
338
|
+
}
|
|
339
|
+
lines.push("");
|
|
340
|
+
}
|
|
341
|
+
return `${lines.join("\n")}\n`;
|
|
342
|
+
}
|
|
343
|
+
export async function writePending(loaded, inputs) {
|
|
344
|
+
const artifact = buildAggregate({
|
|
345
|
+
...inputs,
|
|
346
|
+
criticResults: [],
|
|
347
|
+
status: "pending",
|
|
348
|
+
});
|
|
349
|
+
return writeArtifacts(loaded, artifact);
|
|
350
|
+
}
|
|
351
|
+
export async function acquireCommitLock(loaded, commit) {
|
|
352
|
+
const dir = await resolveArtifactDir(loaded);
|
|
353
|
+
mkdirSync(dir, { recursive: true });
|
|
354
|
+
const lockPath = artifactLockPath(dir, commit);
|
|
355
|
+
if (existsSync(lockPath)) {
|
|
356
|
+
return { acquired: false, lockPath };
|
|
357
|
+
}
|
|
358
|
+
try {
|
|
359
|
+
writeFileSync(lockPath, `${process.pid}\n${new Date().toISOString()}\n`, { flag: "wx" });
|
|
360
|
+
return { acquired: true, lockPath };
|
|
361
|
+
}
|
|
362
|
+
catch {
|
|
363
|
+
return { acquired: false, lockPath };
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
export function releaseCommitLock(lockPath) {
|
|
367
|
+
try {
|
|
368
|
+
if (existsSync(lockPath)) {
|
|
369
|
+
unlinkSync(lockPath);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
catch {
|
|
373
|
+
// best-effort
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
//# sourceMappingURL=report.js.map
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AkB,CAAC,MAAM,CAAC,CAAC;IAC7C,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACpC,MAAM,QAAQ,GAAG,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC/C,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IACvC,CAAC;IACD,IAAI,CAAC;QACH,aAAa,CAAC,QAAQ,EAAE,GAAG,OAAO,CAAC,GAAG,KAAK,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACzF,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IACvC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,QAAgB;IAChD,IAAI,CAAC;QACH,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YACzB,UAAU,CAAC,QAAQ,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,cAAc;IAChB,CAAC;AACH,CAAC"}
|
package/dist/runner.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { LoadedConfig } from "./policy/config.js";
|
|
2
|
+
import type { AdapterRegistry } from "./adapters/critic.js";
|
|
3
|
+
import { type WriteResult } from "./report.js";
|
|
4
|
+
import type { TelemetrySink } from "./evidence/audit-trail.js";
|
|
5
|
+
import type { GateResult, ReviewArtifact, ReviewPacket } from "@momentiq/dark-factory-schemas";
|
|
6
|
+
export interface ReviewRunOptions {
|
|
7
|
+
loaded: LoadedConfig;
|
|
8
|
+
registry: AdapterRegistry;
|
|
9
|
+
ref?: string;
|
|
10
|
+
cwd?: string;
|
|
11
|
+
telemetry?: TelemetrySink;
|
|
12
|
+
signal?: AbortSignal;
|
|
13
|
+
profileName?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ReviewRunOutcome {
|
|
16
|
+
artifact: ReviewArtifact;
|
|
17
|
+
paths: WriteResult;
|
|
18
|
+
packet: ReviewPacket;
|
|
19
|
+
acquired: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare function runReview(options: ReviewRunOptions): Promise<ReviewRunOutcome>;
|
|
22
|
+
export interface GateRunOptions {
|
|
23
|
+
loaded: LoadedConfig;
|
|
24
|
+
commit: string;
|
|
25
|
+
cwd?: string;
|
|
26
|
+
telemetry?: TelemetrySink;
|
|
27
|
+
profileName?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function runCommitGate(options: GateRunOptions): Promise<GateResult>;
|
|
30
|
+
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAuB,MAAM,sBAAsB,CAAC;AAkBjF,OAAO,EAOL,KAAK,WAAW,EACjB,MAAM,aAAa,CAAC;AAIrB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAGV,UAAU,EACV,cAAc,EACd,YAAY,EAEb,MAAM,gCAAgC,CAAC;AAExC,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,EAAE,eAAe,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAC;IAUrB,WAAW,CAAC,EA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