You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(coord): tighten path-claims/dispatcher + bench harness + CI integration (#143)
## Summary
Post-merge cleanup on top of #142. Three commits, all on top of the
squash-merged #142 content:
1. **`6f861a1` — refactor.** Tighten `path-claims.js` (cache
segment-splits, single-regex `//` normalise, extract `DEFAULT_TTL_S`);
split `dispatcher.dispatchLocalCoord` into explicit
`pathClaimsBefore`/`pathClaimsAfter` hooks; DRY the shell helpers
(`_coord_claim_quiet` shared between `coord-claim` and
`coord-worktree`). Adds a `PR Workflow` section to `.claude/CLAUDE.md`
documenting the squash-merge + follow-up-commit hazard that produced
#142's ghost-conflict.
2. **`9bb7df5` — bench.** `mcp-bridge/tests/path_claims_bench.js` +
`just bench-bridge` recipe. Reference numbers on dev host: 240k ops/s at
10 active claims, 3.9k ops/s at 1000 claims, `pathsOverlap` ~170 ns/op.
3. **`f1e646a` — CI.** New `bench-bridge` job in `e2e.yml`: runs the
bench, uploads artifact, posts a **sticky** PR comment (marker-tag
find-or-update) so bench deltas show up inline across pushes. Per-job
`pull-requests: write` override keeps workflow-level perms at
`read-all`. Comment failure is non-fatal (`continue-on-error`) — token
hiccups never gate the bench.
## Behavioural changes
None. All 26 bridge tests stay green. Backend (Idris2/Zig) untouched.
## Test plan
- [x] `node --test mcp-bridge/tests/dispatch_test.js
mcp-bridge/tests/path_claims_test.js` → 26/26 pass locally
- [x] `node mcp-bridge/tests/path_claims_bench.js` → completes in ~3s,
stable output
- [x] `python3 -c "import yaml;
yaml.safe_load(open('.github/workflows/e2e.yml'))"` → valid YAML
- [ ] First PR push triggers `bench-bridge` job; sticky comment appears
with numbers
- [ ] Second push to same PR updates the sticky comment in place (no
spam)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---
_Generated by [Claude
Code](https://claude.ai/code/session_018MBrAtPrwfgn2WG4BAerZW)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
This repo squash-merges PRs. Two consequences worth knowing before pushing follow-ups:
36
+
37
+
-**Don't pile follow-up commits onto a branch whose PR is in review.** When the PR is squash-merged, `main` gets a new commit with a new SHA. Any commits you pushed after the PR was opened are still on the feature branch, on top of a base that no longer matches `main`. GitHub will then mark the PR as `mergeable_state: "blocked"` and any rebase will produce ghost-conflicts — the conflicting hunks are the *same content*, but git can't tell because the SHAs differ. If you have follow-up work, open it as a new PR off the current `main`.
38
+
-**After a squash-merge, delete the feature branch.** It contains pre-squash commits with stale SHAs; reusing it for new work re-creates the ghost-conflict problem. `git checkout main && git pull && git branch -D <branch> && git push origin --delete <branch>`.
39
+
40
+
Diagnostic: if a PR shows `blocked` and `git diff origin/main HEAD` is empty, the PR's content is already on main via squash-merge — close the PR rather than trying to merge it.
0 commit comments