Skip to content

Conversation

@Coldaine
Copy link
Owner

@Coldaine Coldaine commented Dec 23, 2025

User description

Summary

This PR addresses critical gaps identified during the post-merge review of the CI/CD pipeline and test harness.

Changes

  1. CI / STT Coverage:

  2. Tests / GTK Harness:

Verification

  • CI should now run and pass moonshine_e2e tests (verifying model download and inference).
  • GTK integration tests should show improved stability (fewer flaky failures due to early injection).

PR Type

Bug fix, Tests


Description

  • Fix GTK test race condition by deferring readiness signal

  • Add Moonshine E2E tests to CI with required Python dependencies

  • Ensure GTK app is responsive before test injection begins

  • Restore STT coverage in hosted CI runner


Diagram Walkthrough

flowchart LR
  A["GTK Test App"] -->|"Defer readiness signal"| B["g_idle_add callback"]
  B -->|"Main loop starts"| C["Ready file created"]
  D["CI Pipeline"] -->|"Add Moonshine step"| E["Install Python deps"]
  E -->|"Run E2E tests"| F["moonshine_e2e tests"]
Loading

File Walkthrough

Relevant files
Bug fix
gtk_test_app.c
Defer GTK readiness signal to main loop start                       

crates/coldvox-text-injection/test-apps/gtk_test_app.c

  • Changed create_ready_file() from void function to gboolean callback
  • Moved ready file creation from immediate call to g_idle_add()
    scheduler
  • Ensures GTK main loop starts before app signals readiness to tests
  • Eliminates race condition where tests inject before app is responsive
+5/-4     
Enhancement
ci.yml
Add Moonshine E2E tests to CI pipeline                                     

.github/workflows/ci.yml

  • Added new "Run Moonshine E2E Tests" step to CI workflow
  • Installs required Python dependencies (transformers, torch, librosa,
    accelerate)
  • Enables moonshine feature flag for cargo test execution
  • Sets PYTHONPATH for proper Python module discovery
+10/-0   

@qodo-free-for-open-source-projects
Copy link

qodo-free-for-open-source-projects bot commented Dec 23, 2025

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
Buffer overflow risk

Description: The filepath buffer uses snprintf with a fixed 256-byte buffer and unsanitized PID, which
could potentially overflow if PID values become extremely large on some systems, though
this is unlikely in practice.
gtk_test_app.c [25-26]

Referred Code
char filepath[256];
snprintf(filepath, sizeof(filepath), "/tmp/coldvox_gtk_test_%d.txt", getpid());
Ticket Compliance
🟡
🎫 #302
🟢 The change remains simple and does not add new heavyweight dependencies
File existence alone should not be the only guarantee that GUI is interactive/entry
focused
🔴 Readiness wait cannot be satisfied by a stale file from a previous run with PID reuse
If the GTK app crashes early, tests fail fast with a clear error
Use a distinct readiness sentinel file or write a marker string and verify contents
When waiting, poll child.try_wait() to detect if app exited
Consider cleaning/removing any pre-existing file at the expected path before spawning the
app
🟡
🎫 #307
🟢 CI workflow explicitly enables the necessary features for Golden Master tests
CI workflow installs required Python dependencies for Moonshine
Ensure Golden Master tests actually run and are not skipped silently due to missing
feature flags
🔴
Tests pass on the hosted runner verifying model download/inference works
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Missing error handling: The create_ready_file callback does not handle or log failures when fopen returns NULL,
which could cause silent test failures.

Referred Code
static gboolean create_ready_file(gpointer user_data) {
    char filepath[256];
    snprintf(filepath, sizeof(filepath), "/tmp/coldvox_gtk_test_%d.txt", getpid());
    FILE *f = fopen(filepath, "w");
    if (f != NULL) {
        // Write empty content - file existence is the signal
        fclose(f);
    }
    return G_SOURCE_REMOVE; // Run once
}

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link

ⓘ Your approaching your monthly quota for Qodo. Upgrade your plan

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
Unpinned pip dependencies

Description: CI installs unpinned Python packages (pip install transformers torch librosa accelerate)
at runtime, which can introduce supply-chain risk and non-reproducible builds if a
compromised or breaking release is pulled.
ci.yml [202-210]

Referred Code
- name: Run Moonshine E2E Tests
  if: matrix.rust-version == 'stable'
  run: |
    echo "=== Running Moonshine E2E Tests ==="
    # Install Python dependencies for Moonshine
    pip install transformers torch librosa accelerate
    export PYTHONPATH=$(python3 -c "import site; print(site.getsitepackages()[0])")
    # Run the specific E2E test with the moonshine feature enabled
    cargo test -p coldvox-stt --features moonshine --test moonshine_e2e -- --nocapture
Ticket Compliance
🟡
🎫 #307
🟢 CI workflow explicitly enables the necessary features for Golden Master / Moonshine tests
(e.g., --features moonshine or --all-features) so tests are not silently compiled out.
CI workflow installs required Python dependencies for Moonshine (e.g., transformers,
torch, etc.), ideally via a requirements file (e.g., requirements-stt.txt) or similar
mechanism.
Tests pass on the hosted runner (including model download/inference behavior, CPU-only if
intended).
🟡
🎫 #302
🟢 The change remains simple and does not add new heavyweight dependencies.
🔴 Readiness wait cannot be satisfied by a stale /tmp file from a previous run (e.g., due to
PID reuse).
If the GTK app crashes early, tests fail fast with a clear error (e.g., by polling
child.try_wait() while waiting).
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

🔴
Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Silent I/O failure: The new create_ready_file callback silently ignores fopen failures (no error propagation
or logging), making readiness signaling failures hard to diagnose.

Referred Code
static gboolean create_ready_file(gpointer user_data) {
    char filepath[256];
    snprintf(filepath, sizeof(filepath), "/tmp/coldvox_gtk_test_%d.txt", getpid());
    FILE *f = fopen(filepath, "w");
    if (f != NULL) {
        // Write empty content - file existence is the signal
        fclose(f);
    }
    return G_SOURCE_REMOVE; // Run once
}

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
Insecure temp file: The readiness file is written to a predictable /tmp path using snprintf and fopen without
secure temp-file creation (e.g., mkstemp), which may be vulnerable to symlink/hijack risks
depending on execution context.

Referred Code
char filepath[256];
snprintf(filepath, sizeof(filepath), "/tmp/coldvox_gtk_test_%d.txt", getpid());
FILE *f = fopen(filepath, "w");
if (f != NULL) {
    // Write empty content - file existence is the signal
    fclose(f);
}

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

- CI: Add Moonshine E2E tests to hosted runner with required Python deps.
- Tests: Delay GTK app readiness signal until main loop start to prevent race conditions.

Resolves: #307
Addresses: #302
@Coldaine Coldaine force-pushed the fix/ci-stt-coverage-and-gtk-race branch from 498ffd0 to 21e30e9 Compare December 23, 2025 21:29
@qodo-free-for-open-source-projects
Copy link

qodo-free-for-open-source-projects bot commented Dec 23, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Add error handling for file creation
Suggestion Impact:The commit added error handling that logs failures via perror when creating the ready file fails. It also replaced fopen with a more secure open(O_CREAT|O_EXCL) approach and added additional error handling for writing PID content.

code diff:

 static gboolean create_ready_file(gpointer user_data) {
     char filepath[256];
     snprintf(filepath, sizeof(filepath), "/tmp/coldvox_gtk_test_%d.txt", getpid());
-    FILE *f = fopen(filepath, "w");
-    if (f != NULL) {
-        // Write empty content - file existence is the signal
-        fclose(f);
+
+    // Securely create the file: O_CREAT | O_EXCL prevents clobbering or symlink attacks
+    int fd = open(filepath, O_WRONLY | O_CREAT | O_EXCL, 0600);
+    if (fd == -1) {
+        perror("Failed to create ready file");
+        return G_SOURCE_REMOVE; // Do not retry; tests will handle absence
     }
+
+    // Write the PID to the file so tests can verify content is from the current process
+    char pidbuf[32];
+    int len = snprintf(pidbuf, sizeof(pidbuf), "%d", getpid());
+    if (len > 0) {
+        ssize_t w = write(fd, pidbuf, (size_t)len);
+        if (w < 0) {
+            perror("Failed to write PID to ready file");
+        }
+    }
+
+    close(fd);

Add error handling to the create_ready_file function by logging a message to
stderr if the fopen call fails.

crates/coldvox-text-injection/test-apps/gtk_test_app.c [24-33]

 static gboolean create_ready_file(gpointer user_data) {
     char filepath[256];
     snprintf(filepath, sizeof(filepath), "/tmp/coldvox_gtk_test_%d.txt", getpid());
     FILE *f = fopen(filepath, "w");
     if (f != NULL) {
         // Write empty content - file existence is the signal
         fclose(f);
+    } else {
+        perror("Failed to create ready file");
     }
     return G_SOURCE_REMOVE; // Run once
 }

[Suggestion processed]

Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies a silent failure case if fopen fails and proposes adding error logging, which significantly improves the debuggability of the test application.

Medium
High-level
Consolidate Python dependencies into requirements files

To improve maintainability, consolidate the multiple inline pip install commands
in the CI workflow into dedicated requirements.txt files for each test suite.

Examples:

.github/workflows/ci.yml [207]
          pip install transformers torch librosa accelerate

Solution Walkthrough:

Before:

# .github/workflows/ci.yml
- name: Run Golden Master Test
  run: |
    pip install faster-whisper
    cargo test ...

- name: Run Moonshine E2E Tests
  run: |
    pip install transformers torch librosa accelerate
    cargo test --features moonshine ...

After:

# .github/workflows/ci.yml
- name: Run Golden Master Test
  run: |
    pip install -r requirements-golden-master.txt
    cargo test ...

- name: Run Moonshine E2E Tests
  run: |
    pip install -r requirements-stt.txt
    cargo test --features moonshine ...

# requirements-stt.txt would contain:
# transformers
# torch
# librosa
# accelerate
Suggestion importance[1-10]: 5

__

Why: The suggestion offers a valid best-practice improvement for CI maintainability by proposing requirements.txt files over inline pip install commands, which is relevant to the PR's CI modifications.

Low
  • Update

@qodo-code-review
Copy link

ⓘ Your approaching your monthly quota for Qodo. Upgrade your plan

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Security
Securely create temporary signal file

Fix a security vulnerability by using open with O_CREAT | O_EXCL flags to
atomically create the temporary file, preventing potential symlink attacks.

crates/coldvox-text-injection/test-apps/gtk_test_app.c [25-31]

 char filepath[256];
 snprintf(filepath, sizeof(filepath), "/tmp/coldvox_gtk_test_%d.txt", getpid());
-FILE *f = fopen(filepath, "w");
-if (f != NULL) {
-    // Write empty content - file existence is the signal
-    fclose(f);
+// Use O_CREAT | O_EXCL to atomically create the file and fail if it exists.
+// This prevents symlink attacks.
+int fd = open(filepath, O_WRONLY | O_CREAT | O_EXCL, 0600);
+if (fd != -1) {
+    // File created successfully, just close it.
+    close(fd);
 }
  • Apply / Chat
Suggestion importance[1-10]: 8

__

Why: This suggestion correctly identifies a security vulnerability (symlink race condition) in the test application's temporary file creation. The proposed fix using open with O_CREAT | O_EXCL is the standard and correct way to mitigate this issue.

Medium
High-level
'Improve test harness readiness signal robustness.

'


The current fix for the GTK test race condition is
incomplete because it doesn't
handle stale signal files, as noted in ticket #302.
To prevent flaky tests, the
app should write its PID to the signal file for verification,
or the test
harness should clean up old files before starting.

Examples:

crates/coldvox-text-injection/test-apps/gtk_test_app.c [24-33]
static gboolean create_ready_file(gpointer user_data) {
    char filepath[256];
    snprintf(filepath, sizeof(filepath), "/tmp/coldvox_gtk_test_%d.txt", getpid());
    FILE *f = fopen(filepath, "w");
    if (f != NULL) {
        // Write empty content - file existence is the signal
        fclose(f);
    }
    return G_SOURCE_REMOVE; // Run once
}

Solution Walkthrough:

Before:

// In gtk_test_app.c
static gboolean create_ready_file(gpointer user_data) {
    char filepath[256];
    snprintf(filepath, sizeof(filepath), "/tmp/coldvox_gtk_test_%d.txt", getpid());
    FILE *f = fopen(filepath, "w");
    if (f != NULL) {
        // File existence is the only signal
        fclose(f);
    }
    return G_SOURCE_REMOVE;
}

// In test harness (conceptual)
spawn("gtk_test_app");
// This can be fooled by a stale file from a previous run with the same PID
wait_for_file_existence("/tmp/coldvox_gtk_test_PID.txt");
inject_text();

After:

// In gtk_test_app.c
static gboolean create_ready_file(gpointer user_data) {
    char filepath[256];
    snprintf(filepath, sizeof(filepath), "/tmp/coldvox_gtk_test_%d.txt", getpid());
    FILE *f = fopen(filepath, "w");
    if (f != NULL) {
        // Write PID to file for verification
        fprintf(f, "%d", getpid());
        fclose(f);
    }
    return G_SOURCE_REMOVE;
}

// In test harness (conceptual)
child = spawn("gtk_test_app");
// Wait for file and verify its content matches the new process PID
wait_for_file_and_verify_pid("/tmp/coldvox_gtk_test_PID.txt", child.pid());
inject_text();
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies that the PR's fix for the GTK test
app only partially addresses the issues in ticket #302, leaving a potential for
flaky tests due to stale signal files.

Medium
General
Pin dependencies for reproducible builds

Pin Python dependencies in a requirements.txt file and install from it to create
more stable and reproducible CI builds.

.github/workflows/ci.yml [207]

-pip install transformers torch librosa accelerate
+pip install -r stt-requirements/requirements.txt
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly points out that unpinned dependencies can cause CI instability. Using a requirements.txt file is a best practice for ensuring reproducible builds, improving the long-term maintainability of the workflow.

Low
  • More

@qodo-code-review
Copy link

qodo-code-review bot commented Dec 23, 2025

CI Feedback 🧐

(Feedback updated until commit 21e30e9)

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: CI Success Summary

Failed stage: Generate CI Report [❌]

Failure summary:

The action failed because the setup-whisper-dependencies job was cancelled rather than completing
successfully. The CI report shows:
- setup-whisper-dependencies: cancelled
- unit_tests_hosted:
cancelled
- text_injection_tests: cancelled

The script checks if setup-whisper-dependencies completed with "success" status, but it had
"cancelled" status instead. This triggered the error condition at line 132: if [[ "cancelled" !=
"success" ]]; then echo "::error::Setup Whisper dependencies failed."; exit 1; fi, causing the
workflow to exit with code 1.

Relevant error logs:
1:  ##[group]Runner Image Provisioner
2:  Hosted Compute Agent
...

117:  Or undo this operation with:
118:  git switch -
119:  Turn off this advice by setting config variable advice.detachedHead to false
120:  HEAD is now at c9857b1 Merge 498ffd018f4a20d9a46d0b06c52d15545dfd3bc9 into 97f52b8a4a5ba8db304e16dc3bb74508e9d04021
121:  ##[endgroup]
122:  [command]/usr/bin/git log -1 --format=%H
123:  c9857b1332fefb6282c05521448438dbd957a2f4
124:  ##[group]Run echo "## CI Report" > report.md
125:  �[36;1mecho "## CI Report" > report.md�[0m
126:  �[36;1mecho "- validate-workflows:            cancelled" >> report.md�[0m
127:  �[36;1mecho "- setup-whisper-dependencies:    cancelled" >> report.md�[0m
128:  �[36;1mecho "- security_audit:                success" >> report.md�[0m
129:  �[36;1mecho "- unit_tests_hosted:             cancelled" >> report.md�[0m
130:  �[36;1mecho "- text_injection_tests:          cancelled" >> report.md�[0m
131:  �[36;1mecho "- moonshine_check:               cancelled (optional)" >> report.md�[0m
132:  �[36;1mif [[ "cancelled" != "success" ]]; then echo "::error::Setup Whisper dependencies failed."; exit 1; fi�[0m
133:  �[36;1mif [[ "success" != "success" ]]; then echo "::warning::Security audit failed - check for vulnerabilities."; fi�[0m
134:  �[36;1mif [[ "cancelled" != "success" ]]; then echo "::error::Build and check failed."; exit 1; fi�[0m
135:  �[36;1mif [[ "cancelled" != "success" ]]; then echo "::error::Text injection tests failed."; exit 1; fi�[0m
136:  �[36;1mif [[ "cancelled" != "success" ]]; then echo "::warning::Moonshine check failed (optional)."; fi�[0m
137:  �[36;1mecho "All critical stages passed successfully."�[0m
138:  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
139:  env:
140:  CARGO_TERM_COLOR: always
141:  WHISPER_MODEL_SIZE: tiny
142:  MIN_FREE_DISK_GB: 10
143:  MAX_LOAD_AVERAGE: 5
144:  ##[endgroup]
145:  ##[error]Setup Whisper dependencies failed.
146:  ##[error]Process completed with exit code 1.
147:  Post job cleanup.

@qodo-code-review
Copy link

ⓘ Your approaching your monthly quota for Qodo. Upgrade your plan

CI Feedback 🧐

A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

Action: CI Success Summary

Failed stage: Generate CI Report [❌]

Failed test name: ""

Failure summary:

The action failed in the final CI report/guard step because the setup-whisper-dependencies stage did
not complete successfully:
- setup-whisper-dependencies is reported as cancelled in report.md (line
127).
- The script treats any value other than success as a failure and exits: if [[ "cancelled" !=
"success" ]]; then echo "::error::Setup Whisper dependencies failed."; exit 1; fi (line 132).
- This
triggers the job error ##[error]Setup Whisper dependencies failed. and ends the workflow with exit
code 1 (lines 145-146).

Relevant error logs:
1:  ##[group]Runner Image Provisioner
2:  Hosted Compute Agent
...

117:  Or undo this operation with:
118:  git switch -
119:  Turn off this advice by setting config variable advice.detachedHead to false
120:  HEAD is now at c9857b1 Merge 498ffd018f4a20d9a46d0b06c52d15545dfd3bc9 into 97f52b8a4a5ba8db304e16dc3bb74508e9d04021
121:  ##[endgroup]
122:  [command]/usr/bin/git log -1 --format=%H
123:  c9857b1332fefb6282c05521448438dbd957a2f4
124:  ##[group]Run echo "## CI Report" > report.md
125:  �[36;1mecho "## CI Report" > report.md�[0m
126:  �[36;1mecho "- validate-workflows:            cancelled" >> report.md�[0m
127:  �[36;1mecho "- setup-whisper-dependencies:    cancelled" >> report.md�[0m
128:  �[36;1mecho "- security_audit:                success" >> report.md�[0m
129:  �[36;1mecho "- unit_tests_hosted:             cancelled" >> report.md�[0m
130:  �[36;1mecho "- text_injection_tests:          cancelled" >> report.md�[0m
131:  �[36;1mecho "- moonshine_check:               cancelled (optional)" >> report.md�[0m
132:  �[36;1mif [[ "cancelled" != "success" ]]; then echo "::error::Setup Whisper dependencies failed."; exit 1; fi�[0m
133:  �[36;1mif [[ "success" != "success" ]]; then echo "::warning::Security audit failed - check for vulnerabilities."; fi�[0m
134:  �[36;1mif [[ "cancelled" != "success" ]]; then echo "::error::Build and check failed."; exit 1; fi�[0m
135:  �[36;1mif [[ "cancelled" != "success" ]]; then echo "::error::Text injection tests failed."; exit 1; fi�[0m
136:  �[36;1mif [[ "cancelled" != "success" ]]; then echo "::warning::Moonshine check failed (optional)."; fi�[0m
137:  �[36;1mecho "All critical stages passed successfully."�[0m
138:  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
139:  env:
140:  CARGO_TERM_COLOR: always
141:  WHISPER_MODEL_SIZE: tiny
142:  MIN_FREE_DISK_GB: 10
143:  MAX_LOAD_AVERAGE: 5
144:  ##[endgroup]
145:  ##[error]Setup Whisper dependencies failed.
146:  ##[error]Process completed with exit code 1.
147:  Post job cleanup.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses two critical issues in the CI/CD pipeline and test infrastructure: restoring STT test coverage for the Moonshine model and fixing a race condition in the GTK test harness.

Key Changes:

  • Added dedicated CI step to run Moonshine E2E tests with required Python dependencies
  • Fixed GTK test app race condition by deferring ready file creation to the main loop

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/ci.yml Added new CI step to run Moonshine E2E tests with Python dependencies (transformers, torch, librosa, accelerate) and moonshine feature flag enabled
crates/coldvox-text-injection/test-apps/gtk_test_app.c Fixed race condition by converting create_ready_file to an idle callback and scheduling it with g_idle_add to ensure the main loop is running before signaling readiness

run: |
echo "=== Running Moonshine E2E Tests ==="
# Install Python dependencies for Moonshine
pip install transformers torch librosa accelerate
Copy link

Copilot AI Dec 23, 2025

Choose a reason for hiding this comment

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

The Python dependencies are installed without version pinning, which can lead to non-reproducible builds and potential security issues if a dependency is compromised. Consider pinning versions (e.g., pip install transformers==4.36.0 torch==2.1.2 librosa==0.10.1 accelerate==0.25.0) or using a requirements file to ensure consistent test environments across runs.

Copilot uses AI. Check for mistakes.
@kiloconnect
Copy link

kiloconnect bot commented Dec 23, 2025

⚠️ WARNING: Missing error handling in create_ready_file function

The create_ready_file function doesn't handle or log failures when fopen() returns NULL, which could cause silent test failures. Consider adding error logging similar to what's done in the on_text_changed function.

@kiloconnect
Copy link

kiloconnect bot commented Dec 23, 2025

⚠️ 1 Issue Found

Severity Issue Location
WARNING Missing error handling in create_ready_file function crates/coldvox-text-injection/test-apps/gtk_test_app.c:24-30

Recommendation: Address the warning issue before merge

Review Details (2 files)

Files: .github/workflows/ci.yml, crates/coldvox-text-injection/test-apps/gtk_test_app.c

Fix these issues in Kilo Cloud

…eady file creation (secure, logged, PID content)
@Coldaine
Copy link
Owner Author

Thanks for the thorough review — I’ve addressed the key points:

  • GTK ready file: switched to secure creation ( xdg-open - opens a file or URL in the user's preferred
    application

Synopsis

xdg-open { file | URL }

xdg-open { --help | --manual | --version }

Use 'man xdg-open' or 'xdg-open --manual' for additional info. with , mode ), added error logging via perror Ver 2.11, for Linux (x86_64)
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Print a description for a system error code or a MariaDB error code.
If you want to get the error for a negative error code, you should use
-- before the first error code to tell perror that there was no more options.

Usage: perror [OPTIONS] [ERRORCODE [ERRORCODE...]]
-?, --help Displays this help and exits.
-I, --info Synonym for --help.
-s, --silent Only print the error message.
-v, --verbose Print error code and message (default).
(Defaults to on; use --skip-verbose to disable.)
-V, --version Displays version information and exits.

Variables (--variable-name=value)
and boolean options {FALSE|TRUE} Value (after reading options)


verbose TRUE, and wrote the current PID into the file for harness verification. See gtk_test_app.c.

  • Docs validation: added required frontmatter to docs/plans/2025-12-23-pr-triage-action-plan.md per .
  • Python deps pinning: agree on using requirements files for reproducibility. I’ll follow up in a separate PR to centralize Moonshine/Golden Master dependencies into and update CI to install from those files (to keep this PR focused).

If there are any remaining blockers, let me know and I’ll address promptly.

@Coldaine
Copy link
Owner Author

Thanks for the thorough review — I have addressed the key points:

  • GTK ready file: switched to secure creation (open with O_CREAT|O_EXCL, mode 0600), added error logging via perror, and wrote the current PID into the file for harness verification. See gtk_test_app.c in the PR diff.
  • Docs validation: added required frontmatter to docs/plans/2025-12-23-pr-triage-action-plan.md per docs/standards.md.
  • Python deps pinning: agree on using requirements files for reproducibility. I will follow up in a separate PR to centralize Moonshine/Golden Master dependencies into requirements/ and update CI to install from those files (to keep this PR focused).

If there are any remaining blockers, let me know and I will address promptly.

@Coldaine Coldaine merged commit b4e3c39 into main Dec 23, 2025
9 of 10 checks passed
@Coldaine Coldaine deleted the fix/ci-stt-coverage-and-gtk-race branch December 23, 2025 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: Verify Golden Master tests (Moonshine) run and have dependencies on hosted runners

2 participants