Skip to content

feat: scoped accounts - #181

Open
ascandone wants to merge 1 commit into
feat/exp/vmfrom
feat/scoped-accounts-in-vm
Open

feat: scoped accounts#181
ascandone wants to merge 1 commit into
feat/exp/vmfrom
feat/scoped-accounts-in-vm

Conversation

@ascandone

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5d7792de-f469-4c27-ab91-f54880ff32e8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@NumaryBot

Copy link
Copy Markdown
Contributor

🛑 Changes requested — automated review

The changed instruction encoding is incompatible with existing bytecode but is still labeled as format v2, allowing silent misdecoding or runtime panics across versions.

@NumaryBot NumaryBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NumaryBot posted 1 new inline finding.

Summary: #181 (comment)

Comment thread internal/ir/assemble.go
return err
}

a.emit(vm.Op_Save, account, asset, amount)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 [blocker] Bump the bytecode format version for changed opcode layouts

Adding mandatory extension words to existing opcodes such as Save, metadata reads, and Balance changes the v2 instruction layout, but FormatVersion remains 2. Consequently, the new decoder accepts old v2 bytecode and the VM consumes the following real instruction as an extension word (or reads past the end), while older runtimes also accept newly emitted v2 files but misinterpret their extensions. Increment the format version so incompatible bytecode is rejected.

@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 52.52226% with 160 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (feat/exp/vm@2383ba0). Learn more about missing BASE report.

Files with missing lines Patch % Lines
internal/ir/assemble.go 0.00% 68 Missing ⚠️
internal/vm/vm.go 62.50% 19 Missing and 11 partials ⚠️
internal/compiler/compiler.go 73.07% 14 Missing and 7 partials ⚠️
internal/compiler/compiler_error.go 0.00% 15 Missing ⚠️
internal/ir/dump.go 60.00% 6 Missing and 4 partials ⚠️
internal/ir/instr.go 66.66% 3 Missing and 1 partial ⚠️
internal/runtime/metadata.go 0.00% 4 Missing ⚠️
internal/vm/execution_err.go 0.00% 3 Missing ⚠️
internal/ir/parse.go 83.33% 2 Missing ⚠️
internal/ir/typecheck.go 93.10% 2 Missing ⚠️
... and 1 more
Additional details and impacted files
@@              Coverage Diff               @@
##             feat/exp/vm     #181   +/-   ##
==============================================
  Coverage               ?   57.75%           
==============================================
  Files                  ?       83           
  Lines                  ?    10839           
  Branches               ?        0           
==============================================
  Hits                   ?     6260           
  Misses                 ?     4202           
  Partials               ?      377           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants