Skip to content

chore(build): Q_OS_MAC becomes Q_OS_MACOS, silencing the Qt 6.12 clang deprecation. Principle VIII. - #6355

Merged
ten9876 merged 2 commits into
aethersdr:mainfrom
w5jwp:chore/q-os-mac-to-q-os-macos
Oct 11, 2026
Merged

ten9876 merged 2 commits into
aethersdr:mainfrom
w5jwp:chore/q-os-mac-to-q-os-macos

Conversation

@w5jwp

@w5jwp w5jwp commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #6354

Qt 6.12 deprecates Q_OS_MAC (#pragma clang deprecated(Q_OS_MAC, "use Q_OS_MACOS for macOS or Q_OS_APPLE for all Apple platforms instead") in qsystemdetection.h), so every use warned on macOS builds. This renames it to Q_OS_MACOS everywhere it appears. No behavior change and no user-visible change.

117 lines in 51 files, a pure 1:1 replacement (117 insertions, 117 deletions):

Area Files What changed
src/ 41 #if/#ifdef/#ifndef/defined() guards and #endif // Q_OS_MAC comments
tests/ 5 same, in the test sources
tools/docs/gen_reference.py 1 the two literal matches ("Q_OS_MAC", "not (Q_OS_MAC)") and the docstring
AGENTS.md, GEMINI.md, .github/copilot-instructions.md 3 the "prefer Q_OS_WIN / Q_OS_MAC / Q_OS_LINUX" guidance now names Q_OS_MACOS, so new code stops re-adding the deprecated macro
.github/workflows/ci.yml 1 two comments only, no workflow logic

Why this is safe

Q_OS_MAC is defined on every Apple platform; Q_OS_MACOS only on macOS. AetherSDR has no iOS/tvOS/visionOS target and requires Qt 6.12, so both select exactly the same code. On Linux and Windows neither macro is defined, so those builds see no change. I chose Q_OS_MACOS rather than Q_OS_APPLE because every one of these guards is about macOS specifically (Cocoa bridges, CoreAudio, mic permission, window chrome).

Review notes

  • gen_reference.py has to travel with the sources. It compares the preprocessor condition text to the literal macro name and raises ParseError on anything it does not recognise, so renaming the sources alone would break --check.
  • AGENTS.md says "don't do a blanket rewrite". That sentence is about migrating _WIN32/__APPLE__ guards to Qt macros opportunistically. This is a blanket rewrite of a macro the toolchain now warns about, and it is mechanical and compiler-verified, so I do not think it is in tension with the rule, but flagging it for the reviewer.
  • Match used: \bQ_OS_MAC\b, so existing Q_OS_MACOS is not turned into Q_OS_MACOSOS (git grep Q_OS_MACOSOS is empty).

Constitution principle honored

Principle VIII, Evidence Over Assertion. The claim "the rename changes nothing" is backed by the build, the full test suite, and the docs generator's own check, with the one failure compared against unmodified main rather than waved off (see the test plan).

Test plan

Run locally on macOS (Darwin 27.0.0, Qt 6.12.0, RelWithDebInfo, existing Ninja build/):

  • Local build passes (cmake --build build): 862 steps, exit 0, zero compile errors
  • No Q_OS_MAC deprecation warnings: the build log contains no Q_OS_MAC mention. The warnings that remain are unrelated: -Wdeprecated-this-capture at src/gui/RadioSetupDialog.cpp:4362 and QApplication::setActiveWindow at tests/unified_title_bar_test.cpp:982
  • git grep -w Q_OS_MAC returns nothing; git grep Q_OS_MACOSOS returns nothing
  • python3 -I tools/docs/gen_reference.py --check: "generated reference pages are up to date (8 pages)", no ParseError
  • ctest --test-dir build -j10: 768 of 769 pass
  • App launch smoke test: build/AetherSDR.app starts, stays running past 8 seconds and loads its settings (AppSettings: loaded 162 settings) with no errors on stderr
  • Behavior verified on a real radio: not applicable, this is a preprocessor-spelling change and I did not connect a radio
  • Existing tests pass (CI): pending, this is what covers the Linux and Windows builds

The one failing test is pre-existing

unified_title_bar_test fails with:

FAIL: Alt+F still opens the File menu with the menu bar hidden
FAIL: opening a menu rounds the submenus added to it since

(tests/unified_title_bar_test.cpp:1055-1056.) To make sure the rename was not the cause, I stashed it, rebuilt unified_title_bar_test from unmodified main sources and ran it: it fails with the same two lines. That test's only change in this PR is the #ifdef on line 288, a separate block of native-caption-bounds checks that pass; the failing checks exercise menu popups. It looks like a popup-activation issue on this machine; I did not investigate it further and it is out of scope here. I would expect CI on the other platforms to tell us whether it is specific to this Mac.

Checklist

  • Commits are signed (docs/COMMIT-SIGNING.md), SSH signing with the w5jwp signing key
  • No new flat-key AppSettings calls (Principle V): no settings code touched
  • Code is clean-room (Principle IV): macro rename only, no new logic
  • All meter UI uses MeterSmoother: no UI touched
  • Documentation updated if user-visible behavior changed: nothing is user-visible; the contributor guidance files are updated as listed above. CHANGELOG.md is not touched
  • Security-sensitive changes reference a GHSA if applicable: not applicable

🤖 Generated with Claude Code

…g deprecation. Principle VIII.

Qt 6.12's qsystemdetection.h marks Q_OS_MAC deprecated with
`#pragma clang deprecated(Q_OS_MAC, "use Q_OS_MACOS for macOS or
Q_OS_APPLE for all Apple platforms instead")`, so every use warned on
macOS builds and buried the warnings that matter.

Rename it to Q_OS_MACOS everywhere: 117 lines in 51 files, a 1:1
replacement matched on \bQ_OS_MAC\b so existing Q_OS_MACOS is untouched.

- src/, tests/: the platform guards and their #endif comments.
- tools/docs/gen_reference.py: it compares the preprocessor condition
  text to the literal macro name and raises ParseError on anything
  else, so its two matches change with the sources.
- AGENTS.md, GEMINI.md, .github/copilot-instructions.md: the
  "prefer Q_OS_WIN / Q_OS_MAC / Q_OS_LINUX" guidance now names
  Q_OS_MACOS so new code stops re-adding the deprecated macro.
- .github/workflows/ci.yml: two comments.

Behavior is unchanged. Q_OS_MAC is defined on every Apple platform and
Q_OS_MACOS only on macOS; there is no iOS/tvOS target and Qt is pinned
to 6.12, so both select the same code. Neither is defined on Linux or
Windows.

Verified on macOS (Qt 6.12.0): full build succeeds with no Q_OS_MAC
deprecation warnings; gen_reference.py --check passes; ctest passes
768 of 769. The one failure, unified_title_bar_test (Alt+F / submenu
rounding at lines 1055-1056), fails identically on unmodified main.

Fixes aethersdr#6354

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@w5jwp
w5jwp requested review from a team as code owners October 10, 2026 22:33

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Mechanical, complete, and verified end to end. I went looking for the three ways a blanket macro rename usually goes wrong — a straggler left behind, a semantic narrowing that changes selected code, and a tool that string-matches the old spelling — and all three are closed. Details below, including the one claim I could not reproduce here.

Issue fit

Yes. #6354 lists five requirement groups and the diff covers all five, with nothing left over:

#6354 requirement Where it lands Verified
Rename the 109 lines in src/+tests/ guards and #endif comments 46 files git grep -wn Q_OS_MAC on the base returns 117 lines; on ca96f047 it returns 0, and the commit is exactly 117 insertions / 117 deletions in 51 files
tools/docs/gen_reference.py's two literal matches gen_reference.py:523,525 + docstring 513 proved necessary, not incidental — see below
The three contributor-guidance files AGENTS.md:202, GEMINI.md:57, .github/copilot-instructions.md:57 present
Two ci.yml comments ci.yml:359,879 comments only, no workflow logic
git grep -w Q_OS_MAC empty, no Q_OS_MACOSOS — both confirmed in the head checkout

Classifying all 117 added lines: 108 preprocessor directives, 7 comment/doc lines, 2 Python string comparisons. Not one line of executable C++ changed. That is the strongest single fact about this PR and it holds.

No test is needed or possible for a preprocessor-spelling change, and I am not asking for one. The compiler is the test, and check-macos, check-windows and build are all green on ca96f047 — which matters here because all 51 files are platform-guarded, so Linux and Windows compile the #else arms.

The gen_reference.py coupling is real. I checked this rather than taking the review note on trust: I restored the base gen_reference.py over the renamed sources and ran --check:

error: src/gui/MainWindow_Shortcuts.cpp:1677: windowMinimizeKey is under unexpected #if 'Q_OS_MACOS'
error: tools/docs/gen_reference.py could not parse the source; teach it the new shape rather than editing the generated pages

So the parser change is required, and the failure mode without it is loud rather than silent. With the PR's version: generated reference pages are up to date (8 pages), exit 0 — which also proves the eight generated doc pages are byte-unchanged, since the PR does not touch them.

On your AGENTS.md note — your reading is right, and I would not have flagged it. The "don't do a blanket rewrite" clause takes _WIN32/__APPLE__ as its object, and those are untouched: 30 _WIN32 and 39 __APPLE__ uses remain in src/+tests/ after this PR. You renamed a Qt macro to its non-deprecated Qt spelling, which is a different operation from the one that sentence restrains.

Scope

Everything in the diff is explained by #6354. No file, and no line, needs a second justification.

File / group Changes Claimed by the PR? Verdict
src/ (41 files) #if/#ifdef/#ifndef/defined() guards + #endif comments yes In scope
tests/ (5 files) same, in test sources yes In scope
tools/docs/gen_reference.py 2 string comparisons + 1 docstring yes In scope — and load-bearing, proved above
AGENTS.md, GEMINI.md, .github/copilot-instructions.md guidance names Q_OS_MACOS yes In scope; stops the macro being re-added
.github/workflows/ci.yml lines 359, 879 yes In scope; comment text only, no job, step or permissions: change

Specifically checked and clean: no third_party/ file touched (0 of 51); CHANGELOG.md untouched, as it should be; no new public surface, protocol verb, settings key, capability field or build option; nothing deleted — the diff removes no guard, no early return and no comment naming a fixed issue, because every - line has a 1:1 + partner differing by four characters. Self-certifications in the body check out against the diff.

Blockers

None.

Nits (non-blocking)

  • tests/unified_title_bar_test.cpp:1055-1056 has no tracking issue. #6354 offered to file one "if it is not already tracked", and as far as I can find it is not: #6224 is the nearest thing, but its body is about the open native-platform hardware checks and never names these two assertions. Three other open PRs (#6300, #6348, #6353) report the identical pair failing on their own macOS machines against unmodified main, so it is a known cross-PR local failure rather than anything of yours — worth the issue you offered, so the next contributor does not have to re-derive it.
  • Nothing enforces the new guidance. The three guidance files now say Q_OS_MACOS, but a re-introduced Q_OS_MAC would only show up as a warning in a macOS build log. If you want this to stay at zero, a one-line git grep -w Q_OS_MAC gate in static-checks.yml is the cheap version — entirely optional, and I would not bundle it into this PR.

Security audit

Required by the harness (297 CodeGuard findings across the changed files, plus "boundary" flags on FreeDvClient::handleEngineIO and SystemInfo::enumerateThreads, and "path" flags on AutomationServer.cpp, FreeDvClient.cpp, LocalCredentialHandshake.cpp). I ran the audit and verified its leads against the diff.

Nothing confirmed. Every CodeGuard hit is a lexical match on surrounding text the PR does not change — CS-VLN-CMDI-BACKTICK/-AMP on Markdown-quoted Flex verbs and Qt &&-escaped labels in comments, CS-VLN-SSRF-* on the compile-time wss://qso.freedv.org constant at FreeDvClient.h:149, CS-PII-IP on the WSJT-X multicast default 224.0.0.1, CS-INJ-homoglyph on em-dashes in comment prose. There is no system(), popen(), exec*() or QProcess in any of the three path-flagged files. Both boundary flags land on #if selector lines (FreeDvClient.cpp:187 over the hardcoded outbound auth["os"] = "macos", SystemInfo.cpp:133 over Mach self-introspection) — neither inbound parse path changed.

The one place worth the attention is the real one, and it comes out in the PR's favour. src/core/control/LocalCredentialHandshake.cpp:68 guards the getpeereid peer-credential branch that decides whether to hand a caller the control bearer token:

#elif defined(Q_OS_MACOS) || defined(Q_OS_FREEBSD)

The audit diffed that file against b3e0302e and it is identical but for the one token; the Windows SID branch, the Linux SO_PEERCRED branch and exchangeCredentialHello are byte-identical. Because Q_OS_MACOS is narrower than Q_OS_MAC, a non-macOS Darwin target would now fall through to the #else / return false at lines 83-84 — fail-closed. The narrowing cannot admit a peer that was previously rejected. Credited: security-audit (CodeGuard).

What I tried to break

  • A straggler. My first sweep used grep -E '\bQ_OS_MAC\b', which BSD grep handles inconsistently, so I redid it with git grep -wn — the same tool the issue cites. Base: 117 hits. Head: zero, exit 1. Cross-checked against the 117/117 diffstat and against Q_OS_MACOSOS (none). I also looked for the other macros Qt 6.12 deprecates alongside this one — Q_OS_MACX, Q_OS_OSX, Q_OS_MAC64, Q_OS_MAC32, Q_OS_DARWIN64, Q_OS_DARWIN32 — and none appear in src/, tests/ or tools/, so the PR is not leaving half the job behind. No .mm/.m file needed a change, which I confirmed rather than assumed (MacMicPermission.mm, AppActivity.mm, mac/NativeWindowTitle.mm carry no such guard).
  • The semantic narrowing, at the inverted guards. Q_OS_MAC is all Apple platforms, Q_OS_MACOS is macOS only, so the only sites where the two could select different code are the negated ones, where an iOS/tvOS build would flip arms: src/gui/FramelessMoveHelper.h:64, src/gui/AetherDspWidget.cpp:268, src/gui/MainWindow_Controllers.cpp:3164, src/gui/MainWindow_Menus.cpp:976, src/gui/MainWindow_Session.cpp:3014. I grepped CMakeLists.txt and cmake/ for iphoneos, tvos, Q_OS_IOS, Q_OS_APPLE and an iOS/tvOS CMAKE_SYSTEM_NAME: nothing. With no Apple target other than macOS, those five are moot — and your choice of Q_OS_MACOS over Q_OS_APPLE is the right one for guards that wrap Cocoa, CoreAudio and mic permission.
  • A project-level redefinition. If anything in-tree #defined Q_OS_MAC as a compat shim, the rename would silently disable code. Nothing does — the repo-wide count is zero, including CMake.
  • A tool or test pinned to the old spelling. Beyond gen_reference.py I swept tools/ and the test sources for the macro as a string literal; the only hits are the two the PR edits. No source-text pin asserts the old name.
  • The failing-test attribution. I did not take "fails identically on main" on trust; three independent open PRs at nearby bases report exactly those two assertions failing on macOS, and your change to that file is one #ifdef on line 288 in a native-caption block whose checks pass. Consistent.
  • What I could not reproduce. The motivating claim. The only Qt on this machine is 6.11.2, whose qsystemdetection.h:157 has #define Q_OS_MAC // FIXME: Deprecate and no #pragma clang deprecated — the pragma is a 6.12 change I have no header for here. Green check-macos on Qt 6.12.0 proves the rename compiles, not that warnings disappeared, so "no Q_OS_MAC deprecation warnings remain" rests on your local build log. The pragma does appear in 6.11 for the neighbouring Q_OS_DARWIN64, so the mechanism and the trajectory are both there; a maintainer with 6.12 can settle it in one grep. Nothing in the diff depends on the answer — the rename is correct and warning-free either way.

Everything above is reasoned from the code and from commands I ran against the head checkout and the CI API. I did not build the tree, run ctest, or launch the app.

Recommendation

Approve. The diff is 117 single-token substitutions with no executable line changed, the rename is provably complete in both directions, the one coupled tool travels with it and fails loudly rather than silently if it ever drifts, and all three platform builds plus Static checks are green. The two nits are follow-ups, not conditions. Next step: merge, and file the unified_title_bar_test issue you offered in #6354 so the next contributor to hit it does not have to re-derive it.

Thanks for the issue-first write-up and for naming the gen_reference.py coupling and the AGENTS.md tension yourself — both saved me time, and both held up when I checked them.


🤖 aethersdr-agent · cost: $13.6427 · model: claude-opus-5

@aethersdr-agent

Copy link
Copy Markdown
Contributor

Cisco CodeGuard — static analysis of this PR (306 finding(s))

  • [MEDIUM] CG-PATH-001 — Potential path traversal in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:932
  • [CRITICAL] CS-VLN-CMDI-SUBSHELL — Vulnerability: CS-VLN-CMDI-SUBSHELL in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:983
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:5
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:17
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:214
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:232
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:251
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:253
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:258
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:322
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:339
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:359
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:403
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:408
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:434
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:459
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:540
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:662
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:709
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:779
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:806
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:813
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:971
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:1117
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:1214
  • [MEDIUM] CS-VLN-CMDI-ENVVAR — Vulnerability: CS-VLN-CMDI-ENVVAR in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:974
  • [MEDIUM] CS-VLN-CMDI-ENVVAR — Vulnerability: CS-VLN-CMDI-ENVVAR in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:998
  • [MEDIUM] CS-VLN-CMDI-ENVVAR — Vulnerability: CS-VLN-CMDI-ENVVAR in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:998
  • [MEDIUM] CS-VLN-CMDI-ENVVAR — Vulnerability: CS-VLN-CMDI-ENVVAR in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:998
  • [MEDIUM] CS-VLN-CMDI-ENVVAR — Vulnerability: CS-VLN-CMDI-ENVVAR in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:1015
  • [HIGH] CS-PII-BANK — PII detected: bank_account in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:66
  • [HIGH] CS-PII-BANK — PII detected: bank_account in .github/workflows/ci.yml /tmp/aetherclaude/pr-6355/.github/workflows/ci.yml:926
  • [CRITICAL] CS-VLN-CMDI-AMP — Vulnerability: CS-VLN-CMDI-AMP in src/core/AppSettings.cpp /tmp/aetherclaude/pr-6355/src/core/AppSettings.cpp:1174
  • [MEDIUM] CS-VLN-SSRF-HEX — Vulnerability: CS-VLN-SSRF-HEX in src/core/AudioEngine.cpp /tmp/aetherclaude/pr-6355/src/core/AudioEngine.cpp:9807
  • [MEDIUM] CS-VLN-SSRF-HEX — Vulnerability: CS-VLN-SSRF-HEX in src/core/AudioEngine.cpp /tmp/aetherclaude/pr-6355/src/core/AudioEngine.cpp:9808
  • [CRITICAL] CS-VLN-CMDI-AMP — Vulnerability: CS-VLN-CMDI-AMP in src/core/AudioEngine.cpp /tmp/aetherclaude/pr-6355/src/core/AudioEngine.cpp:1378
  • [CRITICAL] CS-VLN-CMDI-AMP — Vulnerability: CS-VLN-CMDI-AMP in src/core/AudioEngine.cpp /tmp/aetherclaude/pr-6355/src/core/AudioEngine.cpp:5432
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in src/core/AudioEngine.cpp /tmp/aetherclaude/pr-6355/src/core/AudioEngine.cpp:5632
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in src/core/AudioEngine.cpp /tmp/aetherclaude/pr-6355/src/core/AudioEngine.cpp:9348
  • [CRITICAL] CS-VLN-CMDI-BACKTICK — Vulnerability: CS-VLN-CMDI-BACKTICK in src/core/AudioEngine.h /tmp/aetherclaude/pr-6355/src/core/AudioEngine.h:649

Automated static scan by Cisco DefenseClaw CodeGuard on the changed files. Advisory — some may be false positives; the review above verifies them.


🤖 aethersdr-agent · cost: $13.8179 · model: claude-opus-5

@NF0T NF0T self-assigned this Oct 11, 2026
NF0T
NF0T previously approved these changes Oct 11, 2026

@NF0T NF0T left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving. This is a correct, complete and mechanical rename, and the claim that motivates it is now measured on CI, not only on one local Mac.

The motivating claim, measured with a control

The AetherClaude review couldn't reproduce the "warnings go away" claim (it had only Qt 6.11.2), so it rested on the author's local build log. check-macos builds against Qt 6.12.0 (qt-6.12.0-202609280346-macos-clang64 cache key), so I compared that job's log on this PR with the same job on the PR's merge base:

check-macos log macro 'Q_OS_MAC' has been marked as deprecated all warning: …deprecated
b3e0302ea (merge base, job 114308699214) 1636 1653
ca96f047 (this PR, job 114329849382) 0 17

The 17 that remain are unrelated: -Wdeprecated-this-capture, setActiveWindow, QDragEnterEvent, and showsBaselineSeparator. They match the PR body's description of what's left. So the PR silences about 99% of the macOS build's deprecation noise, and the base log is the control that shows the zero isn't an artefact of a quiet log.

I also read Qt 6.12.0's qsystemdetection.h myself. Lines 160-161 match the issue verbatim: Q_OS_MAC is defined under Q_OS_DARWIN, with the clang pragma attached.

Why the rename is behavior-neutral

Same header, lines 56-76: Q_OS_MACOS is defined exactly when the target is Darwin and not TARGET_OS_IPHONE. Q_OS_MAC is defined for all of Darwin. The two can only differ on a UIKit target. CMakeLists.txt, cmake/, src/ and tests/ contain no iOS, tvOS, visionOS or Q_OS_IOS selection, and nothing in-tree #defines Q_OS_MAC as a compatibility shim. On Windows and Linux neither macro is defined, so those binaries are preprocessor-identical.

Scope

File / group Claimed by the body Verdict
src/ (41 files), tests/ (5 files) yes in scope; guards and #endif comments only
tools/docs/gen_reference.py yes in scope and required; it string-matches the macro
AGENTS.md, GEMINI.md, .github/copilot-instructions.md yes in scope; stops the guidance from reintroducing the macro
.github/workflows/ci.yml yes two comment lines, no workflow logic

Preference vs. fix: this is a fix. Qt's header is the authority, and no default or behavior changes. Nothing is deleted except the old spelling. CHANGELOG.md is untouched, and no new public surface is added.

What I tried to break

  • A non-mechanical line hidden in 117. I paired every - line with its + partner and checked that re.sub(r'\bQ_OS_MAC\b', 'Q_OS_MACOS', old) == new. All 117 of 117 pairs match exactly; zero differ in any other way.
  • Stragglers after main moved. Three commits have landed on main since b3e0302ea (#6364, #6371, #6372). I merged this PR into current main in memory with git merge-tree. The merge is clean, and git grep -w Q_OS_MAC across the whole tree of the merge result returns 0, with 0 Q_OS_MACOSOS. So the result is complete as of today, not just as of the branch point.
  • The docs generator. python -I tools/docs/gen_reference.py --check on the PR head printed generated reference pages are up to date (8 pages), exit 0. AetherClaude's review already showed the base parser fails loudly against the renamed sources, so the coupling is real and travels with the PR.
  • The AGENTS.md "no blanket rewrite" tension. I agree with both of you that it isn't a conflict. That clause restrains migrating _WIN32/__APPLE__, which this PR leaves alone.
  • The test-layer boundary. The five touched test files change only the macro spelling. No socket or synthetic peer is added.

I didn't launch the app over the automation bridge. On the Windows machine I review from, neither macro is defined, so the binary is preprocessor-identical to main and a bridge session would exercise nothing this PR changes. The macOS side is covered by green check-macos plus the log comparison above.

CI

build, check-windows, check-macos, Static checks, Sanitizer option configures and Build docs site are all green on ca96f047. All 51 files are platform-guarded, so the Linux and Windows jobs compile the #else arms, and that's the test for this PR.

Process

  • Commit ca96f047 is signed and verified. #6354 is linked with Fixes, and the PR is one issue, one commit.
  • Principle VIII is the right citation. The PR's claims are backed by the build, the generator's check and the CI log above, not by prose.
  • Merge gate: AGENTS.md, GEMINI.md and .github/copilot-instructions.md (*.md) and .github/workflows/ci.yml are owned by @aethersdr/infrastructure. This approval satisfies the @aethersdr/reviewers gate for src/, tests/ and tools/. The Tier 2 gate still needs @rfoust, @jensenpat or @ten9876.

Forward guidance (non-blocking)

  • AetherClaude's first nit is closed: the unified_title_bar_test failure is now tracked as #6358.
  • Its second nit stands as optional follow-up. Nothing stops Q_OS_MAC from creeping back except a warning in a macOS log. A git grep -w Q_OS_MAC line in Static checks would hold the count at zero, and it belongs in its own PR.
  • Suggested squash subject for whoever merges: chore(build): Q_OS_MAC becomes Q_OS_MACOS, silencing the Qt 6.12 clang deprecation. Principle VIII. (#6355)

Thanks for the issue-first write-up, the word-boundary care, and for naming the gen_reference.py coupling up front. It made this an easy one to verify.

73, Ryan NF0T


👨🏼‍💻 Co-authored by Claude Opus 5.5

@ten9876 ten9876 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Solves #6354: the complete old-macro sweep, coupled documentation parser, contributor guidance and compiler-warning evidence support the stated macOS deprecation fix. Supported desktop preprocessor selection remains unchanged; no user-visible behavior change was introduced.

Scope

File/group Change Claimed? Verdict
41 src/ files macOS conditional tokens and matching end comments Yes Exact substitution; in scope
5 tests/ files Same conditional substitution Yes Exact substitution; in scope
tools/docs/gen_reference.py Recognize renamed platform conditions Yes Required coupled parser update
AGENTS.md, GEMINI.md, .github/copilot-instructions.md Recommend current macro Yes In scope
.github/workflows/ci.yml Two comments Yes No workflow behavior change

Everything in the diff is explained by the issue and body; the scope checklist holds. The one commit’s author date is 2026-10-10, consistent with this fix; no unrelated older commit is bundled.

Blockers

None.

Nits (non-blocking)

None found.

Verification and attempted breakage

  • Compared every changed file against the merge base after applying only \bQ_OS_MAC\b → Q_OS_MACOS: all 51 files match byte-for-byte; 117 base matches become zero. No Q_OS_MACOSOS, new public surface, deleted guard, architectural addition, default or UX change.
  • Independently retrieved macOS CI job logs: base job 114308699214 contains 1636 occurrences of macro 'Q_OS_MAC' has been marked as deprecated; head job 114329849382 contains 0. Verified the deprecation pragma and macOS-only definition in Qt’s official 6.12 source. No mobile Apple target is selected by this project.
  • python3 -I tools/docs/gen_reference.py --check passes for all eight generated pages. Restoring only the base parser while keeping renamed source fails with src/gui/MainWindow_Shortcuts.cpp:1677: windowMinimizeKey is under unexpected #if 'Q_OS_MACOS'; the parser coupling is real.
  • Compiled and ran the socket-free mac_cursor_compat_test directly against installed Qt 6.11.2, first with native Linux conditions, then with -DQ_OS_MACOS to exercise the pure cursor helper’s alternate arm: both pass all seven checks. Disabling the helper guard makes the alternate-arm test fail ([FAIL] move cursor uses native open hand, exit 1). This manually selected arm is not a macOS runtime test.
  • check_engine_boundary.py --strict succeeds on both versions with identical 103-line legacy-warning output. gen_touchpoint_manifest.py --check passes; manifest and ratchet baselines are unchanged. A current-main merge computed by git merge-tree is clean, preserves intervening changes, and remains exactly the same macro normalization with no old-macro matches.

All displayed required checks (build, check-windows, check-macos, Static checks) succeeded, but their earliest run creation is 2026-10-10T22:33:52Z, earlier than current main 0625d24, committed 2026-10-11T15:12:10Z. The pull-request workflows test their creation-time merge, not current main; strict: false does not force refresh. The clean current-main merge audit above narrows that gap but does not replace refreshed CI.

No separate automated review skill was available; I performed the equivalent manual audit and independently checked the existing bot/human leads. CodeGuard’s broad findings do not correspond to logic introduced by this token-only diff. I did not rebuild the full application, rerun the full test suite, reproduce the author’s unrelated macOS title-bar failure, or drive a demo bridge session: the direct helper compile used system Qt 6.11.2; this Linux host cannot exercise the Cocoa/CoreAudio/native-window paths changed only in spelling. Those author assertions remain attributed to the author, not independently reproduced. No operator app instance or hardware was driven. The modified tests were preflighted as socket-free; the weather test’s framebuffer bind() is an OpenGL operation.

Recommendation

Approve. The complete mechanical substitution survives source normalization, parser mutation, cursor-guard mutation, boundary checks, and independent macOS compiler-log comparison. Refresh CI against current main before relying on the green merge result; approval and merge remain the maintainer’s call.

@ten9876 ten9876 assigned ten9876 and unassigned ten9876 Oct 11, 2026

@ten9876 ten9876 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Landing approval at verified head b275ffb.

The maintainer explicitly approved merging main into this contributor branch and pushing the prepared conflict resolution. Signed append-only merge b275ffb preserves the current setOutputDevice/setInputDevice AudioDeviceSelection signatures in src/core/AudioEngine.h and changes the adjacent guard to Q_OS_MACOS. GitHub verifies the commit signature. Comparing the integrated tree against main 7e080e0 proves all 51 changed files are exactly the whole-word Q_OS_MAC-to-Q_OS_MACOS substitution; the new audio API is byte-preserved.

Empirical resolution proof: registered mac_cursor_compat_test and audio_device_preference_policy_test built and passed 2/2 on the resolved tree and again after the signed commit. The docs generator checks all eight pages as current. Engine boundary, touchpoint manifest, capability and command-plane checks pass without changed ratchet baselines. The original review also independently measured 1636 old-macro deprecation warnings on base macOS CI versus zero on head, and demonstrated failure when reverting the coupled docs parser or cursor guard.

Fresh build, check-windows, check-macos and Static checks all pass on this head. The fresh PR run was created 2026-10-11T19:16:05Z, after main d640265 committed at 19:15:21Z; main at arming is 01d5721. No update was made merely because main moved.

The exhaustive thread sweep is empty and there is no active CHANGES_REQUESTED review. Prior title-bar follow-up is tracked by #6358 and addressed by merged #6359. The optional enforcement gate is separate #6383, outside this invocation. Broad lexical CodeGuard findings describe existing code, with no introduced executable logic or sink in this token-only diff. No unresolved actionable finding remains.

The unavailable automated review skill was replaced by a manual adversarial pass. Linux helper tests do not simulate native macOS UI or CoreAudio; fresh native compilation is supplied by macOS CI. No operator app or radio was driven. Approval is not a post-merge verdict: CI and Full Suite must independently pass on the eventual squash commit on main.

@ten9876
ten9876 merged commit 7ac07b0 into aethersdr:main Oct 11, 2026
7 checks passed
rfoust pushed a commit that referenced this pull request Oct 12, 2026
Add a required Static checks gate that flags Q_OS_MAC in source files while accepting Q_OS_MACOS and excluding vendored code. The gate passes after the #6355 migration. Fixes #6382.
@w5jwp
w5jwp deleted the chore/q-os-mac-to-q-os-macos branch October 12, 2026 14:22
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.

chore(build): migrate deprecated Q_OS_MAC to Q_OS_MACOS (Qt 6.12 clang deprecation warnings)

3 participants