Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dozreg-toplud
Copy link
Contributor

@dozreg-toplud dozreg-toplud commented Aug 29, 2025

Adresses urbit/vere#865 (comment)

Removes jet mismatch: currently the runtime exits from the inner road with no additional trace if %12 is executed with scry gate being ~

@dozreg-toplud dozreg-toplud requested a review from joemfb August 29, 2025 17:12
=/ result
?~ scry ~
(scry product.ref product.path)
?~ scry [%2 trace]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's move this up to the top of %12 -- nock as opposed mock should crash as soon as it encounters the %12, not after resolving subformulas.

@dozreg-toplud
Copy link
Contributor Author

like that? this would also require a change in runtime

@dozreg-toplud dozreg-toplud requested a review from joemfb August 29, 2025 17:52
@dozreg-toplud
Copy link
Contributor Author

Just in case, currently in Vere 409 Mock crashes of the scry gate being ~ (due to an exit here) and Nock crashes on any other atom or a gate that crashes on call via metabail. Should these behaviors be made the same?

@dozreg-toplud
Copy link
Contributor Author

dozreg-toplud commented Aug 29, 2025

bail: 4

bail: 2
> (slum mink [[0 [%12 1+0 1+0]] 1])
dojo: hoon expression failed
>
>
>
> (slum mink [[0 [%12 1+0 1+0]] 0])
[2 0]

[11 [tag.formula 1 product.clue] 1 product.next]
::
[%12 ref=* path=*]
?~ scry !!
Copy link
Collaborator

Choose a reason for hiding this comment

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

I meant that it should [%2 trace] here. But that's wrong given the actual behavior of vere, it should be in the original position where you wrote it. The bail:exit in u3m_soft_exc() corresponds to actually running the scry handler, with the arguments already computed.

If we want +mink with a ~ scry handler to behave as if %12 was completely undefined, we'd have to add that check-and-crash explicitly in the bytecode interpreter.

Copy link
Collaborator

Choose a reason for hiding this comment

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

In other words, you should just revert 0647548, that was my bad.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we want +mink with a ~ scry handler to behave as if %12 was completely undefined, we'd have to add that check-and-crash explicitly in the bytecode interpreter.

Alternatively we could add a check in soft_esc that bails with u3nc(4, c3__exit) if gul is 0. Then scry handler 0 acts the same as any other atomic scry handler, and we can keep this Hoon definition of mink

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually no, ?~ would still need to be moved after subformulas are resolved

@joemfb
Copy link
Collaborator

joemfb commented Aug 29, 2025

The metabail ensures that the runtime follows +mink's behavior. A crash in the scry gate is not a crash in the nock being virtualized, but in the parent context. That shouldn't need to change.

@dozreg-toplud dozreg-toplud requested a review from joemfb August 31, 2025 11:23
@pkova pkova merged commit b68b37a into next/kelvin/409 Sep 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants