Skip to content

Harden history lock-window reliability and repin release workflow action#68

Merged
unbraind merged 2 commits into
mainfrom
chore/reliability-history-release-pin-lock-window-coverage
May 25, 2026
Merged

Harden history lock-window reliability and repin release workflow action#68
unbraind merged 2 commits into
mainfrom
chore/reliability-history-release-pin-lock-window-coverage

Conversation

@unbraind
Copy link
Copy Markdown
Owner

Summary

  • repin softprops/action-gh-release to the current v3.0.0 commit and align the CI workflow contract assertion to unblock Dependabot/workflow reliability
  • expand in-process runner parity coverage with concurrent run isolation checks and explicit process-global restoration assertions
  • add lock-window conflict regression coverage for history-redact, history-repair, and restore, then record pm evidence updates (including closing pm-xk39) and regenerate CHANGELOG.md

Test plan

  • node scripts/run-tests.mjs test -- tests/integration/ci-workflow-contract.spec.ts
  • node scripts/run-tests.mjs test -- tests/integration/cli.integration.spec.ts tests/unit/package-manifest.spec.ts tests/unit/check-secrets.spec.ts tests/integration/release-automation-contract.spec.ts --reporter=dot
  • node scripts/run-tests.mjs test -- tests/integration/cli-inprocess-runner.integration.spec.ts tests/integration/release-readiness-runtime.spec.ts -t 'keeps subprocess and in-process runner behavior aligned for core flows|keeps concurrent in-process runs isolated and restores globals|keeps Sentry startup lazy for fast CLI commands' --reporter=dot
  • node scripts/run-tests.mjs test -- tests/unit/history-activity-command.spec.ts tests/unit/history-repair-command.spec.ts tests/unit/restore-command.spec.ts --reporter=dot
  • node scripts/release/run-gates.mjs --telemetry-mode required --max-sentry-critical 10 --max-sentry-high 20 --max-telemetry-error-rate 10 --json
  • manual temp-dir flow in isolated PM_PATH/PM_GLOBAL_PATH: init -> create -> update -> append sensitive literal -> history-redact -> tamper -> history-repair -> restore -> install npm:pm-changelog -> validate -> health
  • node scripts/check-secrets.mjs
  • pm health --check-only --brief --json
  • pm validate --check-resolution --check-history-drift --json
  • node scripts/release/sentry-telemetry-gate.mjs --json --telemetry-mode required --max-critical 10 --max-high 20 --max-telemetry-error-rate 10 --max-telemetry-missing-error-rows 0

Refresh the release workflow action pin to the current v3 commit and align CI workflow contract assertions so Dependabot and nightly checks remain stable. Add stronger in-process parity coverage plus explicit history-redact/history-repair/restore lock-window conflict regressions, then record pm evidence updates (including pm-xk39 closure) and regenerate CHANGELOG.md for deterministic pm-changelog checks.
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

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

coderabbitai Bot commented May 25, 2026

Review Change Stack

Warning

Review limit reached

@unbraind, we couldn't start this review because you've used your available PR reviews for now.

Your plan includes 1 review of capacity. Refill in 42 minutes and 48 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

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

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 1c48cb8b-a43c-4acd-bd5a-5e01a8a06def

📥 Commits

Reviewing files that changed from the base of the PR and between 484f2b3 and f4cf8ad.

📒 Files selected for processing (3)
  • .agents/pm/chores/pm-7rlp.toon
  • .agents/pm/history/pm-7rlp.jsonl
  • tests/integration/cli-inprocess-runner.integration.spec.ts
📝 Walkthrough

Walkthrough

The PR adds lock-window conflict detection tests for history operations (redact, repair, restore) and verifies in-process CLI runner concurrent isolation. It updates the release workflow action pin, adds a security changelog entry, and tracks the work via project metadata including issue closure and execution history.

Changes

Reliability, Integration, and Workflow Enhancements

Layer / File(s) Summary
Lock-window conflict detection tests for history operations
tests/unit/history-activity-command.spec.ts, tests/unit/history-repair-command.spec.ts, tests/unit/restore-command.spec.ts
Unit tests verify history-redact, history-repair, and restore commands detect item or history file mutations during lock acquisition and reject with EXIT_CODE.CONFLICT and specific retry messages; history files remain unchanged after failed operations.
In-process CLI runner isolation and global restoration
tests/integration/cli-inprocess-runner.integration.spec.ts
Integration test runs two CLI commands concurrently via in-process runner, sets environment sentinel and custom working directory, and asserts both succeed, include created record, and restore process.cwd() and sentinel environment variable after execution.
Release workflow action pin and contract update
.github/workflows/release.yml, tests/integration/ci-workflow-contract.spec.ts, .agents/pm/chores/pm-7rlp.toon
Softprops/action-gh-release pin is updated to a new commit SHA; integration contract test expectation and tracker evidence list are updated to match the new pin; test execution plan expanded for in-process parity and nightly coverage.
Project metadata and reliability work tracking
.agents/pm/extensions/.managed-extensions.json, .agents/pm/features/pm-rnpb.toon, .agents/pm/history/pm-7rlp.jsonl, .agents/pm/history/pm-rnpb.jsonl, .agents/pm/history/pm-xk39.jsonl, .agents/pm/issues/pm-xk39.toon, CHANGELOG.md
Issue pm-xk39 closed with lock-window conflict regression test coverage and manual redaction/repair/restore flow verification; feature pm-rnpb and chore pm-7rlp updated with cross-item summaries and execution history; CHANGELOG adds audited history-stream redaction security entry.

Sequence Diagram(s)

sequenceDiagram
  participant TestRunner
  participant AcquireLock
  participant ItemFile
  participant HistoryFile
  participant HistoryCommand
  TestRunner->>HistoryCommand: run history operation
  HistoryCommand->>AcquireLock: request lock
  AcquireLock->>ItemFile: mutate (mocked)
  AcquireLock-->>HistoryCommand: lock acquired
  HistoryCommand->>ItemFile: detect mismatch
  HistoryCommand-->>TestRunner: EXIT_CODE.CONFLICT
  TestRunner->>TestRunner: verify no history changes
  TestRunner->>TestRunner: assert specific error message
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • unbraind/pm-cli#44: New lock-window conflict tests exercise history replay/repair behavior introduced in this PR.
  • unbraind/pm-cli#50: CI chore/history evidence and workflow-contract test updates relate to CI runtime dedupe changes from this PR.
  • unbraind/pm-cli#67: In-process CLI runner isolation tests extend the in-process runner foundation established in this PR.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: hardening history lock-window reliability and repinning the release workflow action.
Description check ✅ Passed The description clearly relates to the changeset, detailing the three main objectives and providing a comprehensive test plan with checked items.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request focuses on improving the reliability and integrity of history-related operations. Key changes include adding regression tests for conflict handling during the lock window for the history-redact, history-repair, and restore commands, as well as updating a CI action pin. Feedback suggests improving test hygiene by avoiding direct process.env mutation and enhancing the concurrency tests for the in-process runner to better verify state isolation given the runner's serialized execution model.

const cwdBefore = process.cwd();
const nestedCwd = path.join(context.tempRoot, "nested-cwd");
await mkdir(nestedCwd, { recursive: true });
delete process.env[sentinelEnvKey];
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Mutating process.env directly in a test can lead to side effects for other tests in the same process. While this specific sentinel key is likely unique, it is safer to use vi.stubEnv or save the original value and restore it in a finally block to ensure environment hygiene.

Comment on lines +50 to +56
const [listOpen, fetched] = await Promise.all([
context.runCliInProcess(["list-open", "--json", "--limit", "20"], {
expectJson: true,
cwd: nestedCwd,
}),
context.runCliInProcess(["get", createdId, "--json"], { expectJson: true }),
]);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The test uses Promise.all to verify isolation between 'concurrent' runs. However, as noted in the project evidence (toon comment 37), the in-process runner serializes invocations with a queue lock. This means the commands run sequentially rather than concurrently. While this verifies that state is restored between sequential runs, it doesn't actually test concurrency isolation. To make this test more robust, the second command should explicitly verify that it starts with a clean state (e.g., by checking its own cwd or env if the CLI exposed a command for that).

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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/history/pm-7rlp.jsonl:
- Around line 61-68: You directly edited the agent history record pm-7rlp
(changes authored by codex-reliability-history-agent) under the agents metadata,
but these files must be changed only by the pm workflow; revert the manual edits
to that JSONL entry and re-create the intended metadata update by running the pm
workflow/commands (use the pm tool to claim/patch or files_add operations that
produce the same op entries such as "claim", "files_add", "tests_add",
"comment_add") so the system-of-record operations are recorded by pm rather than
committing direct edits.

In @.agents/pm/history/pm-rnpb.jsonl:
- Line 629: The change directly edits the system-of-record file
.agents/pm/history/pm-rnpb.jsonl (modifying metadata/comments/280 and
metadata/updated_at); undo the manual edits and re-generate this record using
the pm tooling/workflow that owns .agents/pm (do not commit direct edits).
Re-run the pm command or script that updates pm-rnpb.jsonl so it produces the
proper metadata (including the comment entry and updated_at value) and commit
the generated output instead of hand-editing metadata/comments/280 or
metadata/updated_at.
🪄 Autofix (Beta)

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: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: a0071cec-242b-44ed-ba2b-f1a55299852a

📥 Commits

Reviewing files that changed from the base of the PR and between c5538fb and 484f2b3.

📒 Files selected for processing (14)
  • .agents/pm/chores/pm-7rlp.toon
  • .agents/pm/extensions/.managed-extensions.json
  • .agents/pm/features/pm-rnpb.toon
  • .agents/pm/history/pm-7rlp.jsonl
  • .agents/pm/history/pm-rnpb.jsonl
  • .agents/pm/history/pm-xk39.jsonl
  • .agents/pm/issues/pm-xk39.toon
  • .github/workflows/release.yml
  • CHANGELOG.md
  • tests/integration/ci-workflow-contract.spec.ts
  • tests/integration/cli-inprocess-runner.integration.spec.ts
  • tests/unit/history-activity-command.spec.ts
  • tests/unit/history-repair-command.spec.ts
  • tests/unit/restore-command.spec.ts

Comment on lines +61 to +68
{"ts":"2026-05-25T12:14:17.695Z","author":"codex-reliability-history-agent","op":"claim","patch":[{"op":"replace","path":"/metadata/updated_at","value":"2026-05-25T12:14:17.695Z"},{"op":"add","path":"/metadata/assignee","value":"codex-reliability-history-agent"}],"before_hash":"65e3c69b2d25f00440e8540e93436460a84716670ff79c550ea7f7cbc766d576","after_hash":"01498c0775fffc3af7cbbcd76b3f1e541a2fe358e73815b815009b4568b243d0"}
{"ts":"2026-05-25T12:27:20.807Z","author":"codex-reliability-history-agent","op":"files_add","patch":[{"op":"replace","path":"/metadata/files/14/note","value":"release relevance helper regression"},{"op":"replace","path":"/metadata/files/14/path","value":"tests/integration/release-automation-contract.spec.ts"},{"op":"replace","path":"/metadata/files/13/note","value":"use npm.cmd on Windows packed-package test"},{"op":"replace","path":"/metadata/files/13/path","value":"tests/integration/cli.integration.spec.ts"},{"op":"replace","path":"/metadata/files/12/note","value":"dedicated in-process runner parity integration coverage"},{"op":"replace","path":"/metadata/files/12/path","value":"tests/integration/cli-inprocess-runner.integration.spec.ts"},{"op":"replace","path":"/metadata/files/11/note","value":"lock CI dedupe contract and nightly full-suite boundary"},{"op":"replace","path":"/metadata/files/11/path","value":"tests/integration/ci-workflow-contract.spec.ts"},{"op":"replace","path":"/metadata/files/10/note","value":"expose runCliInProcess helper for sandbox parity tests"},{"op":"replace","path":"/metadata/files/10/path","value":"tests/helpers/withTempPmPath.ts"},{"op":"replace","path":"/metadata/files/9/note","value":"in-process dist CLI runner helper with output capture"},{"op":"replace","path":"/metadata/files/9/path","value":"tests/helpers/cliRunner.ts"},{"op":"replace","path":"/metadata/files/8/note","value":"export runPmCli invocation seam for in-process tests"},{"op":"replace","path":"/metadata/files/8/path","value":"src/cli/main.ts"},{"op":"replace","path":"/metadata/files/7/note","value":"entrypoint now calls exported runPmCli explicitly"},{"op":"replace","path":"/metadata/files/7/path","value":"src/cli.ts"},{"op":"replace","path":"/metadata/files/6/note","value":"use pure release relevance helper"},{"op":"replace","path":"/metadata/files/6/path","value":"scripts/release/run-release-pipeline.mjs"},{"op":"replace","path":"/metadata/files/5/note","value":"pure release relevance helper avoids executable import in tests"},{"op":"replace","path":"/metadata/files/5/path","value":"scripts/release/release-relevance.mjs"},{"op":"replace","path":"/metadata/files/4/note","value":"CRLF tolerant generated-loader drift check for Windows Nightly"},{"op":"replace","path":"/metadata/files/4/path","value":"scripts/gen-package-runtime-loaders.mjs"},{"op":"replace","path":"/metadata/files/3/note","value":"Secret scanner executable now imports reusable library"},{"op":"replace","path":"/metadata/files/3/path","value":"scripts/check-secrets.mjs"},{"op":"replace","path":"/metadata/files/2/note","value":"Plain secret scanner library for Windows-safe Vitest imports"},{"op":"replace","path":"/metadata/files/2/path","value":"scripts/check-secrets-lib.mjs"},{"op":"replace","path":"/metadata/files/1/note","value":"refresh softprops release action pin"},{"op":"replace","path":"/metadata/files/1/path","value":".github/workflows/release.yml"},{"op":"add","path":"/metadata/files/15","value":{"path":"tests/unit/check-secrets.spec.ts","scope":"project","note":"Secret scanner tests import plain library module"}},{"op":"replace","path":"/metadata/updated_at","value":"2026-05-25T12:27:20.807Z"}],"before_hash":"01498c0775fffc3af7cbbcd76b3f1e541a2fe358e73815b815009b4568b243d0","after_hash":"c8eb4eec3d45eb750cfb85ac95830ad88e1c37f3127b6220bbdc79d01b11ad30"}
{"ts":"2026-05-25T12:27:22.869Z","author":"codex-reliability-history-agent","op":"files_add","patch":[{"op":"replace","path":"/metadata/updated_at","value":"2026-05-25T12:27:22.869Z"}],"before_hash":"c8eb4eec3d45eb750cfb85ac95830ad88e1c37f3127b6220bbdc79d01b11ad30","after_hash":"399c854b46153d199087357fdc2147b0d2e59ba6f0635b529424c931a63a7f8b"}
{"ts":"2026-05-25T12:27:25.046Z","author":"codex-reliability-history-agent","op":"files_add","patch":[{"op":"replace","path":"/metadata/updated_at","value":"2026-05-25T12:27:25.046Z"}],"before_hash":"399c854b46153d199087357fdc2147b0d2e59ba6f0635b529424c931a63a7f8b","after_hash":"935f36980a036cffc9aad3a2f3d3d754635e5531e8ad0c826c8c3fec749d6bab"}
{"ts":"2026-05-25T12:27:45.506Z","author":"codex-reliability-history-agent","op":"tests_add","patch":[{"op":"replace","path":"/metadata/updated_at","value":"2026-05-25T12:27:45.506Z"}],"before_hash":"935f36980a036cffc9aad3a2f3d3d754635e5531e8ad0c826c8c3fec749d6bab","after_hash":"a4e4b882ba469c3cf112341e35dd45d9f4c36e34e297f87d8904c657d05da3aa"}
{"ts":"2026-05-25T12:27:47.643Z","author":"codex-reliability-history-agent","op":"tests_add","patch":[{"op":"add","path":"/metadata/tests/5/note","value":"in-process runner seam parity and startup guard regression"},{"op":"replace","path":"/metadata/tests/5/timeout_seconds","value":600},{"op":"replace","path":"/metadata/tests/5/command","value":"node scripts/run-tests.mjs test -- tests/integration/cli.integration.spec.ts tests/integration/release-readiness-runtime.spec.ts -t 'keeps subprocess and in-process runner behavior aligned for core flows|keeps Sentry startup lazy for fast CLI commands' --reporter=dot"},{"op":"replace","path":"/metadata/tests/4/note","value":"Windows Nightly regression coverage"},{"op":"replace","path":"/metadata/tests/4/timeout_seconds","value":300},{"op":"replace","path":"/metadata/tests/4/command","value":"node scripts/run-tests.mjs test -- tests/integration/cli.integration.spec.ts tests/integration/release-automation-contract.spec.ts tests/unit/package-manifest.spec.ts tests/unit/check-secrets.spec.ts --reporter=dot"},{"op":"replace","path":"/metadata/tests/3/note","value":"in-process parity + startup lazy-sentry contract"},{"op":"replace","path":"/metadata/tests/3/timeout_seconds","value":600},{"op":"replace","path":"/metadata/tests/3/command","value":"node scripts/run-tests.mjs test -- tests/integration/cli-inprocess-runner.integration.spec.ts tests/integration/release-readiness-runtime.spec.ts -t 'keeps subprocess and in-process runner behavior aligned for core flows|keeps Sentry startup lazy for fast CLI commands' --reporter=dot"},{"op":"replace","path":"/metadata/tests/2/note","value":"in-process runner parity plus startup guard"},{"op":"replace","path":"/metadata/tests/2/command","value":"node scripts/run-tests.mjs test -- tests/integration/cli-inprocess-runner.integration.spec.ts tests/integration/release-readiness-runtime.spec.ts -t 'keeps subprocess and in-process runner behavior aligned for core flows|keeps concurrent in-process runs isolated and restores globals|keeps Sentry startup lazy for fast CLI commands' --reporter=dot"},{"op":"add","path":"/metadata/tests/6","value":{"command":"node scripts/run-tests.mjs test -- tests/unit/check-secrets.spec.ts tests/integration/release-automation-contract.spec.ts tests/integration/release-readiness-runtime.spec.ts -t 'keeps release-hardening scaffolding paths present|check-secrets|Auto Release' --reporter=dot","scope":"project","timeout_seconds":240}},{"op":"replace","path":"/metadata/updated_at","value":"2026-05-25T12:27:47.643Z"}],"before_hash":"a4e4b882ba469c3cf112341e35dd45d9f4c36e34e297f87d8904c657d05da3aa","after_hash":"44b9d15a40a7363ebeb4db35418fab4f973f98c77dd90c1fe69473e139f5daaa"}
{"ts":"2026-05-25T12:27:49.651Z","author":"codex-reliability-history-agent","op":"tests_add","patch":[{"op":"add","path":"/metadata/tests/6/note","value":"nightly Windows regression quartet"},{"op":"replace","path":"/metadata/tests/6/timeout_seconds","value":1200},{"op":"replace","path":"/metadata/tests/6/command","value":"node scripts/run-tests.mjs test -- tests/integration/cli.integration.spec.ts tests/unit/package-manifest.spec.ts tests/unit/check-secrets.spec.ts tests/integration/release-automation-contract.spec.ts --reporter=dot"},{"op":"add","path":"/metadata/tests/7","value":{"command":"node scripts/run-tests.mjs test -- tests/unit/check-secrets.spec.ts tests/integration/release-automation-contract.spec.ts tests/integration/release-readiness-runtime.spec.ts -t 'keeps release-hardening scaffolding paths present|check-secrets|Auto Release' --reporter=dot","scope":"project","timeout_seconds":240}},{"op":"replace","path":"/metadata/updated_at","value":"2026-05-25T12:27:49.651Z"}],"before_hash":"44b9d15a40a7363ebeb4db35418fab4f973f98c77dd90c1fe69473e139f5daaa","after_hash":"6d3a63433f93771350aeeccb0147cd17fdf6a59f1d3ceedf2fc8b35810f5c0f8"}
{"ts":"2026-05-25T12:28:13.524Z","author":"codex-reliability-history-agent","op":"comment_add","patch":[{"op":"add","path":"/metadata/comments/24","value":{"created_at":"2026-05-25T12:28:13.524Z","author":"codex-reliability-history-agent","text":"Execution update 2026-05-25 for combined reliability/history PR slice (single-agent, no duplicates):\n\n- Orientation + dedupe evidence rerun: pm context --limit 10; pm search \"reliability history windows dependabot changelog pm-7rlp pm-xk39\" --limit 10; pm list-open --limit 20 --brief; pm list-in-progress --limit 20 --brief. Reused canonical active lineage pm-7rlp + pm-xk39 under pm-rnpb.\n- Claim/bootstrap evidence: bootstrap completed per AGENTS.md (npm install -g ., pm --version, node -v, pnpm -v, pnpm build), PM_AUTHOR set to codex-reliability-history-agent, and item claim ownership moved to this run.\n- Workflow reliability fix: updated .github/workflows/release.yml softprops/action-gh-release pin to current v3.0.0 commit b4309332981a82ec1c5618f44dd2e27cc8bfbfda and aligned tests/integration/ci-workflow-contract.spec.ts.\n- In-process parity enhancement: extended tests/integration/cli-inprocess-runner.integration.spec.ts with concurrent Promise.all in-process runs + process-global restoration checks (cwd/env isolation) while preserving existing subprocess parity assertions.\n- GitHub run triage via gh: no open issues/PRs; no open Dependabot alerts; no open secret-scanning alerts. Historical failures examined from gh run view logs: stale release action SHA/Dependabot softprops no-such-commit and prior nightly Windows regression signatures.\n- Focused verification passed:\n - node scripts/run-tests.mjs test -- tests/integration/ci-workflow-contract.spec.ts\n - node scripts/run-tests.mjs test -- tests/integration/cli.integration.spec.ts tests/unit/package-manifest.spec.ts tests/unit/check-secrets.spec.ts tests/integration/release-automation-contract.spec.ts --reporter=dot (101 tests)\n - node scripts/run-tests.mjs test -- tests/integration/cli-inprocess-runner.integration.spec.ts tests/integration/release-readiness-runtime.spec.ts -t 'keeps subprocess and in-process runner behavior aligned for core flows|keeps concurrent in-process runs isolated and restores globals|keeps Sentry startup lazy for fast CLI commands' --reporter=dot\n- Full release gate passed on this change set: node scripts/release/run-gates.mjs --telemetry-mode required --max-sentry-critical 10 --max-sentry-high 20 --max-telemetry-error-rate 10 --json (1770 tests, 100% coverage, static/docs/security/npx/dogfood/compatibility and sentry-telemetry gate all ok)."}},{"op":"replace","path":"/metadata/updated_at","value":"2026-05-25T12:28:13.524Z"}],"before_hash":"6d3a63433f93771350aeeccb0147cd17fdf6a59f1d3ceedf2fc8b35810f5c0f8","after_hash":"6d2f8716945ae58aed1b5e7968b6d58d144af7ac38eb2f9e5d14b088226e88a8"}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Do not commit direct changes under .agents/pm/**.

This PR includes direct modifications to .agents/pm/history/pm-7rlp.jsonl (Line 61 through Line 68). These changes should be produced via the pm workflow, not edited in-repo.

As per coding guidelines, .agents/pm/**: pm is the system of record. Do not edit .agents/pm files directly.

🤖 Prompt for 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.

In @.agents/pm/history/pm-7rlp.jsonl around lines 61 - 68, You directly edited
the agent history record pm-7rlp (changes authored by
codex-reliability-history-agent) under the agents metadata, but these files must
be changed only by the pm workflow; revert the manual edits to that JSONL entry
and re-create the intended metadata update by running the pm workflow/commands
(use the pm tool to claim/patch or files_add operations that produce the same op
entries such as "claim", "files_add", "tests_add", "comment_add") so the
system-of-record operations are recorded by pm rather than committing direct
edits.

{"ts":"2026-05-25T10:47:23.591Z","author":"codex-reliability-agent","op":"comment_add","patch":[{"op":"add","path":"/metadata/comments/277","value":{"created_at":"2026-05-25T10:47:23.591Z","author":"codex-reliability-agent","text":"AI bot feedback loop iteration 2 on PR #67: applied actionable reliability fixes (history-repair snapshot ordering + in-process helper serialization/safe restoration/env semantics), re-ran focused regressions and static quality gate, all green before push."}},{"op":"replace","path":"/metadata/updated_at","value":"2026-05-25T10:47:23.591Z"}],"before_hash":"e06f01ee39d60ff09924671a7c878ed03ebf3290fb1f20341079560032626d21","after_hash":"1f07123dd524732fb7988b12c4054e01994c7166164604daffbc1ba0328bd29a"}
{"ts":"2026-05-25T10:55:08.658Z","author":"codex-reliability-agent","op":"comment_add","patch":[{"op":"add","path":"/metadata/comments/278","value":{"created_at":"2026-05-25T10:55:08.658Z","author":"codex-reliability-agent","text":"Merge evidence: PR #67 (https://github.com/unbraind/pm-cli/pull/67) is merged into main as bdbba9fe. Reliability continuation scope delivered (pm-uer0 closed, pm-7rlp foundation advanced), stale completed items normalized/closed with metadata, and gates/checks all green."}},{"op":"replace","path":"/metadata/updated_at","value":"2026-05-25T10:55:08.658Z"}],"before_hash":"1f07123dd524732fb7988b12c4054e01994c7166164604daffbc1ba0328bd29a","after_hash":"1445a03fa78a1d6326417e330945a117a580fd2c4c4d58c602d69081b3a00625"}
{"ts":"2026-05-25T11:08:48.451Z","author":"codex-reliability-agent","op":"comment_add","patch":[{"op":"add","path":"/metadata/comments/279","value":{"created_at":"2026-05-25T11:08:48.451Z","author":"codex-reliability-agent","text":"Post-merge tracker sync completed on main: commit 15c0c80b records pm-uer0 closure/release + pm-7rlp handoff notes, and commit 3c738fca re-syncs CHANGELOG.md for deterministic pm-changelog checks after those metadata updates. Working tree is clean on main."}},{"op":"replace","path":"/metadata/updated_at","value":"2026-05-25T11:08:48.451Z"}],"before_hash":"1445a03fa78a1d6326417e330945a117a580fd2c4c4d58c602d69081b3a00625","after_hash":"7b79c733127a8cfd2b30bec244b9b0c1ae2c2a8e57d943d3c3e0e11da778406b"}
{"ts":"2026-05-25T12:28:30.869Z","author":"codex-reliability-history-agent","op":"comment_add","patch":[{"op":"add","path":"/metadata/comments/280","value":{"created_at":"2026-05-25T12:28:30.869Z","author":"codex-reliability-history-agent","text":"Cross-item summary for reliability/history combined PR prep (2026-05-25):\n\n- GitHub health snapshot via gh CLI: issue list [], PR list [], Dependabot alerts [], secret scanning alerts []; code-scanning endpoint returned no analysis available for this repo. Recent historical failures were triaged from run logs and folded into this workstream.\n- Latest dependencies/vulnerability checks in this run: npm view pm-changelog version = 2026.5.24-15 (already current), pnpm security scan and check-secrets gates are clean, and release sentry/telemetry gate is passing with required mode.\n- Combined reliability/history slice is scoped to pm-7rlp + pm-xk39 with one branch/PR and full pm evidence linkage (files/tests/comments) before PR publication."}},{"op":"replace","path":"/metadata/updated_at","value":"2026-05-25T12:28:30.869Z"}],"before_hash":"7b79c733127a8cfd2b30bec244b9b0c1ae2c2a8e57d943d3c3e0e11da778406b","after_hash":"11772f304859b4056bfe1984f8ba8a84fd06b992a5dfd36f26c613431f859108"}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Do not commit direct edits under .agents/pm/**; regenerate via pm tooling instead.

This change updates a system-of-record file directly, which violates the repository rule for .agents/pm/**. Please re-apply this update through the pm command/workflow that owns these records, then commit the generated output.

As per coding guidelines, “.agents/pm/**: pm is the system of record. Do not edit .agents/pm files directly.”

🤖 Prompt for 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.

In @.agents/pm/history/pm-rnpb.jsonl at line 629, The change directly edits the
system-of-record file .agents/pm/history/pm-rnpb.jsonl (modifying
metadata/comments/280 and metadata/updated_at); undo the manual edits and
re-generate this record using the pm tooling/workflow that owns .agents/pm (do
not commit direct edits). Re-run the pm command or script that updates
pm-rnpb.jsonl so it produces the proper metadata (including the comment entry
and updated_at value) and commit the generated output instead of hand-editing
metadata/comments/280 or metadata/updated_at.

Address review feedback by hardening the concurrent in-process runner integration test to snapshot and restore sentinel env state and assert process.argv restoration alongside cwd restoration. Record the follow-up evidence on pm-7rlp through pm CLI history updates.
@unbraind unbraind merged commit dc752ce into main May 25, 2026
13 checks passed
@unbraind unbraind deleted the chore/reliability-history-release-pin-lock-window-coverage branch May 25, 2026 12:54
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