Comet designation architecture

R107 establishes one headless owner, one Qt owner and an AST-only release gate for every comet-designation input.

R107 enforced Parallel regexes, independent element-file scans and legacy text dialogs are prohibited in GUI designation paths.

Final ownership

comet_designation.py

  • final syntax and canonicalisation;
  • incomplete/intermediate typing states;
  • shared examples and validation messages;
  • FITS OBJECT hint parsing;
  • lookup through CometElementRepository;
  • multi-designation parsing and canonical deduplication.

comet_designation_widgets.py

  • Comet designation label;
  • placeholder/help copy and status colours;
  • line-edit styling;
  • embedded, table, single-dialog and list-dialog components;
  • Add or update comet elements… action.

Required validation flow

raw text / FITS OBJECT hint
→ shared parse and canonicalisation
→ syntax or intermediate state
→ CometElementRepository lookup
→ shared Qt status and action
→ widget-specific scientific loading after success

Widgets may consume the validated canonical designation, but must not implement a second regex, message policy or direct scan of element files.

Compatibility surfaces

ephemeris_position.normalize_comet_designation remains a compatibility re-export of the shared function.

The following thin adapters remain intentionally:

wccd._designation_hint_from_object()
wccd._local_comet_elements_available()
wstack_functions.stack_kopr_ephemeris_available()

They contain no local grammar, direct file scanning or independent messages. koprhand.loadcometid() remains for external compatibility but is not a GUI designation validator.

The allowlisted WAnalyzer LoadComet() call occurs only after shared validation and loads scientific/magnitude data.

AST-only release enforcement

python3 comet_designation_inventory.py --enforce .

The command requires no PyQt5 runtime. Release validation fails on:

  • comet/designation QInputDialog.getText() usage;
  • GUI validation through loadcometid() or FindElements();
  • non-allowlisted GUI LoadComet() validation;
  • designation regexes outside comet_designation.py;
  • obsolete UI terms Comet name, Comet short name or destignation;
  • duplicated shared examples or status messages;
  • a required widget losing its shared component import.

Synthetic negative tests must demonstrate detection of every major violation category.

Migration checklist for a new input

  1. Use the headless parser/canonicaliser from comet_designation.py.
  2. Select the appropriate shared Qt component from comet_designation_widgets.py.
  3. Use CometElementRepository status; do not scan element files directly.
  4. Keep UI text and examples in the shared owner.
  5. Commit widget state only after successful validation.
  6. Run the inventory enforcement and focused tests.
  7. Add a synthetic negative test if a new violation form is possible.

R107 QA and scientific non-regression

  • Focused R103–R107 designation suite: 67 passed.
  • Extended designation/ephemeris/compatibility gate: 95 passed.
  • Final total: 1589 passed, 6 skipped, 0 failed.

R107 changes no ephemeris, astrometry, calibration, stacking, photometry, reference-star mathematics or FITS product contract. The R101 unified-ephemeris enforcement remains green.

Source R107 cleanup report · Plain-text designation reference