Skip to content

Add diagnostics#40

Open
mernst wants to merge 4 commits into
mainfrom
ci
Open

Add diagnostics#40
mernst wants to merge 4 commits into
mainfrom
ci

Conversation

@mernst

@mernst mernst commented May 20, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai

coderabbitai Bot commented May 20, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Failed to post review comments

📝 Walkthrough

Walkthrough

The pull request updates CI configuration and a utility script. The workflow file gains a new step that shallow-clones the plume-scripts repository and runs its git-changes diagnostic tool before tests execute. The git-clone-related script unconditionally enables debug output immediately after initialization and replaces the CI_BRANCH_NAME variable with CI_BRANCH in downstream repository branch selection logic, affecting conditional checks, helper invocation, and debug output messages.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@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: 2

🤖 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/test.yml:
- Around line 21-22: Replace the current unpinned clone of the external repo so
CI checks out a fixed immutable commit SHA: change the sequence that runs "git
-C /tmp clone ... plume-scripts" and "/tmp/plume-scripts/ci-info" to fetch or
clone then explicitly checkout a specific commit SHA for plume-scripts (e.g., by
cloning to /tmp/plume-scripts and running git -C /tmp/plume-scripts checkout
<COMMIT_SHA>) so the subsequent invocation of ci-info always runs against that
pinned commit; update the workflow to surface the chosen SHA in a variable or
comment for future updates.
- Around line 18-22: The ci-info step (name: ci-info) currently runs a
network-dependent script (/tmp/plume-scripts/ci-info --debug) and should be made
non-blocking: update the workflow step for "ci-info" to include
continue-on-error: true and timeout-minutes: 2 so transient network or repo
failures won't fail the entire job; keep the existing run commands unchanged but
add those two keys to the step definition.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f6e5005e-55cc-41fa-ae7c-7830961320e0

📥 Commits

Reviewing files that changed from the base of the PR and between 28f9994 and ce2adfe.

📒 Files selected for processing (1)
  • .github/workflows/test.yml

Comment thread .github/workflows/test.yml Outdated
Comment thread .github/workflows/test.yml Outdated

@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: 3

🤖 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/test.yml:
- Around line 18-22: The workflow step named "git-changes" is cloning
plume-scripts into the fixed path /tmp/plume-scripts which pollutes
git-clone-related's expected lookup and causes later tests to reuse that
preseeded checkout; modify the "git-changes" step to clone into a unique or
temporary directory (e.g., use mktemp -d or include a random suffix) and invoke
the script from that directory (the invocation currently using
/tmp/plume-scripts/git-changes should be updated to the new path) so that
git-clone-related still exercises the script's bootstrap path.

In `@git-clone-related`:
- Around line 50-51: Remove the temporary default setting that forces
diagnostics on by deleting the DEBUG=1 line in the git-clone-related file so the
diagnostic path remains opt-in; ensure any code that relies on debug mode uses
explicit flags or environment checks (e.g., the existing ci-org-and-branch
--debug invocation) rather than a hardcoded default and confirm no other places
set DEBUG=1 implicitly.

In `@tests/git-clone-related-test/test-git-clone-related.sh`:
- Around line 36-37: Update the comment above the environment-variable unset
block to reference the actual helper under test: replace the mention of
`git-changes` with `git-clone-related` (and note that it consults
`ci-org-and-branch`) so the comment clearly explains why the variables are being
unset for the `git-clone-related` test; locate the comment in the
`test-git-clone-related.sh` script near the unset block and adjust the wording
to point at `git-clone-related`/`ci-org-and-branch`.
🪄 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: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7c01d5bf-5ef2-492f-9b8f-7b9b47cad499

📥 Commits

Reviewing files that changed from the base of the PR and between ce2adfe and 1c063c2.

📒 Files selected for processing (3)
  • .github/workflows/test.yml
  • git-clone-related
  • tests/git-clone-related-test/test-git-clone-related.sh

Comment on lines +18 to +22
- name: git-changes
run: |
mkdir -p /tmp
git -C /tmp clone --depth=1 -q https://github.com/plume-lib/plume-scripts.git
/tmp/plume-scripts/git-changes --debug

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Keep the diagnostics checkout out of /tmp/plume-scripts.

git-clone-related checks /tmp/plume-scripts first (git-clone-related, Lines 114-118), so this step changes what later tests exercise—they now reuse the preseeded checkout instead of covering the script's own bootstrap path.

Proposed fix
       - name: git-changes
         run: |
           mkdir -p /tmp
-          git -C /tmp clone --depth=1 -q https://github.com/plume-lib/plume-scripts.git
-          /tmp/plume-scripts/git-changes --debug
+          git -C /tmp clone --depth=1 -q https://github.com/plume-lib/plume-scripts.git plume-scripts-diagnostics
+          /tmp/plume-scripts-diagnostics/git-changes --debug
🤖 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 @.github/workflows/test.yml around lines 18 - 22, The workflow step named
"git-changes" is cloning plume-scripts into the fixed path /tmp/plume-scripts
which pollutes git-clone-related's expected lookup and causes later tests to
reuse that preseeded checkout; modify the "git-changes" step to clone into a
unique or temporary directory (e.g., use mktemp -d or include a random suffix)
and invoke the script from that directory (the invocation currently using
/tmp/plume-scripts/git-changes should be updated to the new path) so that
git-clone-related still exercises the script's bootstrap path.

Comment thread git-clone-related
Comment on lines +50 to +51
# TEMPORARY
DEBUG=1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Remove the temporary default DEBUG=1 before merge.

This makes the diagnostic path opt-out instead of opt-in and also forces the extra ci-org-and-branch --debug invocation below on every normal run.

Proposed fix
-# TEMPORARY
-DEBUG=1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# TEMPORARY
DEBUG=1
🤖 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 `@git-clone-related` around lines 50 - 51, Remove the temporary default setting
that forces diagnostics on by deleting the DEBUG=1 line in the git-clone-related
file so the diagnostic path remains opt-in; ensure any code that relies on debug
mode uses explicit flags or environment checks (e.g., the existing
ci-org-and-branch --debug invocation) rather than a hardcoded default and
confirm no other places set DEBUG=1 implicitly.

Comment on lines 36 to +37
# This test might itself be running under CI, so unset the variables that
# `ci-info` examines.
# `git-changes` examines.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Point the comment at the helper this test is isolating.

This script never invokes git-changes; it runs git-clone-related, which now consults ci-org-and-branch. Referencing git-changes here makes the unset block look unrelated.

Proposed fix
 # This test might itself be running under CI, so unset the variables that
-# `git-changes` examines.
+# `git-clone-related` consults via `ci-org-and-branch`.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# This test might itself be running under CI, so unset the variables that
# `ci-info` examines.
# `git-changes` examines.
# This test might itself be running under CI, so unset the variables that
# `git-clone-related` consults via `ci-org-and-branch`.
🤖 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 `@tests/git-clone-related-test/test-git-clone-related.sh` around lines 36 - 37,
Update the comment above the environment-variable unset block to reference the
actual helper under test: replace the mention of `git-changes` with
`git-clone-related` (and note that it consults `ci-org-and-branch`) so the
comment clearly explains why the variables are being unset for the
`git-clone-related` test; locate the comment in the `test-git-clone-related.sh`
script near the unset block and adjust the wording to point at
`git-clone-related`/`ci-org-and-branch`.

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