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=noandoverlap0.95" -> now: the add-on searches the cohort in the base run's LAST stage (manifestlast_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;overlap0.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_rec3Ddoes" -> 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_neighstage 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 atsimple_commanders_solve3D.f90:1001("before NU") is equally stale. Fix: "...so it stops after its firstprob_neighstage, 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_reccallsbootstrap_rec3Donly when the committed sigma2 is not consumable at the native box or the registration box differs; otherwise a plainreconstruct3Don the committed sigmas ("reusing committed canonical sigmas"). Evidence:simple_final_rec.f90:76-103. L654-657 of this document already says it correctly. Fix: "...isbootstrap_rec3Dwhen the sigmas must be rebuilt (section 9), elsereconstruct3D." - [M][STALE] L647-653: final reconstruction "does not inherit ...
refine,lp,automsk, orgauref" -> now:automskIS inherited from the last stage line (andfilt_modeunderautomsk=nu); only search,lpandgaurefare not. Evidence:simple_final_rec.f90:385-397(comment: "automsk is inherited on BOTH routes"). Fix: dropautomskfrom 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 anautomskfeature;envfsc=yeswithautomsk=noleaves 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: "Withautomskactive ..." and keep envfsc for the FSC mode only. - [M][CONTRADICTS] other documents:
doc/policies/importance_sampling_fractional_update_policy.mdL229-233 says the default multi-state run "stops after theprobphase and beforeprob_neigh, staged NU filtering"; this document (section 6) and the controller say stage 5 isprob_neigh+ NU. UI helpsrc/main/ui/simple/simple_ui_solve3D.f90:77says the PCG solvent prior is "active in solve3D from stage 7 (one stage after NU filtering starts)"; controllerPCG_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
solve3Dnever runs with a low-pass limit finer than 20 A" -> the 20 A floor (LPSTAGES_STAGE1_LP_FLOOR) is inlpstagesandlpstages_fastonly. Routes planned bylpstages_setlims(no 2D solution, andvol1) andforce_lp_range=yesstart atlpstart(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 "exceptforce_lp_range=yesand the routes planned frommskdiam". - [L][DRIFT] L164-166: "
lpstart/lpstop... otherwise frommskdiam(mskdiam2lplimits)" ->lpstopis then clamped bymin(lpstop, LPSTOP_BOUNDS(1)), andmskdiam2lplimitsreturns 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.0is set on the command line beforeprep_class_command_lines, sol_refine3D_lpstop_overrideis true and stage 5 (an NU stage) carrieslpstop=6.0as a ceiling, against L352-369 ("only an explicit command-linelpstopremains 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_fsc05never advances the last stage (no next rung,:751), has no entry-stage or axis-stage guard, whilelpexithas 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/res05are cleared only byreset_ptcl3D_from_ptcl2D_selection(simple_commanders_solve3D.f90:2192-2195), which thecavg_ini_extand state-continuation branches (:1294-1324,:1076-1090) do not call, so ares05left 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)
symmetrizewithl_symran(start group has more symmetry than target) callsse1%symrandomize(spproj%os_ptcl3D)and writesptcl3Dto the file, but exec_solve3D'sspprojwas last read BEFORE the symmetry-search stage ran (read_segmentis at the end of each loop pass,:1400-1403, aftersymmetrizeat: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" oflayering_and_project_ownership_policy.mdsection 4. Please verify; fix isread_segment('ptcl3D')beforesymrandomize. - [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
latest6trajectories and "Revisit with per-stage trajectories" = plan; the mid-stage-exit story withlatest8/latest9restarts; 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 newdoc/implementation_notes/completed/solve3D_stage_decisions.md, and the MAXITS paragraph to the existingdoc/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.binwritten once,balancedefault,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_backendis gridding for stages 1-2 and the requested backend from stage 3 (PCG_REC_START_STAGE),ml_regfrom stage 3,trsfrom the ladder,overlap/fracsrch0.99/99 up to the last full-budget stage, 0.9/90 after, 0.95/90 in stages 7-8,frac_best1.0 / 0.5 from stage 5 (single state) / 0.85 in stages 7-8,greedy_sampling=nofor multi-state from stage 4,trail_recfrom stage 5 (single) or 8 (multi),fillin=yesonly 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 defaultnsample=10000 (NSAMPLE_SOLVE3D_DEFAULT), while the full-sampling switch testsnsample/N > 0.9WITHOUT thenstatesfactor. 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
refine3Dstage runs as a whole program whose master owns the file during the stage; exec_solve3D keeps no unsaved change across a stage and re-readscls3D,ptcl3D,outafter each (:1400-1402); the controller readsptcl3Dfrom the file twice per stage forres05(omission test:1354, promotion:564,project_best_fsc05_resolution); each boundary reconstruction does a read-modify-write of theoutsegment per state (register_stage_volume);calc_final_recreads the whole project and writesoutonce; the manifest write is a whole-project read plus oneprojinfowrite. 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 tosolve3D_stateNN_tmpproj.simple, runsselection prune=yeson the copy, switchesparams%projfileto it, starts at stageNSTAGES_INDEPENDENT=5, forcesfilt_mode=nonuniform, refusesnstates,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=Nandscreen=<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_collapsegoes 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_keysmust stay the dual ofapply_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 inMANIFEST_INPUT_KEYS, so an add-on of a base run withnu_stage>5 andnstages5 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 ...) inunit_project-> nowsolve3D 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,28still 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) atsimple_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 (comparenu_stageabove). - [L][GAP] project write count of the final reconstruction:
switch_addon_membership(l_union=.true.)is a whole-projectspproj%write(simple_commanders_solve3D.f90:1664-1667) and the mask switch writesptcl2Dandptcl3D(:1680-1682);calc_final_rec_addoncalls 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 fromlayering_and_project_ownership_policy.mdsection 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 suitesolve3D chunks planis 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_rowsin the stream's solve3D stage)", "The stream also splits a stack only when it cannot fit" ->cap_rowsexists nowhere insrc; 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 iscut_whole_stacksfor 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 whenpgrp_startdiffers frompgrp; codemin_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_stageis implemented insimple_solve3D_controller.f90(declared insimple_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_blobswas removed on 2026-10-20 ... after it failed on every run of its profile" is changelog/benchmark; keep only "No high-level test runssolve3D_pyramidend to end". - [L][DRIFT] L41:
nspaceis read fromparams(simple_commanders_solve3D_pyramid.f90:160) but is not an input of the UI entry (simple_ui_solve3D.f90:272-305declares 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=euclidunder "When unset, it supplies" ->objfunis forced (simple_commanders_solve3D.f90:113), as arebfac,filt_mode,automsk,oritype; thefilt_modedefault at:119is dead code. Fix: moveobjfunto the forced list. - [M][GAP] the restart driver is described in one clause (L162). Code:
nrestarts_collapseonsolve3D_cavgsroutes tocommander_solve3D_cavgs_conditional_restarts(simple_exec_solve3D.f90:41-43): needsmkdir=yes,projfile,nstates>1, forbidsnrestarts, runs up to N times withexit_collapse=yesexcept the last, and writes the standing run's directory intoSOLVE3D_CAVGS_FINAL_DIR(read by stream p03;simple_commanders_solve3D.f90:620-684).nrestarts(plainrestarted_exec) and theexit_collapsedefault (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 atNSPACE_CAVGS_EARLY=500 andMAXITS_CAVGS_EARLY=15,snr_noise_reg2/4/6,lpstageswithFRCLIMS_CAVGSandl_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 andeo_*fields verified.
doc/policies/3D/reconstruct3D_pcg_policy.md (lines 882; last commit 2026-10-20; verdict: minor drift; split recommended)¶
- [M][STALE] L5-6: "carries no regularization of its own beyond the ordinary FSC/SSNR
P_taureplay" -> 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 atsimple_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 insimple_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/_unfilcome 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
refine3Dmaster'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 honourswrite(simple_volassemble_strategy.f90:1249). Breaks "one write of a segment per iteration" (layering_and_project_ownership_policy.md 5.4). Fix: giveexecute_rec3D_pcg_distributed_masterawriteargument; standalonereconstruct3Dkeeps true. - [M][STALE] L363-367: "
envfsc=yeswithautomsk=noaffects 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(andautomsknotnu) only builds the density envelope and writesautomask3D_stateNN.mrc(simple_rec3D_pcg_strategy.f90:86-91); the FSC mode line readsphase_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: everyl_nonzerois 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;
refine3Dhas nocacheinput). Particle I/O is the read session and particle buffer (doc/policies/particle_read_path_policy.md). - [L][DRIFT] L197: the
reconstruct3DUI issrc/main/ui/simple/simple_ui_reconstruct3D.f90, notsimple_ui_refine3D.f90. L201: the stages oftest=pcg_reconare insimple_commanders_test_highlevel_pcg.f90(the commander is declared insimple_commanders_test_highlevel.f90). L657-679: sub-suite names arefractional reconstruction,trailing chain identity,PCG sparse sampling(simple_commanders_test_class.f90:429,567-570); suitesPCG half-set,atomic prior,rec3D backendexist and are not listed. - [M][GAP] project reads and writes of the reconstruction path have no statement. Standalone
reconstruct3D(service + strategy):ensure_field_halvesplus awrite_segment_inside(oritype)at initialization (simple_rec3D_strategy.f90:141-143,225-227), possibly aprojinfore-read after the sigma2 rebuild (:306), the PCG master's field write (:931above), the NU handoff write (simple_volassemble_strategy.f90:824) andoutregistration (simple_rec3D_service.f90:330). Proposal: a section "Project reads and writes" with: standalone owns and writes; a caller that owns its project passeswrite=.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_GUINIER10 A,PCG_MASTER_NTHR_CAP32,PCG_ASSEMBLE_BENCH.txt, noQ_NU/nu_input/pcg_lambda_rel/pcgopkey left insrc,maxits_mldefault 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: innonuniform_lpsetmoderefresh_matching_lp_from_project(src/main/strategies/parallelization/simple_refine3D_strategy.f90:333-414) replacesparams%lpand the command-linelpby the handoff whether or notlpis already set (log line at:409), which explains the eight "NU filter promoted ..." lines; theelsebranch ofset_bp_range3D(try_nu_project_working_lp) is not reached whenlpis on the line (l_lpset). Replace the paragraph by that rule (please confirm) or delete it; keep "do not clamp the band inset_bp_range3D" as one sentence. - [M][VIOLATED] L634: "explicit user
lpremains a hard override" ->refresh_matching_lp_from_projecthas no explicit-lpguard (onlylpstop), so innonuniform_lpsetanlpfrom the user is also replaced by the handoff; in solve3D the scheduledlpis 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_filtreferences are on disk (simple_matcher_smpl_and_lplims.f90:146-156, the refine3D_auto startup bootstrap). - [L][CONTRADICTS] L77: "
automsk=tightis rejected in 3D refinement" ->simple_parameters_phases.f90:911-914rejectstightonly with NU filtering; therefine3DUI offersyes|nu|noonly. 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_estfield 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_execandfilter_pcg_nonuniform_mapsset the field on the caller'sspproj_fieldand write it unless the caller passeswrite=.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 densityautomask3D_stateNN.mrcis generated "whenenvfsc=yes" (L289) whilenonuniform_filter_statewrites it underautomsk=nutoo (simple_nu_state_filter.f90:89-90). - [L][STRUCTURE] about 150 lines of history/benchmark: L43-61 (
nu_inputretirement 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 toclaude/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 todoc/implementation_notes/completed/pcg_decision_log.md. - [L][STRUCTURE]
nonuniform_filtering_simple_explainer.png/.svgandnonuniform_regularization_schematic.svgindoc/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¶
- 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), solve3Dsymmetrizestale write (simple_solve3D_utils.f90:620-623), add-on membership switch full writes. - Strategy routines with a
writeswitch.volassemble_execandfilter_pcg_nonuniform_mapstakewrite,execute_rec3D_pcg_distributed_masterdoes 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. - 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. Theres05stale-entry case above is a consequence. - Optional PCG priors (solvent, atomicity) and
pcg_mskfilehave 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). - 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).
- Test names. Three documents cite sub-suites by name; two are stale (
solve3D stream emulation). The names live insimple_commanders_test_class.f90tables, not the registry; a single "Tests" pointer totest_environment_policy.mdplus names that are generated from the tables would stop this. - 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/completedlog to receive them (pcg_decision_log.md,pcg_priors_history.md); solve3D has none. - Dated status lines ("Status (...): implemented, not yet compiled or run") in chunks and pyramid are false and should go;
doc/for_developers/index.mdsays 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_projectandset_bp_range3Donly, 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
symmetrizewithl_symranreally loses the stage's poses depends onsymrandomizenot re-reading; I readsimple_sym.f90:800-820only 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.mdsections 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.