Skip to content

fix: repair five files corrupted by batch-port union merges - #279

Merged
azilber merged 1 commit into
mainfrom
fix/union-merge-damage
Aug 10, 2026
Merged

fix: repair five files corrupted by batch-port union merges#279
azilber merged 1 commit into
mainfrom
fix/union-merge-damage

Conversation

@azilber

@azilber azilber commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Repairs the collateral damage from the earlier upstream batch port, where some conflicts were resolved by concatenating both sides. All five files are clean upstream; dashboard-api could not be imported at all, so rebuilding that image would have failed to start.

File Damage Fix
dashboard-api/helpers.py 36 orphaned lines after a return (refactored + old inline get_loaded_model both kept) Dropped the dead inline copy — the extracted helpers already carry the same validation
dashboard-api/routers/features.py stray single-line def before the wrapped signature Removed the duplicate
dashboard-api/routers/updates.py "releases" key twice in one dict literal Removed the dead first entry (Python already used the later one — no behavior change)
privacy-shield/tests/test_pii_scrubber.py @pytest.mark.parametrize( opening line lost, orphaning its args Restored the decorator
installers/windows/lib/opencode-config.ps1 2 lines lost indentation; [Math]::Min(32768, $ContextLimit) bound the Int32 overload Restored indentation; forced the [long] overload so contexts above Int32 work (the test uses 9007199254740991)

Verified: every Python file under ods/ compiles (3 previously failed); no duplicate dict-key literals remain repo-wide; the .ps1 keeps CRLF endings; and the full dashboard-api package — including main.py — imports cleanly against real dependencies inside the running ods-dashboard-api container, with the repaired helpers returning correct values for loaded/fallback/invalid payloads. make lint and check-version-consistency.py pass.

The earlier upstream batch port resolved some conflicts by concatenating
both sides, which produced duplicated/orphaned code in five files that are
clean upstream. dashboard-api could not be imported at all, so a rebuild of
that image would have failed to start.

- helpers.py: get_loaded_model kept both the refactored form (delegating to
  _lemonade_loaded_model/_llama_loaded_model) and the older inline
  implementation, leaving 36 orphaned lines after a return. Dropped the
  dead inline copy; the helpers already carry the same payload validation.
- routers/features.py: a stray single-line 'def calculate_feature_status'
  preceded the wrapped multi-line signature. Removed the duplicate.
- routers/updates.py: the 'releases' key appeared twice in one dict literal
  (old inline comprehension + refactored _format_release). Removed the dead
  first entry; Python already used the later one, so behavior is unchanged.
- privacy-shield tests: an @pytest.mark.parametrize opening line was lost,
  orphaning its arguments. Restored the decorator.
- opencode-config.ps1: two lines lost their indentation, and
  [Math]::Min(32768, $ContextLimit) bound the Int32 overload, throwing on
  contexts above Int32 (test-windows-model-activation.ps1 exercises
  9007199254740991). Restored indentation and forced the [long] overload.

Verified: all Python files under ods/ compile (previously 3 failed), no
duplicate dict-key literals remain repo-wide, the PowerShell file keeps its
CRLF endings, and the complete dashboard-api package - including main.py -
imports cleanly against real dependencies inside the ods-dashboard-api
container, with the repaired helpers returning correct results.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@azilber
azilber merged commit 52de6e5 into main Aug 10, 2026
20 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