Skip to content

Cleanup: dead code, flatten PARAMETER_SOURCE_MAP, + cleanup backlog doc#103

Merged
jirhiker merged 1 commit into
feature/source-registryfrom
chore/cleanup-tier1
Jun 30, 2026
Merged

Cleanup: dead code, flatten PARAMETER_SOURCE_MAP, + cleanup backlog doc#103
jirhiker merged 1 commit into
feature/source-registryfrom
chore/cleanup-tier1

Conversation

@jirhiker

Copy link
Copy Markdown
Member

Adds docs/cleanup-todo.md (a tiered cleanup backlog from a code-analysis sweep of backend + frontend + orchestration) and executes its Tier 1 (dead/commented code) plus 2.1 and 2.2.

Stacked on #102 (base feature/source-registry) because item 2.1 updates the registry/validation tests added in #101/#102. Merge order: #101#102 → this.

Dead / commented-out code removed

  • backend/unifier.py — commented _perister_factory / _unify_wrapper; type(x) == listisinstance (2.2).
  • backend/config.py — commented pods wiring in all_site_sources.
  • frontend/api/app.py — commented create_queue, stale cache/Cloud-Tasks payload comments, debug print, the always-None task_id/name path, and the unused ConfigModel.sources field (accepted on POST, never read).
  • orchestration/definitions.py_all_specs dropped from _build_graph's return (returned, never used).
  • orchestration/resources/die_config.py — the output_type → is_summary / output_format mapping is now dead: the source asset always passes a nominal ogc_timeseries synth product and unify_source_both produces both modes, so the config carries no output mode. Simplified payload + docstring. (Also why the missing ogc_hardness/ogc_water_type there was harmless — the whole block is gone.)
  • backend/worker.py, backend/record.py, backend/logger.py, frontend/cli.py — misc commented lines.

2.1 — Flatten PARAMETER_SOURCE_MAP

param: {"agencies": [...]}param: [...]. "agencies" was the only key ever present and every read was ["agencies"]. Updated the two read sites (config.py, products.py) and the two tests.

Verification

No behavior change. Full suite 311 passed; dg check defs clean. py_compile over the API files (not import-tested in CI) clean.

Remaining backlog (Tier 2.3–2.7, Tier 3, Tier 4) tracked in docs/cleanup-todo.md.

🤖 Generated with Claude Code

…backlog

Adds docs/cleanup-todo.md (a tiered cleanup backlog from a code-analysis pass)
and executes its Tier 1 (dead/commented code) plus items 2.1 and 2.2.

Dead / commented-out code removed:
- backend/unifier.py: commented _perister_factory / _unify_wrapper blocks; also
  `type(x) == list` -> `isinstance` (2.2).
- backend/config.py: commented pods wiring in all_site_sources.
- frontend/api/app.py: commented create_queue, stale cache-check and Cloud Tasks
  payload comments, a debug print, the always-None task_id/name path, and the
  unused ConfigModel.sources field (accepted on POST, never read).
- orchestration/definitions.py: _all_specs dropped from _build_graph's return —
  it was returned but never used.
- orchestration/resources/die_config.py: the output_type -> is_summary /
  output_format mapping is now dead — the source asset always passes a nominal
  ogc_timeseries synth product and unify_source_both produces both modes, so the
  config carries no output mode. Simplified the payload + docstring accordingly.
- backend/worker.py, backend/record.py, backend/logger.py, frontend/cli.py:
  misc commented-out lines.

2.1 — Flatten PARAMETER_SOURCE_MAP from `param: {"agencies": [...]}` to
`param: [...]`. "agencies" was the only key ever present and every read was
`["agencies"]`; updated the two read sites (config.py, products.py) and the two
registry/validation tests.

No behavior change. Full suite (311) + dg check defs clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

Your pull request is automatically being deployed to Dagster Cloud.

Location Status Link Updated
die-orchestration View in Cloud Jun 30, 2026 at 12:52 AM (UTC)

@jirhiker jirhiker merged commit d0afdc6 into feature/source-registry Jun 30, 2026
3 checks passed
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.

1 participant