Skip to content

Import pelikhan/rig into githubnext/rig and harden JSON fallback parsing#1

Merged
pelikhan merged 4 commits into
mainfrom
copilot/clone-github-repo
Jun 10, 2026
Merged

Import pelikhan/rig into githubnext/rig and harden JSON fallback parsing#1
pelikhan merged 4 commits into
mainfrom
copilot/clone-github-repo

Conversation

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

This replaces the placeholder scaffold in githubnext/rig with the current pelikhan/rig codebase so the repository contains the actual TypeScript package, skill implementation, samples, docs, and test suite. While validating the import, it also removes regex-based JSON fallback parsing that triggered CodeQL ReDoS findings.

  • Repository import

    • Bring over the published rig package layout: runtime, addons, samples, scripts, docs, workflows, and package metadata
    • Replace the README-only placeholder state with the source project structure expected by the package
  • Parser hardening

    • Replace regex-based fallback extraction for fenced JSON and embedded JSON objects in skills/rig/rig.ts
    • Use bounded, linear parsing helpers instead of backtracking patterns flagged by CodeQL
  • Coverage

    • Add focused parser tests for:
      • JSON returned inside fenced markdown blocks
      • JSON objects embedded inside surrounding prose
mocks.setSendAndWaitImpl(async () => "```json\n\"hello\"\n```");

const reviewer = agent({ name: "reviewer" });

await expect(reviewer("go")).resolves.toBe("hello");
Original prompt

Clone the code from https://github.com/pelikhan/rig

Copilot AI changed the title [WIP] Clone code from GitHub repository Import pelikhan/rig into githubnext/rig and harden JSON fallback parsing Jun 10, 2026
Copilot AI requested a review from pelikhan June 10, 2026 19:56
Comment thread LICENSE
@@ -1,21 +0,0 @@
MIT License

Copyright (c) 2026 GitHub Next

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot restore license file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in e68a89e.

Copilot AI requested a review from pelikhan June 10, 2026 22:22
@pelikhan pelikhan marked this pull request as ready for review June 10, 2026 22:22
@pelikhan pelikhan merged commit 80081cf into main Jun 10, 2026
4 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.

2 participants