Skip to content

fix(ci): quote fresh merge base ref - #112

Merged
konard merged 5 commits into
mainfrom
issue-111-8b292fa789f3
Jul 21, 2026
Merged

fix(ci): quote fresh merge base ref#112
konard merged 5 commits into
mainfrom
issue-111-8b292fa789f3

Conversation

@konard

@konard konard commented Jul 21, 2026

Copy link
Copy Markdown
Member

Fixes #111

Problem

scripts/simulate-fresh-merge.sh passed BASE_REF unquoted to both git rev-list and git merge. Shell word splitting could therefore change the intended revision argument and prevent the fresh-merge conflict check from operating on the requested base ref.

Solution

  • Quote HEAD..origin/$BASE_REF in the behind-count command.
  • Quote origin/$BASE_REF in the simulated merge command.
  • Add a focused regression test that requires both safe forms and rejects the previous unquoted forms.
  • Add the required patch changeset.

Reproduction / tests

The new test fails against the previous script because neither quoted command is present, then passes with this change.

Local verification:

  • node --test --test-timeout=30000 tests/simulate-fresh-merge.test.js
  • bash -n scripts/simulate-fresh-merge.sh
  • node scripts/check-changesets.mjs
  • npm run lint
  • npm run format:check
  • npm run check:duplication
  • npm test — 182 tests passed

The branch includes the latest origin/main, and the working tree is clean.

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #111
@konard konard self-assigned this Jul 21, 2026
@konard konard changed the title [WIP] simulate-fresh-merge.sh: unquoted $BASE_REF on lines 40 and 50 can silently skip the merge-conflict check fix(ci): quote fresh merge base ref Jul 21, 2026
@konard
konard marked this pull request as ready for review July 21, 2026 06:27
@konard

konard commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

Working session summary

Implemented and finalized PR #112.

  • Quoted both unsafe $BASE_REF expansions.
  • Added a regression test and patch changeset.
  • All 182 local tests pass; lint, formatting, duplication, syntax, and changeset checks pass.
  • Fresh CI succeeded on commit ea737e0.
  • PR is mergeable, ready for review, and the working tree is clean.

This summary was automatically extracted from the AI working session output.

@konard

konard commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.6 Sol
  • Provider: OpenAI
  • Public pricing estimate: $3.005102

📊 Context and tokens usage:

  • 104.7K / 200K (52%) input tokens, 8.3K / 128K (6%) output tokens

Total: (104.7K + 1.6M cached) input tokens, 8.3K output tokens, $3.005102 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.6-sol
  • Thinking level: off (disabled)
  • Model: GPT-5.6 Sol (gpt-5.6-sol)

📎 Log file uploaded as Gist (1261KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
konard merged commit d826156 into main Jul 21, 2026
14 checks passed
@konard

konard commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

🎉 Auto-merged

This pull request has been automatically merged by hive-mind.

  • All CI checks have passed

Auto-merged by hive-mind with --auto-merge flag

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.

simulate-fresh-merge.sh: unquoted $BASE_REF on lines 40 and 50 can silently skip the merge-conflict check

1 participant