diff --git a/.agents/pm/extensions/.managed-extensions.json b/.agents/pm/extensions/.managed-extensions.json index 41e241f74..5fe7494c0 100644 --- a/.agents/pm/extensions/.managed-extensions.json +++ b/.agents/pm/extensions/.managed-extensions.json @@ -1,6 +1,6 @@ { "version": 1, - "updated_at": "2026-06-27T22:59:25.513Z", + "updated_at": "2026-06-27T23:31:46.022Z", "entries": [ { "name": "pm-changelog", diff --git a/.agents/pm/history/pm-7zs0.jsonl b/.agents/pm/history/pm-7zs0.jsonl index 1d74f38a2..ad72c9bc0 100644 --- a/.agents/pm/history/pm-7zs0.jsonl +++ b/.agents/pm/history/pm-7zs0.jsonl @@ -35,3 +35,17 @@ {"ts":"2026-06-27T07:41:34.851Z","author":"codex-sdk-cli-20260627","op":"comment_add","patch":[{"op":"add","path":"/metadata/comments/16","value":{"created_at":"2026-06-27T07:41:34.851Z","author":"codex-sdk-cli-20260627","text":"Release-health evidence for PR #385: managed project package refresh remains on pm-changelog 2026.6.27; pnpm changelog:pm:check regenerated in check mode and reported CHANGELOG.md unchanged with item_count=1357 and bytes=218600. Package doctor deep reports pm-changelog active with command paths changelog export/generate and no warnings. Auto Release issue #374 remains externally blocked by missing RELEASE_PAT in the release environment, confirmed from GitHub scheduled run evidence before this implementation. Sentry/telemetry gate passed after review fixes with critical=0 high=0, access_ok=true, telemetry finish_error_rate_pct=0.72, failures_without_error_code_rows=0."}},{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T07:41:34.851Z"}],"before_hash":"62ee67bb31e48b42c1b263d2bbf0d384e11e0a45426d6a2131ec456a73da5aad","after_hash":"0d3d32f5ab4587e7e407985796148bfa1062812df7b7e8bae53807b750807671"} {"ts":"2026-06-27T08:04:27.572Z","author":"codex-sdk-cli-20260627","op":"comment_add","patch":[{"op":"add","path":"/metadata/comments/17","value":{"created_at":"2026-06-27T08:04:27.572Z","author":"codex-sdk-cli-20260627","text":"Merge evidence: PR #385 merged to main as 753410df with pm-changelog project package refreshed to 2026.6.27 and package doctor deep clean. Post-merge release-health checks passed: pm health summary ok, history drift validation ok, package doctor deep ok, and Sentry/telemetry gate critical=0 high=0 telemetry finish_error_rate_pct=0.72. Daily Auto Release remains externally blocked by GitHub issue #374 because RELEASE_PAT is absent from the release environment; no code-side blocker found in this lane."}},{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T08:04:27.572Z"}],"before_hash":"0d3d32f5ab4587e7e407985796148bfa1062812df7b7e8bae53807b750807671","after_hash":"163122a9feb78f293ebfcaf4361b315ae1f77d821a710857d45f133af4e1f1fe"} {"ts":"2026-06-27T08:04:28.909Z","author":"codex-sdk-cli-20260627","op":"release","patch":[{"op":"remove","path":"/metadata/assignee"},{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T08:04:28.909Z"}],"before_hash":"163122a9feb78f293ebfcaf4361b315ae1f77d821a710857d45f133af4e1f1fe","after_hash":"562b66f5be236081ffc691230d1d5eebde8290c43839acdfd5ec1c9dbdef953e"} +{"ts":"2026-06-27T23:24:15.504Z","author":"claude-code-agent","op":"claim","patch":[{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T23:24:15.504Z"},{"op":"add","path":"/metadata/assignee","value":"claude-code-agent"}],"before_hash":"562b66f5be236081ffc691230d1d5eebde8290c43839acdfd5ec1c9dbdef953e","after_hash":"ddf823340af6afbf50a1617ea8a301950a86189623358b43cf2a600fb4ed6dd4"} +{"ts":"2026-06-27T23:24:23.273Z","author":"claude-code-agent","op":"comment_add","patch":[{"op":"add","path":"/metadata/comments/18","value":{"created_at":"2026-06-27T23:24:23.273Z","author":"claude-code-agent","text":"Implementation start: duplicate-safe all-status search found existing release-health item pm-7zs0 plus blocked external credential issue pm-9gxi/#374; no new pm item created. Scope is code-side auto-release issue lifecycle cleanup: close the blocked scheduled-release issue only after a scheduled run actually publishes a tag and the downstream Release workflow succeeds, while preserving the external RELEASE_PAT blocker."}},{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T23:24:23.273Z"}],"before_hash":"ddf823340af6afbf50a1617ea8a301950a86189623358b43cf2a600fb4ed6dd4","after_hash":"8f6eedd681a459b0a1918b97a1b499eb6cfb05a1b32a40f659f40ecbc15d54b1"} +{"ts":"2026-06-27T23:25:20.025Z","author":"claude-code-agent","op":"tests_add","patch":[{"op":"add","path":"/metadata/tests/3","value":{"command":"pnpm quality:static","scope":"project","timeout_seconds":180}},{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T23:25:20.025Z"}],"before_hash":"8f6eedd681a459b0a1918b97a1b499eb6cfb05a1b32a40f659f40ecbc15d54b1","after_hash":"0436e287f666e58f24d84655872898114307963bab633cda33f7aaf0c0d3298a"} +{"ts":"2026-06-27T23:25:20.071Z","author":"claude-code-agent","op":"files_add","patch":[{"op":"replace","path":"/metadata/files/3/note","value":"Ignore expected handled apply-failure CommandError and expose blocking issue IDs"},{"op":"replace","path":"/metadata/files/3/path","value":"scripts/release/sentry-telemetry-gate.mjs"},{"op":"replace","path":"/metadata/files/2/note","value":"close stale blocked-release issue after successful scheduled publish"},{"op":"replace","path":"/metadata/files/2/path","value":".github/workflows/auto-release.yml"},{"op":"add","path":"/metadata/files/4","value":{"path":"tests/integration/ci-workflow-contract.spec.ts","scope":"project","note":"assert auto-release issue resolution workflow contract"}},{"op":"add","path":"/metadata/files/5","value":{"path":"tests/unit/scripts/release/sentry-telemetry-gate.spec.ts","scope":"project","note":"Regression coverage for updated sentry gate output/classification"}},{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T23:25:20.071Z"}],"before_hash":"0436e287f666e58f24d84655872898114307963bab633cda33f7aaf0c0d3298a","after_hash":"938b35e16d4b81cddbd9ed1679300f9f5d30e5e1e336e4d866cc205835617261"} +{"ts":"2026-06-27T23:25:20.141Z","author":"claude-code-agent","op":"tests_add","patch":[{"op":"replace","path":"/metadata/tests/3/timeout_seconds","value":240},{"op":"replace","path":"/metadata/tests/3/command","value":"PM_RUN_TESTS_SKIP_BUILD=1 node scripts/run-tests.mjs test -- tests/unit/scripts/release/sentry-telemetry-gate.spec.ts tests/unit/scripts/release/run-gates.spec.ts"},{"op":"replace","path":"/metadata/tests/2/timeout_seconds","value":120},{"op":"replace","path":"/metadata/tests/2/command","value":"node scripts/release/sentry-telemetry-gate.mjs --json --telemetry-mode off --max-critical 0 --max-high 0"},{"op":"replace","path":"/metadata/tests/1/timeout_seconds","value":180},{"op":"replace","path":"/metadata/tests/1/command","value":"node scripts/release/sentry-telemetry-gate.mjs --json --telemetry-mode best-effort"},{"op":"add","path":"/metadata/tests/4","value":{"command":"pnpm quality:static","scope":"project","timeout_seconds":180}},{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T23:25:20.141Z"}],"before_hash":"938b35e16d4b81cddbd9ed1679300f9f5d30e5e1e336e4d866cc205835617261","after_hash":"9c37f9e0a35b5d6c9d92eb4c2c3ad46120f5a20bd94e42774472e9be32689d07"} +{"ts":"2026-06-27T23:25:28.245Z","author":"claude-code-agent","op":"docs_add","patch":[{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T23:25:28.245Z"},{"op":"add","path":"/metadata/docs","value":[{"path":"docs/RELEASING.md","scope":"project","note":"document scheduled publish closing blocked auto-release issues"}]}],"before_hash":"9c37f9e0a35b5d6c9d92eb4c2c3ad46120f5a20bd94e42774472e9be32689d07","after_hash":"e94f9ee8fe5fd3d7c6492052647f85cef769e966aca981a8f671b65b209effae"} +{"ts":"2026-06-27T23:25:28.688Z","author":"claude-code-agent","op":"tests_add","patch":[{"op":"replace","path":"/metadata/tests/4/timeout_seconds","value":240},{"op":"replace","path":"/metadata/tests/4/command","value":"PM_RUN_TESTS_SKIP_BUILD=1 node scripts/run-tests.mjs test -- tests/unit/scripts/release/sentry-telemetry-gate.spec.ts tests/unit/scripts/release/run-gates.spec.ts"},{"op":"replace","path":"/metadata/tests/3/command","value":"node scripts/run-tests.mjs test -- tests/integration/ci-workflow-contract.spec.ts"},{"op":"add","path":"/metadata/tests/5","value":{"command":"pnpm quality:static","scope":"project","timeout_seconds":180}},{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T23:25:28.688Z"}],"before_hash":"e94f9ee8fe5fd3d7c6492052647f85cef769e966aca981a8f671b65b209effae","after_hash":"8a0decbf626c2a52859cee9e4c7b0e9d9900992716302d7151a036cfe896aee1"} +{"ts":"2026-06-27T23:25:29.177Z","author":"claude-code-agent","op":"tests_add","patch":[{"op":"replace","path":"/metadata/tests/5/timeout_seconds","value":240},{"op":"replace","path":"/metadata/tests/5/command","value":"pnpm build"},{"op":"add","path":"/metadata/tests/6","value":{"command":"pnpm quality:static","scope":"project","timeout_seconds":180}},{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T23:25:29.177Z"}],"before_hash":"8a0decbf626c2a52859cee9e4c7b0e9d9900992716302d7151a036cfe896aee1","after_hash":"654466c9e5e65cb91d51355288cb724c9788d7c63ea388d6ad9700f8a5c2a3fe"} +{"ts":"2026-06-27T23:26:06.673Z","author":"claude-code-agent","op":"test_run_track","patch":[{"op":"add","path":"/metadata/test_runs/1","value":{"run_id":"test-local-mqwzntpx-bck9yj","kind":"test","status":"passed","started_at":"2026-06-27T23:25:38.329Z","finished_at":"2026-06-27T23:26:06.645Z","recorded_at":"2026-06-27T23:26:06.645Z","passed":7,"failed":0,"skipped":0}},{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T23:26:06.673Z"}],"before_hash":"654466c9e5e65cb91d51355288cb724c9788d7c63ea388d6ad9700f8a5c2a3fe","after_hash":"8d3863b925fb8b7e1581fe9c5607f9ce7ad31d2514fba255ca715a5c578907f4","message":"Track test run summary (test-local-mqwzntpx-bck9yj)"} +{"ts":"2026-06-27T23:32:57.898Z","author":"claude-code-agent","op":"comment_add","patch":[{"op":"add","path":"/metadata/comments/19","value":{"created_at":"2026-06-27T23:32:57.898Z","author":"claude-code-agent","text":"Evidence: implemented scheduled Auto Release success cleanup so a scheduled run only closes the stale Auto Release blocked issue after it publishes a tag and the downstream Release workflow succeeds. Validation passed: focused workflow contract test, linked pm test run 7/7, pnpm build, pnpm typecheck, pnpm lint, pnpm quality:static, pnpm contracts:check, pnpm security:scan, pnpm audit --audit-level moderate, pnpm changelog:pm:check using pm-changelog 2026.6.27 with CHANGELOG.md unchanged, pm health summary ok, history drift ok, full coverage 100/100/100/100, Sentry/telemetry gate critical=0 high=0 telemetry finish_error_rate_pct=0.76, and isolated temp-directory smoke passed with PM_PATH/PM_GLOBAL_PATH at /tmp/tmp.zLjtqymDaG. pm validate still reports existing resolution metadata backlog of 258 closed items; not introduced by this branch."}},{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T23:32:57.898Z"}],"before_hash":"8d3863b925fb8b7e1581fe9c5607f9ce7ad31d2514fba255ca715a5c578907f4","after_hash":"f3f2ebc451f3718cc23f2ca7307edb8602103c162f6f563838ad97abde5e92ad"} +{"ts":"2026-06-27T23:42:48.229Z","author":"claude-code-agent","op":"test_run_track","patch":[{"op":"add","path":"/metadata/test_runs/2","value":{"run_id":"test-local-mqx09aji-bcp53i","kind":"test","status":"passed","started_at":"2026-06-27T23:42:21.521Z","finished_at":"2026-06-27T23:42:48.222Z","recorded_at":"2026-06-27T23:42:48.222Z","passed":7,"failed":0,"skipped":0}},{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T23:42:48.229Z"}],"before_hash":"f3f2ebc451f3718cc23f2ca7307edb8602103c162f6f563838ad97abde5e92ad","after_hash":"6d24b98285453e7c06febd1f8266c926da4f0ccbda3090ad1873c21626abfa4f","message":"Track test run summary (test-local-mqx09aji-bcp53i)"} +{"ts":"2026-06-27T23:42:55.639Z","author":"claude-code-agent","op":"comment_add","patch":[{"op":"add","path":"/metadata/comments/20","value":{"created_at":"2026-06-27T23:42:55.639Z","author":"claude-code-agent","text":"Review fix evidence: addressed CodeRabbit/Cubic feedback on PR #392. Auto Release now exports the tagged release commit SHA with published_sha and uses it in the success cleanup comment; stale blocked-issue query/close failures now log and exit 0 so a successful scheduled publish cannot trigger the blocked-release alert. Post-fix validation passed: focused workflow contract test, pnpm build, pnpm quality:static, git diff --check, and pm test pm-7zs0 --run --progress 7/7."}},{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T23:42:55.639Z"}],"before_hash":"6d24b98285453e7c06febd1f8266c926da4f0ccbda3090ad1873c21626abfa4f","after_hash":"e7d0e467819f5bd4fe3034a16e6eb645a4a0af1511441ff1e4038d1a031e0f92"} +{"ts":"2026-06-27T23:51:49.833Z","author":"claude-code-agent","op":"test_run_track","patch":[{"op":"add","path":"/metadata/test_runs/3","value":{"run_id":"test-local-mqx0kwfz-ola41b","kind":"test","status":"passed","started_at":"2026-06-27T23:51:22.968Z","finished_at":"2026-06-27T23:51:49.823Z","recorded_at":"2026-06-27T23:51:49.823Z","passed":7,"failed":0,"skipped":0}},{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T23:51:49.833Z"}],"before_hash":"e7d0e467819f5bd4fe3034a16e6eb645a4a0af1511441ff1e4038d1a031e0f92","after_hash":"8a91fdf1d314ab074ccbbef382b3b56cd6e32a9501c20bc27ad9c7e563401bcb","message":"Track test run summary (test-local-mqx0kwfz-ola41b)"} +{"ts":"2026-06-27T23:51:57.067Z","author":"claude-code-agent","op":"comment_add","patch":[{"op":"add","path":"/metadata/comments/21","value":{"created_at":"2026-06-27T23:51:57.067Z","author":"claude-code-agent","text":"Final review fix evidence: addressed unresolved Gemini thread on PR #392 by changing the scheduled-success cleanup guard from an empty-string comparison to a direct published_tag truthiness check, preventing skipped/no-publish runs with absent outputs from entering stale-issue cleanup. Validation passed: focused workflow contract test, pnpm build, git diff --check, and pm test pm-7zs0 --run --progress 7/7."}},{"op":"replace","path":"/metadata/updated_at","value":"2026-06-27T23:51:57.067Z"}],"before_hash":"8a91fdf1d314ab074ccbbef382b3b56cd6e32a9501c20bc27ad9c7e563401bcb","after_hash":"27164ec6dd216ef4699a52968c74507323d1940ed46cc1d79c8b47ad7cf0ef58"} diff --git a/.agents/pm/reminders/pm-7zs0.toon b/.agents/pm/reminders/pm-7zs0.toon index 1b600f768..f40b6ab5f 100644 --- a/.agents/pm/reminders/pm-7zs0.toon +++ b/.agents/pm/reminders/pm-7zs0.toon @@ -6,12 +6,13 @@ status: in_progress priority: 2 tags[3]: "area:release",living-map,reliability created_at: "2026-06-07T10:24:45.889Z" -updated_at: "2026-06-27T08:04:28.909Z" +updated_at: "2026-06-27T23:51:57.067Z" reminders[1]{at,text}: "2026-06-08T10:24:45.889Z",Confirm daily auto-release tagged a new version AND npm latest advanced; else inspect publish + Sentry-gate steps +assignee: claude-code-agent author: maintainer-agent parent: pm-u9d0 -comments[18]{created_at,author,text}: +comments[22]{created_at,author,text}: "2026-06-10T14:44:30.277Z",maintainer-agent,"2026-06-10 daily auto-release (scheduled run 27258655654, 06:50Z) FAILED at sentry-telemetry-gate: PM-CLI-1J 'CommandError: {' — a CommandError whose message was the raw guided-error JSON envelope (code tracker_not_initialized) thrown by an ephemeral temp-dir script (readPmItemsForUpsert, source no longer on disk; 2 events 2026-06-09T21:34Z). Gate classifier fix already landed in PR #197 (fba75fb0, merged 11:34Z, adds 'tracker_not_initialized' to KNOWN_EXPECTED_HANDLED_CLI_ISSUE_PATTERNS) but AFTER the scheduled run. Recovery: resolved PM-CLI-1J in Sentry + re-dispatched auto-release.yml with push=true (run 27284359777). Will verify v2026.6.10 npm publish before closing." "2026-06-16T11:26:49.976Z",codex-sdk-cli-consolidation-20260616,"Auto-release gate reproduced locally with SENTRY_PERSONAL_ADMIN_TOKEN; failing high issue was PM-CLI-1Q (handled CommandError: all items failed to apply). Added count-agnostic handled pattern 'item(s) failed to apply' and blocking_short_ids/blocking_titles output for diagnostics. Gate now passes in strict mode with max-high=0." "2026-06-16T11:46:33.866Z",codex-sdk-cli-consolidation-20260616,"Release-health verification: sentry-telemetry gate now passes in strict mode (max-critical=0,max-high=0) after expected handled-CommandError classification update; output now includes blocking_short_ids/blocking_titles for actionable diagnostics." @@ -30,15 +31,30 @@ comments[18]{created_at,author,text}: "2026-06-27T07:21:25.279Z",codex-sdk-cli-20260627,"Final evidence: release-health/package checks after pm-changelog 2026.6.27 refresh remain clean. Verified pnpm changelog:pm:check unchanged, package doctor deep ok, pm health summary ok, Sentry/telemetry gate ok with critical=0 high=0 and telemetry finish_error_rate_pct=0.72. Current external blocker remains GitHub issue #374: scheduled Auto Release run 28280770086 fails because RELEASE_PAT is absent from the release environment." "2026-06-27T07:41:34.851Z",codex-sdk-cli-20260627,"Release-health evidence for PR #385: managed project package refresh remains on pm-changelog 2026.6.27; pnpm changelog:pm:check regenerated in check mode and reported CHANGELOG.md unchanged with item_count=1357 and bytes=218600. Package doctor deep reports pm-changelog active with command paths changelog export/generate and no warnings. Auto Release issue #374 remains externally blocked by missing RELEASE_PAT in the release environment, confirmed from GitHub scheduled run evidence before this implementation. Sentry/telemetry gate passed after review fixes with critical=0 high=0, access_ok=true, telemetry finish_error_rate_pct=0.72, failures_without_error_code_rows=0." "2026-06-27T08:04:27.572Z",codex-sdk-cli-20260627,"Merge evidence: PR #385 merged to main as 753410df with pm-changelog project package refreshed to 2026.6.27 and package doctor deep clean. Post-merge release-health checks passed: pm health summary ok, history drift validation ok, package doctor deep ok, and Sentry/telemetry gate critical=0 high=0 telemetry finish_error_rate_pct=0.72. Daily Auto Release remains externally blocked by GitHub issue #374 because RELEASE_PAT is absent from the release environment; no code-side blocker found in this lane." -files[4]{path,scope,note}: + "2026-06-27T23:24:23.273Z",claude-code-agent,"Implementation start: duplicate-safe all-status search found existing release-health item pm-7zs0 plus blocked external credential issue pm-9gxi/#374; no new pm item created. Scope is code-side auto-release issue lifecycle cleanup: close the blocked scheduled-release issue only after a scheduled run actually publishes a tag and the downstream Release workflow succeeds, while preserving the external RELEASE_PAT blocker." + "2026-06-27T23:32:57.898Z",claude-code-agent,"Evidence: implemented scheduled Auto Release success cleanup so a scheduled run only closes the stale Auto Release blocked issue after it publishes a tag and the downstream Release workflow succeeds. Validation passed: focused workflow contract test, linked pm test run 7/7, pnpm build, pnpm typecheck, pnpm lint, pnpm quality:static, pnpm contracts:check, pnpm security:scan, pnpm audit --audit-level moderate, pnpm changelog:pm:check using pm-changelog 2026.6.27 with CHANGELOG.md unchanged, pm health summary ok, history drift ok, full coverage 100/100/100/100, Sentry/telemetry gate critical=0 high=0 telemetry finish_error_rate_pct=0.76, and isolated temp-directory smoke passed with PM_PATH/PM_GLOBAL_PATH at /tmp/tmp.zLjtqymDaG. pm validate still reports existing resolution metadata backlog of 258 closed items; not introduced by this branch." + "2026-06-27T23:42:55.639Z",claude-code-agent,"Review fix evidence: addressed CodeRabbit/Cubic feedback on PR #392. Auto Release now exports the tagged release commit SHA with published_sha and uses it in the success cleanup comment; stale blocked-issue query/close failures now log and exit 0 so a successful scheduled publish cannot trigger the blocked-release alert. Post-fix validation passed: focused workflow contract test, pnpm build, pnpm quality:static, git diff --check, and pm test pm-7zs0 --run --progress 7/7." + "2026-06-27T23:51:57.067Z",claude-code-agent,"Final review fix evidence: addressed unresolved Gemini thread on PR #392 by changing the scheduled-success cleanup guard from an empty-string comparison to a direct published_tag truthiness check, preventing skipped/no-publish runs with absent outputs from entering stale-issue cleanup. Validation passed: focused workflow contract test, pnpm build, git diff --check, and pm test pm-7zs0 --run --progress 7/7." +files[6]{path,scope,note}: .agents/pm/extensions/.managed-extensions.json,project,record project pm-changelog 2026.6.27 managed package metadata .agents/pm/extensions/pm-changelog,project,refresh project-managed pm-changelog package files to 2026.6.27 + .github/workflows/auto-release.yml,project,close stale blocked-release issue after successful scheduled publish scripts/release/sentry-telemetry-gate.mjs,project,Ignore expected handled apply-failure CommandError and expose blocking issue IDs + tests/integration/ci-workflow-contract.spec.ts,project,assert auto-release issue resolution workflow contract tests/unit/scripts/release/sentry-telemetry-gate.spec.ts,project,Regression coverage for updated sentry gate output/classification -tests[3]{command,path,scope,timeout_seconds,pm_context_mode,env_set,env_clear,shared_host_safe,assert_stdout_contains,assert_stdout_regex,assert_stderr_contains,assert_stderr_regex,assert_stdout_min_lines,assert_json_field_equals,assert_json_field_gte,note}: +tests[7]{command,path,scope,timeout_seconds,pm_context_mode,env_set,env_clear,shared_host_safe,assert_stdout_contains,assert_stdout_regex,assert_stderr_contains,assert_stderr_regex,assert_stdout_min_lines,assert_json_field_equals,assert_json_field_gte,note}: node dist/cli.js package doctor --project --detail deep --json,null,project,180,null,null,null,null,null,null,null,null,null,null,null,null + node scripts/release/sentry-telemetry-gate.mjs --json --telemetry-mode best-effort,null,project,180,null,null,null,null,null,null,null,null,null,null,null,null node scripts/release/sentry-telemetry-gate.mjs --json --telemetry-mode off --max-critical 0 --max-high 0,null,project,120,null,null,null,null,null,null,null,null,null,null,null,null + node scripts/run-tests.mjs test -- tests/integration/ci-workflow-contract.spec.ts,null,project,240,null,null,null,null,null,null,null,null,null,null,null,null PM_RUN_TESTS_SKIP_BUILD=1 node scripts/run-tests.mjs test -- tests/unit/scripts/release/sentry-telemetry-gate.spec.ts tests/unit/scripts/release/run-gates.spec.ts,null,project,240,null,null,null,null,null,null,null,null,null,null,null,null -test_runs[1]{run_id,kind,status,started_at,finished_at,recorded_at,attempt,resumed_from,passed,failed,skipped,items,linked_tests,fail_on_skipped_triggered}: + pnpm build,null,project,240,null,null,null,null,null,null,null,null,null,null,null,null + "pnpm quality:static",null,project,180,null,null,null,null,null,null,null,null,null,null,null,null +test_runs[4]{run_id,kind,status,started_at,finished_at,recorded_at,attempt,resumed_from,passed,failed,skipped,items,linked_tests,fail_on_skipped_triggered}: test-local-mqw0pnxi-coga1f,test,passed,"2026-06-27T07:07:41.177Z","2026-06-27T07:07:45.894Z","2026-06-27T07:07:45.894Z",null,null,3,0,0,null,null,null + test-local-mqwzntpx-bck9yj,test,passed,"2026-06-27T23:25:38.329Z","2026-06-27T23:26:06.645Z","2026-06-27T23:26:06.645Z",null,null,7,0,0,null,null,null + test-local-mqx09aji-bcp53i,test,passed,"2026-06-27T23:42:21.521Z","2026-06-27T23:42:48.222Z","2026-06-27T23:42:48.222Z",null,null,7,0,0,null,null,null + test-local-mqx0kwfz-ola41b,test,passed,"2026-06-27T23:51:22.968Z","2026-06-27T23:51:49.823Z","2026-06-27T23:51:49.823Z",null,null,7,0,0,null,null,null +docs[1]{path,scope,note}: + docs/RELEASING.md,project,document scheduled publish closing blocked auto-release issues body: "" diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index b076edbc4..c2a6b5db2 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -99,6 +99,7 @@ jobs: run: pnpm build - name: Run auto release pipeline + id: auto_release env: GITHUB_EVENT_NAME: ${{ github.event_name }} # GitHub Actions evaluates boolean `false` as falsy in `&& ... || ...` @@ -166,6 +167,41 @@ jobs: exit 1 fi gh run watch "${RELEASE_RUN_ID}" --compact --exit-status --interval 30 + PUBLISHED_SHA="$(git rev-list -n 1 "${NEW_TAG}")" + echo "published_tag=${NEW_TAG}" >> "${GITHUB_OUTPUT}" + echo "published_sha=${PUBLISHED_SHA}" >> "${GITHUB_OUTPUT}" + + - name: Resolve blocked scheduled auto-release issue + if: success() && github.event_name == 'schedule' && steps.auto_release.outputs.published_tag + shell: bash + env: + GH_TOKEN: ${{ github.token }} + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + RELEASE_SHA: ${{ steps.auto_release.outputs.published_sha }} + RELEASE_TAG: ${{ steps.auto_release.outputs.published_tag }} + run: | + set -euo pipefail + title="Auto Release blocked: scheduled run failed" + existing_issue="" + if ! existing_issue="$(gh issue list --state open --search "\"${title}\" in:title" --json number --jq '.[0].number // empty')"; then + echo "Could not query blocked auto-release issues after successful publish; leaving release status successful." + exit 0 + fi + if [[ -z "${existing_issue}" ]]; then + echo "No open blocked auto-release issue found." + exit 0 + fi + body="Scheduled Auto Release succeeded and published \`${RELEASE_TAG}\`. + + Run: ${RUN_URL} + Commit: ${RELEASE_SHA} + + Closing this stale blocker because the scheduled production path pushed a release tag and the downstream Release workflow completed successfully." + + if ! gh issue close "${existing_issue}" --comment "${body}" --reason completed; then + echo "Could not close blocked auto-release issue #${existing_issue} after successful publish; leaving release status successful." + exit 0 + fi - name: Alert on blocked scheduled auto-release if: failure() && github.event_name == 'schedule' diff --git a/docs/RELEASING.md b/docs/RELEASING.md index e17a09477..5aca66f40 100644 --- a/docs/RELEASING.md +++ b/docs/RELEASING.md @@ -59,6 +59,7 @@ Policy: - release reliability gating requires `SENTRY_PERSONAL_ADMIN_TOKEN` for issue-threshold checks; Auto Release fails before creating the version commit/tag when the token is missing and `push=true`, while sourcemap upload remains optional through `SENTRY_AUTH_TOKEN` - after creating and pushing a new tag, auto-release dispatches `.github/workflows/release.yml` with that tag and waits for the publish workflow to finish, because GitHub does not start normal push/tag workflows from `GITHUB_TOKEN` pushes - scheduled failure issues include the preflight state (`push`, `dry_run`, `release_pat_configured`, and `sentry_personal_admin_token_configured`) plus a detected cause so agents can distinguish missing release secrets from Sentry gate failures without scanning the full workflow log first +- after a scheduled run publishes a tag and the downstream release workflow succeeds, auto-release closes any open `Auto Release blocked` issue so the GitHub tracker reflects current release health Pipeline entrypoint: diff --git a/tests/integration/ci-workflow-contract.spec.ts b/tests/integration/ci-workflow-contract.spec.ts index 5c393a8ec..4250505b3 100644 --- a/tests/integration/ci-workflow-contract.spec.ts +++ b/tests/integration/ci-workflow-contract.spec.ts @@ -411,6 +411,19 @@ describe("GitHub workflow contract", () => { "--telemetry-mode", "gh workflow run release.yml --ref main -f tag=\"${NEW_TAG}\"", "gh run watch \"${RELEASE_RUN_ID}\" --compact --exit-status --interval 30", + "id: auto_release", + "PUBLISHED_SHA=\"$(git rev-list -n 1 \"${NEW_TAG}\")\"", + "echo \"published_tag=${NEW_TAG}\" >> \"${GITHUB_OUTPUT}\"", + "echo \"published_sha=${PUBLISHED_SHA}\" >> \"${GITHUB_OUTPUT}\"", + "name: Resolve blocked scheduled auto-release issue", + "if: success() && github.event_name == 'schedule' && steps.auto_release.outputs.published_tag", + "RELEASE_SHA: ${{ steps.auto_release.outputs.published_sha }}", + "RELEASE_TAG: ${{ steps.auto_release.outputs.published_tag }}", + "Could not query blocked auto-release issues after successful publish; leaving release status successful.", + "No open blocked auto-release issue found.", + "Scheduled Auto Release succeeded and published", + "Could not close blocked auto-release issue #${existing_issue} after successful publish; leaving release status successful.", + "gh issue close \"${existing_issue}\" --comment \"${body}\" --reason completed", "name: Alert on blocked scheduled auto-release", "if: failure() && github.event_name == 'schedule'", "GH_TOKEN: ${{ github.token }}",