Conversation
Agent-Logs-Url: https://github.com/rockcarver/frodo-cli/sessions/b6757a0d-dff7-4f92-a696-e8ddfcfc9c9a Co-authored-by: vscheuber <28791378+vscheuber@users.noreply.github.com>
Agent-Logs-Url: https://github.com/rockcarver/frodo-cli/sessions/b6757a0d-dff7-4f92-a696-e8ddfcfc9c9a Co-authored-by: vscheuber <28791378+vscheuber@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR moves the integration batching merge/conflict-handling logic out of the workflow YAML and into a dedicated script, with the goal of automatically resolving known-safe conflicts (union merges for stub-command files and targeted Jest snapshot refreshes) while keeping automation files out of published artifacts.
Changes:
- Replaced inlined merge logic in the integration-batch workflow with
.github/integration/scripts/merge_prs.sh, which outputs a JSON summary consumed by later steps. - Added auto-generated union allowlist support with repo-managed override files under
.github/integration/. - Expanded workflow PR body + job summary reporting to include auto-resolved conflict and snapshot-update details.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
docs/INTEGRATION.md |
Updates docs to describe the new union/snapshot conflict recovery behavior. |
.github/workflows/integration-batch.yml |
Calls the new merge script and surfaces its JSON results in PR text and step summary. |
.github/integration/union-blocklist.txt |
Adds repo-managed blocklist for union allowlist generation. |
.github/integration/union-allowlist-extra.txt |
Adds repo-managed allowlist additions for union allowlist generation. |
.github/integration/scripts/merge_prs.sh |
Implements scripted merging, allowlist generation, union/snapshot conflict handling, and JSON summary output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| while IFS= read -r pattern; do | ||
| [ -n "$pattern" ] || continue | ||
| npm run test:update "$pattern" |
There was a problem hiding this comment.
npm run test:update "$pattern" may not reliably forward $pattern to Jest (npm generally requires -- to pass args through). Use npm run test:update -- "$pattern" so the derived pattern is definitely treated as a Jest testPathPattern argument.
| npm run test:update "$pattern" | |
| npm run test:update -- "$pattern" |
There was a problem hiding this comment.
Yes. I agree, and this is already updated in ed1f6bb to npm run test:update -- "$pattern". No UI changes in this PR (workflow/script-only), so no UI screenshot applies.
Agent-Logs-Url: https://github.com/rockcarver/frodo-cli/sessions/6c18d667-cd05-4469-9cad-ac46e0cead23 Co-authored-by: vscheuber <28791378+vscheuber@users.noreply.github.com>
Integration batching was regularly stalling on deterministic merge conflicts in stub-command files and snapshot files. This change moves merge logic into a dedicated script that auto-resolves known-safe conflicts and performs targeted Jest snapshot refreshes, while keeping packaging clean by placing helpers under
.github/integration/.Scripted merge engine for integration batching
.github/integration/scripts/merge_prs.shand replaced inlined merge logic inintegration-batch.yml.integration, and emits a single-line JSON summary consumed by workflow steps.Dynamic union allowlist (with repo-managed overrides)
src/cli/**:const program = new FrodoStubCommand(const program = new FrodoCommand(.github/integration/union-allowlist-extra.txt.github/integration/union-blocklist.txt.git/info/attributes(non-committed).Automated conflict handling paths
*.snap/__snapshots__, optionallypackage-lock.json): completes merge, derives targeted test patterns from snapshot filenames, runsnpm run test:update <pattern>per deduped pattern, and commits updated snapshots for integration PR review.Workflow output + reviewer visibility
Packaging/publishing safety
.github/integration/...; nopkgconfig changes were required.Example pattern derivation used for targeted snapshot updates:
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/rockcarver/frodo-cli/releases/opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node --no-warnings --enable-source-maps --experimental-loader file:///home/REDACTED/work/frodo-cli/frodo-cli/dist/loader.cjs /home/REDACTED/work/frodo-cli/frodo-cli/dist/app.cjs shell modules/@npmcli/run-script/lib/node-gyp-bin/ldd(http block)/opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node --no-warnings --enable-source-maps --experimental-loader file:///home/REDACTED/work/frodo-cli/frodo-cli/dist/loader.cjs /home/REDACTED/work/frodo-cli/frodo-cli/dist/app.cjs shell odules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node(http block)/opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node --no-warnings --enable-source-maps --experimental-loader file:///home/REDACTED/work/frodo-cli/frodo-cli/dist/loader.cjs /home/REDACTED/work/frodo-cli/frodo-cli/dist/app.cjs shell(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Implement scripted conflict resolution + targeted snapshot update for integration batching in
rockcarver/frodo-cli, ensuring packaging/publishing does not include new script files.Background:
npm run test:update [TestPathPattern]and we should run only relevant test patterns derived from conflicted snapshot filenames (e.g.,admin-list-oauth2-clients-with-admin-privileges.e2e.test.js.snap->admin-list-oauth2-clients-with-admin-privileges)..npmignorealready ignores.github/, andpkgpackaging usescjs/**assets/scripts. Place helper script under.github/integration/scripts/.Requirements:
Add a script under
.github/integration/scripts/merge_prs.shto replace inlined merge logic in.github/workflows/integration-batch.yml.Auto-generate a "union allowlist" each run:
src/cli/**.const program = new FrodoStubCommand(.const program = new FrodoCommand(..github/integration/union-allowlist-extra.txt.github/integration/union-blocklist.txtUnion merge handling:
.git/info/attributes(do not commit gitattributes).Snapshot conflict handling:
**/*.snapor__snapshots__) (optionally pluspackage-lock.json), resolve by completing the merge (choose a side for snapshot files if needed), then run targeted snapshot updates..snapand suffixes like.e2e.test.js,.test.js,.spec.js.npm cionce when needed, then runnpm run test:update <pattern>for each derived pattern (dedupe).Workflow integration:
.github/workflows/integration-batch.ymlto call the new script and use its JSON output to drive labeling/commenting (non-dry-run) and step summary.Packaging/publishing:
.github/integration/...so they are excluded by.npmignore(already ignores.github/).pkgconfig in package.json unless necessary.Deliverable: Create a PR implementing the above changes.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Yes, open a PR with all those changes.
Assistant: I’m not able to open the PR from here at the moment (I don’t currently have access to the repo-writing automation in this chat session).
If you want to unblock immediately, you can make the fix yourself with a tiny commit:
.github/workflows/integration-batch.ymlecho "<key>=$json" >> "$GITHUB_OUTPUT"that writes JSON to instead write compact JSON, e.g.:If you paste the current contents of your
integration-batch.yml(or point me to the exact commit/lines), I’ll mark up the exact diff so you can copy/paste it with high confidence.User: @copilot Accepted Confirmation: Confirm agent session
Assistant: I’ve started a follow-up PR to apply exactly those
jq -c/ single-line JSON output fixes to the integration-batch workflow. You can track it here: