Skip to content

fix: stop frozen Connect leaking bundled Qt env into launched DCCs - #659

Merged
dennisweil merged 5 commits into
mainfrom
harmony-qt-plugin-path-conflict
Jul 16, 2026
Merged

fix: stop frozen Connect leaking bundled Qt env into launched DCCs#659
dennisweil merged 5 commits into
mainfrom
harmony-qt-plugin-path-conflict

Conversation

@dennisweil

@dennisweil dennisweil commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Resolves : no dedicated ticket found for this bug — add an FT-/F- link here if one exists.

  • I have added automatic tests where applicable.
  • The PR contains a description of what has been changed.
  • The description contains manual test instructions.
  • The PR contains update to the release notes.
  • The PR contains update to the documentation.

This PR has been tested on :

  • Windows.
  • MacOs.
  • Linux.

Overview

Purpose: Stop a frozen (PyInstaller) ftrack Connect from leaking its own bundled Qt paths into the environment of launched DCCs. Harmony 25.2/27 (Qt 6.4) otherwise loads Connect's bundled Qt 6.6 plugins, printing ~10 Plugin uses incompatible Qt library (6.6.0) warnings and breaking menus/dialogs.

Scope: apps/connect launcher (root fix, all DCCs) and the framework-harmony launch hook (transitional fix), plus tests, a CI job, and a design record.

Implementation Details

Approach: Two layers. Layer 1 — the Connect launcher (_get_application_environment) strips its own bundle's entries from QT_PLUGIN_PATH/QML(2)_IMPORT_PATH/PATH/loader-library paths before the launch event is published, so any studio-set Qt vars applied afterwards still win; guarded by sys.frozen and never touching os.environ. Layer 2 — the Harmony hook emits equivalent .set/.unset launch-env actions so users on an already-installed frozen Connect (predating Layer 1) are protected immediately by the next plugin release.

Reasoning: The two layers ship on different release vehicles (Connect vs. the framework-harmony plugin); Layer 2 reaches existing installs now, Layer 1 fixes it at the source for every DCC. A previously-proposed setLibraryPaths() patch in the standalone process was rejected (wrong process; runs too late) — see the design record.

Changes: New pure helpers get_frozen_bundle_roots/strip_frozen_qt_environment/restore_loader_library_path in the connect launcher; get_frozen_qt_environment_actions (self-contained twin, marked TODO(remove)) wired into the Harmony hook's on_launch_integration.

Trade-offs: Layer 2 duplicates Layer 1's logic deliberately (hooks must not depend on new Connect code); the duplicate is idempotent alongside a fixed Connect and is scheduled for removal once the minimum supported Connect ships Layer 1 (> 26.6.x).

Testing

Tests Added: First unit tests in apps/connect (tests/unit/test_application_launcher_environment.py) covering the frozen-path scrub; a framework-harmony tests/test_qt_env_scrub.py suite (unit action-emission + live tier-1 launch verification via ps eww + tier-2 standalone log check); a connect-unit-pytest CI job mirroring harness-unit-pytest.

Manual Testing: Reproduced on this workstation — launching Harmony 25.2 with QT_PLUGIN_PATH = Connect's bundled Qt gave 32 incompatible Qt library (6.6.0) lines; with it unset (the scrubbed state) → 0. The Harmony test suite (incl. the live tier-1/tier-2 cases and the existing test_launch.py) passed against real Harmony 27. To verify against the frozen Connect: restart Ftrack Connect.app, launch Harmony, then ps eww $(pgrep -f "Harmony 25.2 Premium.app/Contents/MacOS") | grep -oE "QT_PLUGIN_PATH|QML2_IMPORT_PATH" → expect no output.

Testing Environment: macOS (Harmony 25.2 + 27, installed frozen Ftrack Connect.app).

Notes for Reviewers

Focus Areas: The env-scrub prefix-matching (normcase/normpath, sibling-collision guard, macOS two-root .app case) and its placement before the launch-event publish so studio overrides still win.

Dependencies: None. Layer 1 ships with the next Connect release; Layer 2 with the next framework-harmony plugin release.

Known Issues: Release notes and user-facing docs are not yet updated (checkboxes left unchecked). On macOS the DCC's stderr never reaches ftrack's log files, so these warnings were only visible on Windows / via direct stderr capture; the meaningful macOS check is the ps eww env inspection above. Windows/Linux end-to-end verification is still pending.

Summary by CodeRabbit

  • Bug Fixes
    • Prevented bundled (installed/frozen) Connect Qt-related environment settings from leaking into launched applications (including Harmony), covering Qt plugin/QML and related loader-path variables while preserving studio-provided values; restored correct Linux loader library path behavior.
  • Tests
    • Expanded launcher-side unit coverage plus Harmony hook unit/live integration tests across Windows/macOS/Linux edge cases, and added a dedicated CI run for the Connect unit suite.
  • Documentation
    • Added a spec detailing the Qt environment leak and the layered remediation approach (launcher scrub + transitional Harmony hook behavior).

A frozen (PyInstaller) ftrack Connect exports its own bundled Qt paths
(QT_PLUGIN_PATH, QML2_IMPORT_PATH, PATH, loader library paths) into the
environment of launched DCCs. Harmony then loads Connect's Qt 6.6
plugins in its own Qt 6.4 runtime, emitting ~10 "Plugin uses
incompatible Qt library" warnings and breaking menus/dialogs.

Layer 1 (root fix): the Connect launcher strips its own bundle's
entries from the child environment before the launch event is published,
so any studio-set Qt vars applied afterwards still win. Guarded by
sys.frozen; never touches os.environ. Covers all DCCs.

Layer 2 (transitional): the framework-harmony launch hook emits
equivalent .set/.unset launch-env actions, protecting users on an
already-installed frozen Connect that predates Layer 1. Marked for
removal once the minimum supported Connect ships Layer 1.

Adds Connect launcher unit tests, a Harmony qt-env-scrub suite (verified
live against Harmony 27), a connect-unit-pytest CI job, and a design
record under docs/specs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dennisweil
dennisweil requested a review from a team as a code owner July 16, 2026 06:20
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dbe2f8f8-2a3c-46a4-aae9-45b5e2069122

📥 Commits

Reviewing files that changed from the base of the PR and between c8423b8 and e9783d6.

⛔ Files ignored due to path filters (3)
  • apps/connect/uv.lock is excluded by !**/*.lock
  • libs/utils/uv.lock is excluded by !**/*.lock
  • projects/framework-harmony/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • libs/utils/pyproject.toml
  • libs/utils/release_notes.md
  • libs/utils/source/ftrack_utils/process/monitor.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • ftrackhq/ftrack (manual)

📝 Walkthrough

Walkthrough

The change adds frozen Connect Qt-environment scrubbing, restores Linux loader paths, integrates transitional cleanup into Harmony launches, and validates behavior through unit, live-process, integration, standalone-log, and CI tests. It also lowers periodic process-monitor liveness logging from info to debug and updates its package release metadata.

Changes

Frozen Qt environment cleanup

Layer / File(s) Summary
Remediation contract
docs/specs/.../2026-07-15-qt-env-leak-frozen-connect-design.md
Documents the leak, launcher and Harmony cleanup layers, rejected approach, test strategy, and scope boundaries.
Connect launcher environment scrub
apps/connect/source/.../application_launcher/__init__.py, apps/connect/tests/unit/*, apps/connect/pyproject.toml, .github/workflows/push-main-test.yml, apps/connect/conftest.py, apps/connect/release_notes.md
Detects frozen bundle roots, removes bundle-owned Qt paths, restores LD_LIBRARY_PATH, applies cleanup during launches, and adds test configuration, CI coverage, and release notes.
Harmony launch hook cleanup
projects/framework-harmony/connect-plugin/hook/discover_ftrack_framework_harmony.py, projects/framework-harmony/tests/_launcher.py, projects/framework-harmony/release_notes.md
Generates scoped Qt environment actions, applies action directives, and merges cleanup actions into Harmony integration launch data.
Cross-process scrub verification
projects/framework-harmony/tests/*
Tests launcher helpers, action precedence, leaked versus scrubbed live environments, Harmony integration startup, standalone logs, and temporary port-file handling.

Process monitor logging update

Layer / File(s) Summary
Monitor logging and release metadata
libs/utils/source/.../process/monitor.py, libs/utils/pyproject.toml, libs/utils/release_notes.md
Changes the periodic liveness probe to debug logging while preserving monitoring behavior, and updates the package version and release notes.

Estimated code review effort: 5 (Critical) | ~90+ minutes

Sequence Diagram(s)

sequenceDiagram
  participant ConnectLauncher
  participant HarmonyHook
  participant Harmony
  participant Standalone
  ConnectLauncher->>ConnectLauncher: detect frozen bundle roots
  ConnectLauncher->>ConnectLauncher: scrub bundle-owned Qt paths
  ConnectLauncher->>HarmonyHook: launch with cleaned environment
  HarmonyHook->>Harmony: apply Qt environment actions
  Harmony->>Standalone: start framework with scrubbed environment
  Standalone-->>Harmony: return RPC result and logs
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: preventing frozen Connect from leaking bundled Qt env into launched DCCs.
Description check ✅ Passed The description follows the template closely, covering overview, implementation, testing, notes, and testing environment; only release notes/docs remain unchecked.
Docstring Coverage ✅ Passed Docstring coverage is 88.37% which is sufficient. The required threshold is 50.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch harmony-qt-plugin-path-conflict

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 9

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/push-main-test.yml:
- Around line 94-98: Add a setup step before the ftrack Connect unit tests that
installs libegl1 and any other required Qt runtime dependencies on ubuntu-22.04.
Keep the existing uv sync and uv run pytest commands in the ftrack Connect test
step unchanged.

In `@apps/connect/pyproject.toml`:
- Around line 88-91: Update the repository-level pytest configuration or generic
Python 3.13 job collection rules to exclude apps/connect/tests, while keeping
the Connect-specific pythonpath setting in tool.pytest.ini_options unchanged.
Ensure generic pytest jobs no longer collect Connect-only tests and avoid
provisioning the package outside the requested scope.

In `@docs/specs/2026-07-15-qt-env-leak-frozen-connect-design.md`:
- Line 49: Update the design record’s referenced sections to describe only
current behavior and supported-version requirements. Remove PR/release
sequencing, rollout or migration phases, historical narration such as “first
tests” or “Added,” and future follow-ups; relocate any necessary planning or
history outside this durable document.
- Around line 117-126: Rewrite the “Rejected: the standalone-side
setLibraryPaths patch” section in the design document to remove coworker, patch,
and review-history framing. Preserve the technical rationale as a current
constraint, explaining that the standalone helper’s frozen Qt and plugin
versions cannot emit these warnings and that setting library paths after
QApplication creation is too late; retain its redundancy with the existing two
layers.

In
`@projects/framework-harmony/connect-plugin/hook/discover_ftrack_framework_harmony.py`:
- Around line 50-62: Update the comments surrounding the environment-scrubbing
hook to state only that it independently sanitizes the environment for
compatibility, using the locally available os/sys imports. Remove transitional,
installation-version, future-release, removal-plan, and specification references
while leaving the hook implementation unchanged.
- Around line 63-64: The fallback environment handling must scrub PATH,
LD_LIBRARY_PATH, and DYLD_LIBRARY_PATH like the launcher and restore
LD_LIBRARY_PATH_ORIG as applicable. Update the fallback logic in the discovery
hook and adjust its scoped test to verify these variables are cleared/restored
while preserving the existing Qt path behavior.
- Around line 50-67: Remove temporal rollout, release-history, and design-spec
references while preserving the current Qt environment scrub behavior. In
projects/framework-harmony/connect-plugin/hook/discover_ftrack_framework_harmony.py
lines 50-67, document the current compatibility contract; in lines 374-381,
describe the scrub without referring to older installations. Remove the dated
design-spec link from
apps/connect/source/ftrack_connect/application_launcher/__init__.py lines 90-95,
make apps/connect/tests/unit/test_application_launcher_environment.py lines 4-12
self-contained, and retain the existing behavior and scope while removing
rollout/history language from
projects/framework-harmony/tests/test_qt_env_scrub.py lines 4-27.
- Around line 382-384: Update the environment merge around
get_frozen_qt_environment_actions() so scrub actions are applied first and the
existing launch_data["integration"]["env"] actions are applied afterward,
preserving configured .set, .prepend, and .append entries. Add coverage
verifying each of those existing action types remains intact when generated
scrub keys overlap.

In `@projects/framework-harmony/tests/test_qt_env_scrub.py`:
- Line 445: Replace tempfile.mktemp() with a path created under pytest-managed
tmp_path for the port file in test_qt_env_scrub.py, and apply the same change to
the related port-file setup in conftest.py. Preserve the existing filename
prefix and suffix while using tmp_path to avoid filename-claim races.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: efa3e0fb-9b2c-43a7-8dc0-eb01c95f3da6

📥 Commits

Reviewing files that changed from the base of the PR and between 22169e9 and 1b0eee2.

⛔ Files ignored due to path filters (1)
  • projects/framework-harmony/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • .github/workflows/push-main-test.yml
  • apps/connect/pyproject.toml
  • apps/connect/source/ftrack_connect/application_launcher/__init__.py
  • apps/connect/tests/unit/test_application_launcher_environment.py
  • docs/specs/2026-07-15-qt-env-leak-frozen-connect-design.md
  • projects/framework-harmony/connect-plugin/hook/discover_ftrack_framework_harmony.py
  • projects/framework-harmony/tests/_launcher.py
  • projects/framework-harmony/tests/test_qt_env_scrub.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • ftrackhq/ftrack (manual)

Comment thread .github/workflows/push-main-test.yml
Comment thread apps/connect/pyproject.toml
Comment thread docs/specs/2026-07-15-qt-env-leak-frozen-connect-design.md Outdated
Comment thread docs/specs/2026-07-15-qt-env-leak-frozen-connect-design.md Outdated
Comment on lines +50 to +62
# ---------------------------------------------------------------------------
# TODO(remove): transitional duplicate of the ftrack Connect launcher's
# frozen-Qt scrub (apps/connect .../application_launcher/__init__.py:
# FROZEN_QT_ENVIRONMENT_VARIABLES / strip_frozen_qt_environment). It exists
# only to protect users whose *already-installed* frozen Connect predates
# that scrub: this plugin ships in a framework-harmony release that reaches
# them before the next Connect release does. Remove once the minimum
# supported Connect version ships the launcher scrub (> 26.6.x).
#
# A hook must not depend on new Connect code, so this is a self-contained
# twin (uses only the already-imported ``os``/``sys``). It is idempotent
# alongside a fixed Connect: ``.unset`` of an absent key is a no-op and
# ``.set`` rewrites the identical filtered value. Scope is intentionally

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Replace release-history commentary with a current compatibility contract.

Remove the “transitional,” prior-installation, future-release, removal-plan, and specification references. Describe only why this hook independently sanitizes the environment. As per path instructions, code must not retain migration history or depend on plans/specifications.

Also applies to: 66-67

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@projects/framework-harmony/connect-plugin/hook/discover_ftrack_framework_harmony.py`
around lines 50 - 62, Update the comments surrounding the environment-scrubbing
hook to state only that it independently sanitizes the environment for
compatibility, using the locally available os/sys imports. Remove transitional,
installation-version, future-release, removal-plan, and specification references
while leaving the hook implementation unchanged.

Source: Path instructions

Comment on lines +50 to +67
# ---------------------------------------------------------------------------
# TODO(remove): transitional duplicate of the ftrack Connect launcher's
# frozen-Qt scrub (apps/connect .../application_launcher/__init__.py:
# FROZEN_QT_ENVIRONMENT_VARIABLES / strip_frozen_qt_environment). It exists
# only to protect users whose *already-installed* frozen Connect predates
# that scrub: this plugin ships in a framework-harmony release that reaches
# them before the next Connect release does. Remove once the minimum
# supported Connect version ships the launcher scrub (> 26.6.x).
#
# A hook must not depend on new Connect code, so this is a self-contained
# twin (uses only the already-imported ``os``/``sys``). It is idempotent
# alongside a fixed Connect: ``.unset`` of an absent key is a no-op and
# ``.set`` rewrites the identical filtered value. Scope is intentionally
# the four Qt path vars only (PATH / loader-path handling stays
# Connect-launcher-only, to keep this transitional surface minimal).
#
# See docs/specs/2026-07-15-qt-env-leak-frozen-connect-design.md.
# ---------------------------------------------------------------------------

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove temporal rollout and specification residue from the implementation and tests.

  • projects/framework-harmony/connect-plugin/hook/discover_ftrack_framework_harmony.py#L50-L67: replace release/removal history and the design link with the current compatibility contract.
  • projects/framework-harmony/connect-plugin/hook/discover_ftrack_framework_harmony.py#L374-L381: describe the current scrub behavior without referring to older installations.
  • apps/connect/source/ftrack_connect/application_launcher/__init__.py#L90-L95: remove the dated design-spec link.
  • apps/connect/tests/unit/test_application_launcher_environment.py#L4-L12: make the module documentation self-contained.
  • projects/framework-harmony/tests/test_qt_env_scrub.py#L4-L27: retain current behavior and test scope, removing rollout/design-history language.

As per path instructions, “Code stays locally coherent — no temporal references.”

📍 Affects 4 files
  • projects/framework-harmony/connect-plugin/hook/discover_ftrack_framework_harmony.py#L50-L67 (this comment)
  • projects/framework-harmony/connect-plugin/hook/discover_ftrack_framework_harmony.py#L374-L381
  • apps/connect/source/ftrack_connect/application_launcher/__init__.py#L90-L95
  • apps/connect/tests/unit/test_application_launcher_environment.py#L4-L12
  • projects/framework-harmony/tests/test_qt_env_scrub.py#L4-L27
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@projects/framework-harmony/connect-plugin/hook/discover_ftrack_framework_harmony.py`
around lines 50 - 67, Remove temporal rollout, release-history, and design-spec
references while preserving the current Qt environment scrub behavior. In
projects/framework-harmony/connect-plugin/hook/discover_ftrack_framework_harmony.py
lines 50-67, document the current compatibility contract; in lines 374-381,
describe the scrub without referring to older installations. Remove the dated
design-spec link from
apps/connect/source/ftrack_connect/application_launcher/__init__.py lines 90-95,
make apps/connect/tests/unit/test_application_launcher_environment.py lines 4-12
self-contained, and retain the existing behavior and scope while removing
rollout/history language from
projects/framework-harmony/tests/test_qt_env_scrub.py lines 4-27.

Source: Path instructions

Comment thread projects/framework-harmony/tests/test_qt_env_scrub.py Outdated
The new apps/connect/tests broke two CI jobs: the root unit-test-pytest
recursed into them and failed to import ftrack_connect, and the
connect-unit-pytest job hit `libEGL.so.1` because importing the launcher
runs ftrack_connect/__init__ -> qtawesome -> PySide6 (no Qt libs on the
headless runner).

- Add apps/connect/conftest.py that collect_ignores tests/ when
  ftrack_connect is not importable (find_spec, not a real import, to
  avoid pulling in Qt), mirroring the harmony/dcc-test-harness guards.
- Load the launcher module by file path in the unit test instead of
  importing the package, bypassing the Qt-importing package __init__;
  documented in code so it is not "simplified" back.
- Add release-notes entries for the frozen-Qt env scrub (connect
  launcher + harmony hook).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  apps/connect
  conftest.py
Project Total  

This report was generated by python-coverage-comment-action

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/connect/release_notes.md`:
- Line 16: Update the release-note entry describing Qt environment variables so
it explicitly states that values from the launch config or integration hook are
applied after scrubbing and override the scrubbed values; replace the ambiguous
“and win” wording without changing the surrounding behavior or guidance.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 84c589df-fe1e-4755-8581-72d7140b1921

📥 Commits

Reviewing files that changed from the base of the PR and between 1b0eee2 and 781158f.

📒 Files selected for processing (4)
  • apps/connect/conftest.py
  • apps/connect/release_notes.md
  • apps/connect/tests/unit/test_application_launcher_environment.py
  • projects/framework-harmony/release_notes.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • ftrackhq/ftrack (manual)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/connect/tests/unit/test_application_launcher_environment.py

Comment thread apps/connect/release_notes.md Outdated
Address CodeRabbit review on PR #659:

- Merge frozen-Qt scrub actions before any env actions already configured
  on the integration, so a studio's own QT_PLUGIN_PATH.set/.prepend/.append
  runs after the scrub and takes precedence (was silently overwritten).
- Replace tempfile.mktemp() with pytest tmp_path / tmp_path_factory in the
  standalone port-file fixtures to avoid a filename-claim race.
- Clarify release-note precedence wording ("take precedence").
- Rewrite the design doc and code comments to current-state only (drop
  PR/rollout/review-history narration; rejected alt -> "Not used",
  follow-ups -> "Scope boundaries"); keep a concise TODO(remove) marker.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/connect/tests/unit/test_application_launcher_environment.py (1)

1-57: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover bundle-root detection in addition to path stripping.

These tests inject bundle_roots, so they exercise filtering but not get_frozen_bundle_roots()—the production path that derives _MEIPASS and adds the macOS .app root. Add frozen/non-frozen and macOS-root tests unless another test module already covers this helper.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/connect/tests/unit/test_application_launcher_environment.py` around
lines 1 - 57, Extend the tests in this module to cover
get_frozen_bundle_roots(), including non-frozen behavior, frozen _MEIPASS
detection, and macOS .app bundle-root derivation. Reuse the existing direct
module-loading setup and monkeypatch the relevant runtime/platform values; avoid
duplicating coverage if an existing test module already exercises this helper.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/specs/2026-07-15-qt-env-leak-frozen-connect-design.md`:
- Around line 48-49: Update
docs/specs/2026-07-15-qt-env-leak-frozen-connect-design.md lines 48-49 to
describe the launcher scrub and Harmony hook implementations and their
compatibility relationship without release sequencing; lines 113-115 to state
when the hook is currently required, removing the future minimum-version
condition and TODO(remove); and lines 130-132 to describe DCC behavior without
temporal wording. Update projects/framework-harmony/release_notes.md line 20 to
describe current support for frozen Connect installations without launcher
scrubbing, removing “now,” “Transitional shim,” and “predating.”

---

Nitpick comments:
In `@apps/connect/tests/unit/test_application_launcher_environment.py`:
- Around line 1-57: Extend the tests in this module to cover
get_frozen_bundle_roots(), including non-frozen behavior, frozen _MEIPASS
detection, and macOS .app bundle-root derivation. Reuse the existing direct
module-loading setup and monkeypatch the relevant runtime/platform values; avoid
duplicating coverage if an existing test module already exercises this helper.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8293acfd-835c-4e31-a3a7-d4a2145ba3aa

📥 Commits

Reviewing files that changed from the base of the PR and between 781158f and c8423b8.

📒 Files selected for processing (8)
  • apps/connect/release_notes.md
  • apps/connect/source/ftrack_connect/application_launcher/__init__.py
  • apps/connect/tests/unit/test_application_launcher_environment.py
  • docs/specs/2026-07-15-qt-env-leak-frozen-connect-design.md
  • projects/framework-harmony/connect-plugin/hook/discover_ftrack_framework_harmony.py
  • projects/framework-harmony/release_notes.md
  • projects/framework-harmony/tests/conftest.py
  • projects/framework-harmony/tests/test_qt_env_scrub.py
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • ftrackhq/ftrack (manual)
💤 Files with no reviewable changes (1)
  • apps/connect/source/ftrack_connect/application_launcher/init.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/connect/release_notes.md
  • projects/framework-harmony/connect-plugin/hook/discover_ftrack_framework_harmony.py

Comment on lines +48 to +49
The launcher scrub and the Harmony hook ship on independent release
vehicles (ftrack Connect and the framework-harmony plugin).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep durable documentation current-state only.

These entries mix current behavior with release sequencing, future removal plans, or temporal wording. Preserve the technical compatibility behavior, but remove the rollout narrative.

  • docs/specs/2026-07-15-qt-env-leak-frozen-connect-design.md#L48-L49: describe the two implementations and their compatibility relationship without “release vehicles”.
  • docs/specs/2026-07-15-qt-env-leak-frozen-connect-design.md#L113-L115: remove the future minimum-version condition and TODO(remove); state when the hook is currently required.
  • docs/specs/2026-07-15-qt-env-leak-frozen-connect-design.md#L130-L132: remove “today” and describe the DCC behavior timelessly.
  • projects/framework-harmony/release_notes.md#L20-L20: remove “now”, “Transitional shim”, and “predating”; describe current support for frozen Connect installations without launcher scrubbing.

As per path instructions, implementation documentation must stand on its own without PR, release, migration, historical, or future-work framing.

📍 Affects 2 files
  • docs/specs/2026-07-15-qt-env-leak-frozen-connect-design.md#L48-L49 (this comment)
  • docs/specs/2026-07-15-qt-env-leak-frozen-connect-design.md#L113-L115
  • docs/specs/2026-07-15-qt-env-leak-frozen-connect-design.md#L130-L132
  • projects/framework-harmony/release_notes.md#L20-L20
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/specs/2026-07-15-qt-env-leak-frozen-connect-design.md` around lines 48 -
49, Update docs/specs/2026-07-15-qt-env-leak-frozen-connect-design.md lines
48-49 to describe the launcher scrub and Harmony hook implementations and their
compatibility relationship without release sequencing; lines 113-115 to state
when the hook is currently required, removing the future minimum-version
condition and TODO(remove); and lines 130-132 to describe DCC behavior without
temporal wording. Update projects/framework-harmony/release_notes.md line 20 to
describe current support for frozen Connect installations without launcher
scrubbing, removing “now,” “Transitional shim,” and “predating.”

Source: Path instructions

dennisweil and others added 2 commits July 16, 2026 09:21
The watchdog's periodic "Checking if application is still alive (pid: ...)"
message fired on every poll at info level, flooding the logs. Drop it to
debug; the process-detected and process-gone messages stay at info so it's
still clear when the watchdog launched and when it fired.

Bump ftrack-utils to 4.0.1 and refresh the affected lockfiles.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dennisweil
dennisweil merged commit ad495d6 into main Jul 16, 2026
8 checks passed
@dennisweil
dennisweil deleted the harmony-qt-plugin-path-conflict branch July 16, 2026 08:11
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