Skip to content

Audit A2: solve3D family, PCG backend, nonuniform filtering

Audited 2026-10-21 against the working tree (HEAD fd5b5bc8e). Read-only. All line numbers are of the documents as they stand today; code evidence is file:line under /Users/elmlundho/src/SIMPLE. Test sub-suite names were checked in src/main/commanders/test/simple_commanders_test_class.f90 (the add_suite tables), not in simple_test_registry.f90, which holds only the high-level CTest entries.

Verified as correct and not repeated below: the stage constants of src/main/solve/simple_solve3D_controller.f90 against solve3D_policy sections 3, 4, 6, 8 (NSPACE, MAXITS, search mode per stage, NSPACE_MULTI_MAX, NU_FILTER_STAGE=5, SYMSRCH_STAGE=4, PCG_SOLVENT_START_STAGE=8, the scan exit, lpexit gain guard, stage omission and its single-state restriction, VOL_SUPPLIED_STAGE anchoring, nu_stage>=5); the add-on file names, constants, refusals and flow; the chunks plan arithmetic; the pyramid constants and step table; the NU ladder [20..4], NU_BANK_FSC_HEADROOM=1.5, AWF, Potts constants, evidence bands, suffixes; the PCG raw-format magic SIMPLE_PCG_RAW02, pcgtrail-v3, PCG_LAMBDA, PCG_WEIGHT_THRESHOLD, gate tolerances. No living abinitio*/cluster2D name in any of the seven documents (only dated history file names). No policy-vs-skill or policy-vs-CLAUDE.md contradiction found for these documents.


doc/policies/3D/solve3D_policy.md (lines 730; last commit 2026-10-21; verdict: minor drift, section 11 stale, about 200 lines are history)

  • [H][STALE] L711-713: "The run enters at stage 3 of the base run's planned ladder with center=no and overlap 0.95" -> now: the add-on searches the cohort in the base run's LAST stage (manifest last_stage) after a one-iteration registration pass. Evidence: src/main/commanders/simple/simple_commanders_solve3D.f90:1075 (start_stage = man_addon%get_last_stage()), :1341-1345 (addon_register_pass), controller :238-267; solve3D_addon_policy sections 1 and 5. Fix: "The run searches the cohort in the last stage of the base run's planned ladder (read from its manifest), after one registration pass (refine=prob, nspace 1000); center=no; overlap 0.95 applies only when that stage is stage 3 (solve3D_addon_policy.md sections 1 and 5)."
  • [H][STALE] L723-725: "the final reconstruction bootstraps the union's sigma2 state over every particle exactly as bootstrap_rec3D does" -> now: the add-on final reconstruction is incremental (calc_final_rec_addon): it reads only the cohort and the carried frozen sums, no frozen particle, no image-power seed; the residual pass commits the cohort's sigmas only. Evidence: src/main/simple_final_rec.f90:190-308; solve3D_addon_policy section 8. Fix: delete the bullet, point to addon policy section 8.
  • [M][STALE] L62-65: "Independent multi-state startup defaults to five stages, so it stops after its first prob_neigh stage and before the NU-filtering stages." -> now: NU_FILTER_STAGE=NSTAGES_INDEPENDENT=5, so stage 5 is the first NU stage (L509 and L622-629 of this same document say so). Evidence: controller :33,:36, set_refine3D_filtering_policy :417-419. The comment at simple_commanders_solve3D.f90:1001 ("before NU") is equally stale. Fix: "...so it stops after its first prob_neigh stage, which is also its first NU-filtered stage."
  • [M][STALE] L183-186: "The final reconstruction at original sampling is one program call, bootstrap_rec3D" -> now: calc_final_rec calls bootstrap_rec3D only when the committed sigma2 is not consumable at the native box or the registration box differs; otherwise a plain reconstruct3D on the committed sigmas ("reusing committed canonical sigmas"). Evidence: simple_final_rec.f90:76-103. L654-657 of this document already says it correctly. Fix: "...is bootstrap_rec3D when the sigmas must be rebuilt (section 9), else reconstruct3D."
  • [M][STALE] L647-653: final reconstruction "does not inherit ... refine, lp, automsk, or gauref" -> now: automsk IS inherited from the last stage line (and filt_mode under automsk=nu); only search, lp and gauref are not. Evidence: simple_final_rec.f90:385-397 (comment: "automsk is inherited on BOTH routes"). Fix: drop automsk from the list and say it is inherited.
  • [M][CONTRADICTS] L578-583: "With envfsc=yes ... the PCG backend uses the same envelope as the support of both solves" -> solve support is an automsk feature; envfsc=yes with automsk=no leaves PCG on the sphere. Evidence: src/main/strategies/parallelization/simple_rec3D_pcg_strategy.f90:210-215 (pcg_density_support_enabled: automsk /= 'no'), :180-189; reconstruct3D_pcg_policy L338-367. Fix: "With automsk active ..." and keep envfsc for the FSC mode only.
  • [M][CONTRADICTS] other documents: doc/policies/importance_sampling_fractional_update_policy.md L229-233 says the default multi-state run "stops after the prob phase and before prob_neigh, staged NU filtering"; this document (section 6) and the controller say stage 5 is prob_neigh + NU. UI help src/main/ui/simple/simple_ui_solve3D.f90:77 says the PCG solvent prior is "active in solve3D from stage 7 (one stage after NU filtering starts)"; controller PCG_SOLVENT_START_STAGE=NSTAGES=8 and NU starts at 5. Fix the UI text and the importance-sampling paragraph; here also L100-102 "settled over stages 6-7" -> "5-7" and L660 "stages 3-7" -> "stages 1-7".
  • [M][STALE] L210-212: "Stage 1 of solve3D never runs with a low-pass limit finer than 20 A" -> the 20 A floor (LPSTAGES_STAGE1_LP_FLOOR) is in lpstages and lpstages_fast only. Routes planned by lpstages_setlims (no 2D solution, and vol1) and force_lp_range=yes start at lpstart (mskdiam/12 clamped to 8-15 A on the mskdiam routes) with no floor. Evidence: src/utils/filter/simple_estimate_ssnr.f90:328-329,453-455,485-540; simple_commanders_solve3D.f90:1217-1230. Fix: add "except force_lp_range=yes and the routes planned from mskdiam".
  • [L][DRIFT] L164-166: "lpstart/lpstop ... otherwise from mskdiam (mskdiam2lplimits)" -> lpstop is then clamped by min(lpstop, LPSTOP_BOUNDS(1)), and mskdiam2lplimits returns 5-8 A, so it is always 4.5 A unless given. Evidence: simple_commanders_solve3D.f90:1221-1225. Fix: state 4.5 A.
  • [M][GAP] default multi-state lpstop=6.0 is set on the command line before prep_class_command_lines, so l_refine3D_lpstop_override is true and stage 5 (an NU stage) carries lpstop=6.0 as a ceiling, against L352-369 ("only an explicit command-line lpstop remains a ceiling in NU stages") and NU policy L615-627. Evidence: simple_commanders_solve3D.f90:1003,1163; simple_solve3D_utils.f90:199-201; controller :568-574. Proposal: say in section 6 that the injected default is a ceiling in every stage including stage 5 (or stop injecting it).
  • [L][DRIFT] L240-257: "The one-rung advance therefore applies only to the three stages that cannot be omitted" and L310-311 "Emitted for the same stages the shift is allowed for" -> promote_stage_lp_from_fsc05 never advances the last stage (no next rung, :751), has no entry-stage or axis-stage guard, while lpexit has all three guards (:677-680). The controller comment at :671-676 ("Same eligibility as the shift") is wrong the same way. Fix: state the two eligibility sets separately.
  • [L][VIOLATED] L335-337 / L241: "only resolutions measured in the run itself advance the band" and "the entry stage remains ineligible for shift" -> res/res05 are cleared only by reset_ptcl3D_from_ptcl2D_selection (simple_commanders_solve3D.f90:2192-2195), which the cavg_ini_ext and state-continuation branches (:1294-1324, :1076-1090) do not call, so a res05 left by an earlier run can advance their entry stage (stage 4 or 5). Fix: clear the fields on those routes or narrow the sentence.
  • [M][VIOLATED] (project ownership, found while auditing section 7) symmetrize with l_symran (start group has more symmetry than target) calls se1%symrandomize(spproj%os_ptcl3D) and writes ptcl3D to the file, but exec_solve3D's spproj was last read BEFORE the symmetry-search stage ran (read_segment is at the end of each loop pass, :1400-1403, after symmetrize at :1396-1398). The write would replace the stage's poses by the previous stage's, randomized. Evidence: src/main/solve/simple_solve3D_utils.f90:620-623, simple_commanders_solve3D.f90:1390-1403. Not caused by the 2026-10-20 restructuring (older code) but it breaks the rule "re-read what the callee wrote" of layering_and_project_ownership_policy.md section 4. Please verify; fix is read_segment('ptcl3D') before symrandomize.
  • [M][STRUCTURE] history, benchmark and plan narrative inside the policy, about 200 of 730 lines: L229-386 (FSC=0.5 advance and stage omission dated 2026-09-06/10-18; "Stage iteration budget: measured slack, not yet reallocated" with PfCRT latest6 trajectories and "Revisit with per-stage trajectories" = plan; the mid-stage-exit story with latest8/latest9 restarts; the NU-ceiling history 2026-09-07/08/16/18 with 0/4 and 1/9 convergence counts; streptavidin log set), L494-506 (two-state simulated-set accuracies 0.57 vs 0.97), L606-620 (NU at stage 5 with PfCRT numbers), dated parentheticals throughout (2026-09-07, 10-17, 10-18, 10-19). Keep the rules (each is 2-5 lines); move evidence to a new doc/implementation_notes/completed/solve3D_stage_decisions.md, and the MAXITS paragraph to the existing doc/implementation_notes/planned/data_driven_stage_progression.md.
  • [M][STRUCTURE] section 11 duplicates solve3D_addon_policy.md and is the stale part (two H findings above). Replace by a 3-line summary and the link. Section 3 "Sampling units" (L126-147) duplicates importance_sampling_fractional_update_policy.md; keep only the solve3D-owned facts (file clssmp.bin written once, balance default, nclust).
  • [M][GAP] no stage table. The ladder is a set of constants in one controller but the document scatters them and omits many: rec_backend is gridding for stages 1-2 and the requested backend from stage 3 (PCG_REC_START_STAGE), ml_reg from stage 3, trs from the ladder, overlap/fracsrch 0.99/99 up to the last full-budget stage, 0.9/90 after, 0.95/90 in stages 7-8, frac_best 1.0 / 0.5 from stage 5 (single state) / 0.85 in stages 7-8, greedy_sampling=no for multi-state from stage 4, trail_rec from stage 5 (single) or 8 (multi), fillin=yes only in the last active stage of a single-state run, nspace_sub = round(126 * nspace / 2500). Evidence: controller :299-523. Proposal: one table "Stage plan" in section 3, columns stage 1..8, so a constant change is a one-row edit.
  • [M][GAP] sampling rule: update_frac = min(0.9, nsample*nstates/N) and default nsample=10000 (NSAMPLE_SOLVE3D_DEFAULT), while the full-sampling switch tests nsample/N > 0.9 WITHOUT the nstates factor. Only solve3D_chunks_policy.md L69-71 states the factor. Evidence: simple_commanders_solve3D.f90:1176-1187. Proposal: add to section 3, "Full-Sampling Switch".
  • [M][GAP] project ownership and write cadence is not stated. What the code does: exec_solve3D owns the project file at start, between stages and at the end; each refine3D stage runs as a whole program whose master owns the file during the stage; exec_solve3D keeps no unsaved change across a stage and re-reads cls3D, ptcl3D, out after each (:1400-1402); the controller reads ptcl3D from the file twice per stage for res05 (omission test :1354, promotion :564, project_best_fsc05_resolution); each boundary reconstruction does a read-modify-write of the out segment per state (register_stage_volume); calc_final_rec reads the whole project and writes out once; the manifest write is a whole-project read plus one projinfo write. Proposal: new section "Project ownership" with those five sentences and a pointer to layering_and_project_ownership_policy.md section 5.
  • [M][GAP] the state=<k> continuation route (UI: "continue as a single-state stage-5 search") has no rule anywhere in the policies except one incidental mention at L618. Code: copies the project to solve3D_stateNN_tmpproj.simple, runs selection prune=yes on the copy, switches params%projfile to it, starts at stage NSTAGES_INDEPENDENT=5, forces filt_mode=nonuniform, refuses nstates, vol1, cavg_ini*. The original project is never written and the result stays in the temporary project. Evidence: simple_commanders_solve3D.f90:994-997,1076-1090,2114-2162. Proposal: new subsection in section 5.
  • [L][GAP] solve3D nrestarts=N and screen=<file> are wrappers of the whole program in the exec router (restarted_exec, exec_screen, src/main/exec/simple_exec_solve3D.f90:35-43); solve3D_cavgs nrestarts_collapse goes to the conditional-restart driver. None is described. One paragraph in section 1.
  • [L][GAP] the strip/copy duality rule for child command lines (strip_pcg_backend_keys must stay the dual of apply_refine3D_reconstruction_controls, "extend both together") exists only as a comment, simple_solve3D_utils.f90:273-276. It is the guard that keeps PCG keys off child lines that leave the PCG backend; a developer adding a PCG key can break it. Proposal: one rule in section 3.
  • [L][GAP] nu_stage (public, simple_ui_solve3D.f90:160) is not in MANIFEST_INPUT_KEYS, so an add-on of a base run with nu_stage>5 and nstages 5 or 6 decides NU for the last stage differently from its base. Evidence: simple_solve3D_manifest.f90:33-38, controller :427-433. Proposal: record it, or state it in the addon policy.

doc/policies/3D/solve3D_addon_policy.md (lines 495; last commit 2026-10-20; verdict: minor drift)

  • [M][STALE] L458-461: sub-suite solve3D stream emulation (legacy partitioning, automatic active-balanced chunk planning ...) in unit_project -> now solve3D chunks plan (run_all_solve3D_chunks_plan_tests, simple_commanders_test_class.f90:388); the explicit-size emulator ("legacy partitioning") was removed 2026-10-14. All other sub-suite names in section 13 check out.
  • [L][STALE] L31-32, L386-387, L415-425: "mkdir=no (NICE, the stream)" and the paragraphs on the stream's multistate stage rolling back add-ons are changelog; the stream runs no add-ons since 2026-10-13. A comment in src/utils/gui/metadata/stream/simple_gui_metadata_stream_solve3D_multistate.f90:2,28 still counts add-on passes for p07 (stale code comment/field, outside this audit). Fix: say "NICE" only, move the stream history to the refactoring note.
  • [L][STRUCTURE] L355-357 dataset-specific example ("HolJunk update 2: rows 1-53652 ...") is not a rule; delete or move to the emulation note.
  • [L][GAP] the recorded and replayed inputs are not listed: 32 recorded keys (MANIFEST_INPUT_KEYS) and 19 replayed (MANIFEST_REPLAY_KEYS) at simple_solve3D_manifest.f90:33-60, manifest schema version 2 (:24). Section 2 describes them only as "solution, reconstruction and search policy". A table (key, recorded, replayed, overridable) would let a developer who adds a solve3D key see that the add-on must replay it (compare nu_stage above).
  • [L][GAP] project write count of the final reconstruction: switch_addon_membership(l_union=.true.) is a whole-project spproj%write (simple_commanders_solve3D.f90:1664-1667) and the mask switch writes ptcl2D and ptcl3D (:1680-1682); calc_final_rec_addon calls them three times each (simple_final_rec.f90:230-231,247-248,265). Section 8 describes the passes but not that the working project is rewritten 3 times in full. This is a deviation from layering_and_project_ownership_policy.md section 5.3 ("a full write belongs to the end of a run") that the ledger in its section 8 does not list.
  • [L][DRIFT] L99-102: "a run stopped before stage 3 ... writes none" is exact for one state only; a multi-state run always writes a manifest (l_run_final_rec = ... .or. params%nstates > 1, simple_commanders_solve3D.f90:1151) and the add-on then refuses it by stage (:763-765). Chunks policy L283-287 has it right.
  • Otherwise current (names, constants, refusals, flow, publication, code map, gate numbers 2000/2500/3000 all verified).

doc/policies/3D/solve3D_chunks_policy.md (lines 323; last commit 2026-10-20; verdict: minor drift)

  • [M][STRUCTURE] L13: "Status (2026-10-11): implemented, not yet compiled or run." -> false: the program is in simple_exec_solve3D.f90:55-56, and the unit suite solve3D chunks plan is registered. Delete the line (dated status line in a policy).
  • [M][STALE] L27-30, L112-114, L123, L133-137: "meant primarily for emulating the stream", "the way the stream forms its runs (cap_rows in the stream's solve3D stage)", "The stream also splits a stack only when it cannot fit" -> cap_rows exists nowhere in src; the stream's 3D stage (p07) assigns class averages and runs no add-ons (addon policy L31-32; stream_3D_ingestion_policy.md). The only whole-stack cut left is cut_whole_stacks for p07's first set. Fix: describe the workflow as an offline balanced-chunk solver whose cut rule was modelled on the stream's former one.
  • [M][STALE] L297-301: sub-suite solve3D stream emulation -> solve3D chunks plan (simple_commanders_test_class.f90:388); "the report header" etc. check.
  • [L][DRIFT] L40 vs L283-287: the table says nstages "must be at least 3 (section 9)", section 9 says 3, or 4 when pgrp_start differs from pgrp; code min_stage = solve3D_symsrch_stage(pgrp /= pgrp_start) (simple_commanders_solve3D_chunks.f90:79). The symmetry-search stage moved 3 -> 4 on 2026-10-17. Make the table say "the symmetry-search stage (section 9)".
  • [L][DRIFT] L323: solve3D_symsrch_stage is implemented in simple_solve3D_controller.f90 (declared in simple_solve3D_utils.f90).
  • [L][STRUCTURE] L9-11 and L306-310 plan narrative: "No workflow gate exists yet. Validation still has to cover ..." is a to-do list (true: no registry entry). Move to doc/implementation_notes/planned/; keep "no high-level gate".
  • Otherwise current: key table, defaults (addon_diag=yes, filt_mode=nonuniform_lpset, gridding), nsample=5000/nstates, partition algorithm (partition_selected_balanced), refusals, outputs, publication (tmp + rename) all verified; the input project is never written.

doc/policies/3D/solve3D_pyramid_policy.md (lines 144; last commit 2026-10-20; verdict: minor drift)

  • [M][STRUCTURE] L11: "Status (2026-10-15): implemented, not yet compiled or run." -> contradicted by L143-144 (a high-level test ran and failed every time before it was removed on 2026-10-20) and by the unit rules in simple_state_assignment_tester.f90. Delete the line.
  • [L][STRUCTURE] L143-144: "solve3D_pyramid_blobs was removed on 2026-10-20 ... after it failed on every run of its profile" is changelog/benchmark; keep only "No high-level test runs solve3D_pyramid end to end".
  • [L][DRIFT] L41: nspace is read from params (simple_commanders_solve3D_pyramid.f90:160) but is not an input of the UI entry (simple_ui_solve3D.f90:272-305 declares projfile, nptcls_refs, nstates, use_model, mskdiam, nparts, nthr). Say whether it can be set.
  • [L][GAP] the nested-run contract of section 4 ("Each step runs in-process in a folder ... then the program returns to the execution directory") is exactly layering_and_project_ownership_policy.md section 4 (hand the project over through the file); add a pointer so a new step follows it. Code does it consistently (run_job, simple_commanders_solve3D_pyramid.f90:405-426); the input project is copied into the execution directory and written once at the end (:391), as section 5 says.
  • Otherwise current: steps 1-13, folder names, constants (NCLS2D_FIRST=150, NCLS_EXPANDED=500, 20 -> 12 A, thresholds 50 deg / 70 % / 0.97 / 5 %, LP_ASSIGN=15, NSPACE_ASSIGN=1000, NCAVGS_STATE_MIN=20, STATE_VOL_CC_MIN=0.80), the refine3D command line, and the plan-note and stream-policy cross-references all verified.

doc/policies/3D/solve3D_cavgs_policy.md (lines 216; last commit 2026-10-18; verdict: current, minor gaps)

  • [L][DRIFT] L31-44 lists objfun=euclid under "When unset, it supplies" -> objfun is forced (simple_commanders_solve3D.f90:113), as are bfac, filt_mode, automsk, oritype; the filt_mode default at :119 is dead code. Fix: move objfun to the forced list.
  • [M][GAP] the restart driver is described in one clause (L162). Code: nrestarts_collapse on solve3D_cavgs routes to commander_solve3D_cavgs_conditional_restarts (simple_exec_solve3D.f90:41-43): needs mkdir=yes, projfile, nstates>1, forbids nrestarts, runs up to N times with exit_collapse=yes except the last, and writes the standing run's directory into SOLVE3D_CAVGS_FINAL_DIR (read by stream p03; simple_commanders_solve3D.f90:620-684). nrestarts (plain restarted_exec) and the exit_collapse default (no) are undocumented. Proposal: section 8 "Restarts".
  • [L][GAP] project ownership: all stage state lives in the temporary project; the original project is read once and written once at the end with a full write (:396), after the temporary project is deleted (:427). One sentence in section 3 or 6; it is the opposite of the add-on rule and a developer needs to know which segment writes happen when.
  • [L][GAP] stage constants of the route are code-only: first CAVGS_EARLY_NSTAGES=3 stages at NSPACE_CAVGS_EARLY=500 and MAXITS_CAVGS_EARLY=15, snr_noise_reg 2/4/6, lpstages with FRCLIMS_CAVGS and l_cavgs=.true. (simple_estimate_ssnr.f90:312-437). Fits the stage table proposed for solve3D_policy.
  • [L][STRUCTURE] dated narrative: L36-37 "(ruling of 18 October 2026; it was 90, with an optional per-stage taper that is deleted)", L121-124, L142-143 "(since 14 October 2026)", L144 "(added 9 October 2026)", L166-168 "Validate the option before making it a default". Keep the rule, drop the history.
  • Otherwise current: defaults, temporary project, cavg3D note, nstages cap, symmetry-stage refusal (:149-151), multi-state mode, mapping back, validation artifacts and eo_* fields verified.
  • [M][STALE] L5-6: "carries no regularization of its own beyond the ordinary FSC/SSNR P_tau replay" -> two opt-in priors exist and have no contract in any policy: the soft solvent prior (pcg_solvent, pcg_solvent_lambda, pcg_solvent_check; src/main/volume/simple_pcg_solvent_sidecar.f90, wired at simple_rec3D_pcg_strategy.f90:1397-1470; enabled by solve3D in stage 8 only, controller :608-625) and the atomicity prior (atm_prior, maxits_atm, lambda_atm, bfac_data, rtol_atm; src/main/volume/simple_pcg_atomic_prior.f90, 744 lines, attached in simple_reconstructor_pcg.f90:120-123,502-635, needs the deapodized operator :437, not exposed in any UI entry). Neither appears in the module table L186-201 or section 10. Proposal: new section "Optional priors": both act on the base solve only, are half-independent so the pair stays gold-standard, FSC/NU/evidence/_unfil come from the prior-free pair and the NU label field is applied to the prior'd pair (NU policy L347-355), sidecar file names, who may enable them.
  • [M][VIOLATED] L135-137: "except on the distributed refine3D master's path, where the master owns its project and writes the field once at the end of the iteration" -> the PCG master finalization writes the particle field unconditionally (simple_rec3D_pcg_strategy.f90:931), so on the refine3D master path the field is written there, again by the master at the end of the iteration (simple_refine3D_strategy.f90:1592) and once before the workers (:1353/1357); write=.false. (:1423) only silences the NU handoff. The gridding assembly honours write (simple_volassemble_strategy.f90:1249). Breaks "one write of a segment per iteration" (layering_and_project_ownership_policy.md 5.4). Fix: give execute_rec3D_pcg_distributed_master a write argument; standalone reconstruct3D keeps true.
  • [M][STALE] L363-367: "envfsc=yes with automsk=no affects only the phase-randomized FSC evaluation, never a solve" -> PCG never phase-randomizes: l_phase_randomization = backend=='gridding' .and. mask_kind/='none' (src/main/volume/simple_halfmap_diagnostics.f90:39,84-86). On PCG, envfsc=yes (and automsk not nu) only builds the density envelope and writes automask3D_stateNN.mrc (simple_rec3D_pcg_strategy.f90:86-91); the FSC mode line reads phase_randomization=no. NU policy L87-88 says it correctly. Fix: rewrite the sentence.
  • [M][STALE] L520-523: "Production therefore defaults to two iterations and rejects maxits>8" -> a warning above 8, hard limits 1..100 (simple_rec3D_pcg_strategy.f90:2065-2071).
  • [L][STALE] L262-269: the nonzero-start replay solve restarted once from zero (solve_with_cold_restart) -> no production job has a nonzero start: every l_nonzero is set .false. (simple_rec3D_pcg_strategy.f90:1223,1239,1467,1504,1684) since the replay solve was retired on 2026-09-14. Keep the "base solve starts from zero" rule, drop the replay clause (stage 14 still tests warm-start band stability, so the solver API keeps the capability).
  • [L][STALE] L866-867: "the validated downscaled cache for cache-enabled refinement" -> the particle cache is 2D-only (solve3D_policy L104; refine3D has no cache input). Particle I/O is the read session and particle buffer (doc/policies/particle_read_path_policy.md).
  • [L][DRIFT] L197: the reconstruct3D UI is src/main/ui/simple/simple_ui_reconstruct3D.f90, not simple_ui_refine3D.f90. L201: the stages of test=pcg_recon are in simple_commanders_test_highlevel_pcg.f90 (the commander is declared in simple_commanders_test_highlevel.f90). L657-679: sub-suite names are fractional reconstruction, trailing chain identity, PCG sparse sampling (simple_commanders_test_class.f90:429,567-570); suites PCG half-set, atomic prior, rec3D backend exist and are not listed.
  • [M][GAP] project reads and writes of the reconstruction path have no statement. Standalone reconstruct3D (service + strategy): ensure_field_halves plus a write_segment_inside(oritype) at initialization (simple_rec3D_strategy.f90:141-143,225-227), possibly a projinfo re-read after the sigma2 rebuild (:306), the PCG master's field write (:931 above), the NU handoff write (simple_volassemble_strategy.f90:824) and out registration (simple_rec3D_service.f90:330). Proposal: a section "Project reads and writes" with: standalone owns and writes; a caller that owns its project passes write=.false. and writes once itself.
  • [M][STRUCTURE] 882 lines, over the 600-line limit, with decision and benchmark content mixed into the contract: L250-309 (PfCRT regression story, bgal box-256 test 2026-09-16), L376-396 (PfCRT B-factor -25 vs -105), L726-857 (two "review 2026-09-09" sections, a baseline-profile study design "at least 10 seeds" = experiment protocol, not contract), L697-699 (licensing aside), section 11 (design rationale). Duplicates: bench records L836-846 = refine3D_policy.md section 11.1; NU ladder L331-335 = NU policy sections 8 and 12. Proposal: keep sections intro/1/2/8/10 and the numbered invariants (4, 5, 7) in the policy; move rationale and protocols to doc/implementation_notes/completed/pcg_backend_overview.md / pcg_decision_log.md (which exist) and the comparison protocol to the testing plan.
  • Verified current: raw format v2, chain manifest v3 and pcg_trail_stateNN.txt, pcgtrail-v3, weight threshold 0.01, HPLIM_GUINIER 10 A, PCG_MASTER_NTHR_CAP 32, PCG_ASSEMBLE_BENCH.txt, no Q_NU/nu_input/pcg_lambda_rel/pcgop key left in src, maxits_ml default 0, support rule (automsk-driven), gate tolerances 1e-6/5e-4.

doc/policies/NU/nonuniform_filtering_policy.md (lines 675; last commit 2026-10-20; verdict: minor drift)

  • [M][STRUCTURE] L156-190: a reverted change with commit hash (65bee3073), line-number references that have drifted (simple_solve3D_controller ... (:636) is now :650) and a paragraph that says "Not established ... Confirm against a build before relying on either reading". A policy cannot carry an open question. My reading of the code closes it: in nonuniform_lpset mode refresh_matching_lp_from_project (src/main/strategies/parallelization/simple_refine3D_strategy.f90:333-414) replaces params%lp and the command-line lp by the handoff whether or not lp is already set (log line at :409), which explains the eight "NU filter promoted ..." lines; the else branch of set_bp_range3D (try_nu_project_working_lp) is not reached when lp is on the line (l_lpset). Replace the paragraph by that rule (please confirm) or delete it; keep "do not clamp the band in set_bp_range3D" as one sentence.
  • [M][VIOLATED] L634: "explicit user lp remains a hard override" -> refresh_matching_lp_from_project has no explicit-lp guard (only lpstop), so in nonuniform_lpset an lp from the user is also replaced by the handoff; in solve3D the scheduled lp is always on the line. Suspect, traced only that routine; verify before keeping the sentence.
  • [L][DRIFT] L633: "fresh stage starts do not consume it unless the run is continuing" -> also consumed when the previous assembly's _nu_filt references are on disk (simple_matcher_smpl_and_lplims.f90:146-156, the refine3D_auto startup bootstrap).
  • [L][CONTRADICTS] L77: "automsk=tight is rejected in 3D refinement" -> simple_parameters_phases.f90:911-914 rejects tight only with NU filtering; the refine3D UI offers yes|nu|no only. Reword. Also contradicts reconstruct3D_pcg_policy L363 (see there); this document is the correct one for PCG phase randomization.
  • [M][GAP] the handoff carrier and write ownership: the matching low-pass is carried as the lp/lp_est field of every particle record; a worker reads only its part's first record from the file (simple_refine3D_strategy.f90:372-378), the master reads it from memory (l_memory=.true., :1508). volassemble_exec and filter_pcg_nonuniform_maps set the field on the caller's spproj_field and write it unless the caller passes write=.false. (simple_volassemble_strategy.f90:824,1249). Section 12 lists the consumption rules without naming the carrier or who writes. Proposal: two sentences in section 3 (Ownership).
  • [L][GAP] section 3 omits simple_nu_state_filter (nonuniform_filter_state), the single entry shared by the gridding assembly and the PCG master and named in section 1; it also says the density automask3D_stateNN.mrc is generated "when envfsc=yes" (L289) while nonuniform_filter_state writes it under automsk=nu too (simple_nu_state_filter.f90:89-90).
  • [L][STRUCTURE] about 150 lines of history/benchmark: L43-61 (nu_input retirement records), L340-345 (9.9 s vs 10.5 s benchmark), L357-386, L439-461 (PfCRT records 2026-09-08d), section 10 L505-518 (a whole section on a removed feature), L574-604 (PfCRT log-set analysis). L583 points to claude/pfcrt_abinitio_band_lead_analysis.md, which does not exist in the repository (broken pointer). Proposal: keep the retired-feature list as one sentence, move the rest to doc/implementation_notes/completed/pcg_decision_log.md.
  • [L][STRUCTURE] nonuniform_filtering_simple_explainer.png/.svg and nonuniform_regularization_schematic.svg in doc/policies/NU/ are linked from no document (grep over *.md, *.html).
  • Verified current: bank and cap rules, auxiliary-member rule, handoff = finest bank member, outputs/suffixes, evidence constants and bands, Potts constants, the section 13 defaults of refine3D_auto and staged solve3D, the multi-state stage-5 NU statement (L668-673).

Cross-cutting gaps in this cluster

  1. Who owns the project file, and how often it is written, for the whole solve3D family. Facts that exist only in code: solve3D owns it between stages while each refine3D master owns it inside a stage; solve3D_cavgs writes the original once at the end; the add-on rewrites its working project 3 times in full during the final reconstruction and publishes by tmp+rename; chunks and pyramid copy the input into an execution directory and never write the original; reconstruct3D writes eo flags, sigma2 registration, the field, the NU handoff and out. layering_and_project_ownership_policy.md (draft) states the general rules; each workflow policy needs its own two-line "project reads/writes" block. Deviations missing from that draft's ledger: PCG master field write (simple_rec3D_pcg_strategy.f90:931), solve3D symmetrize stale write (simple_solve3D_utils.f90:620-623), add-on membership switch full writes.
  2. Strategy routines with a write switch. volassemble_exec and filter_pcg_nonuniform_maps take write, execute_rec3D_pcg_distributed_master does not. The rule "a routine on the caller's (params, build) writes only when asked" has no home; layering policy section 5.3/5.4 is the place.
  3. Per-particle fields as an inter-stage contract. res, res05, cfar (written by assembly, read by the solve3D controller from the file), lp/lp_est (NU handoff), updatecnt/sampled, eo, state. No document lists which module writes and which reads, nor which routes clear them. The res05 stale-entry case above is a consequence.
  4. Optional PCG priors (solvent, atomicity) and pcg_mskfile have no policy; the decision log is the only record. They are the only PCG features whose contract touches NU (label field applied to the prior'd pair).
  5. Stage plan as a table (solve3D and solve3D_cavgs): see solve3D_policy GAP. Without it, a constant edit in the controller has no document to update and the stage statements in importance_sampling_fractional_update_policy.md drift (it already has).
  6. Test names. Three documents cite sub-suites by name; two are stale (solve3D stream emulation). The names live in simple_commanders_test_class.f90 tables, not the registry; a single "Tests" pointer to test_environment_policy.md plus names that are generated from the tables would stop this.
  7. History in policies. About 200 lines of solve3D_policy, 150 of the NU policy and 200+ of the PCG policy are benchmark logs, decision logs or plan narrative (listed per document). All three already have an implementation_notes/completed log to receive them (pcg_decision_log.md, pcg_priors_history.md); solve3D has none.
  8. Dated status lines ("Status (...): implemented, not yet compiled or run") in chunks and pyramid are false and should go; doc/for_developers/index.md says policies describe the software as it is.

Unverified

  • All PfCRT, streptavidin, msp1, bgal, HolJunk numbers and log-set names (latest6/8/9, Sep16_10of10, convergence counts, resolutions, 9.9 s vs 10.5 s): the data are not in the repository.
  • claude/pfcrt_abinitio_band_lead_analysis.md: not in the repository.
  • NU policy L156-190 resolution and L634 "hard override": I traced refresh_matching_lp_from_project and set_bp_range3D only, not the full distributed log flow.
  • PCG numerical claims not checked against runs: "~7x faster per iteration", "~3.4% interior error", "about 32 box_crop^3 bytes per half", stage 5/6 acceptance thresholds. Gate tolerances 1e-6, 5e-4 were matched to the tester constants.
  • Whether symmetrize with l_symran really loses the stage's poses depends on symrandomize not re-reading; I read simple_sym.f90:800-820 only for its signature.
  • Add-on sigma2 copy-on-write semantics (sigma2_state_extend, sigma2_state_union_means), carried-bundle validation details and the distributed-partition claims of addon section 9 were checked for existence and call sites, not for numerics.
  • doc/policies/stream/stream_3D_ingestion_policy.md sections 9-10 were only checked for existence and cross-reference consistency.
  • Skills were grepped for contradictions on stage numbers, NU stage, PCG solvent and the add-on; not read in full.