Skip to content

Commit 2e2ebc4

Browse files
committed
test(cli): write the earlier build's ledger entry into the home's ledger
The install-local ledger follows OS_HOME (#30217). The jobs-pull and hooks integration fixtures boot `os start --home HOME` and planted the earlier build's entry under the working directory, so boot 2 never read it (boot 1 had already created the home's ledger, so no one-time copy ran). They now write it into HOME/installed-packages; the intent of each test is unchanged. Claude-Session: https://claude.ai/code/session_01Utp6CY4LWqfjLCYqpZhNCs Co-authored-by: Claude <noreply@anthropic.com>
1 parent 299ca6d commit 2e2ebc4

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

‎packages/cli/test/package-install-local-hooks.integration.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,10 @@ beforeAll(async () => {
412412
readings.output.install = first.output();
413413
await stopGroup(first.child);
414414

415-
// ── boot 2: same host, home and cwd, plus a ledger entry an earlier build wrote ──
416-
const ledger = join(runtimeDir, '.objectstack', 'installed-packages');
415+
// ── boot 2: same host, home and cwd, plus an entry an earlier build wrote into this home's ledger ──
416+
// The ledger follows OS_HOME (#30217): `--home` names it, so the entry goes
417+
// under that home, not under the working directory.
418+
const ledger = join(home, 'installed-packages');
417419
mkdirSync(ledger, { recursive: true });
418420
writeFileSync(join(ledger, `${LEGACY_APP_ID}.json`), JSON.stringify(LEGACY_ENTRY, null, 2), 'utf8');
419421
const second = await bootStart(runtimeDir, home, ['--artifact', hostArtifact]);

‎packages/cli/test/package-install-local-jobs-pull.integration.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,10 @@ beforeAll(async () => {
385385
readings.output.install = first.output();
386386
await stopGroup(first.child);
387387

388-
// ── boot 2: same host, home and cwd, plus a ledger entry an earlier build wrote ──
389-
const ledger = join(runtimeDir, '.objectstack', 'installed-packages');
388+
// ── boot 2: same host, home and cwd, plus an entry an earlier build wrote into this home's ledger ──
389+
// The ledger follows OS_HOME (#30217): `--home` names it, so the entry goes
390+
// under that home, not under the working directory.
391+
const ledger = join(home, 'installed-packages');
390392
mkdirSync(ledger, { recursive: true });
391393
writeFileSync(join(ledger, `${LEGACY_APP_ID}.json`), JSON.stringify(LEGACY_ENTRY, null, 2), 'utf8');
392394
const second = await bootStart(runtimeDir, home, ['--artifact', hostArtifact]);

0 commit comments

Comments
 (0)