Skip to content

fix(ci): repair merge detection and Rust Docker build#140

Merged
konard merged 5 commits into
mainfrom
issue-139-24bf83def591
Jun 14, 2026
Merged

fix(ci): repair merge detection and Rust Docker build#140
konard merged 5 commits into
mainfrom
issue-139-24bf83def591

Conversation

@konard

@konard konard commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Fixes #139

Summary

  • Makes scripts/detect-code-changes.mjs event-aware: PR synthetic merge commits keep the existing PR-head diff behavior, while real merge commits pushed to main compare first parent to merge commit so the full merged branch is detected.
  • Fixes the Rust Docker build by moving the builder image to rust:1.96-bullseye, satisfying the crate rust-version.
  • Updates workflow policy to current template behavior: release-safe concurrency, actions/checkout@v6, and Rust actions/cache@v5.
  • Moves repository-level CI-policy Jest tests into js/tests/ci/, excludes that directory from JS/Rust product parity matching, and keeps those test/config changes out of the blocking npm changeset gate while still running JS checks.
  • Adds a case study with preserved CI logs, template diffs, root-cause notes, and verification logs under docs/case-studies/issue-139/.
  • Reported the same detector defect upstream in the JS and Rust pipeline templates:

Reproduction

  • Failed Rust run 27504645835 logged Merge commit detected (pull_request event) during a push, emitted any-code-changed=false, then failed Docker build because rustc 1.94.1 did not satisfy rust-version = "1.96".
  • JS run 27504645820 showed the same merge-event misclassification and false code-change outputs, though the release still completed.
  • New Jest coverage reproduces the real merge-push false negative with a branch whose earlier commit changes Rust code and final commit is docs-only.
  • Fresh PR parity run 27511525135 showed repository CI tests under js/tests/unit/ were being counted as JS product tests; the fix keeps those tests in CI while excluding js/tests/ci/ from product parity matching.
  • Fresh JS run 27511646578 then showed the changeset gate counted js/tests/ci/ and js/jest.config.mjs as package code. js-code-changed now tracks publishable JS paths only: js/src/, js/bin/, and js/package.json.

Tests

  • cd js && npm test -- --runTestsByPath tests/ci/detect-code-changes.test.js tests/ci/rust-dockerfile.test.js tests/ci/workflow-policy.test.js
  • cd js && npm run lint passed with 0 errors and existing complexity warnings.
  • cd js && npx prettier --check .
  • GITHUB_BASE_SHA=$(git merge-base origin/main HEAD) GITHUB_HEAD_SHA=HEAD GITHUB_BASE_REF=main node scripts/check-js-rust-parity.mjs
  • GITHUB_EVENT_NAME=push node scripts/detect-code-changes.mjs on the latest CI-test-only commit: js-code-changed=false, any-js-code-changed=true.
  • cd rust && cargo fmt --all -- --check
  • cd rust && cargo clippy --all-targets --all-features -- -D warnings
  • cd rust && cargo test --all-features --verbose
  • cd rust && docker build -t web-capture-rust-issue-139 .

Full local npm test was also attempted and is documented in the case study. It is not a clean local signal in this workspace because Playwright browser binaries are missing and the Docker e2e setup is normally prepared by CI.

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

Issue: #139
@konard konard self-assigned this Jun 14, 2026
@konard konard changed the title [WIP] Check for all false positives and errors in CI/CD and fix them all fix(ci): repair merge detection and Rust Docker build Jun 14, 2026
@konard konard marked this pull request as ready for review June 14, 2026 20:45
@konard

konard commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator Author

Working session summary

Implemented and pushed the fix to issue-139-24bf83def591.

PR 140 is ready: #140

Current head 6295928ecf9750b2c51ddac204df75a8b9c3991a is green:

  • JavaScript Checks and Release: success
  • Rust Checks and Release: success
  • JS/Rust Parity: success

I also confirmed the PR is no longer draft and the working tree is clean. Older failed runs belong to superseded commits and were addressed by the latest push.


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

@konard

konard commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator Author

🤖 Solution Draft Log

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

💰 Cost estimation:

  • Model: GPT-5.5
  • Provider: OpenAI
  • Public pricing estimate: $32.068725

📊 Context and tokens usage:

GPT-5.5: (4 sub-sessions)

  1. ~150K / 200K (75%) input tokens, 14.0K / 128K (11%) output tokens
  2. ~150K / 200K (75%) input tokens, 14.0K / 128K (11%) output tokens
  3. ~150K / 200K (75%) input tokens, 14.0K / 128K (11%) output tokens
  4. ~383.9K / 200K (192%) input tokens, 35.8K / 128K (28%) output tokens

Sub-session values are estimates from observed compact events; the Total line remains exact.

Total: (833.9K + 20.2M cached) input tokens, 77.7K output tokens, $32.068725 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Model: GPT-5.5 (gpt-5.5)

📎 Log file uploaded as Repository (2 chunks) (124336KB)


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

@konard

konard commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator 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

@konard konard merged commit 369a91a into main Jun 14, 2026
18 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.

Check for all false positives and errors in CI/CD and fix them all

1 participant