Skip to content

test: read the agent skill's example package on a CRLF checkout - #2144

Merged
chhoumann merged 1 commit into
masterfrom
fix/agent-skill-test-crlf
Oct 2, 2026
Merged

chhoumann merged 1 commit into
masterfrom
fix/agent-skill-test-crlf

Conversation

@chhoumann

@chhoumann chhoumann commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Every push to master has failed CI since #1965 (2026-09-30). Only the Windows platform test fails, and only on tests/agent-skill.test.ts:

Error: Package content is not valid JSON: Unexpected end of JSON input

The Windows checkout gives skills/quickadd/SKILL.md CRLF line endings, so the test's ```json\n fence never matched and it parsed an empty package. PR CI skips the platform matrix, so no PR showed it. Because master CI never went green, the release-prepare workflow skipped every run and the release PR (#1904) is still planned from 81e95a1.

The fix is test-only: the regex accepts \r?\n. Checked locally: on a CRLF copy of SKILL.md the old regex finds nothing and the new one extracts the example, which parses. The CI run dispatched on this branch (with the Windows/macOS matrix) is linked in the checks. No release impact.

Note

Fix JSON code-fence extraction in agent skill test to accept CRLF

The QuickAdd agent skill test failed to extract the example package when the skill file used Windows CRLF line endings. The extraction regex in the test now accepts either LF or CRLF after the opening fence, and the CRLF case is documented. Import assertions and package application flow are unchanged.

Macroscope summarized ac952e6.

Summary by CodeRabbit

  • Tests
    • Updated a test to recognize skill-file examples using either LF or CRLF line endings.

On Windows the checkout gives skills/quickadd/SKILL.md CRLF line endings,
so the example's ```json\n fence never matched and the test parsed an
empty package. Every master push has failed the Windows platform test on
this since #1965, which also kept the release PR from refreshing.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T17:46:06.211138Z ac952e6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: c7f58509-10e9-403b-a016-03797c934d34

📥 Commits

Reviewing files that changed from the base of the PR and between 9a1b3ad and ac952e6.

📒 Files selected for processing (1)
  • tests/agent-skill.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The package-import test now matches the JSON code-fence opener when it is followed by LF or CRLF.

Changes

Skill-file package import test

Layer / File(s) Summary
Update the example matcher
tests/agent-skill.test.ts
The example matcher accepts LF and CRLF after the JSON code-fence opener. A comment notes that Windows checkouts may use CRLF.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to ac952

This test-only change supports both LF and CRLF checkouts while retaining the existing package-import assertions. No merge-blocking risk remains.

Architecture Summary

Architecture risk: 🔵 Low · up to ac952

The change affects 1 system.

Changed systems: tests

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — tests (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in tests/agent-skill.test.ts: The test’s example matcher now accepts \r\n or \n after the JSON code-fence opener; the added comment identifies CRLF as a Windows-checkout case.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the test change that adds support for reading the agent skill example on CRLF checkouts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

A rabbit checks the fence with care
For LF or CRLF waiting there
The JSON lines now match just right
Through Windows paths and newline flight
One test hops onward, neat and bright

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

@chhoumann
chhoumann merged commit 3b9550d into master Oct 2, 2026
20 checks passed
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