fix: memory deallocation cleanup across TASK modules#1
Merged
Conversation
- Input parameters documentation (plasma config, profiles, transport, heating) - Output variables documentation (global quantities, radial distributions) - Basic equations (transport, heating, collision models) - Usage examples and troubleshooting guide - Build configuration (Makefile, requirements.txt) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Overview and installation guide - Input parameters documentation - Output variables documentation - Basic equations (transport, heating, collision) - Usage examples and troubleshooting - References 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- docs/ja/ : Japanese documentation - docs/en/ : English documentation - Updated README.md with bilingual build instructions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added detailed execution output format explanation - Added graph output descriptions with figure placeholders - Added LAPACK error troubleshooting section - Fixed Makefile GLIBS variable for GSAF library linking - Enhanced both Japanese and English documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Guard GPNB deallocation with ALLOCATED check since it is only allocated when NBI model (MDLNB=3,4) is enabled, not in ALLOCATE_TRCOMM - Add missing DEALLOCATE(SPSCT) which was allocated but never freed - Add explicit DEALLOCATE_TRCOMM call before STOP in trmain.f90 to ensure clean shutdown Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SPSC(NRMAX, NSM) was allocated at trcomm.f90:351 but never deallocated, causing a memory leak. Add DEALLOCATE alongside the existing SPSCT deallocation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split large DEALLOCATE statements into IF(ALLOCATED(x)) DEALLOCATE(x) form and add missing variables (ANF0, WFT, VEXBP, SPSC, SPSCT etc.) to the deallocation lists in TRM and TRX variants. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add IF(ALLOCATED(x)) DEALLOCATE(x) guards to prevent deallocation of unallocated arrays and remove duplicate deallocations across the FP module variants (fp, fp.anzai, fp.nuga, fp.ota, fpx). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add IF(ALLOCATED(x)) DEALLOCATE(x) guards in the WF wave solver variants (wf2d, wf2dt, wf2dx, wf3d) to prevent double-free when cleanup is called multiple times. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Deallocate graphics and eigenmode work arrays across wmx sources, adding IF(ALLOCATED(x)) DEALLOCATE(x) guards. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… modules - imas/ids/ids_equilibrium.f90: fix duplicate IF(ALLOCATED(bt)) that should have been IF(ALLOCATED(bz)) - pl/plprof_TOTAL.f90: add pl_TOTAL_deallocate + cleanup on error path - eq/equread.f90: call alloc_equ(-2) to release arrays after eqdsk read - other modules: add IF(ALLOCATED(x)) DEALLOCATE(x) guards Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… modules Add missing DEALLOCATE statements, IF(ALLOCATED) guards, and a new dpglib_cleanup subroutine that releases RGB lookup tables. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…b-adf11 Release ADF11 work arrays before every RETURN in lib-adf11.f90 to avoid leaks when the library is called repeatedly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds the auditing scripts (check_dealloc.py/.sh) and usage manual that were used to find the leaks fixed in the preceding commits on this branch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 tasks
k-yoshimi
added a commit
that referenced
this pull request
Apr 28, 2026
Bugbot's second pass on PR #178 surfaced 4 issues that survived the first round of LOW fixes (e1e5a37). All four addressed in this commit, with targeted regression tests: #1 (LOW) PipelineResult.to_dict() now returns defensive copies of inner scalars dicts and coupling_applied lists. Previously, MCP- side mutation of the JSON payload would propagate into the originating PipelineStep. New test_to_dict_returns_defensive_copies asserts the contract. #2 (LOW) _validate_steps now accepts list-of-2-element steps in addition to tuple-of-2-element. JSON-decoded MCP payloads deserialise tuples as lists, so the API now round-trips through to_dict() without manual coercion. New test_run_pipeline_accepts_list_shaped_steps regression guard. #3 (LOW) set_param now explicitly rejects bool inputs with TotPipelineCouplingError instead of silently coercing to 1.0/0.0 via the numeric branch (Python's bool is a subclass of int). The previous test_set_param_records_bool_as_float (which documented the silent-coercion behavior) is replaced with test_set_param_rejects_bool that asserts the explicit rejection. #4 (MED) ExceptionGroup compatibility shim for Python 3.10. The close() multi-failure path uses builtin ExceptionGroup (3.11+); tot_mcp's pyproject.toml declares requires-python=">=3.10". The shim probes for the builtin first, falls back to the exceptiongroup PyPI backport if available, and degrades gracefully to raising errors[0] only when neither is reachable (same as pre-fix behavior). CI runs 3.11+ so the existing ExceptionGroup test still passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
k-yoshimi
added a commit
that referenced
this pull request
Apr 28, 2026
* docs(spec): add L-7a cross-module coupling design Design for incremental Python-side scalar coupling between fp and tr in the tot orchestrator. Establishes TotPipeline class skeleton in a new file (python/totlib/pipeline.py) without touching the legacy Tot wrapper. Covers fp -> tr driven current (RJT volume integral -> PNBCD scalar) only; profile/coordinate transforms deferred to L-7b via BPSD. Two Codex review passes: 9 findings (HIGH 2 / MED 5 / LOW 1) all addressed inline. Pre-flight Research R1 (singleton coexistence + finalize/init state-leak) / R2 (rjt_volint extraction) / R3 (tr param name confirmation) gated before implementation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(plan): add L-7a cross-module coupling implementation plan Bite-sized TDD task list executing the L-7a design spec (0a12bd0) across 4 phases / 16 tasks / 3 sub-PRs: - Phase 0: Pre-flight research R1/R2/R3 (singleton coexistence, rjt_volint extraction, tr driven-current param confirmation) - Phase 1 (PR 1): TotPipeline class + errors + mock unit tests - Phase 2 (PR 2): compute_rjt_volint helper + COUPLING_RULES population + fp -> tr 1e-10 equivalence test - Phase 3 (PR 3): run_pipeline MCP tool + docs Each PR phase ends with the CLAUDE.md pre-push gate (code-reviewer + codex:codex-rescue + REVIEW_OK marker + --forked --timeout=120 --timeout-method=signal pytest). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(spec): record L-7a R1 (singleton coexistence) outcome R1-a (concurrent live) and R1-b (re-init state leak) verified per the L-7a design spec. Outcome and fallback decision recorded. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(spec): record L-7a R2 (rjt_volint extraction) outcome R2 PASS. compute_rjt_volint(state, *, R0, a) verified against fp internal aggregate rtotalIP at 1e-10 (sanity case NRMAX=10, RR=3, RA=1, default fixture: helper -2.769528e-13 MA == fp stdout -2.7695E-13 MA). FpState shape characterized: top-level dataclass attrs [nrmax, nsamax, npmax, nthmax, ntg2, timefp, RNT/RWT/RTT/RJT/RPCT/RPWT]; **no `.scalars` dict** (asymmetric to TrState — R1 concern #3 confirmed). FpState exposes no grid info (RG/DV/VOLR/RA/RR absent), so helper takes R0, a as kwargs and assumes uniform rho-grid in [0,1] (matches fp/fpprep.f90:97-99). RJT units: [MA/m^2] (matches RJS in fp/fpcale.f90:290 where RJ_P = RJS*1.D6 converts to A/m^2). Helper applies *1e6 internally and returns total I in [A]. fplib unchanged — helper lives in totlib/pipeline.py (Phase 2 Task 2.1). Probe stdout (truncated): FpState attributes: RJT/RNT/RPCT/RPWT/RTT/RWT (list[list[float]]), npmax=50, nrmax=1, nsamax=1, ntg2=2, nthmax=50, timefp=0.01. Grid candidates RG/DV/VOLP/RM/RMAX/DR/RA/RR/RB: ALL ABSENT. Scalar candidates AJT/AJT_driven/.../scalars: ALL ABSENT. Sanity check (NRMAX=10): fp stdout: total plasma current [MA] -2.7695E-13 helper: compute_rjt_volint = -2.769528e-07 A = -2.769528e-13 MA (1e-10 match) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(spec): record L-7a R3 (tr driven current param) outcome PARTIAL PASS: PNBCD is NOT in tr_param_registry. Registered scalar candidates are PICCD, PECCD, PLHCD (dimensionless current-drive factors) and PLHTOT (LH input power [MW]). Selected PLHCD as L-7a skeleton target with documented unit mismatch (Amperes -> dimensionless factor); rigorous physical conversion deferred to L-7b. Picked a = tr.RA for compute_rjt_volint(state, R0=tr.RR, a=tr.RA) because fp's radial mesh is RA-normalized (fpcale.f90:34, 56). Active-drive fixture for Phase 2.3 equivalence test: fp.set_param('E0', 0.001) # induction E-field [V/m] yields ~0.946 MA (vs ~1e-13 MA for default), well above the 1e-10 equivalence-test floor. MODEL_WAVE+PABS_LH path failed with rc=3 and needs additional setup; E0 is the minimum-cost active-drive trigger. Open issue surfaced: tr lacks a registered scalar that semantically accepts an external driven current in MA. L-7b should add such a param (or expose PNBCD via the registry). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(l7a): R4 decision gate — accept skeleton coupling, update spec/plan R3 confirmed PNBCD is not registered in tr_param_registry.f90; only PLHCD/PICCD/PECCD (dimensionless multipliers) accept set_param. Per user decision (option A), L-7a proceeds as API-plumbing skeleton with PLHCD as the dst_param; physical fidelity (proper EXTERNAL_DRIVEN_I scalar in tr) is moved to L-7b follow-ups. Spec updates: - §2 table: PNBCD -> PLHCD with skeleton-coupling caveat - §3 non-goals: explicit "physical fidelity is L-7b scope" - §5.2 CouplingRule: src_state_key now (state, params) 2-arg callable - §5.3 PipelineResult + new _state_to_scalars adapter (handles FpState which lacks the .scalars dict per R1/R2) - §5.4 TotPipeline: self._params tracking for callable rules - §6.2 run_pipeline: uses _state_to_scalars + records dst_param injections back into _params - §12 follow-ups: tr EXTERNAL_DRIVEN_I_MA addition + fplib .scalars property consideration Plan updates: - Task 1.4: __init__ adds self._params; set_param records into it - Task 1.5: _extract_source 2-arg callable + _state_to_scalars helper + 5 new tests (callable+params, set_param tracking, adapter) - Task 2.1: compute_rjt_volint(state, *, R0, a) signature with the R2-derived implementation pasted in - Task 2.2: COUPLING_RULES uses lambda wrapper pulling tr:RR/tr:RA from params; dst_param=PLHCD; documents skeleton nature - Task 2.3: equivalence test uses E0=0.001 active-drive fixture (R3), PLHCD instead of PNBCD, _state_to_scalars adapter, plus a sanity guard that the integral magnitude is non-trivial (>= 1e3 A) - Test count expectations updated throughout Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(totlib): add TotPipeline error hierarchy Five new exception classes for the L-7a pipeline: - TotPipelineError (base, extends TotlibError) - TotPipelineUnknownModuleError, TotPipelineCouplingError, TotPipelineLifecycleError - TotPipelineRunError carrying partial_result + failed_step_index + failed_module attributes for debugging mid-pipeline failures. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(totlib): add CouplingRule/PipelineStep/PipelineResult dataclasses Pure data carriers for the run_pipeline orchestrator. CouplingRule is frozen (immutable) so the registry can be hashable in the future. PipelineResult.last(module) returns the most recent matching step, to_dict() is the MCP serialization format. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * style(totlib): match typing convention from surrounding modules Code-quality reviewer flagged divergence: pipeline.py used PEP 585 (dict[...], list[...]) while totlib/state.py and sibling state.py files use Dict[...], List[...] from typing. Match the surrounding codebase. Also addresses two reviewer nits: explicit "frozen=True rationale" docstring on CouplingRule, and explicit shallow-ref caveat docstring on PipelineResult.to_dict. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(totlib): add module registry + lazy import helpers _MODULE_REGISTRY maps short names (fp/tr/eq/wr/wrx/ti) to (package, wrapper_class, base_error_class) triples. _import_wrapper / _import_module_error keep the lazy-load contract from spec section 5.5: only modules used in the current pipeline get their lib*.so / errors.py loaded. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(totlib): correct ti wrapper class name + add parametrized registry tests Code-quality reviewer flagged a coverage gap: only fp was exercised by the registry-resolves-class tests. Adding parametrized tests across all 6 modules immediately surfaced a real bug: the ti wrapper class is `TiLib` (capital L), not `Tilib` as the registry claimed. The sibling `TilibError` IS lowercase, so ti is the only entry where the wrapper-class and error-class casing diverge — easy to miss. Fixed registry entry; added a comment flagging the asymmetry. Spec and plan updated to match. Now 31/31 pipeline tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(totlib): add TotPipeline lifecycle (init/set_param/close) Implements the lifecycle subset of TotPipeline: - __init__ creates empty _modules / _params / _closed=False; opens nothing. - _ensure_module lazy-instantiates a wrapper on first reference, gated by the closed flag. - set_param routes strings to set_param_str, numerics to set_param, and records the value into _params after the wrapper accepts it (so failed wrapper validation keeps _params consistent). - close is idempotent and finalizes all modules even when one raises; the first exception is re-raised so the root cause is visible. - Context manager support via __enter__/__exit__. run_pipeline / _extract_source / COUPLING_RULES are deferred to Task 1.5. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(totlib): guard set_param_str when module wrapper lacks the method Code-quality reviewer flagged that wrlib.Wrlib, wrxlib.Wrxlib, and tilib.TiLib do not expose set_param_str (only fp/tr/eq do). Routing a string value through TotPipeline.set_param previously raised a bare AttributeError leaking from getattr. Now raises a typed TotPipelineCouplingError with a clear message identifying the module. Added a regression test using a mock wrapper without set_param_str. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(totlib): implement TotPipeline.run_pipeline orchestrator - _state_to_scalars adapter (handles fp's missing .scalars dict + the standard .scalars-bearing modules uniformly). - COUPLING_RULES registry (empty at this commit; ('fp','tr') is filled in Phase 2 after R2/R3 outcomes are baked into pipeline.py). - _validate_steps performs side-effect-free pre-flight checks. - _extract_source resolves callable src_state_key with (state, params) signature; string keys go through _state_to_scalars. - run_pipeline iterates steps, applies coupling rules between adjacent pairs, and wraps per-module errors as TotPipelineRunError with the partial PipelineResult attached for debugging. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(totlib): export TotPipeline + dataclasses at package level Backwards-compatible: legacy 'from totlib import Tot' / 'TotState' imports continue to work. New 'from totlib import TotPipeline, CouplingRule, PipelineStep, PipelineResult' is added for L-7a users. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(totlib): broaden run_pipeline catch + cover Codex review gaps Codex independent review (2026-04-28) flagged 1 MED + 2 LOW gaps the prior reviewer missed: MED1: run_pipeline's except clause was (base_err, TotPipelineCouplingError), which let TypeError/ValueError from wrong kwargs escape without TotPipelineRunError wrapping — so partial_result was lost. Broadened to `except Exception`. KeyboardInterrupt and SystemExit still propagate (they are BaseException, not Exception). The lazy `_import_module_error(name)` call is kept for forward-compat debugging clarity (annotated noqa). LOW2: test_set_param_records_into_params_dict only exercised the numeric path of set_param. Added a string-value entry so the string path's _params bookkeeping is also verified. LOW3: test_run_pipeline_partial_failure_carries_partial_result did not assert on coupling_applied. Added an empty-list assertion (regression guard against silently dropping coupling metadata). Plus a new test test_run_pipeline_typeerror_from_bad_kwargs_is_wrapped that exercises the broadened catch path directly. 61 tests pass under --forked --timeout=120 --timeout-method=signal. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(totlib): address PR #178 Bugbot LOW findings Three independent fixes surfaced by the Cursor Bugbot pass on PR #178: 1. close() no longer silently drops secondary finalize errors (pipeline.py:259-269). When more than one module's close() raises, the caller now sees an ExceptionGroup carrying every collected error instead of just errors[0]. Single-failure path is unchanged (the original exception type is preserved). Tested via the new test_close_raises_exception_group_when_multiple_modules_fail. 2. set_param's _params bookkeeping no longer diverges from the value the wrapper actually received (pipeline.py:235-249). Numeric inputs are coerced via float() at the boundary, but _params used to store the original (e.g. True or int 2). Coupling rules reading self._params now see the same float the underlying module saw. Existing test_set_param_records_into_params_dict updated for the int → float coercion; new test_set_param_records_bool_as_float pins the bool path explicitly. 3. run_pipeline no longer calls _import_module_error per step (pipeline.py:329-336). The call had become dead after the broad "except Exception" catch in commit 941f353 — base_err was F841'd noqa'd, the comment misleadingly claimed "lazy-import semantics," and the call still triggered an .errors module import per step. _validate_steps already gates on _MODULE_REGISTRY membership pre-execution, and _ensure_module raises on bad names, so removing the dead call doesn't reduce safety. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(totlib): address PR #178 remaining Bugbot findings (4 items) Bugbot's second pass on PR #178 surfaced 4 issues that survived the first round of LOW fixes (e1e5a37). All four addressed in this commit, with targeted regression tests: #1 (LOW) PipelineResult.to_dict() now returns defensive copies of inner scalars dicts and coupling_applied lists. Previously, MCP- side mutation of the JSON payload would propagate into the originating PipelineStep. New test_to_dict_returns_defensive_copies asserts the contract. #2 (LOW) _validate_steps now accepts list-of-2-element steps in addition to tuple-of-2-element. JSON-decoded MCP payloads deserialise tuples as lists, so the API now round-trips through to_dict() without manual coercion. New test_run_pipeline_accepts_list_shaped_steps regression guard. #3 (LOW) set_param now explicitly rejects bool inputs with TotPipelineCouplingError instead of silently coercing to 1.0/0.0 via the numeric branch (Python's bool is a subclass of int). The previous test_set_param_records_bool_as_float (which documented the silent-coercion behavior) is replaced with test_set_param_rejects_bool that asserts the explicit rejection. #4 (MED) ExceptionGroup compatibility shim for Python 3.10. The close() multi-failure path uses builtin ExceptionGroup (3.11+); tot_mcp's pyproject.toml declares requires-python=">=3.10". The shim probes for the builtin first, falls back to the exceptiongroup PyPI backport if available, and degrades gracefully to raising errors[0] only when neither is reachable (same as pre-fix behavior). CI runs 3.11+ so the existing ExceptionGroup test still passes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 11, 2026
k-yoshimi
added a commit
that referenced
this pull request
May 12, 2026
…195) * docs(spec): trlib test_equivalence eq-mirror fallback design (#192) Approach A2 (eq-mirror fallback) replaces the original A1 (CI step fixture-copy). Pivot driven by Codex spec review #1 finding: eq's test_equivalence.py:197-205 ALREADY has the FIXTURES_DIR fallback; trlib is missing it. Adding the same fallback to trlib is the root- cause fix vs adding a CI shim. Scope (3 files, 1 commit): - python/trlib/tests/test_equivalence.py: add FIXTURES_DIR constant + replace SKIP-only logic with two-tier fallback mirroring eq:53, 197-211 verbatim. - python/trlib/tests/fixtures/eqdata.ITER01 (NEW, 45956 B): copy of python/eqlib/tests/fixtures/eqdata.ITER01 (eqdata.TST-2 mirror is already present in trlib/tests/fixtures/). - .gitignore: add !python/trlib/tests/fixtures/eqdata.ITER01 negation next to the existing TST-2 negation. Out of scope (follow-ups): - fp/wr/wrx/ti silent-SKIP audit (different mechanism, no KNAMEQ) - eq.x build for CI regen / eq-physics drift detection Drift risk (Codex MED): CI gfortran-13.2 vs baseline's 13.3 may produce > 1e-10 drift; §6.4 documents the contingency regen path. Reviewer trail: brainstorming → Codex spec review #1 → pivot A1→A2 → this spec. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(plan): trlib test_equivalence eq-mirror fallback impl plan (#192) Bite-sized task plan for the spec at docs/superpowers/specs/2026-05-12-ci-tr-equiv-staging-design.md (committed be5245e). 8 numbered tasks across 2 phases: - Pre-flight (worktree + branch + current-SKIP-state baseline) - Phase 1 (5 tasks): copy eqdata.ITER01 fixture, .gitignore negation, FIXTURES_DIR + 2-tier fallback in test_equivalence.py, local sanity, commit C1 - Phase 2 (3 tasks): bounded pytest + parallel reviewers (in-house + Codex) on diff + REVIEW_OK marker + push + PR create + Bugbot trigger Each task has exact files/lines, before/after snippets, verification commands, expected outputs. Acceptance maps to issue #192 #1-#3. Self-review: spec coverage complete, no placeholders, names consistent across tasks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(trlib): fallback to committed eqdata fixture so test_equivalence runs (#192) Mirror python/eqlib/tests/test_equivalence.py's two-tier eqdata fallback into python/trlib/tests/test_equivalence.py so TestEquivalence::test_{iter01,tst2} run on CI (and on any fresh checkout) instead of silently SKIPping. Closes the invisibility gap that let PR #187 (L-7b-i AJRFT) pass CI for ~10 days with a real 1e-10 failure under chore branch's local test. Three changes: - python/trlib/tests/test_equivalence.py: add FIXTURES_DIR constant (line 46 area, between TEST_OUTPUT_DIR and COMPARE_SCRIPT) + replace SKIP-only logic in _check_case with the two-tier fallback (prefer Phase-0 runner output at TEST_OUTPUT_DIR/<case>/<KNAMEQ>, fall back to FIXTURES_DIR/<KNAMEQ>, only SKIP if both absent). Verbatim structural mirror of eqlib test_equivalence:53, 197-211. - python/trlib/tests/fixtures/eqdata.ITER01 (new, 45956 B): exact copy of python/eqlib/tests/fixtures/eqdata.ITER01. The TST-2 mirror already lives at python/trlib/tests/fixtures/eqdata.TST-2. - .gitignore: add !python/trlib/tests/fixtures/eqdata.ITER01 negation, adjacent to the existing TST-2 negation. Out of scope (follow-up issues to be filed): - fp/wr/wrx/ti silent-SKIP audit (different mechanism, no KNAMEQ). - CI-side eq.x build for fresh eqdata regen (eq-physics drift detection); the current fixture-trust model mirrors the project's existing convention. Spec: docs/superpowers/specs/2026-05-12-ci-tr-equiv-staging-design.md Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * test(trlib): xfail test_tst2 pending #190 baseline regen CI surfaced what #192's eq-mirror fallback was designed to expose: test_tst2 now actively runs (no longer silent SKIP) and fails with `scalars.AJRFT: missing` because `test_run/baselines/tr_tst2/ metrics.json` predates PR #187 (AJRFT addition). #190 tracks the baseline regen, which is in turn blocked by upstream eq_tst2 drift (~3e-9 > 1e-10). Until that chain resolves, mark test_tst2 as xfail(strict=True) so: - CI is green again (this PR's #192 goal preserved for tr_iter01) - When #190 closes and the baseline is regenerated to include AJRFT, the xfail flips to XPASS and CI fails red, forcing removal of this decorator (CLAUDE.md narrow exception protocol). This is the documented contingency path from spec §6.4, except the cause is not gfortran drift — it's a pre-existing baseline staleness that was hidden by the silent SKIP this PR fixed. In a real sense #192 is now doing its job: invisibility → visibility. test_iter01 still PASSes (its baseline was regenerated in 24b1b12 to include AJRFT). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
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
TASK の複数モジュールに横断的に残っていたメモリ解放の不備を、モジュールグループ単位の 8 コミットに分けて修正。117 個の tracked ファイルを書き換え、新規に QA スクリプトを 3 本追加。
変更内容(コミット単位)
変更の方針
Test plan
補足
本 PR 後、Phase 0 として TR モジュールの回帰テスト基盤 (`feature/tr-regression-phase0`) を積む予定です(別 PR)。
🤖 Generated with Claude Code