Skip to content

Add missing 'AI Ambiguity validation' and 'ISB model' keys to pdp3 config generation - #33

Merged
frigusgulo merged 1 commit into
mainfrom
28-ai-ambiguity-validation-key
Jul 30, 2026
Merged

Add missing 'AI Ambiguity validation' and 'ISB model' keys to pdp3 config generation#33
frigusgulo merged 1 commit into
mainfrom
28-ai-ambiguity-validation-key

Conversation

@frigusgulo

Copy link
Copy Markdown
Collaborator

Summary

Fixes #28 — every PPP run silently produced 0 KIN files because the generated config_file was missing the AI Ambiguity validation key that pdp3 (v3.2.10) unconditionally reads. With the key absent, get_ctrl returns a value with embedded newlines that crashes pdp3.sh's sed substitution, and no error surfaces to the wrapper.

Root cause

The key was dropped in three places, so even an up-to-date installed PRIDE template didn't help: _write_config loads the installed template via load_default()read_config_file had no parsing branch for the key (stripped on read) → write_config_file never emitted it → and AmbiguityFixingOptions had no field to carry it.

Changes

  • AmbiguityFixingOptions.ai_ambiguity_validation (default "YES", matching upstream), plus the writer line and reader branch — the key now round-trips, and is injected with the upstream default when reading an old template that lacks it.
  • Same fix for ISB model — it was in the shipped config_template but absent from the model/reader/writer, so the read→write round-trip stripped it too. This is the key earthscope-sfg-workflows currently monkeypatches write_config_file to inject; that workaround can be dropped once this lands. (Found by the new drift guard below.)
  • Shipped config_template gains the AI Ambiguity validation line, matching upstream's.

Drift guard (the issue's 'more general fix')

PRIDE-PPPAR's shipped table/config_template at the pinned commit b7451a8 is vendored as a test resource, and test_config_file.py asserts that (a) our shipped template, (b) write_config_file output, and (c) the read→write round-trip each cover every upstream key. Future keys like ISB model/AI Ambiguity validation will fail CI instead of silently zeroing out PPP runs. The vendored copy should be refreshed when re-pinning the table source (noted in the test docstring).

Note: these tests only run in CI once the pride-ppp suite is added to the workflow (currently only the gnss-product-management and gpm-cli suites run).

Verification

  • 6 new tests pass; full local run: 41 (pride-ppp) + 430 (gpm, non-integration) + 43 (cli); ruff clean.
  • Generated config verified to match upstream's key set exactly.

🤖 Generated with Claude Code

pdp3 (v3.2.10) unconditionally reads 'AI Ambiguity validation' from the
ctrl file; when the key is absent, get_ctrl returns a value with
embedded newlines that crashes pdp3.sh's sed substitution, and every
PPP run silently produces 0 KIN files.

The generated config was missing the key in three places, so it was
dropped even when the installed PRIDE template had it: the
AmbiguityFixingOptions model had no field, read_config_file had no
parsing branch (load_default reads the installed template and stripped
it), and write_config_file never emitted it.

The same read/write round-trip also stripped 'ISB model' — present in
the shipped config_template but absent from the model, reader, and
writer. earthscope-sfg-workflows currently monkeypatches
write_config_file to inject it; with this fix that workaround can be
dropped.

New test_config_file.py covers the round-trip for both keys and adds a
drift guard: PRIDE-PPPAR's shipped table/config_template at the pinned
commit b7451a8 is vendored as a test resource, and tests assert that
the shipped template, the writer output, and the read→write round-trip
all cover every upstream key. The ISB gap was found by this guard.
Refresh the vendored copy when re-pinning the table source.

Fixes #28.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@frigusgulo
frigusgulo merged commit 659e6be into main Jul 30, 2026
4 checks passed
@frigusgulo
frigusgulo deleted the 28-ai-ambiguity-validation-key branch July 30, 2026 23:30
frigusgulo pushed a commit to EarthScope/earthscope-sfg-workflows that referenced this pull request Jul 31, 2026
sv3_pipeline.py carried three monkey-patches applied at import time:
write_config_file (inject 'ISB model' / 'AI Ambiguity validation' pdp3
keys), PrideProcessor._validate_kinfile (DataFrame truthiness crash),
and TBDArray.write_df (promote 'time' column to index for
tiledb.from_pandas). All three are now fixed at the source:

- pride-ppp: config keys fixed in EarthScope/GNSSommelier#33 (merged),
  _validate_kinfile fixed in EarthScope/GNSSommelier#34
- earthscope-sfg-tools: write_df fixed in
  EarthScope/earthscope-sfg-tools#19 (which also makes the Go-binary
  wrappers raise on non-zero exit instead of failing silently)

pyproject now pins pride-ppp to an explicit GNSSommelier rev (it was
unpinned, resolving default-branch HEAD at lock time) and moves the
sfg-tools pin from 0.2.0 to the fix commit; pixi.lock re-solved
accordingly. Once the upstream PRs merge, both pins should move to
merged-main revs (sfg-tools 0.2.1 tag) with a single re-lock.

Removing the base-class write_df patch also ends qc_pipeline's silent
dependence on sv3_pipeline being imported first for its
qcKinPositionTDB writes to work.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pdp3 config_file missing 'AI Ambiguity validation' key → every PPP run silently produces 0 KIN files

1 participant