Fix PROPOSAL interpolation tables path being silently ignored#71
Open
kcarloni wants to merge 1 commit into
Open
Fix PROPOSAL interpolation tables path being silently ignored#71kcarloni wants to merge 1 commit into
kcarloni wants to merge 1 commit into
Conversation
PROPOSAL stores its interpolation-table directory in a process-global (InterpolationSettings::TABLES_PATH), mutated only by set_tables_path. It does NOT read a `tables_path` key from the JSON config. The three config generators embedded `tables_path` into config["global"], so the entire PROPOSAL_TABLES_PATH env var -> get_proposal_tables_path() -> JSON chain terminated in a key PROPOSAL silently discarded. Tables always landed at PROPOSAL's compiled-in default (/tmp), regardless of PROPOSAL_TABLES_PATH. Fix: push the resolved path into PROPOSAL via set_tables_path in create_temp_config (the single chokepoint run immediately before every create_propagator_* call) and drop the dead JSON keys. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ChargedLeptonPropagationgenerates PROPOSAL JSON configs with atables_pathkey underconfig["global"], populated fromget_proposal_tables_path()(which honors thePROPOSAL_TABLES_PATHenvironment variable). PROPOSAL never reads that key.PROPOSAL stores its interpolation-table directory in a process-global C++ static,
InterpolationSettings::TABLES_PATH, whose only mutator isPROPOSAL.set_tables_path(...). Because the JSONtables_pathkey is discarded, the wholePROPOSAL_TABLES_PATH→get_proposal_tables_path()→ JSON chain has no effect: interpolation tables always land at PROPOSAL's compiled-in default (/tmp), regardless of the env var.Fix
PROPOSAL.set_tables_path(get_proposal_tables_path())increate_temp_config— the single chokepoint run immediately before everycreate_propagator_*call, so the global is correct at propagator-creation time for bothSphericalBodyPropagatorandSlabPropagator.tables_pathkey from all three config generators (generate_sphere_config,generate_uniform_sphere_config,generate_slab_layer_config) — leaving it in falsely implies PROPOSAL consumes it.PROPOSAL_TABLES_PATHis now a working knob again.Test plan
Pkg.test()— full suite passes (449/449).PROPOSAL_TABLES_PATHset, the test run wrote.dattables into the bundleddata/proposal_tables/default rather than/tmp, confirming the path now takes effect.🤖 Generated with Claude Code