Skip to content

chore(cli): Update cartesi-machine-stored-hash test case. - #508

Open
brunomenezes wants to merge 1 commit into
prerelease/v2-alphafrom
fix/cartesi-machine-stored-hash-test
Open

chore(cli): Update cartesi-machine-stored-hash test case.#508
brunomenezes wants to merge 1 commit into
prerelease/v2-alphafrom
fix/cartesi-machine-stored-hash-test

Conversation

@brunomenezes

Copy link
Copy Markdown
Contributor

Summary

This PR changes the test assertion for cartesi-machine-stored-hash cases to verify that a valid hash string is present, rather than asserting against a fixed hash value.

Because build environments can produce slight variations in the resulting output hash, strict hash comparison was causing test failures in CI/local environments—even when the dApp template code itself remained unchanged.

…ad of fix hash value.

* Depending on environment it was build the hash will change making the test fail even though the dapp code template did not change.
@changeset-bot

changeset-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 31ec8f8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@brunomenezes brunomenezes moved this from Todo to Waiting review in Rollups SDK Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 98.63% (🎯 0%) 4880 / 4948
🔵 Statements 98.63% 4880 / 4948
🔵 Functions 94.89% 130 / 137
🔵 Branches 0% 0 / 0
📁 File Coverage (19 files)
File Lines Statements Functions Branches Uncovered Lines
apps/cli/src/builder/directory.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/builder/docker.ts 🟢 86.72% 🟢 86.72% 🟡 66.67% 🔴 0% 75-77, 79, 109-111, 169-178
apps/cli/src/builder/empty.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/builder/none.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/builder/tar.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/compose/builder.ts 🟢 99.79% 🟢 99.79% 🟢 100% 🔴 0% 228
apps/cli/src/compose/common.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/compose/node.ts 🟢 99.24% 🟢 99.24% 🟢 100% 🔴 0% 106
apps/cli/src/config.ts 🟢 94.32% 🟢 94.32% 🟢 95.24% 🔴 0% 75-76, 251, 260, 269, 363, ...
apps/cli/src/contracts.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
...rc/errors/ForkChainValidationError.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
...c/errors/UnsupportedForkChainError.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
...c/exec/cartesi-machine-stored-hash.ts 🟢 92.86% 🟢 92.86% 🟢 100% 🔴 0% 36-37
apps/cli/src/exec/cartesi-machine.ts 🟡 75% 🟡 75% 🟡 66.67% 🔴 0% 10-12, 28-30
apps/cli/src/exec/genext2fs.ts 🟢 96.92% 🟢 96.92% 🟢 100% 🔴 0% 87-88
apps/cli/src/exec/index.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -
apps/cli/src/exec/mksquashfs.ts 🟢 91.53% 🟢 91.53% 🟢 100% 🔴 0% 70-74
apps/cli/src/exec/util.ts 🟢 85.11% 🟢 85.11% 🟡 66.67% 🔴 0% 24-28, 68-69
apps/cli/src/validations.ts 🟢 100% 🟢 100% 🟢 100% 🔴 0% -

@endersonmaia

Copy link
Copy Markdown
Contributor

even when the dApp template code itself remained unchanged.

We should aim a reproducible build.

Isn't there any thing we can do to ensure this.

@brunomenezes

Copy link
Copy Markdown
Contributor Author

even when the dApp template code itself remained unchanged.

We should aim a reproducible build.

Isn't there any thing we can do to ensure this.

I am not sure, as from time to time we are changing the application-template Dockerfile, as it will eventually fail to build and updates are necessary. If I understood it right, the machine hash-generated factor, not just the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Waiting review

Development

Successfully merging this pull request may close these issues.

2 participants