Skip to content

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

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#57
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 CI step that runs `./node_modules/.bin/pm health --strict-exit`
immediately after `npm ci`.

When two agents edit the same scalar field of one pm item on two branches,
the field-aware merge driver picks a winner and records the loser in a
clone-local receipt. The merged `.toon` has no conflict markers and is valid
TOON already holding the winning value, yet git still marks the path `UU`.
The standard resolution idiom (`git add` the marker-free file, then commit)
then succeeds and the peer agent's edit is gone, with no trace in any pushed
artifact.

`pm validate` returns ok:true on that result because the file really is valid
TOON, so it cannot gate this. Only `pm health` goes red, via
integrity.counts.pending_merge_decisions, naming the affected items in
integrity.details.pending_merge_decision_items. `--strict-exit` is
load-bearing: a bare `pm health` exits 0 even when ok:false. A fresh runner
checkout has no merge drivers installed, which is a warn rather than a
failure, so the step does not need `pm merge install`.

@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: 62c36414-2281-4641-992b-0f05456e6d40

📥 Commits

Reviewing files that changed from the base of the PR and between ecd261a and db6c583.

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

Summary by CodeRabbit

  • New Features

    • Added automated project health checks to the CI workflow after dependency installation.
    • CI now fails when health checks detect project-integrity or merge-safety issues.
    • Missing merge-driver installation warnings are tolerated without masking other health-check failures.
    • Added merge handling for project-management files to improve consistency during collaborative changes.
  • Documentation

    • Documented the new CI health gate and its known limitations in the changelog.

Walkthrough

The CI workflow now runs pm health --strict-exit after dependency installation. Supporting records document the chore, acceptance criteria, verification, closure, merge handling, release note, and PM tooling updates.

Changes

CI health gate

Layer / File(s) Summary
Add and record the CI health gate
.github/workflows/ci.yml, .agents/pm/chores/pm-linear-9848.toon, .agents/pm/history/pm-linear-9848.jsonl, package.json
The CI job runs pm health --strict-exit after npm ci. The workflow fails on reported health issues and documents fresh-clone merge-receipt limitations. PM records document implementation, verification, reconciliation, and closure. Development dependencies use the 2026.8.6 PM tooling versions.
Configure PM merging and release documentation
.gitattributes, CHANGELOG.md
Merge-driver rules cover PM metadata files and managed extensions. The changelog records the strict tracked-health CI gate.

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

Possibly related issues

  • unbraind/pm-cli#921: The PR adds the strict health gate and documents the fresh-clone merge-receipt limitation.
  • unbraind/pm-cli#922: The PR documents the clone-local merge-receipt limitation associated with the strict health check.

Possibly related PRs

🚥 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 refresh, documented limitations, reconciliation work, and verification commands.
Title check ✅ Passed The title clearly and concisely describes the main change: gating CI on durable PM tracker health with the specified PM version.
✨ 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 (collapsed on small PRs)

Reviewer's Guide

Adds a CI gate that runs pm health --strict-exit after dependency installation to fail builds when there are pending merge decisions that would otherwise silently drop peer edits, and records the associated pm-linear tracking item artifacts in the repo.

Sequence diagram for new CI pm health integrity gate

sequenceDiagram
    participant GitHubActions as GitHubActions_runner
    participant NPM as npm_ci
    participant PM as pm_cli

    GitHubActions->>NPM: npm ci
    NPM-->>GitHubActions: dependencies_installed

    GitHubActions->>PM: pm health --strict-exit
    PM-->>GitHubActions: integrity.counts.pending_merge_decisions

    alt [no pending_merge_decisions]
        PM-->>GitHubActions: exit 0
        GitHubActions-->>GitHubActions: continue_to_typecheck
    else [pending_merge_decisions present]
        PM-->>GitHubActions: exit 1
        GitHubActions-->>GitHubActions: fail_workflow
    end
Loading

File-Level Changes

Change Details Files
Add a CI step to run pm health with strict exit behavior to catch pending merge decisions that pm validate would miss.
  • Insert a bash step after dependency installation in the GitHub Actions workflow to execute ./node_modules/.bin/pm health --strict-exit.
  • Document via comments why pm validate is insufficient, why --strict-exit is required, and why merge driver installation is not needed on CI runners.
.github/workflows/ci.yml
Check in pm tracking artifacts for the pm-linear-9848 chore associated with enabling the new health gate.
  • Add a pm chore TOON file documenting the tracking item for this change.
  • Add a corresponding pm history JSONL entry for the pm-linear-9848 tracking item.
.agents/pm/chores/pm-linear-9848.toon
.agents/pm/history/pm-linear-9848.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 gate for durable, checkout-visible PM tracker failures while explicitly documenting that fresh CI clones cannot inspect clone-local merge receipts.

  • Runs pm health --strict-exit immediately after dependency installation.
  • Updates PM CLI and changelog tooling to 2026.8.6 with refreshed lockfile state.
  • Records the corrected attestation boundary in the canonical PM item and regenerated changelog.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
.github/workflows/ci.yml Adds the strict tracked-health gate and accurately limits its stated guarantee to evidence available in a fresh checkout.
package.json Updates PM development tooling to 2026.8.6 while retaining the repository's existing dependency-range convention.
package-lock.json Pins the updated PM tools and their transitive dependencies for the npm-ci-based workflows.
.agents/pm/chores/pm-linear-9848.toon Documents the gate, its durable-health scope, and the distinct upstream gaps around repair bypass and fresh-clone evidence.
.agents/pm/history/pm-linear-9848.jsonl Preserves the correction, reconciliation evidence, verification notes, and final canonical item state.
CHANGELOG.md Adds the generated unreleased entry after closure of the corresponding PM item.

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.
@unbraind unbraind changed the title Gate CI on pm health to block silently discarded peer edits 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 5 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 ecd261a8cda8911a37a7c7a926400720fe768d5f 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 the current PR state at ecd261a8cda8911a37a7c7a926400720fe768d5f. I will check the CI health-gate description, --strict-exit behavior, and clone-local or gitignored evidence patterns.

⚠️ 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: 2

🤖 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-linear-9848.toon:
- Around line 28-30: Update the health-check command in the project-scoped chore
configuration to invoke the locked local PM CLI binary from node_modules/.bin
instead of the bare pm command, while preserving the existing --health,
--strict-exit, and timeout settings.
- Line 3: Align the upstream issue references for the CI gate across
.agents/pm/chores/pm-linear-9848.toon lines 3, 16, and 32-33,
.github/workflows/ci.yml lines 51-52, and
.agents/pm/history/pm-linear-9848.jsonl lines 3-4: determine whether pm-cli#921
and pm-cli#922 are both applicable, then consistently retain both references or
update every affected site to the single canonical issue. No site is exempt from
synchronization.
🪄 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: 51b364e1-2649-487e-a8c7-0cedb623afee

📥 Commits

Reviewing files that changed from the base of the PR and between f9080ac and ecd261a.

⛔ 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-linear-9848.toon
  • .agents/pm/history/pm-linear-9848.jsonl
  • .gitattributes
  • .github/workflows/ci.yml
  • CHANGELOG.md
  • package.json

Comment thread .agents/pm/chores/pm-linear-9848.toon Outdated
Comment thread .agents/pm/chores/pm-linear-9848.toon
@unbraind

unbraind commented Aug 6, 2026

Copy link
Copy Markdown
Owner Author

Exact-head disposition for db6c58328708bb7ec497f55606698755e774b9ca:

  • 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 15 seconds before sending another message.

@unbraind
unbraind merged commit 729b58d into main Aug 6, 2026
8 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