@diffci.com/diffci 0.3.10 → 0.3.12
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 +7 -5
- package/README.md +18 -422
- package/dist-client/src/client/cli.js +1 -49
- package/dist-client/src/client/mcp.js +2 -1
- package/dist-client/src/client/package-identity.js +69 -0
- package/dist-client/src/client/workflow-guard.js +1 -1
- package/node_modules/@diffci.com/core/README.md +33 -0
- package/package.json +17 -131
- package/.agents/plugins/marketplace.json +0 -12
- package/.claude-plugin/marketplace.json +0 -17
- package/COMMERCIAL.md +0 -35
- package/SECURITY.md +0 -61
- package/SUPPORT.md +0 -47
- package/action.yml +0 -155
- package/docs/adoption-metrics.md +0 -161
- package/docs/adoption-outreach.md +0 -156
- package/docs/agent-adoption-kit.md +0 -97
- package/docs/agent-adoption-targets.md +0 -62
- package/docs/agent-plugin.md +0 -145
- package/docs/ai-agents.md +0 -123
- package/docs/claude-code.md +0 -18
- package/docs/codex.md +0 -18
- package/docs/copilot.md +0 -18
- package/docs/cursor.md +0 -19
- package/docs/distribution.md +0 -153
- package/docs/grok.md +0 -18
- package/docs/language-support.md +0 -118
- package/docs/mcp.md +0 -116
- package/docs/npm-adoption.md +0 -165
- package/glama.json +0 -12
- package/llms.txt +0 -41
- package/packaging/agent-plugin/.claude-plugin/plugin.json +0 -26
- package/packaging/agent-plugin/.codex-plugin/plugin.json +0 -47
- package/packaging/agent-plugin/.mcp.json +0 -13
- package/packaging/agent-plugin/README.md +0 -36
- package/packaging/agent-plugin/assets/diffci-mark.svg +0 -14
- package/packaging/agent-plugin/mcp.json +0 -15
- package/packaging/agent-plugin/plugin.json +0 -51
- package/packaging/agent-plugin/skills/diffci-verify/SKILL.md +0 -35
- package/packaging/public-plugin/README.md +0 -12
- package/packaging/public-plugin/SUBMISSION.md +0 -21
- package/packaging/public-plugin/assets/icon-dark.png +0 -0
- package/packaging/public-plugin/assets/icon.png +0 -0
- package/packaging/public-plugin/assets/logo-dark.png +0 -0
- package/packaging/public-plugin/assets/logo.png +0 -0
- package/packaging/public-plugin/mcp.json +0 -16
- package/packaging/public-plugin/plugin.json +0 -114
- package/packaging/public-plugin/review/refusal-observation.json +0 -41
- package/packaging/public-plugin/skills/diffci-remote/SKILL.md +0 -19
- package/packaging/public-plugin/skills/get-started/SKILL.md +0 -26
- package/server.json +0 -43
- package/site/assets/calcom-runtime-evidence.svg +0 -11
- package/site/llms.txt +0 -44
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@diffci.com/diffci",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
4
4
|
"description": "Fail-closed, change-aware verification for AI coding agents with conservative affected-test selection",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|
|
@@ -24,10 +24,17 @@
|
|
|
24
24
|
"mcpName": "io.github.DiffCI/diffci",
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|
|
27
|
-
"url": "git+https://github.com/DiffCI/
|
|
27
|
+
"url": "git+https://github.com/DiffCI/core.git",
|
|
28
|
+
"directory": "packages/diffci-cli"
|
|
29
|
+
},
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/DiffCI/core/issues"
|
|
28
32
|
},
|
|
29
33
|
"homepage": "https://diffci.com/",
|
|
30
34
|
"private": false,
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
31
38
|
"type": "module",
|
|
32
39
|
"engines": {
|
|
33
40
|
"node": ">=22.5.0"
|
|
@@ -37,147 +44,26 @@
|
|
|
37
44
|
"diffci-mcp": "dist-client/src/client/mcp.js"
|
|
38
45
|
},
|
|
39
46
|
"files": [
|
|
40
|
-
"action.yml",
|
|
41
47
|
"dist-client/src/client",
|
|
42
48
|
"dist-client/src/preflight",
|
|
43
49
|
"README.md",
|
|
44
|
-
"
|
|
45
|
-
"server.json",
|
|
46
|
-
"glama.json",
|
|
47
|
-
"llms.txt",
|
|
48
|
-
"docs/ai-agents.md",
|
|
49
|
-
"docs/adoption-outreach.md",
|
|
50
|
-
"docs/adoption-metrics.md",
|
|
51
|
-
"docs/agent-adoption-kit.md",
|
|
52
|
-
"docs/agent-adoption-targets.md",
|
|
53
|
-
"docs/mcp.md",
|
|
54
|
-
"docs/codex.md",
|
|
55
|
-
"docs/claude-code.md",
|
|
56
|
-
"docs/cursor.md",
|
|
57
|
-
"docs/copilot.md",
|
|
58
|
-
"docs/grok.md",
|
|
59
|
-
"docs/distribution.md",
|
|
60
|
-
"docs/npm-adoption.md",
|
|
61
|
-
"docs/language-support.md",
|
|
62
|
-
"SECURITY.md",
|
|
63
|
-
"SUPPORT.md",
|
|
64
|
-
"COMMERCIAL.md",
|
|
65
|
-
".claude-plugin/marketplace.json",
|
|
66
|
-
".agents/plugins/marketplace.json",
|
|
67
|
-
"docs/agent-plugin.md",
|
|
68
|
-
"packaging/agent-plugin",
|
|
69
|
-
"packaging/public-plugin"
|
|
50
|
+
"LICENSE"
|
|
70
51
|
],
|
|
71
|
-
"exports": {
|
|
72
|
-
"./*": {
|
|
73
|
-
"types": "./dist/src/*.d.ts",
|
|
74
|
-
"default": "./dist/src/*.js"
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
52
|
"scripts": {
|
|
78
53
|
"typecheck": "tsc --noEmit",
|
|
79
|
-
"build": "
|
|
80
|
-
"test": "tsx --test \"tests/**/*.test.ts\"",
|
|
81
|
-
"check": "npm run check:public-metadata && npm run typecheck && npm run test",
|
|
82
|
-
"prepack": "npm run build:client",
|
|
83
|
-
"package:smoke": "node scripts/package-smoke.mjs",
|
|
84
|
-
"diffci": "tsx scripts/diffci.ts",
|
|
85
|
-
"diffci:verify": "tsx src/client/cli.ts verify --changed --json",
|
|
86
|
-
"impact": "tsx scripts/diffci.ts impact",
|
|
87
|
-
"observe": "tsx src/client/cli.ts observe",
|
|
88
|
-
"verify-workflow": "tsx src/client/cli.ts verify-workflow",
|
|
54
|
+
"build": "npm run build:client",
|
|
89
55
|
"build:client": "tsc -p tsconfig.client.json && node scripts/ensure-client-executables.mjs",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"dogfood:report": "tsx scripts/dogfood-report.ts",
|
|
94
|
-
"dogfood:mutate": "tsx scripts/dogfood-mutate.ts",
|
|
95
|
-
"dogfood:qualify": "tsx scripts/dogfood-qualify.ts",
|
|
96
|
-
"dogfood:freeze": "tsx scripts/dogfood-freeze.ts",
|
|
97
|
-
"shadow": "tsx scripts/diffci-shadow.ts",
|
|
98
|
-
"shadow-report": "tsx scripts/diffci-shadow-report.ts",
|
|
99
|
-
"evidence:dentalpresence": "tsx scripts/dentalpresence-evidence-report.ts",
|
|
100
|
-
"evidence:dentalpresence-pairs": "tsx scripts/dentalpresence-pair-report.ts",
|
|
101
|
-
"check:dentalpresence": "tsx scripts/check-dentalpresence.ts",
|
|
102
|
-
"audit:dentalpresence": "tsx scripts/audit-dentalpresence-graph.ts",
|
|
103
|
-
"audit:dentalpresence-impact": "tsx scripts/audit-dentalpresence-impact.ts",
|
|
104
|
-
"research:stage0": "tsx src/research/cli/run-stage0.ts",
|
|
105
|
-
"research:sandbox:deploy": "wrangler deploy --config wrangler.research-sandbox.jsonc",
|
|
106
|
-
"shadow:upload-source": "tsx scripts/upload-shadow-source.ts",
|
|
107
|
-
"shadow:deploy": "tsx scripts/deploy-research-sandbox.ts",
|
|
108
|
-
"shadow:screen": "tsx scripts/screen-shadow-eligibility.ts",
|
|
109
|
-
"shadow:status": "node scripts/shadow-status.mjs",
|
|
110
|
-
"shadow:report": "tsx scripts/generate-shadow-report.ts",
|
|
111
|
-
"shadow:freshness": "tsx scripts/check-deployment-freshness.ts",
|
|
112
|
-
"shadow:missed-commits": "tsx scripts/derive-missed-commits.ts",
|
|
113
|
-
"github-runner:deploy": "wrangler deploy --config wrangler.github-runner.jsonc",
|
|
114
|
-
"product:deploy": "wrangler deploy --config wrangler.product.jsonc",
|
|
115
|
-
"product:migrate": "tsx scripts/migrate-product-db.ts",
|
|
116
|
-
"site:dev": "wrangler dev --config wrangler.site.jsonc --port 8788",
|
|
117
|
-
"site:check": "tsx --test tests/site/seo.test.ts tests/site/site-worker.test.ts",
|
|
118
|
-
"site:prepare": "npm run site:sitemap && npm run site:check",
|
|
119
|
-
"site:deploy": "npm run site:prepare && wrangler deploy --config wrangler.site.jsonc && npm run site:indexnow",
|
|
120
|
-
"site:sitemap": "node scripts/generate-site-sitemap.mjs",
|
|
121
|
-
"site:indexnow": "node scripts/submit-indexnow.mjs",
|
|
122
|
-
"release:sync": "node scripts/sync-public-metadata.mjs",
|
|
123
|
-
"study:render": "tsx scripts/render-open-study.ts",
|
|
124
|
-
"validation:deploy": "wrangler deploy --config wrangler.validation-env.jsonc",
|
|
125
|
-
"validation:pack": "tsx scripts/diffci-validation-cli.ts pack",
|
|
126
|
-
"validation:start": "tsx scripts/diffci-validation-cli.ts start",
|
|
127
|
-
"validation:status": "tsx scripts/diffci-validation-cli.ts status",
|
|
128
|
-
"validation:collect": "tsx scripts/diffci-validation-cli.ts collect",
|
|
129
|
-
"dogfood:compare": "tsx scripts/dogfood-compare.ts",
|
|
130
|
-
"verify:savings-pilot": "tsx scripts/verify-savings-pilot.ts",
|
|
131
|
-
"test:calibration": "tsx --test \"tests/scripts/harness-calibration.test.ts\" \"tests/scripts/compute-usage.test.ts\"",
|
|
132
|
-
"agent:equivalence": "tsx scripts/agent-equivalence.ts",
|
|
133
|
-
"dogfood:economics": "tsx scripts/dogfood-economics.ts",
|
|
134
|
-
"analyze:buckets": "tsx scripts/analyze-selection-buckets.ts",
|
|
135
|
-
"trace:selection": "tsx scripts/trace-selection-provenance.ts",
|
|
136
|
-
"diagnose:symbols": "tsx scripts/diagnose-symbol-precision.ts",
|
|
137
|
-
"eligibility": "tsx scripts/economic-eligibility.ts",
|
|
138
|
-
"calibrate": "tsx scripts/calibrate-repository.ts",
|
|
139
|
-
"survey": "tsx scripts/survey-run.ts",
|
|
140
|
-
"diagnose:candidate": "tsx scripts/diagnose-candidate.ts",
|
|
141
|
-
"select:candidate": "tsx scripts/select-source-candidate.ts",
|
|
142
|
-
"survey:density": "tsx scripts/survey-mapping-density.ts",
|
|
143
|
-
"trace:imports": "tsx scripts/trace-import-resolution.ts",
|
|
144
|
-
"select:compute-proof": "tsx scripts/select-compute-proof.ts",
|
|
145
|
-
"funnel:qualification": "tsx scripts/qualification-funnel.ts",
|
|
146
|
-
"select:mechanism-proof": "tsx scripts/select-mechanism-proof.ts",
|
|
147
|
-
"observe:pairs": "tsx scripts/observe-named-pairs.ts",
|
|
148
|
-
"qualify:universe": "tsx scripts/qualify-universe.ts",
|
|
149
|
-
"corpus:register": "tsx scripts/register-corpus-entry.ts",
|
|
150
|
-
"ci:benchmark": "tsx scripts/ci-inference-benchmark.ts",
|
|
151
|
-
"ci:reproduce": "tsx scripts/ci-reproduction.ts",
|
|
152
|
-
"cloud:pilot": "tsx scripts/diffci-analysis-fanout-cli.ts",
|
|
153
|
-
"check:oss-boundary": "node scripts/check-oss-boundary.mjs",
|
|
154
|
-
"check:public-metadata": "node scripts/check-public-metadata.mjs",
|
|
155
|
-
"registry:verify": "node scripts/verify-mcp-registry.mjs"
|
|
56
|
+
"prepack": "npm run build:client",
|
|
57
|
+
"package:check": "node scripts/check-package-boundary.mjs",
|
|
58
|
+
"package:smoke": "node scripts/package-smoke.mjs"
|
|
156
59
|
},
|
|
157
60
|
"dependencies": {
|
|
158
|
-
"@diffci.com/core": "git+https://github.com/DiffCI/core.git#
|
|
159
|
-
"@types/node": "^22.15.12",
|
|
160
|
-
"@vue/compiler-sfc": "3.5.42",
|
|
161
|
-
"typescript": "^5.8.3",
|
|
61
|
+
"@diffci.com/core": "git+https://github.com/DiffCI/core.git#4c76be14cec37d94eb7df93922f3c29d202f4e65",
|
|
162
62
|
"yaml": "^2.9.0"
|
|
163
63
|
},
|
|
164
64
|
"devDependencies": {
|
|
165
|
-
"@
|
|
166
|
-
"
|
|
167
|
-
"esbuild": "^0.28.2",
|
|
168
|
-
"pdf-lib": "^1.17.1",
|
|
169
|
-
"tsx": "^4.23.12",
|
|
170
|
-
"wrangler": "4.120.0"
|
|
171
|
-
},
|
|
172
|
-
"diffci": {
|
|
173
|
-
"alwaysRunTests": [
|
|
174
|
-
"**/security.test.*",
|
|
175
|
-
"**/test-security.*",
|
|
176
|
-
"**/*api-guardrails*",
|
|
177
|
-
"**/verify-*.test.*",
|
|
178
|
-
"**/validate-*.test.*",
|
|
179
|
-
"scripts/**/*.test.mjs"
|
|
180
|
-
]
|
|
65
|
+
"@types/node": "^22.15.12",
|
|
66
|
+
"typescript": "^5.8.3"
|
|
181
67
|
},
|
|
182
68
|
"bundleDependencies": [
|
|
183
69
|
"@diffci.com/core"
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "diffci-local",
|
|
3
|
-
"interface": { "displayName": "DiffCI" },
|
|
4
|
-
"plugins": [
|
|
5
|
-
{
|
|
6
|
-
"name": "diffci",
|
|
7
|
-
"source": { "source": "local", "path": "./packaging/agent-plugin" },
|
|
8
|
-
"policy": { "installation": "AVAILABLE", "authentication": "ON_INSTALL" },
|
|
9
|
-
"category": "Productivity"
|
|
10
|
-
}
|
|
11
|
-
]
|
|
12
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "diffci-marketplace",
|
|
3
|
-
"description": "DiffCI plugins for change-aware CI verification.",
|
|
4
|
-
"version": "1.0.0",
|
|
5
|
-
"owner": {
|
|
6
|
-
"name": "DiffCI",
|
|
7
|
-
"email": "support@diffci.com",
|
|
8
|
-
"url": "https://diffci.com/"
|
|
9
|
-
},
|
|
10
|
-
"plugins": [
|
|
11
|
-
{
|
|
12
|
-
"name": "diffci",
|
|
13
|
-
"source": "./packaging/agent-plugin",
|
|
14
|
-
"description": "Change-aware CI verification with conservative affected-test selection and full fallback."
|
|
15
|
-
}
|
|
16
|
-
]
|
|
17
|
-
}
|
package/COMMERCIAL.md
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Commercial DiffCI boundary
|
|
2
|
-
|
|
3
|
-
DiffCI is an open-core project with two separate software boundaries.
|
|
4
|
-
|
|
5
|
-
## Open-source core
|
|
6
|
-
|
|
7
|
-
DiffCI Core is the installable observation-only package published as `@diffci.com/diffci`.
|
|
8
|
-
|
|
9
|
-
It is licensed AGPL-3.0-only and includes:
|
|
10
|
-
|
|
11
|
-
- the engine/client/action code shipped in the npm package;
|
|
12
|
-
- local analysis;
|
|
13
|
-
- local JSON reports;
|
|
14
|
-
- the basic GitHub Action;
|
|
15
|
-
- optional submission to a configured hosted endpoint.
|
|
16
|
-
|
|
17
|
-
The exact package boundary is recorded in [`docs/oss-boundary.md`](docs/oss-boundary.md).
|
|
18
|
-
|
|
19
|
-
## Commercial DiffCI
|
|
20
|
-
|
|
21
|
-
Commercial DiffCI is proprietary software. It includes code and services for:
|
|
22
|
-
|
|
23
|
-
- DiffCI Cloud;
|
|
24
|
-
- organization dashboards;
|
|
25
|
-
- private report access;
|
|
26
|
-
- historical analytics;
|
|
27
|
-
- enterprise policies;
|
|
28
|
-
- managed runners;
|
|
29
|
-
- team and organization features;
|
|
30
|
-
- billing, ledger, usage, and entitlement systems;
|
|
31
|
-
- deployment, research, operations, and control-plane infrastructure.
|
|
32
|
-
|
|
33
|
-
Commercial DiffCI is not licensed under the AGPL merely because it lives in the same repository. Files
|
|
34
|
-
outside the OSS package boundary remain proprietary unless a later change explicitly moves them into the
|
|
35
|
-
OSS package boundary.
|
package/SECURITY.md
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
# Security policy
|
|
2
|
-
|
|
3
|
-
## Supported project
|
|
4
|
-
|
|
5
|
-
This policy covers the DiffCI open-source core package, published as `@diffci.com/diffci`.
|
|
6
|
-
|
|
7
|
-
Covered surfaces:
|
|
8
|
-
|
|
9
|
-
- `diffci observe`
|
|
10
|
-
- `diffci verify-workflow`
|
|
11
|
-
- the basic GitHub Action in `action.yml`
|
|
12
|
-
- local report generation
|
|
13
|
-
- optional report submission to a configured endpoint and token
|
|
14
|
-
|
|
15
|
-
Commercial DiffCI, including DiffCI Cloud, hosted dashboards, managed runners, billing, organization
|
|
16
|
-
management, private report access, and enterprise policy features, is separate proprietary software and
|
|
17
|
-
is handled through commercial support channels.
|
|
18
|
-
|
|
19
|
-
## Supported versions
|
|
20
|
-
|
|
21
|
-
The supported OSS package line is the latest published npm release. Security fixes are released as a
|
|
22
|
-
new npm version and Git tag.
|
|
23
|
-
|
|
24
|
-
DiffCI Core requires Node.js `>=22.5.0`.
|
|
25
|
-
|
|
26
|
-
## Reporting a vulnerability
|
|
27
|
-
|
|
28
|
-
Do not open a public issue for a suspected vulnerability.
|
|
29
|
-
|
|
30
|
-
Report security issues by email to:
|
|
31
|
-
|
|
32
|
-
```text
|
|
33
|
-
security@diffci.com
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Include:
|
|
37
|
-
|
|
38
|
-
- affected package/version;
|
|
39
|
-
- affected command or GitHub Action path;
|
|
40
|
-
- reproduction steps;
|
|
41
|
-
- expected impact;
|
|
42
|
-
- whether any token, report, repository data, or CI behavior is exposed or modified.
|
|
43
|
-
|
|
44
|
-
## Response target
|
|
45
|
-
|
|
46
|
-
For the OSS package:
|
|
47
|
-
|
|
48
|
-
- acknowledge within 3 business days;
|
|
49
|
-
- provide an initial assessment within 7 business days;
|
|
50
|
-
- publish a fix or mitigation plan when the issue is confirmed.
|
|
51
|
-
|
|
52
|
-
## Security boundaries
|
|
53
|
-
|
|
54
|
-
DiffCI Core is observation-only. A security issue is especially important if it causes the observer to:
|
|
55
|
-
|
|
56
|
-
- modify the repository checkout without reporting it;
|
|
57
|
-
- affect another CI job's conclusion;
|
|
58
|
-
- expose tokens or report submission credentials;
|
|
59
|
-
- submit a report to the wrong repository or organization;
|
|
60
|
-
- include source file contents when the report schema says it does not;
|
|
61
|
-
- bypass the OSS package boundary and include commercial/control-plane code.
|
package/SUPPORT.md
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Support policy
|
|
2
|
-
|
|
3
|
-
## Open-source core
|
|
4
|
-
|
|
5
|
-
Supported package:
|
|
6
|
-
|
|
7
|
-
```text
|
|
8
|
-
@diffci.com/diffci
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Supported surfaces:
|
|
12
|
-
|
|
13
|
-
- `diffci observe`
|
|
14
|
-
- `diffci verify-workflow`
|
|
15
|
-
- `diffci version`
|
|
16
|
-
- the basic GitHub Action in `action.yml`
|
|
17
|
-
- local JSON observation reports
|
|
18
|
-
- optional report submission to a configured endpoint and token
|
|
19
|
-
|
|
20
|
-
Supported runtime:
|
|
21
|
-
|
|
22
|
-
```text
|
|
23
|
-
Node.js >=22.5.0
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
The open-source support commitment is limited to the latest published npm release unless a security
|
|
27
|
-
advisory says otherwise.
|
|
28
|
-
|
|
29
|
-
## Commercial DiffCI
|
|
30
|
-
|
|
31
|
-
Commercial DiffCI is separate proprietary software. It includes:
|
|
32
|
-
|
|
33
|
-
- DiffCI Cloud;
|
|
34
|
-
- hosted dashboards and private report access;
|
|
35
|
-
- organization/team management;
|
|
36
|
-
- historical analytics;
|
|
37
|
-
- enterprise policies;
|
|
38
|
-
- managed runners;
|
|
39
|
-
- billing, ledger, and support operations;
|
|
40
|
-
- deployment and control-plane infrastructure.
|
|
41
|
-
|
|
42
|
-
Those features are not included in Tidelift package support for the OSS dependency.
|
|
43
|
-
|
|
44
|
-
## Tidelift boundary
|
|
45
|
-
|
|
46
|
-
Tidelift support, if accepted, should cover the open-source npm package as a dependency. It should not be
|
|
47
|
-
used to represent DiffCI Cloud, managed runners, or enterprise policy features as open source.
|
package/action.yml
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
# DiffCI observer - the GitHub Action a third-party repository installs (Phase 02, 2026-08-26).
|
|
2
|
-
#
|
|
3
|
-
# WHAT THIS DOES: analyses one commit range against the checkout the job already has, writes a JSON
|
|
4
|
-
# report to the runner's temp directory, prints a summary to the job log and the job summary, optionally
|
|
5
|
-
# uploads the report as an artifact, and - only when `api-url` and `api-token` are both set - sends that
|
|
6
|
-
# same report to DiffCI. With no token configured nothing leaves the runner at all.
|
|
7
|
-
#
|
|
8
|
-
# WHAT THIS DOES NOT DO, and cannot: run tests, skip tests, cancel a job, re-order steps, write to the
|
|
9
|
-
# repository, comment on a pull request, or set a check status. There is no input below that turns any
|
|
10
|
-
# of that on, because the claim being tested for seven days is that installing DiffCI leaves CI
|
|
11
|
-
# byte-identical, and a flag that could change what CI runs would eventually be set by accident.
|
|
12
|
-
#
|
|
13
|
-
# INSTALL IT AS ITS OWN JOB. A job of its own is what makes the claim structural rather than careful:
|
|
14
|
-
#
|
|
15
|
-
# jobs:
|
|
16
|
-
# diffci:
|
|
17
|
-
# runs-on: ubuntu-24.04
|
|
18
|
-
# continue-on-error: true # a DiffCI failure must not become the workflow's conclusion
|
|
19
|
-
# permissions:
|
|
20
|
-
# contents: read
|
|
21
|
-
# steps:
|
|
22
|
-
# - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
23
|
-
# with:
|
|
24
|
-
# fetch-depth: 0 # the base commit must exist locally, or DiffCI refuses
|
|
25
|
-
# - uses: DiffCI/DiffCI.com@<40-character commit sha>
|
|
26
|
-
#
|
|
27
|
-
# `diffci verify-workflow` checks those properties against your own workflow files and exits non-zero
|
|
28
|
-
# if any of them does not hold. Run it before the observation window starts.
|
|
29
|
-
name: DiffCI observer
|
|
30
|
-
description: Observation-only change-aware CI analysis. Runs nothing, changes nothing, skips nothing.
|
|
31
|
-
branding:
|
|
32
|
-
icon: eye
|
|
33
|
-
color: gray-dark
|
|
34
|
-
|
|
35
|
-
inputs:
|
|
36
|
-
repository-path:
|
|
37
|
-
description: The checkout to observe. Defaults to the workspace.
|
|
38
|
-
required: false
|
|
39
|
-
default: ${{ github.workspace }}
|
|
40
|
-
base-sha:
|
|
41
|
-
description: Base commit. Leave empty to derive it from the event (pull request base, push before).
|
|
42
|
-
required: false
|
|
43
|
-
default: ""
|
|
44
|
-
head-sha:
|
|
45
|
-
description: Head commit. Must be given together with base-sha.
|
|
46
|
-
required: false
|
|
47
|
-
default: ""
|
|
48
|
-
node-version:
|
|
49
|
-
description: Node version used to run the observer. Only affects this job.
|
|
50
|
-
required: false
|
|
51
|
-
default: "22"
|
|
52
|
-
report-path:
|
|
53
|
-
description: Where to write the report. Must be outside the checkout. Defaults to RUNNER_TEMP.
|
|
54
|
-
required: false
|
|
55
|
-
default: ""
|
|
56
|
-
redact-paths:
|
|
57
|
-
description: Replace every file path in the report with a stable 12-character digest.
|
|
58
|
-
required: false
|
|
59
|
-
default: "false"
|
|
60
|
-
upload-artifact:
|
|
61
|
-
description: Upload the report as a workflow artifact.
|
|
62
|
-
required: false
|
|
63
|
-
default: "true"
|
|
64
|
-
artifact-name:
|
|
65
|
-
description: Name of the uploaded artifact.
|
|
66
|
-
required: false
|
|
67
|
-
default: diffci-observation
|
|
68
|
-
artifact-retention-days:
|
|
69
|
-
description: Retention for the uploaded artifact.
|
|
70
|
-
required: false
|
|
71
|
-
default: "7"
|
|
72
|
-
api-url:
|
|
73
|
-
description: >-
|
|
74
|
-
DiffCI ingest endpoint. Leave empty and nothing is sent anywhere - the report stays on the runner
|
|
75
|
-
as an artifact. Must be https.
|
|
76
|
-
required: false
|
|
77
|
-
default: ""
|
|
78
|
-
api-token:
|
|
79
|
-
description: >-
|
|
80
|
-
Ingest token for THIS repository, from a repository secret. Pass it as the workflow expression
|
|
81
|
-
for secrets.DIFFCI_TOKEN, never as a literal. Nothing is sent without it. (This text deliberately
|
|
82
|
-
does not spell out the expression: GitHub evaluates expressions inside action metadata, and
|
|
83
|
-
"secrets" is not a context an action file may use - a literal expression here made the whole
|
|
84
|
-
action fail to load on every run until 2026-09-06.)
|
|
85
|
-
required: false
|
|
86
|
-
default: ""
|
|
87
|
-
fail-on-error:
|
|
88
|
-
description: >-
|
|
89
|
-
Fail this step when the observation refuses or errors. Default false, so a DiffCI problem never
|
|
90
|
-
shows up as a red step in your CI. Turn it on only while debugging an installation.
|
|
91
|
-
required: false
|
|
92
|
-
default: "false"
|
|
93
|
-
|
|
94
|
-
outputs:
|
|
95
|
-
report-path:
|
|
96
|
-
description: Absolute path of the written report.
|
|
97
|
-
value: ${{ steps.observe.outputs.report-path }}
|
|
98
|
-
status:
|
|
99
|
-
description: OBSERVED, REFUSED, or ERROR.
|
|
100
|
-
value: ${{ steps.observe.outputs.status }}
|
|
101
|
-
|
|
102
|
-
runs:
|
|
103
|
-
using: composite
|
|
104
|
-
steps:
|
|
105
|
-
- name: Set up Node for the observer
|
|
106
|
-
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
107
|
-
with:
|
|
108
|
-
node-version: ${{ inputs.node-version }}
|
|
109
|
-
|
|
110
|
-
# Installed into the action's own directory, never into the observed repository: nothing here
|
|
111
|
-
# touches the workspace, its node_modules, or its lockfile. --omit=dev keeps this to TypeScript and
|
|
112
|
-
# a YAML parser; --ignore-scripts means no dependency of DiffCI's runs code on your runner.
|
|
113
|
-
- name: Install observer dependencies
|
|
114
|
-
shell: bash
|
|
115
|
-
working-directory: ${{ github.action_path }}
|
|
116
|
-
run: npm ci --omit=dev --no-audit --fund=false --ignore-scripts
|
|
117
|
-
|
|
118
|
-
- name: Build observer
|
|
119
|
-
shell: bash
|
|
120
|
-
working-directory: ${{ github.action_path }}
|
|
121
|
-
run: node_modules/.bin/tsc -p tsconfig.client.json
|
|
122
|
-
|
|
123
|
-
- name: Observe
|
|
124
|
-
id: observe
|
|
125
|
-
shell: bash
|
|
126
|
-
env:
|
|
127
|
-
DIFFCI_REPO: ${{ inputs.repository-path }}
|
|
128
|
-
DIFFCI_BASE: ${{ inputs.base-sha }}
|
|
129
|
-
DIFFCI_HEAD: ${{ inputs.head-sha }}
|
|
130
|
-
DIFFCI_OUT: ${{ inputs.report-path }}
|
|
131
|
-
DIFFCI_REDACT: ${{ inputs.redact-paths }}
|
|
132
|
-
DIFFCI_FAIL_ON_ERROR: ${{ inputs.fail-on-error }}
|
|
133
|
-
# Passed through the environment, never on the command line: an argv is visible to every other
|
|
134
|
-
# process on the runner and shows up in traces. The observer reads these directly and never
|
|
135
|
-
# prints them.
|
|
136
|
-
DIFFCI_API_URL: ${{ inputs.api-url }}
|
|
137
|
-
DIFFCI_TOKEN: ${{ inputs.api-token }}
|
|
138
|
-
run: |
|
|
139
|
-
set -euo pipefail
|
|
140
|
-
args=(observe --repo "$DIFFCI_REPO")
|
|
141
|
-
if [ -n "$DIFFCI_BASE" ]; then args+=(--base "$DIFFCI_BASE"); fi
|
|
142
|
-
if [ -n "$DIFFCI_HEAD" ]; then args+=(--head "$DIFFCI_HEAD"); fi
|
|
143
|
-
if [ -n "$DIFFCI_OUT" ]; then args+=(--out "$DIFFCI_OUT"); fi
|
|
144
|
-
if [ "$DIFFCI_REDACT" = "true" ]; then args+=(--redact-paths); fi
|
|
145
|
-
if [ "$DIFFCI_FAIL_ON_ERROR" = "true" ]; then args+=(--fail-on-error); fi
|
|
146
|
-
node "$GITHUB_ACTION_PATH/dist-client/src/client/cli.js" "${args[@]}"
|
|
147
|
-
|
|
148
|
-
- name: Upload observation report
|
|
149
|
-
if: ${{ inputs.upload-artifact == 'true' && steps.observe.outputs.report-path != '' }}
|
|
150
|
-
uses: actions/upload-artifact@v4
|
|
151
|
-
with:
|
|
152
|
-
name: ${{ inputs.artifact-name }}
|
|
153
|
-
path: ${{ steps.observe.outputs.report-path }}
|
|
154
|
-
retention-days: ${{ inputs.artifact-retention-days }}
|
|
155
|
-
if-no-files-found: warn
|