Repository navigation
fix(ci): skip agent inventory when checkout predates script - #2955
Open
groupthinking wants to merge 1 commit into
Open
groupthinking wants to merge 1 commit into
groupthinking wants to merge 1 commit into
Conversation
Copilot runs copilot-setup-steps.yml from the default branch but checks out the task's head SHA. Branches cut before #2935 lack scripts/ci/agent_inventory.py, so the inventory step exited 2 and failed Copilot code review setup (e.g. #2938). Skip with a warning and write a placeholder inventory when the script is absent; a present-but-failing script still fails setup. Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Copilot started work to fix failing Actions workflows on behalf of
groupthinking
December 4, 2026 17:43
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The fallback leaves .agent-inventory.md unignored on older branches, risking accidental commits and subsequent inventory runs modifying a tracked file.
1 open issue
What changed in this PR
Updates UVAI’s Copilot setup to tolerate checkouts that predate the agent-inventory script, addressing #2954.
Changes:
- Adds a warning and placeholder inventory when the script is absent.
- Adds regression tests for missing scripts and present-but-failing scripts.
| File | Description |
|---|---|
tests/unit/test_agent_inventory.py |
Exercises workflow shell steps for both compatibility cases. |
.github/workflows/copilot-setup-steps.yml |
Adds the missing-script fallback while preserving execution failures. |
Review effort: Max
| "# Agent inventory (check before starting work)" \ | ||
| "" \ | ||
| "_Unavailable: this checkout predates scripts/ci/agent_inventory.py._" \ | ||
| > "$RUNNER_TEMP/agent-inventory.md" |
Copilot started work to fix failing Actions workflows on behalf of
groupthinking
December 4, 2026 17:50
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Canonical issue
Closes #2954
Outcome
Copilot code review and cloud-agent setup no longer fail on branches cut before #2935. The failing job (https://github.com/groupthinking/EventRelay/actions/runs/47127476642/job/144327758349, PR #2938) exited 2 because
scripts/ci/agent_inventory.pywas absent. Copilot runscopilot-setup-steps.ymlfrom the default branch while checking out the PR head SHA.Scope
Inventory active agents and automationsstep runs the script when present. When the script is absent, the step emits a::warning::and writes a placeholderagent-inventory.mdsoExpose inventory to the agentstill succeeds. New regression tests intests/unit/test_agent_inventory.pyexecute the real workflow step scripts underbash -e -o pipefail, as the Copilot runner does.agent_inventory.pyitself; rebasing feat(web): add YouTube-to-agent-tasks and UVAI vs YouExtractor pages #2938 or other stale branches.Risk
Verification
Head:
c41d2b7e9pytest tests/unit/test_agent_inventory.py tests/unit/test_workflow_pr_gate_coverage.py -o addopts="" --strict-markers --strict-configpassed with 41 tests.test_setup_steps_tolerate_checkout_that_predates_inventory_scriptfailed with the CI error (python: can't open file ... [Errno 2], exit 2). It passes with the fix.ruff check tests/unit/test_agent_inventory.py scripts/ci/passed with no issues.actionlint .github/workflows/copilot-setup-steps.ymlpassed with no issues.copilot-setup-stepspasses on this PR, and all 5test_agent_inventory.pytests pass in CI.test (Python 3.11/3.12)fails on 2 pre-existing tests (test_dependency_review_workflow,test_node_engines_floor[apps/web]). Those same 2 tests fail onmainat based71fb6c9f(run 47286474955) and are unrelated to this change.Production evidence
Not applicable. This changes CI and Copilot setup only; nothing is deployed.
Agent handoff