Skip to content

fix: use /enabled endpoint instead of app_api's ocs state check - #352

Merged
kyteinsky merged 2 commits into
masterfrom
fix/do-not-check-app_api-enabled-state
Sep 30, 2026
Merged

kyteinsky merged 2 commits into
masterfrom
fix/do-not-check-app_api-enabled-state

Conversation

@kyteinsky

Copy link
Copy Markdown
Contributor

enabled state is inconsistent between app_api and the ex-app during initial setup.

The enabled flag in app_api is written to the DB before /init is called (i.e., before model download begins), while the ex-app's own /enabled endpoint is called only after /init completes. As a result, during the initial installation phase:

  • Calls routed through the ex-app work correctly (it reports its true state).
  • Direct checks against app_api's internal state (with nc.enabled_state, which hits /ocs/v1.php/apps/app_api/ex-app/state) can return a stale/incorrect enabled value.

This is a race condition limited to only the app registration/installation part, once /init finishes, both sources report the same.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

Signed-off-by: kyteinsky <kyteinsky@gmail.com>
@marcelklehr

Copy link
Copy Markdown
Member

fingers crossed this won't break things

Signed-off-by: kyteinsky <kyteinsky@gmail.com>
@kyteinsky
kyteinsky merged commit 2646288 into master Sep 30, 2026
6 checks passed
@kyteinsky
kyteinsky deleted the fix/do-not-check-app_api-enabled-state branch September 30, 2026 15:43
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.

2 participants