You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RPC: the worker does not enforce the construction-time settings guard #37
The docstring of reject_construction_time_keys (settings.py:101) says:
Both engines check before they send, and the worker checks again, so nothing
can slip past by building a request by hand.
The worker does not check. The guarantee is false at the protocol level.
Evidence
NixCore.configure_eval_state (_core/_nix_core.py:154) is the function that
performs the worker-side check. It has no production caller. The module
docstring of tests/nanopynix/core/test_nix_core_unit.py says so: "nothing
currently calls configure_eval_state".
The worker handler calls the other method. EvalServiceHandler.configure_eval (rpc/worker/_worker_eval.py:258) calls CoreEvalState.configure (_core/_objects.py:493), which applies both maps
with no check at all.
Measured:
public configure(pure_eval=True): refused (SettingNotLiveError)
hand-built ConfigureEval(pure-eval): ACCEPTED by worker
The existing unit test does not close the gap. It passes {"a": "1"}, which is
not a Nix setting, so the test passes whether the guard runs or not.
Why it matters
The client guard gives a good message. The worker guard makes the property
true of the protocol rather than of one client. A second client, or a
caller that reaches session._manager.eval_stub directly, gets the old
silent-drop behaviour.
Scope
Delete NixCore.configure_eval_state.
Put the two reject_construction_time_keys calls at the top of CoreEvalState.configure, where the call already goes.
Delete the EvalSettingsTarget protocol and its static-assertion helper.
Activity
docs: turn the code improvement plan into issues and living documents
fix(settings): route each scope to the door that owns it
test(asan): skip the runaway-recursion tests, which libasan cannot un…
test(asan): skip the runaway-recursion tests, which libasan cannot un…
docs: turn the code improvement plan into issues and living documents
fix(core): make the worker enforce the construction-time settings guard
fix(settings): route each scope to the door that owns it
test(asan): skip the runaway-recursion tests, which libasan cannot un…