Skip to content

Action files #1611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 18, 2025
Merged

Action files #1611

merged 4 commits into from
Jun 18, 2025

Conversation

pelikhan
Copy link
Member

@pelikhan pelikhan commented Jun 18, 2025

Parse INPUT_MODEL_ as model aliases


  • 🔧 Refactored handling of INPUT_FILES environment variable:
    • Code to process INPUT_FILES was removed from cli.ts and moved to run.ts.
    • Improved flexibility: INPUT_FILES can now be split using semicolons (;) or newlines (\n), making it more robust

AI-generated content by pr-describe may be incorrect. Use reactions to eval.

@pelikhan pelikhan changed the base branch from main to dev June 18, 2025 12:21
Copy link
Contributor

The changes in the diff focus on refactoring and improving the handling of environment variables in the CLI and core packages, specifically addressing support for INPUT_FILES and INPUT_MODEL settings for GitHub Actions. Key highlights:

  1. Logic to handle INPUT_FILES was removed from cli.ts and incorporated in run.ts to centralize functionality.
  2. Improved parsing of environment variables (INPUT_FILES, INPUT_MODEL) with better regex patterns and enhanced debug logging.
  3. Removed unnecessary flag checks (e.g., options.githubAction) to streamline execution.

No functional issues detected. The changes are aligned with improving modularity and GitHub Action support.

LGTM 🚀

AI-generated content by pr-review may be incorrect. Use reactions to eval.

Copy link
Contributor

Annotations

variable-names

No specific variable names issues detected, but no new tests were added for the affected files.

stats

Metric Count
Files Modified 3
Files Added 10
Removed Content Segments 3
Lines Added Not computed

no-fix-mes

No instances of fixMe comments detected.

grumpy-dev

  1. .github/genaisrc/issue-bot.genai.mts: Why is the issue lack description enhanced to a degree? Lacking mandatory filing-up

AI-generated content by linters may be incorrect. Use reactions to eval.

Copy link
Contributor

Investigator report

Context collection

  • run id: 15732803745
  • failed job
  • last successful run not found

AI Analysis

Root Cause Analysis:

The workflow failed because of an error in the "yarn test:samples" script, specifically in the "gist" subtest of the "run" suite. The relevant error lines:

# genaiscript: vscode://vsls-contrib.gistfs/open?gist=8f7db2674f7b0eaaf563eae28253c2b0&file=echo.genai.mts (run: zQKsLQ4DlMY-xtxHeA6Ik)
...
# GET /gists/8f7db2674f7b0eaaf563eae28253c2b0?owner=microsoft - 403 with id 86C0:3F2A0:4B305D0:94F54F0:6852B196 in 138ms
# ENOENT: no such file or directory, open 'vscode://vsls-contrib.gistfs/open?gist=8f7db2674f7b0eaaf563eae28253c2b0&file=echo.genai.mts'
# Error: ENOENT: no such file or directory, open 'vscode://vsls-contrib.gistfs/open?gist=8f7db2674f7b0eaaf563eae28253c2b0&file=echo.genai.mts'
    at async open (node:internal/fs/promises:633:25)
    at async readFile (node:internal/fs/promises:1237:14)
    ...

The stack trace shows ENOENT: no such file or directory, paired with a failed API request returning 403 Forbidden when trying to access the GitHub Gist.

Summary:

  • The "gist" test tries to access a GitHub Gist via an authenticated API call.
  • It receives a 403 Forbidden (most likely due to lack of required Gist permissions or misconfigured GitHub token).
  • As a result, the test fails when it tries to open a file that couldn't be downloaded (ENOENT).

Code Responsible:

The error probably originates from a test script in packages/sample/src/cli.test.ts, invoking code that tries to access a gist via vscode://vsls-contrib.gistfs/open?... and expecting it to be readable on the local filesystem.

Definitive root cause:
lacking correct GITHUB_TOKEN permissions for accessing the requested Gist (read or write), or the token is not set/sufficient for gist API calls in the workflow.

Potential Fixes:

  1. Update the GitHub workflow configuration to add Gist: read permissions to the GITHUB_TOKEN (see: github docs).
  2. Alternatively, mark the failing test as skipped/conditional if Gist integration cannot be guaranteed in CI.

No code diff is possible until the workflow and permissions configuration is reviewed and/or updated. If you want a sample diff for the test file to skip the "gist" test if not authorized, request the test file. Otherwise, update your workflow permissions:

Example GitHub Actions workflow permissions block:

permissions:
  contents: read
  metadata: read
  gist: read             # ADD THIS LINE
  models: read

Conclusion:
The root cause is missing or insufficient permissions to read a GitHub Gist in the workflow, causing a 403 Forbidden and failing test. Fix by updating workflow permissions or skipping tests in CI that require private GitHub Gist access.

AI-generated content by gai may be incorrect. Use reactions to eval.

@pelikhan pelikhan merged commit 7808200 into dev Jun 18, 2025
11 of 14 checks passed
@pelikhan pelikhan deleted the action-files branch June 21, 2025 05:45
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.

1 participant