Skip to content

Fix PR base retarget ordering after ancestry changes#2106

Open
konard wants to merge 3 commits into
mainfrom
issue-2099-f1b146a65aa9
Open

Fix PR base retarget ordering after ancestry changes#2106
konard wants to merge 3 commits into
mainfrom
issue-2099-f1b146a65aa9

Conversation

@konard

@konard konard commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Reconstruct the complete archcore-ai/plugin#24 solver run from authenticated logs, issue/PR timelines, all GitHub comment channels, and the fork CI record.
  • Fix the identified Hive Mind defect by requiring agents to push new base ancestry and verify the remote head SHA before changing an existing pull request's base.
  • Apply the invariant to all six prompt backends and all four localized prompt catalogs.
  • Add a regression test plus a patch changeset.
  • Preserve the full analysis and losslessly compressed 21,963-line run log under docs/case-studies/issue-2099/.

Root cause

The agent merged the unrelated dev history locally, then ran gh pr edit 26 --base dev before pushing that merge. GitHub therefore compared the still-remote main-rooted placeholder head against unrelated dev and closed/stranded PR 26. The replacement PR 27 was valid, but its workflow stopped at the expected public-fork approval gate with zero jobs; no tests failed.

Reproduction and regression

The archived timeline records:

  1. placeholder PR 26 created from main;
  2. dev merged only into the local feature branch;
  3. PR base changed before the merged head was pushed;
  4. PR 26 closed against its stale remote head;
  5. replacement PR 27 created after the implementation was pushed.

tests/test-pr-base-retarget-order-2099.mjs builds every supported agent prompt and verifies the required ordering: push ancestry, verify the remote head SHA, then retarget.

Verification

  • node tests/test-pr-base-retarget-order-2099.mjs
  • npm run format:check
  • npm run lint
  • npm run check:duplication
  • bash scripts/check-mjs-syntax.sh
  • bash scripts/check-file-line-limits.sh
  • npx -y node@24 scripts/run-tests.mjs --suite default — all 350 selected test files passed
  • npx -y node@24 scripts/validate-changeset.mjs

Fixes #2099

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

Issue: #2099
@konard konard self-assigned this Jul 25, 2026
@konard konard changed the title [WIP] Check https://github.com/archcore-ai/plugin/issues/24 for issues (false positives, false negatives, errors, warnings, and fix them all, so Hive Mind will operate next time perfectly) Fix PR base retarget ordering after ancestry changes Jul 25, 2026
@konard
konard marked this pull request as ready for review July 25, 2026 17:59
@konard

konard commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

Working session summary

Implemented and finalized PR #2106.

Key results:

  • Identified the root cause: PR [WIP] Create perfect readme for this project #26 was retargeted to unrelated dev before the merged ancestry was pushed.
  • Added safe retarget-order guidance across all six agent backends and four locales.
  • Added a regression test and patch changeset.
  • Archived the complete investigation, GitHub records, and compressed 21,963-line authenticated log in the case study.
  • All 350 local Node 24 test files passed.
  • Fresh CI run 30168210884 passed against exact head 0e86b248.
  • PR is mergeable, clean, and marked ready for review.
  • Working tree is clean and the branch includes current main.

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

@konard

konard commented Jul 25, 2026

Copy link
Copy Markdown
Contributor 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: $22.386909

📊 Context and tokens usage:

  • 407.0K / 200K (204%) input tokens, 32.4K / 128K (25%) output tokens

Total: (407.0K + 16.9M cached) input tokens, 32.4K output tokens, $22.386909 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.6-sol
  • Thinking level: low (~7999 tokens)
  • Model: GPT 5.6 Sol (gpt-5.6-sol)

📎 Log file uploaded as Gist (7609KB)


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

@konard

konard commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable 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

1 participant