fix: repair five files corrupted by batch-port union merges - #279
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
dashboard-api/helpers.pyreturn(refactored + old inlineget_loaded_modelboth kept)dashboard-api/routers/features.pydefbefore the wrapped signaturedashboard-api/routers/updates.py"releases"key twice in one dict literalprivacy-shield/tests/test_pii_scrubber.py@pytest.mark.parametrize(opening line lost, orphaning its argsinstallers/windows/lib/opencode-config.ps1[Math]::Min(32768, $ContextLimit)bound the Int32 overload[long]overload so contexts above Int32 work (the test uses9007199254740991)Verified: every Python file under
ods/compiles (3 previously failed); no duplicate dict-key literals remain repo-wide; the.ps1keeps CRLF endings; and the full dashboard-api package — includingmain.py— imports cleanly against real dependencies inside the runningods-dashboard-apicontainer, with the repaired helpers returning correct values for loaded/fallback/invalid payloads.make lintandcheck-version-consistency.pypass.