start-command 0.39.1 → 0.40.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.
@@ -367,13 +367,12 @@ describe('ExecutionStore', () => {
367
367
  const linoPath = path.join(TEST_APP_FOLDER, LINO_DB_FILE);
368
368
  expect(fs.existsSync(linoPath)).toBe(true);
369
369
 
370
- // Read and verify content - lino format uses base64 encoding for strings
370
+ // lino-objects-codec 0.9 writes readable links notation (#253)
371
371
  const content = fs.readFileSync(linoPath, 'utf8');
372
372
  expect(content.length).toBeGreaterThan(0);
373
- // Verify content has array structure
374
- expect(content).toContain('(array');
375
- // Verify PID is stored (as int)
376
- expect(content).toContain('(int 12345)');
373
+ expect(content).toContain('command "echo hello"');
374
+ // Verify PID is stored as a bare integer
375
+ expect(content).toContain('pid 12345');
377
376
  });
378
377
  });
379
378
 
@@ -449,6 +448,51 @@ describe('ExecutionStore with lino-objects-codec', () => {
449
448
  expect(retrieved.command).toBe('echo "Hello 世界 🌍"');
450
449
  expect(retrieved.logPath).toBe('/tmp/unicode-日本語.log');
451
450
  });
451
+
452
+ it('reads a store written by lino-objects-codec 0.4.0 and rewrites it readable (#253)', () => {
453
+ fs.mkdirSync(TEST_APP_FOLDER, { recursive: true });
454
+ fs.copyFileSync(
455
+ path.join(__dirname, 'fixtures/executions-lino-objects-codec-0.4.0.lino'),
456
+ path.join(TEST_APP_FOLDER, LINO_DB_FILE)
457
+ );
458
+ const uuid = '25300000-0000-4000-8000-000000000253';
459
+
460
+ const legacy = store.get(uuid);
461
+ expect(legacy.pid).toBe(4242);
462
+ expect(legacy.exitCode).toBe(0);
463
+ expect(legacy.command).toBe('echo "legacy store"');
464
+
465
+ store.save(new ExecutionRecord({ command: 'echo next' }));
466
+ const content = fs.readFileSync(
467
+ path.join(TEST_APP_FOLDER, LINO_DB_FILE),
468
+ 'utf8'
469
+ );
470
+ expect(content).toContain('command "echo next"');
471
+ expect(content).not.toContain('(str ');
472
+ expect(store.get(uuid).command).toBe('echo "legacy store"');
473
+ });
474
+
475
+ it('reads a readable store written by lino-objects-codec 0.9 (#253)', () => {
476
+ // rust/tests/regression_253.rs reads the same fixture
477
+ fs.mkdirSync(TEST_APP_FOLDER, { recursive: true });
478
+ fs.copyFileSync(
479
+ path.join(__dirname, 'fixtures/executions-lino-objects-codec-0.9.3.lino'),
480
+ path.join(TEST_APP_FOLDER, LINO_DB_FILE)
481
+ );
482
+
483
+ const record = store.get('25300000-0000-4000-8000-000000000930');
484
+ expect(record.pid).toBe(4242);
485
+ expect(record.exitCode).toBe(0);
486
+ expect(record.command).toBe(
487
+ `echo "readable store" (with) \\ odd chars 'q' 世界`
488
+ );
489
+ expect(record.endTime).toBe('2026-10-01T00:00:01.000Z');
490
+ expect(record.options).toEqual({
491
+ isolated: 'docker',
492
+ keepAlive: false,
493
+ nested: { list: [1, 'two', null] },
494
+ });
495
+ });
452
496
  });
453
497
 
454
498
  describe('ExecutionStore verifyConsistency', () => {
@@ -0,0 +1 @@
1
+ (array (object ((str dXVpZA==) (str MjUzMDAwMDAtMDAwMC00MDAwLTgwMDAtMDAwMDAwMDAwMjUz)) ((str cGlk) (int 4242)) ((str c3RhdHVz) (str ZXhlY3V0ZWQ=)) ((str ZXhpdENvZGU=) (int 0)) ((str Y29tbWFuZA==) (str ZWNobyAibGVnYWN5IHN0b3JlIg==)) ((str bG9nUGF0aA==) (str L3RtcC9zdGFydC0yNTMubG9n)) ((str c3RhcnRUaW1l) (str MjAyNi0xMC0wMVQwMDowMDowMC4wMDBa)) ((str ZW5kVGltZQ==) (str MjAyNi0xMC0wMVQwMDowMDowMS4wMDBa)) ((str d29ya2luZ0RpcmVjdG9yeQ==) (str L3RtcA==)) ((str c2hlbGw=) (str L2Jpbi9zaA==)) ((str cGxhdGZvcm0=) (str bGludXg=)) ((str b3B0aW9ucw==) (object ((str aXNvbGF0ZWQ=) (null))))))
@@ -0,0 +1,26 @@
1
+ (
2
+ (
3
+ uuid "25300000-0000-4000-8000-000000000930"
4
+ pid 4242
5
+ status "executed"
6
+ exitCode 0
7
+ command """echo "readable store" (with) \ odd chars 'q' 世界"""
8
+ logPath "/tmp/start-253-readable.log"
9
+ startTime "2026-10-01T00:00:00.000Z"
10
+ endTime "2026-10-01T00:00:01.000Z"
11
+ workingDirectory "/tmp"
12
+ shell "/bin/sh"
13
+ platform "linux"
14
+ options (
15
+ isolated "docker"
16
+ keepAlive false
17
+ nested (
18
+ list (
19
+ 1
20
+ "two"
21
+ null
22
+ )
23
+ )
24
+ )
25
+ )
26
+ )
@@ -233,6 +233,35 @@ describe('JavaScript first CI gate', () => {
233
233
  );
234
234
  });
235
235
 
236
+ it('treats generated Rust regenerated by a translator bump as no change', () => {
237
+ const features = [
238
+ {
239
+ id: 'generated',
240
+ javascript: { implementation: ['js/source.mjs'], tests: [] },
241
+ rust: { implementation: ['rust/generated.rs'], tests: [] },
242
+ },
243
+ ];
244
+ const generated = [
245
+ { javascript: 'js/source.mjs', rust: 'rust/generated.rs' },
246
+ ];
247
+ assert.deepEqual(
248
+ checkFeatureChanges(features, ['rust/generated.rs'], generated),
249
+ []
250
+ );
251
+ assert.deepEqual(
252
+ checkFeatureChanges(
253
+ features,
254
+ ['js/source.mjs', 'rust/generated.rs'],
255
+ generated
256
+ ),
257
+ []
258
+ );
259
+ assert.equal(
260
+ checkFeatureChanges(features, ['rust/generated.rs']).length,
261
+ 1
262
+ );
263
+ });
264
+
236
265
  it('keeps both halves of a regression test under one feature', () => {
237
266
  const feature = (id, js, rust) => ({
238
267
  id,