Skip to content

fix(resources): refresh Library service restart eligibility - #7264

Merged
Lightheartdevs merged 2 commits into
Osmantic:mainfrom
tang-vu:fix/library-resource-restart-refresh
Oct 8, 2026
Merged

Lightheartdevs merged 2 commits into
Osmantic:mainfrom
tang-vu:fix/library-resource-restart-refresh

Conversation

@tang-vu

@tang-vu tang-vu commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Reload currently selected Library built-in manifests on each resources/restart request. Remove disabled/invalid entries immediately, preserve measured auxiliary containers without granting them authority, and recover on the next request after an unreadable selection.

Closes #7403. Issue: #7403. Reconstructs the independently useful archived #7264 scope on current upstream main c5b5533e9d81714dcdebf5b929765dfbdc998689. Candidate e058a7ac76ee45cd76dc8e3efcd69e1063b12192.

Why this matters

Dashboard resources and restart controls use import-time SERVICES while Library enables/disables built-ins during API uptime. An added service lacks restart authority; a disabled startup entry can retain it.

AI Assistance

The contributor and Codex collaborated. The contributor provided project direction, scope decisions and environment setup; Codex assisted analysis, implementation, tests and review preparation. Listed commands were executed by Codex. Specific human runtime verification is not inferred; independent maintainer/human release review remains required.

Release Lane

  • Mainline change targeting main

Changed Surface

  • Dashboard API / host agent

Risk And Validation

Risk: High under HIGH_RISK_CHANGE_MAP because this changes live service restart authority after Library selection changes. Native Windows x64, Python 3.14.2; Node 24.12.0/npm 11.6.2/Vitest 4.1.11 where applicable.

18 current-main regressions failed and one passed. Candidate: 47 resources/collection/auxiliary-container tests passed, including all 11 current Library built-ins, authenticated API and real host-agent HTTP restart handling. Docker outcomes are simulated.

  • Diff check and touched Python Ruff
  • Commit identity gate against exact base/head
  • New API tests actually execute in existing dashboard.yml API whole tests job; Dashboard tests execute in its frontend job

Focused API command (from ods/extensions/services/dashboard-api):

python -m pytest -q tests/test_library_resource_restart.py tests/test_resources.py tests/test_resource_collection.py tests/test_auxiliary_container_resources.py

Operational Change Check

  • Operational validation intentionally deferred: full fresh install, installed large-model/GPU, Portal, Docker/WSL/macOS/Linux runtime and release fleet qualification. HTTP/fixtures establish only the behavior described above.

Notes For Reviewers

Revert this isolated scope to roll back; preserve model artifacts, persisted configuration and recovery receipts.

Overlap check

Searched all states for Library restart eligibility and checked every live open PR file list: no open PR changes routers/resources.py. #7175 and other lean Library integration branches change installation/lifecycle selection producers; this fixes their live resources/restart consumer after selection changes. Existing #7263/#7390 are separate API template/Windows agent ownership outcomes. Closed #7264 is the archived predecessor, now reconstructed and tested across all eleven current Library built-ins.

Independent maintainer/human review is required before merge; agent review and local test results do not replace the installed/fleet release gate.

Combined integration validation

All three independently useful candidates were composed on base c5b5533e9d81714dcdebf5b929765dfbdc998689; exact combined head b301503f6c80a219a1f5b804f6e8096c50f3d333.

  • Native Windows/Python 3.14.2 full Dashboard API suite: 6,567 passed, 60 skipped, 25 failed. All 25 failures reproduced on exact unchanged base. They are existing shell/Windows WSL bridge, symlink/FIFO privilege and filesystem/config fixtures; no new regression failed.
  • Isolated Ubuntu 24.04.5 WSL2/Python 3.12.3 full API suite with locked service dependencies: 6,648 passed, 3 skipped, 1 failed. That same failure reproduced on exact unchanged base: an existing Darwin-unavailable fixture mocks Darwin telemetry but leaves real WSL telemetry available, so the handler correctly returns 200 instead of its fixture's expected 503. This is not claimed as a completely green full-suite run.

The 23 new API regressions pass in both full runs. No production change or exclusion was added to hide baseline failures. Individual focused checks remain green; hosted required CI and maintainer/human review remain separate. Linux source was a credentials-free exact Git archive in a dedicated QA directory; the installed product runtime was not changed. These combination receipts establish test interactions only, not installed model/GPU/Portal or fleet qualification.

CI follow-up

Candidate e058a7ac76ee45cd76dc8e3efcd69e1063b12192 adds only explicit fixture types after CI's mypy ratchet identified untyped fixture state. Production files are byte-for-byte equivalent to independently reviewed 898e6069948b658c3789de4c0781ba0c755b9ea3; earlier full-suite/combined receipts apply through that production equivalence. Root independently reviewed the typing-only diff. The affected resource/update checks passed again (49 Linux tests), touched-file Ruff and commit identity gates passed, and the CI dependency-only mypy 2.4.0 preflight targeting Python 3.11 reports 426 established errors, 0 new errors (baseline unchanged). The test-runtime environment includes pytest's typed fixture declarations, so it is kept separate from the workflow's dependency-only type-checking environment.

@tang-vu tang-vu reopened this Oct 6, 2026
@tang-vu
tang-vu force-pushed the fix/library-resource-restart-refresh branch from d9c8a91 to 898e606 Compare October 6, 2026 05:45
@Lightheartdevs
Lightheartdevs merged commit b1b2414 into Osmantic:main Oct 8, 2026
68 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.

Library selection changes leave resource restart eligibility stale

2 participants