coderifts 8.6.3 → 8.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coderifts",
3
- "version": "8.6.3",
3
+ "version": "8.6.4",
4
4
  "description": "Detect breaking API changes from the command line. Works locally or with the CodeRifts cloud API.",
5
5
  "author": "CodeRifts <hello@coderifts.com>",
6
6
  "license": "MIT",
@@ -85,7 +85,68 @@ try {
85
85
  fail('packed init --agents --atomic-v2 --dry-run did not mention atomic-v2 / WIRING_REQUIRED');
86
86
  }
87
87
 
88
- process.stdout.write('packed install smoke: OK (atomic-v2 dry-run)\n');
88
+ // Packed `lock --check` must actually RUN two fixtures, not merely list the command.
89
+ // 8.6.3 threw CORE_UNAVAILABLE because mcp-lock-drift was a dynamic require outside the bundle.
90
+ const fixtures = path.join(tmp, 'lock-fixtures');
91
+ fs.mkdirSync(fixtures);
92
+ const lockedManifest = {
93
+ tools: [
94
+ { name: 'get_user', description: 'Get user', inputSchema: { type: 'object', properties: {} } },
95
+ { name: 'pay', description: 'Pay', inputSchema: { type: 'object', properties: {} } },
96
+ ],
97
+ };
98
+ const liveSame = JSON.parse(JSON.stringify(lockedManifest));
99
+ const liveDrift = {
100
+ tools: [
101
+ { name: 'get_user', description: 'Get user', inputSchema: { type: 'object', properties: {} } },
102
+ ],
103
+ };
104
+ const lockedPath = path.join(fixtures, 'locked.json');
105
+ const samePath = path.join(fixtures, 'live-same.json');
106
+ const driftPath = path.join(fixtures, 'live-drift.json');
107
+ fs.writeFileSync(lockedPath, `${JSON.stringify(lockedManifest)}\n`);
108
+ fs.writeFileSync(samePath, `${JSON.stringify(liveSame)}\n`);
109
+ fs.writeFileSync(driftPath, `${JSON.stringify(liveDrift)}\n`);
110
+
111
+ const lockOk = run(bin, [
112
+ 'lock', '--check', '--json',
113
+ '--locked-manifest', lockedPath,
114
+ '--live-manifest', samePath,
115
+ ], { cwd: installDir, env: { ...process.env, NO_COLOR: '1' } });
116
+ if (lockOk.status !== 0) {
117
+ fail(`packed lock --check (identical fixtures) exited ${lockOk.status}:\n${lockOk.stderr}\n${lockOk.stdout}`);
118
+ }
119
+ if (/Cannot load mcp-lock-drift core/i.test(`${lockOk.stdout}\n${lockOk.stderr}`)) {
120
+ fail('packed lock --check still cannot load mcp-lock-drift core');
121
+ }
122
+ let okReport;
123
+ try { okReport = JSON.parse(lockOk.stdout); } catch (e) {
124
+ fail(`packed lock --check identical fixtures did not print JSON: ${e.message}\n${lockOk.stdout}`);
125
+ }
126
+ if (okReport.drift !== false) {
127
+ fail(`packed lock --check identical fixtures expected drift=false, got ${JSON.stringify(okReport)}`);
128
+ }
129
+
130
+ const lockDrift = run(bin, [
131
+ 'lock', '--check', '--json',
132
+ '--locked-manifest', lockedPath,
133
+ '--live-manifest', driftPath,
134
+ ], { cwd: installDir, env: { ...process.env, NO_COLOR: '1' } });
135
+ if (lockDrift.status !== 3) {
136
+ fail(`packed lock --check (drift fixture) exited ${lockDrift.status}, expected 3:\n${lockDrift.stderr}\n${lockDrift.stdout}`);
137
+ }
138
+ if (/Cannot load mcp-lock-drift core/i.test(`${lockDrift.stdout}\n${lockDrift.stderr}`)) {
139
+ fail('packed lock --check drift fixture still cannot load mcp-lock-drift core');
140
+ }
141
+ let driftReport;
142
+ try { driftReport = JSON.parse(lockDrift.stdout); } catch (e) {
143
+ fail(`packed lock --check drift fixture did not print JSON: ${e.message}\n${lockDrift.stdout}`);
144
+ }
145
+ if (driftReport.drift !== true) {
146
+ fail(`packed lock --check drift fixture expected drift=true, got ${JSON.stringify(driftReport)}`);
147
+ }
148
+
149
+ process.stdout.write('packed install smoke: OK (atomic-v2 dry-run + lock --check two fixtures)\n');
89
150
  } finally {
90
151
  fs.rmSync(tmp, { recursive: true, force: true });
91
152
  }