Skip to content

Fix PROPOSAL interpolation tables path being silently ignored#71

Open
kcarloni wants to merge 1 commit into
masterfrom
fix-proposal-tables-path
Open

Fix PROPOSAL interpolation tables path being silently ignored#71
kcarloni wants to merge 1 commit into
masterfrom
fix-proposal-tables-path

Conversation

@kcarloni
Copy link
Copy Markdown

Summary

ChargedLeptonPropagation generates PROPOSAL JSON configs with a tables_path key under config["global"], populated from get_proposal_tables_path() (which honors the PROPOSAL_TABLES_PATH environment variable). PROPOSAL never reads that key.

PROPOSAL stores its interpolation-table directory in a process-global C++ static, InterpolationSettings::TABLES_PATH, whose only mutator is PROPOSAL.set_tables_path(...). Because the JSON tables_path key is discarded, the whole PROPOSAL_TABLES_PATHget_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

  • Call PROPOSAL.set_tables_path(get_proposal_tables_path()) in create_temp_config — the single chokepoint run immediately before every create_propagator_* call, so the global is correct at propagator-creation time for both SphericalBodyPropagator and SlabPropagator.
  • Remove the dead tables_path key 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_PATH is now a working knob again.

Test plan

  • Pkg.test() — full suite passes (449/449).
  • Verified incidentally: with no PROPOSAL_TABLES_PATH set, the test run wrote .dat tables into the bundled data/proposal_tables/ default rather than /tmp, confirming the path now takes effect.

🤖 Generated with Claude Code

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>
@kcarloni kcarloni requested a review from jlazar17 May 20, 2026 01:57
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.

1 participant