Child of the solver boundary umbrella. Shape D: plain wiring. No new
mechanism, no new adapter attribute except one small addition. This is the
cheapest item and it removes the most embarrassing leaks, the ones in modules
the boundary test already claims to protect.
What leaks
csauto/web_support.py:187, inside discover_job_id:
for name in ("csauto.stdout", "csauto.stderr", "run_solver.log", "listing"):
adapter.anomaly_file_names holds exactly that list and is already passed into
this function's adapter argument. The literal list should simply be that
attribute.
csauto/fastapi_routes/case_data.py:
27: file: str = "listing" # Log Tail default
36: scope: str = "monitoring" # probes scope
105: scope_value = (query.scope or "monitoring").strip().lower()
106: if scope_value not in ("monitoring", "profiles"):
listing, monitoring and profiles are code_saturne directory and file
names, sitting in HTTP query defaults. A solver whose console log is not called
listing gets an unusable default, and the boundary test does not notice
because its token list does not include these words.
What to do
discover_job_id: replace the tuple with adapter.anomaly_file_names.
- The probes
scope: the API should speak in roles, not in code_saturne
directory names. Either rename the query values to probes / profiles and
let the adapter map them to its own directories, or expose the valid scopes
through the adapter. The adapter already has list_probe_files and
list_profile_files, so the mapping has a natural home.
- The Log Tail default
file: there is no adapter attribute for it today.
Smallest option is a new default_tail_file (or reusing the first entry of
the existing tail priority list). Decide in the PR; either way the literal
leaves case_data.py.
Definition of done
- No
listing, monitoring, profiles or hardcoded file list in
fastapi_routes/ or web_support.py.
- With
solver = "stub", the Log Tail panel opens on a file the stub actually
produces, instead of defaulting to a code_saturne name.
- Existing web tests still pass unchanged for code_saturne.
Note
This is the one child that changes the HTTP API surface (the scope values).
The umbrella lists API shapes as a non-goal, but that non-goal covers the
historical names kept deliberately (/api/resu_dirs, resu_removed); scope
is a query value nobody has documented as residue. Worth confirming before the
PR that renaming it is acceptable.
Child of the solver boundary umbrella. Shape D: plain wiring. No new
mechanism, no new adapter attribute except one small addition. This is the
cheapest item and it removes the most embarrassing leaks, the ones in modules
the boundary test already claims to protect.
What leaks
csauto/web_support.py:187, insidediscover_job_id:adapter.anomaly_file_namesholds exactly that list and is already passed intothis function's
adapterargument. The literal list should simply be thatattribute.
csauto/fastapi_routes/case_data.py:listing,monitoringandprofilesare code_saturne directory and filenames, sitting in HTTP query defaults. A solver whose console log is not called
listinggets an unusable default, and the boundary test does not noticebecause its token list does not include these words.
What to do
discover_job_id: replace the tuple withadapter.anomaly_file_names.scope: the API should speak in roles, not in code_saturnedirectory names. Either rename the query values to
probes/profilesandlet the adapter map them to its own directories, or expose the valid scopes
through the adapter. The adapter already has
list_probe_filesandlist_profile_files, so the mapping has a natural home.file: there is no adapter attribute for it today.Smallest option is a new
default_tail_file(or reusing the first entry ofthe existing tail priority list). Decide in the PR; either way the literal
leaves
case_data.py.Definition of done
listing,monitoring,profilesor hardcoded file list infastapi_routes/orweb_support.py.solver = "stub", the Log Tail panel opens on a file the stub actuallyproduces, instead of defaulting to a code_saturne name.
Note
This is the one child that changes the HTTP API surface (the
scopevalues).The umbrella lists API shapes as a non-goal, but that non-goal covers the
historical names kept deliberately (
/api/resu_dirs,resu_removed);scopeis a query value nobody has documented as residue. Worth confirming before the
PR that renaming it is acceptable.