coderifts 8.3.0 → 8.5.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/CHANGELOG.md +18 -0
- package/README.md +23 -8
- package/bin/coderifts.js +33 -3
- package/dist/.build-source-sha +2 -2
- package/dist/cli.js +1071 -64
- package/package.json +3 -2
- package/scripts/check-packed-install.js +91 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 8.5.0 - 2026-09-07
|
|
6
|
+
|
|
7
|
+
The generated check-summary reads the rulesets API when there is no classic branch protection (a ruleset-governed repo no longer reports protection_not_configured). The quickstart's Atomic example carries the issuer-grant keyring. The strict workflow template pins contract-gate at d1c348d (v0.9.0), the current gate commit.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 8.4.0 - 2026-09-06
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Published onboarding for Atomic V2: `coderifts init --agents --atomic-v2` (and `init --strict --atomic-v2`) writes an `ENFORCING_ATOMIC_V2` config plus fail-closed wiring placeholders (`PROFILE_CONFIGURED` / `WIRING_REQUIRED`, `atomic_v2_verified: false`). `coderifts verify atomic-v2` is in the packed binary (exit **0** `TARGET_ENFORCEMENT_VERIFIED` for a named reference target; **2** `WIRING_REQUIRED` for a customer target until the six adapter operations are wired; **3** `VERIFICATION_FAILED`; **1** usage). Packed-install smoke runs `coderifts init --agents --atomic-v2 --dry-run`.
|
|
14
|
+
- ATOMIC_V2 phase 2 (réteg 3): versioned adapter-contract `atomic-v2-adapter/1` (six operations: `state_challenge`, `consume`, `conditional_write`, `mutate`, `executor_attestation`, `provider_readback`). Capability discovery is a machine probe. `coderifts verify atomic-v2` is target-bound (`--target --environment --executor-identity --operation --adapter-id`); reference-executor success is not inherited. Mandatory negative probes (replay, expired challenge, wrong target, CAS mismatch, missing attestation, mismatched JTI/scope-hash) must fail-close. `customer_target_verified:false` + `production_ready:true` is unconstructible.
|
|
15
|
+
- `coderifts init --strict --atomic-v2` writes an `ENFORCING_ATOMIC_V2` config plus fail-closed `unconfiguredCapability` wiring placeholders (`PROFILE_CONFIGURED` / `WIRING_REQUIRED`, `atomic_v2_verified: false`). Init may succeed; verify must not exit 0 on incomplete wiring. Placeholders throw; they are not no-ops.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- Strict installer teaching (`coderifts init --agents --strict`): primary production grant is `cr.exec.v2` (mint with `grantVersion: 'v2'`). `cr.exec.v1` is labelled legacy; the gate still accepts both so a migration is not a hard cut. `ENFORCING_ATOMIC_V2` is not the installer default — that profile needs customer-held executor wiring this installer cannot emit.
|
|
19
|
+
- `inescapable_deploy` is false while `MERGEGATE_ENFORCE` is unobservable. All six layers `VERIFIED` is a proven binding, not a proven inescapable deploy; the composite reads `CLAMP_RESIDUAL` on `required_check` (classic and ruleset). True only when `MERGEGATE_ENFORCE` is observably `'true'`.
|
|
20
|
+
|
|
3
21
|
## 8.3.0 - 2026-09-05
|
|
4
22
|
|
|
5
23
|
### Changed
|
package/README.md
CHANGED
|
@@ -75,7 +75,9 @@ coderifts init --agents --hosts=cursor # Cursor only
|
|
|
75
75
|
coderifts init --agents --hosts=copilot # GitHub Copilot / VS Code only
|
|
76
76
|
coderifts init --agents --no-hook # skip host hook install
|
|
77
77
|
coderifts init --agents --no-workflow # skip .github/workflows/coderifts.yml
|
|
78
|
-
coderifts init --agents --strict # STRICT: require-verified-monitoring
|
|
78
|
+
coderifts init --agents --strict # STRICT: require-verified-monitoring + require-grant (cr.exec.v2 primary)
|
|
79
|
+
coderifts init --strict --atomic-v2 # ATOMIC_V2 config + fail-closed wiring (implies --agents --strict)
|
|
80
|
+
coderifts verify atomic-v2 # 0 TARGET_ENFORCEMENT_VERIFIED; 2 WIRING_REQUIRED; 3 VERIFICATION_FAILED; 1 usage
|
|
79
81
|
coderifts init --agents --check # which of the four pieces are present
|
|
80
82
|
```
|
|
81
83
|
|
|
@@ -84,17 +86,28 @@ coderifts init --agents --check # which of the four pieces are present
|
|
|
84
86
|
| **MCP config** | `.mcp.json` (Claude Code), `.cursor/mcp.json` (Cursor), `.vscode/mcp.json` (Copilot / VS Code) | Three shapes, never normalised into one: Claude `mcpServers` + `type: "http"` + `url`; Cursor `mcpServers` + `url` only (no `type`); Copilot **`servers`** (not `mcpServers`) + `type: "http"` + `url`. Never `httpUrl` (that is Gemini, extension-level — this command does not write it). |
|
|
85
87
|
| **Agent rules** | generated host files via `agent-setup`'s writer | `AGENTS.md` is always written. Claude also gets `CLAUDE.md`; Cursor also gets `.cursor/rules/coderifts.mdc`; Copilot also gets `.github/copilot-instructions.md`. `--hosts=all` adds LangGraph and OpenAI instructions. (`coderifts init agent` is a different command — it writes a `.coderifts.yml` template.) |
|
|
86
88
|
| **Host hook** | `.claude/settings.json`, `.cursor/hooks.json` | Reuses `hook install --claude` / `--cursor` (JSON-merge, backup, idempotent). Copilot shares Claude's `.claude/settings.json` — VS Code reads it by default. |
|
|
87
|
-
| **CI workflow** | `.github/workflows/coderifts.yml` | `coderifts/contract-gate@v0`. Default: `require-verified-monitoring` commented (honest default: **false**). `--strict`: the same file with `require-verified-monitoring: 'true'` |
|
|
89
|
+
| **CI workflow** | `.github/workflows/coderifts.yml` | `coderifts/contract-gate@v0`. Default: `require-verified-monitoring` commented (honest default: **false**). `--strict`: the same file with `require-verified-monitoring: 'true'` and `require-grant: 'true'` (teaches `cr.exec.v2`) |
|
|
88
90
|
|
|
89
91
|
**Grant versions** (these names are not interchangeable; field-by-field matrix: [Grant versions](https://github.com/coderifts/app/blob/main/docs/grant-versions.md)):
|
|
90
92
|
|
|
91
93
|
| What | Who uses it | What it proves |
|
|
92
94
|
|------|-------------|----------------|
|
|
93
|
-
| `cr.exec.
|
|
94
|
-
|
|
|
95
|
-
| `ENFORCING_STRICT` | Guard `withCodeRifts({ profile })` | Permanent alias of `ENFORCING_STRICT_V1` (must resolve to `_V1` forever). Not a grant format. Different axis from `ENFORCING_ATOMIC_V1`/`V2
|
|
95
|
+
| `cr.exec.v2` | `coderifts init --agents --strict` (`require-grant`); Guard/SDK when `grantVersion: 'v2'` | Canonical production execution grant. Not the same bytes as v1. Mint with `grantVersion: 'v2'`. |
|
|
96
|
+
| `cr.exec.v1` | capability-demo; legacy/migration | Older reference grant bound to `operation ∥ target_id ∥ after_payload`. Not the installer default. The gate still accepts it so a migration is not a hard cut. |
|
|
97
|
+
| `ENFORCING_STRICT` | Guard `withCodeRifts({ profile })` | Permanent alias of `ENFORCING_STRICT_V1` (must resolve to `_V1` forever). Installer-reachable production lock. Not a grant format. Different axis from `ENFORCING_ATOMIC_V1`/`V2` — those require customer-held executor wiring this installer does not emit. |
|
|
96
98
|
|
|
97
|
-
`--strict` turns on `require-grant` and `require-verified-monitoring` in the workflow; it
|
|
99
|
+
`--strict` turns on `require-grant` and `require-verified-monitoring` in the workflow; it teaches `cr.exec.v2` as the grant to mint. It does not emit `ENFORCING_ATOMIC_V2`.
|
|
100
|
+
|
|
101
|
+
`--atomic-v2` writes `.coderifts/atomic-v2.json` plus fail-closed `unconfiguredCapability` wiring placeholders. Init may exit 0 with `PROFILE_CONFIGURED` / `WIRING_REQUIRED` (`state: ATOMIC_V2_CONFIGURED`, `atomic_v2_verified: false`). That is configuration, not target enforcement. `coderifts verify atomic-v2` is the verifier and **must not exit 0** while placeholders remain:
|
|
102
|
+
|
|
103
|
+
| Exit | Meaning |
|
|
104
|
+
|------|---------|
|
|
105
|
+
| **0** | `TARGET_ENFORCEMENT_VERIFIED` — customer target fully verified |
|
|
106
|
+
| **2** | `WIRING_REQUIRED` — config installed, placeholders still throw |
|
|
107
|
+
| **3** | `VERIFICATION_FAILED` — wiring present but verification failed (including a document that claimed `verified:true` with incomplete wiring) |
|
|
108
|
+
| **1** | usage / missing config |
|
|
109
|
+
|
|
110
|
+
Never emit `state: ENFORCING_ATOMIC_V2` with `atomic_v2_verified: true` while any of the adapter-contract (`atomic-v2-adapter/1`) operations is missing: `state_challenge`, `consume`, `conditional_write`, `mutate`, `executor_attestation`, `provider_readback`. Discovery is a machine probe, not a customer boolean. Exit 0 is target-bound (`--target --environment --executor-identity --operation --adapter-id`); a reference-executor success is not inherited. `customer_target_verified:false` and `production_ready:true` cannot be constructed together. The names are `PROFILE_CONFIGURED` / `TARGET_ENFORCEMENT_VERIFIED`, not STRICT-vs-ATOMIC (that pairing would read as a weaker-but-acceptable end state).
|
|
98
111
|
|
|
99
112
|
**Next manual step:** add `CODERIFTS_API_KEY` to the repository secrets. The
|
|
100
113
|
CLI never writes a key anywhere.
|
|
@@ -477,7 +490,9 @@ coderifts enforce --check --repo owner/repo --env production --json
|
|
|
477
490
|
Provider-native pipeline-protection evidence. This is **not** a host claim:
|
|
478
491
|
`--enforce` and `CODERIFTS_DEPLOY_NO_BYPASS` do **not** set
|
|
479
492
|
`inescapable_deploy`. The field is true only when every layer below is
|
|
480
|
-
`VERIFIED
|
|
493
|
+
`VERIFIED` **and** `MERGEGATE_ENFORCE` is observably true. A `VERIFIED`
|
|
494
|
+
required-check binding whose reason names the unobservable clamp is not an
|
|
495
|
+
inescapable deploy.
|
|
481
496
|
|
|
482
497
|
| Layer | VERIFIED when |
|
|
483
498
|
|-------|----------------|
|
|
@@ -488,7 +503,7 @@ Provider-native pipeline-protection evidence. This is **not** a host claim:
|
|
|
488
503
|
| `workflow_contract_gate` | an **active** job (not `if: false`) has a step whose `uses:` is `coderifts/contract-gate` at a pinned major. Comments, string literals, and commented-out steps are **NOT_VERIFIED** |
|
|
489
504
|
| `workflow_deploy_gate` | an **active** job step **invokes** `coderifts deploy-gate` (not `echo` of the string; not a comment) |
|
|
490
505
|
|
|
491
|
-
**Invariant:** any layer whose evidence cannot be bound to an issuer (our GitHub App id) or to an active job is `NOT_VERIFIED` or `UNVERIFIABLE` — never `VERIFIED`. `inescapable_deploy` remains true only when every layer is `VERIFIED`
|
|
506
|
+
**Invariant:** any layer whose evidence cannot be bound to an issuer (our GitHub App id) or to an active job is `NOT_VERIFIED` or `UNVERIFIABLE` — never `VERIFIED`. `inescapable_deploy` remains true only when every layer is `VERIFIED` **and** `MERGEGATE_ENFORCE` is observably true.
|
|
492
507
|
|
|
493
508
|
Statuses: `VERIFIED` / `NOT_VERIFIED` / `UNVERIFIABLE(reason)`. Auth:
|
|
494
509
|
`GITHUB_TOKEN` (never printed). **No token** → API layers `UNVERIFIABLE` with
|
package/bin/coderifts.js
CHANGED
|
@@ -165,7 +165,8 @@ program
|
|
|
165
165
|
.option('--hosts <list>', 'With --agents: claude, cursor, copilot, or all (default: all)', 'all')
|
|
166
166
|
.option('--no-hook', 'With --agents: skip host hook install')
|
|
167
167
|
.option('--no-workflow', 'With --agents: skip writing .github/workflows/coderifts.yml')
|
|
168
|
-
.option('--strict', 'With --agents: STRICT workflow (require-verified-monitoring
|
|
168
|
+
.option('--strict', 'With --agents: STRICT workflow (require-verified-monitoring + require-grant; cr.exec.v2 primary)')
|
|
169
|
+
.option('--atomic-v2', 'Write ENFORCING_ATOMIC_V2 config + fail-closed wiring (implies --agents --strict)')
|
|
169
170
|
.option('--dry-run', 'With --agents: print the plan without writing')
|
|
170
171
|
.option('--check', 'With --agents: report which of the four pieces are present (no write)')
|
|
171
172
|
.option('--out <dir>', 'With --agents: target directory (default: cwd)')
|
|
@@ -176,7 +177,7 @@ program
|
|
|
176
177
|
AGENT_FLAGS_REQUIRE_AGENTS,
|
|
177
178
|
AGENTS_NO_TEMPLATE,
|
|
178
179
|
} = require('../src/commands/init-agents');
|
|
179
|
-
if (options.agents) {
|
|
180
|
+
if (options.agents || options.atomicV2) {
|
|
180
181
|
if (template) {
|
|
181
182
|
console.error(AGENTS_NO_TEMPLATE);
|
|
182
183
|
process.exitCode = 1;
|
|
@@ -189,7 +190,8 @@ program
|
|
|
189
190
|
dryRun: !!options.dryRun,
|
|
190
191
|
check: !!options.check,
|
|
191
192
|
out: options.out,
|
|
192
|
-
strict: !!options.strict,
|
|
193
|
+
strict: !!options.strict || !!options.atomicV2,
|
|
194
|
+
atomicV2: !!options.atomicV2,
|
|
193
195
|
});
|
|
194
196
|
if (result && typeof result.exitCode === 'number') {
|
|
195
197
|
process.exitCode = result.exitCode;
|
|
@@ -468,6 +470,34 @@ const corpusCmd = program
|
|
|
468
470
|
.command('corpus')
|
|
469
471
|
.description('Reproduce the CodeRifts accuracy proof matrix (MCP always; OpenAPI needs oasdiff)');
|
|
470
472
|
|
|
473
|
+
program
|
|
474
|
+
.command('verify <target>')
|
|
475
|
+
.description('Verify an installed profile. Target: atomic-v2. Exit 0 = TARGET_ENFORCEMENT_VERIFIED (named target); 2 = WIRING_REQUIRED; 3 = VERIFICATION_FAILED; 1 = usage.')
|
|
476
|
+
.option('--out <dir>', 'Target directory (default: cwd)')
|
|
477
|
+
.option('--json', 'Print the structured status JSON')
|
|
478
|
+
.option('--target <id>', 'Bind verification to this target_id')
|
|
479
|
+
.option('--environment <env>', 'Bind verification to this environment')
|
|
480
|
+
.option('--executor-identity <id>', 'Bind verification to this executor identity')
|
|
481
|
+
.option('--operation <op>', 'Bind verification to this operation')
|
|
482
|
+
.option('--adapter-id <id>', 'Bind verification to this adapter_id')
|
|
483
|
+
.action((target, options) => {
|
|
484
|
+
if (String(target) !== 'atomic-v2') {
|
|
485
|
+
console.error(`verify: unknown target "${target}" (use atomic-v2)`);
|
|
486
|
+
process.exitCode = 1;
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
const { runVerifyAtomicV2 } = require('../src/commands/verify-atomic-v2');
|
|
490
|
+
runVerifyAtomicV2({
|
|
491
|
+
out: options.out,
|
|
492
|
+
json: !!options.json,
|
|
493
|
+
target: options.target,
|
|
494
|
+
environment: options.environment,
|
|
495
|
+
executorIdentity: options.executorIdentity,
|
|
496
|
+
operation: options.operation,
|
|
497
|
+
adapterId: options.adapterId,
|
|
498
|
+
});
|
|
499
|
+
});
|
|
500
|
+
|
|
471
501
|
corpusCmd
|
|
472
502
|
.command('verify', { isDefault: true })
|
|
473
503
|
.description('Evaluate every trust vector and print the proof matrix (exit 1 on any FAIL)')
|
package/dist/.build-source-sha
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$comment": "GENERATED by scripts/build.js. sha256 over src/**.js + bin/**.js (path + bytes). test/build-freshness.test.js recomputes it; a mismatch means dist/cli.js is stale.",
|
|
3
|
-
"sha256": "
|
|
4
|
-
"file_count":
|
|
3
|
+
"sha256": "e9cca5e219ca1bc43448406afaae8ac9b4bd5f61dcbb880967393ea37575b354",
|
|
4
|
+
"file_count": 49
|
|
5
5
|
}
|