Skip to content

Gate CI on durable PM tracker health with pm 2026.8.6 - #29

Merged
unbraind merged 6 commits into
mainfrom
ci-merge-safety-gate
Aug 6, 2026
Merged

Gate CI on durable PM tracker health with pm 2026.8.6#29
unbraind merged 6 commits into
mainfrom
ci-merge-safety-gate

Conversation

@unbraind

@unbraind unbraind commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Outcome

  • Runs pm health --strict-exit in CI for durable, checkout-visible tracker failures.
  • States the boundary explicitly: clone-local merge receipts are not a lossless CI attestation; pm-cli #921 and #922 track the missing durable proof.
  • Refreshes npm lockfiles so the gate executes with @unbrained/pm-cli 2026.8.6 and pm-changelog 2026.8.6.
  • Reconciles the concurrent correction through pm merge reconcile, preserves both agents' notes, refreshes the 2026.8.6 merge fence, and regenerates the package-owned changelog.

PM evidence

Verification

  • npm ci --ignore-scripts
  • npm run release:check
  • pm health --strict-exit
  • npm run changelog:check
  • current tracked files and source history scanned for credential-shaped material

Add a 'Verify pm project integrity and merge safety' step to ci.yml
immediately after Install dependencies. It runs
./node_modules/.bin/pm health --strict-exit.

This closes a hole in multi-agent branch merging: when two agents edit the
same scalar field of one item on two branches, the field-aware merge driver
picks a winner and records the loser in a clone-local receipt. The resulting
.toon has no conflict markers and already holds the winning value, so the
naive resolution idiom (git add the marker-free file, commit) succeeds and
the peer edit is gone with no trace in any pushed artifact.

pm validate returns ok:true on that corrupted result because the file is
valid TOON. Only pm health goes red, via integrity.counts.pending_merge_decisions,
naming the affected items in pending_merge_decision_items. --strict-exit is
load-bearing because a bare pm health exits 0 even when ok:false.

Verified green on this repo and proven to exit 1 on the hazard in a
throwaway copy.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @unbraind, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@unbraind, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 568c8727-1d86-4369-9ac0-884d41c6a384

📥 Commits

Reviewing files that changed from the base of the PR and between d3cd9cb and a590780.

📒 Files selected for processing (3)
  • .agents/pm/chores/pm-github-eh1h.toon
  • .agents/pm/history/pm-github-eh1h.jsonl
  • .github/workflows/ci.yml

Summary by CodeRabbit

  • Bug Fixes

    • CI now performs strict project health checks immediately after installing dependencies.
    • Builds fail when tracked-state integrity issues are detected, helping prevent inconsistent changes from passing validation.
    • Merge configuration is handled more reliably, with missing setup reported as a warning instead of an unexpected failure.
  • Documentation

    • Added an unreleased changelog entry describing the new CI integrity gating.
  • Chores

    • Updated project maintenance tooling to improve health-check validation.

Walkthrough

The CI workflow runs pm health --strict-exit after dependency installation. CI fails when strict health findings occur. PM metadata, history, changelog, merge attributes, and development dependency versions document and support the gate.

Changes

CI integrity gate

Layer / File(s) Summary
Update PM tooling and merge configuration
.gitattributes, package.json
Development PM tooling versions are updated. Extension merge behavior uses no merge driver by default, with .managed-extensions.json assigned to pm-json.
Add and record the CI integrity gate
.github/workflows/ci.yml, .agents/pm/chores/pm-github-eh1h.toon, .agents/pm/history/pm-github-eh1h.jsonl, CHANGELOG.md
The workflow runs strict pm health after npm ci. PM records and the changelog document the gate, verification, and clone-local merge-receipt limitation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CI
  participant npm
  participant PMHealth
  participant TrackedState
  CI->>npm: Install dependencies with npm ci
  CI->>PMHealth: Run pm health --strict-exit
  PMHealth->>TrackedState: Check tracked PM project health
  PMHealth-->>CI: Return success or failure
Loading

Possibly related issues

Possibly related PRs

  • unbraind/pm-github#5: Its PM metadata and merge-driver changes relate directly to this PR’s merge configuration and health gate.
  • unbraind/pm-github#23: Both PRs update the @unbrained/pm-cli dependency in package.json.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description clearly explains the CI health gate, dependency updates, limitations, reconciliation, and verification steps.
Title check ✅ Passed The title clearly and concisely identifies the main change: gating CI on durable PM tracker health with version 2026.8.6.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci-merge-safety-gate

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds a CI gate that runs pm health --strict-exit to fail builds when there are unresolved pm merge decisions, plus documents the change in the changelog and records a corresponding pm chore/history entry.

File-Level Changes

Change Details Files
Add a CI step to verify pm project integrity and merge safety using pm health --strict-exit.
  • Insert a new GitHub Actions step after dependency installation to run pm health --strict-exit using bash with set -euo pipefail.
  • Document in comments why pm validate is not used and why --strict-exit is required for pm health to fail on integrity issues.
  • Clarify that missing merge drivers on fresh runners only produce warnings and do not require pm merge install for this gate.
.github/workflows/ci.yml
Document the new CI gate and track it in pm chore/history artifacts.
  • Add an Unreleased section to the changelog describing the new CI gate and linking to the pm chore item.
  • Introduce a new pm chore TOON file representing this change.
  • Add a matching pm history JSONL entry to record the chore in pm's history.
CHANGELOG.md
.agents/pm/chores/pm-github-eh1h.toon
.agents/pm/history/pm-github-eh1h.jsonl

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@greptile-apps

greptile-apps Bot commented Aug 6, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds a strict CI health gate for durable, checkout-visible PM tracker failures while explicitly documenting that clone-local merge receipts cannot provide lossless CI attestation.

  • Runs pm health --strict-exit after dependency installation.
  • Updates PM tooling and lockfile resolutions to 2026.8.6.
  • Records the corrected gate boundary in the PM tracker and changelog.
  • Adds merge attributes for managed PM extensions.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported fresh-checkout receipt limitation is now explicitly and consistently documented.

Important Files Changed

Filename Overview
.github/workflows/ci.yml Adds the strict PM health check and accurately limits its stated guarantees to checkout-visible state.
.agents/pm/chores/pm-github-eh1h.toon Records the CI change, verification, and the distinction between durable health checks and clone-local merge evidence.
.agents/pm/history/pm-github-eh1h.jsonl Preserves the tracker history, reconciliation evidence, and corrections to the original attribution and capability claims.
package.json Updates the PM CLI and changelog development dependencies to 2026.8.6.
package-lock.json Locks the updated PM tooling and its transitive dependencies.
.gitattributes Adds merge handling for PM extension metadata and disables generic merging for other extension content.
CHANGELOG.md Documents the new strict tracked-state health gate without claiming lossless merge detection.

Reviews (6): Last reviewed commit: "docs(ci): resolve exact-head health-gate..." | Re-trigger Greptile

Comment thread .github/workflows/ci.yml
The step and its tracker item both said this gate blocks a merge that silently
discarded a peer agent's edit. Verified today that it does not, and cannot as built:
merge-decision receipts live in .agents/pm/runtime/, which pm init gitignores, so they
are never pushed. On the same commit, the merge-performing clone reports one receipt and
exits 1, while a fresh clone - which is what CI checks out - reports zero and exits 0.

The pushed history does not disambiguate it either. Both writes are present in timestamp
order and the item matches the latest, so history verification reports ok. Filed upstream
as unbraind/pm-cli#922; flagged first by Greptile on every PR in this rollout.

The step is kept, because what it does catch is real and CI-observable: conflict markers
in item and history files, parse failures, invalid history JSON, hash drift,
unknown-author events, stale in-progress work and tracked runtime cache files. Only the
overstated claim is removed. A gate whose documentation promises more than it delivers is
worse than no gate, because it stops people looking for the hazard it does not cover.
Comment thread .github/workflows/ci.yml Outdated
@unbraind unbraind changed the title Gate CI on pm health so a silently discarded peer edit cannot merge Gate CI on pm health for tracker integrity Aug 6, 2026
@unbraind

unbraind commented Aug 6, 2026

Copy link
Copy Markdown
Owner Author

Correction pushed — re-review please.

@coderabbitai full review
@greptileai

Greptile's P1 was correct and is the reason for this push. The gate does not detect a
silently discarded peer edit, and cannot as built: merge-decision receipts live in the
gitignored .agents/pm/runtime/, so a fresh CI checkout has none. Verified on the same
commit — merge clone exits 1, fresh clone exits 0. Filed upstream as
pm-cli#922.

What changed: the overstated claim was removed everywhere it appeared — the step name
(now "Verify pm tracker integrity"), its comment, the tracker item, and this PR's title
and body. The step itself is kept for what it genuinely catches in a fresh checkout.

What is worth checking this round:

  • Does the new comment now describe the gate accurately, without under- or
    over-claiming? It deliberately spells out what the step does not cover; if any part of
    that reads as still too confident, say so.
  • Is --strict-exit genuinely sufficient to make the step fail on the conditions listed,
    or is there a health condition that reports warn without flipping ok and therefore
    passes silently?
  • Anything else in this repo where a check's evidence lives in gitignored or clone-local
    state — that is the general pattern behind the P1 and it would be valuable to know if it
    appears elsewhere.

GitHub Actions is under a critical outage, so the checks here are absent for external
reasons; pm health --strict-exit and the full release:check were run locally.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

@unbraind have exceeded the limit for the number of chat messages per hour. Please wait 17 minutes and 7 seconds before sending another message.

@unbraind unbraind changed the title Gate CI on pm health for tracker integrity Gate CI on durable PM tracker health with pm 2026.8.6 Aug 6, 2026
@unbraind

unbraind commented Aug 6, 2026

Copy link
Copy Markdown
Owner Author

Fresh exact-head review requested for d3cd9cb5215712686858b0e9caba952b6b97f3bf after reconciling the concurrent correction, updating to pm CLI/SDK 2026.8.6, and rerunning package gates.

@greptileai
/gemini review
@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

@unbraind: I will perform a full review of PR #29 at commit d3cd9cb5215712686858b0e9caba952b6b97f3bf.

⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 58 minutes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/pm/chores/pm-github-eh1h.toon:
- Around line 21-24: Update the metadata.files list in this chore to include
.github/workflows/ci.yml and CHANGELOG.md alongside the existing paths,
preserving the current path/scope structure so the tracker traces the CI gate
implementation and documentation.
- Line 3: The clone-local merge-receipt references in the chore metadata point
to the wrong upstream issue. Update the description, actual_result,
close_reason, and docs link, including the corresponding entries 16, 32, and 33,
to reference pm-cli#922 for clone-local receipt coverage; reserve pm-cli#921 for
the broader fresh-clone/history-repair signal gap.

In @.agents/pm/history/pm-github-eh1h.jsonl:
- Line 9: Update the merge_reconcile patch in the history event so it also
replaces /metadata/updated_at with the final event timestamp,
2026-08-06T22:22:02.721Z. Keep the existing notes and title mutations unchanged,
ensuring the chore metadata freshness matches the final recorded mutation.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 63d75edc-1d56-4413-90dc-bf647f9cd183

📥 Commits

Reviewing files that changed from the base of the PR and between d00956b and d3cd9cb.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • .agents/pm/chores/pm-github-eh1h.toon
  • .agents/pm/history/pm-github-eh1h.jsonl
  • .gitattributes
  • .github/workflows/ci.yml
  • CHANGELOG.md
  • package.json

Comment thread .agents/pm/chores/pm-github-eh1h.toon Outdated
Comment thread .agents/pm/chores/pm-github-eh1h.toon Outdated
Comment thread .agents/pm/history/pm-github-eh1h.jsonl
@unbraind

unbraind commented Aug 6, 2026

Copy link
Copy Markdown
Owner Author

Exact-head disposition for a590780c101cd63d0bcbd863ba86aec41dd2a407:

  • accepted and fixed the attribution overclaim;
  • added stale in-progress work to the documented failing conditions;
  • linked the workflow and changelog on the canonical PM item;
  • distinguished pm-cli #921 (repair bypass) from #922 (directly green fresh-clone shape);
  • reran pm health --strict-exit and changelog:check (plus pm-vcs self-host verification where applicable).

Every inline bot finding has been reacted to and answered in-thread. CodeRabbit rate-limit messages are recorded as review limitations, not approvals.

@greptileai
/gemini review
@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Rate Limit Exceeded

@unbraind have exceeded the limit for the number of chat messages per hour. Please wait 13 minutes and 33 seconds before sending another message.

@unbraind
unbraind merged commit 4237603 into main Aug 6, 2026
7 checks passed
@unbraind
unbraind deleted the ci-merge-safety-gate branch August 6, 2026 23:58
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.

1 participant