Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .agents/pm/features/pm-github-fmrf.toon
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
id: pm-github-fmrf
title: Revalidate blocked items against the live state of their GitHub blockers
description: "Add `pm github blockers`: re-read every blocked item (plus non-terminal items whose blocked_by dependency targets an external GitHub reference), parse blocked_reason/description/comments for GitHub references (owner/repo#N, bare #N vs the item repo or --repo, full issue/PR URLs, GH-N), query their current state via batched GraphQL, and report a verdict (cleared / partially_cleared / still_blocked / unresolvable). Report-only: never auto-unblock; --comment appends one idempotent pm comment per cleared item. Exit 0 when nothing cleared, a documented non-zero code when something cleared so CI and the scheduled sync can alert."
type: Feature
status: in_progress
priority: 2
tags: []
created_at: "2026-10-12T10:46:45.720Z"
updated_at: "2026-10-12T13:12:30.216Z"
author: pi-gh-blockers
comments[19]{created_at,author,text}:
"2026-10-12T10:46:49.828Z",pi-gh-blockers,"Claimed and started. Companion item: https://github.com/unbraind/pm-cli-website/blob/main/.agents/pm/features/pm-cli-website-5o9j.toon — this implements the blocker-revalidation capability the companion item calls for, in pm-github where the GitHub client, auth handling and provenance model already live. Design summary: complete pm list read (same receipts as import), candidate selection = status blocked OR non-terminal with an external GitHub blocked_by dependency, reference parsing across blocked_reason/description/comments, batched GraphQL state queries, report-only verdicts, idempotent --comment, wired into the reusable scheduled sync workflow as a report-only step."
"2026-10-12T10:55:14.500Z",pi-gh-blockers,"Implementation drafted in the package worktree: complete-read refactor (runCompletePmList shared by readPmItems and the new readBlockerPmItems), BlockerPmItem decoder validating blocked_reason/blocked_by/dependencies/comments on top of the existing complete-corpus receipts, reference parser (URL, owner/repo#N, GH-N, name#N, bare #N; gitlab/jira/linear locators masked, github: locator scheme unwrapped), hint resolution against the item's gh: provenance repo then --repo, batched GraphQL state query (issue+pullRequest per number, repos deduped+sorted so recorded fixtures stay stable), verdict function, idempotent --comment with per-item lock, report + exit codes (0 nothing cleared, 4 cleared, 2 usage/token, 1 total state failure). Real GraphQL fixtures recorded from api.github.com: unbraind/pm-cli#854 closed 2026-08-01 (the motivating blocker), #1246 open, PR #34 merged, #999999 not found, plus a repository-not-found and a data-null error response."
"2026-10-12T11:10:45.144Z",codex-sol,"Continuation audit: prior implementation and fixtures inspected; no gates or workflow integration were completed. Correcting host-rendered reports/exit status, complete SDK reads, GitHub-only dependency selection, partial error handling, and one comment per cleared item before validating. Companion scope remains pm-cli-website-5o9j."
"2026-10-12T11:18:07.181Z",codex-sol,"Verified prior fixture states live through GitHub GraphQL: pm-cli issue 854 CLOSED/COMPLETED at 2026-08-01T15:24:48Z; PR 34 MERGED at 2026-05-20T21:09:52Z; issue 1246 OPEN. Corrected focused suite passed 23/23 before added CLI/grouped-comment/permission regressions. Complete SDK reader uses listAllComplete with extensions disabled and certifyCompleteListResult. Reports now return structured exit_code for host TOON/JSON rendering. Scheduled reporting step warns on 4 and fails on read errors; comment writes are limited to fully cleared items."
"2026-10-12T11:24:38.757Z",codex-sol,"Manual acceptance used the built candidate under a distinct isolated extension identity, with explicit --pm-path, no --comment. The current pm-rl corpus is 78 items with zero blocker candidates (exit 0); both motivating items pm-rl-e20d and pm-rl-et5b are now closed. The companion corpus is 937 items with six candidates: two cleared, zero partially_cleared, zero still_blocked, four unresolvable (exit 4). Tracker items, history, and settings remained byte-identical for both runs. The complete SDK read refreshed only ignored pm-rl runtime metadata caches. No companion content or private blocker prose was copied into package evidence."
"2026-10-12T11:27:23.884Z",codex-sol,"Additional corrections: reports expose only requested item identities/status and parsed reference state, omitting full blocker prose/title from workflow logs. Annotations group newly cleared references in one comment per fully cleared item; partial query/permission or annotation failures return report + exit 1. Lock degradation now fails closed rather than permitting duplicate-prone unlocked comments. Peer/manifest floor raised together to PM CLI 2026.10.5 for required SDK and host exit_code contracts; README discloses the compatibility change."
"2026-10-12T11:34:26.749Z",codex-sol,"Behavioural revert proof in isolated source copies: replacing only parseBlockerReferences with its absent-parser behavior (empty references) made both the all-forms regression and real-tracker mixed scenario fail: 0/2 pass, exit 1. Replacing only blockerItemVerdict with the old static blocked behavior (still_blocked) made both verdict regression and real-tracker mixed scenario fail: 0/2 pass, exit 1. Production source remained intact. Scheduled report executable acceptance passed 1/1: code 4 becomes a warning and preserves item bytes; query failure remains exit 1. The first diagnostic full suite exposed installed global extension SDK/host skew in scratch health checks; workflow fixtures now isolate their global extension root."
"2026-10-12T11:38:57.331Z",codex-sol,"Corrected companion permalink after checking its canonical remote: https://github.com/unbraind/pm-cli-companion/blob/main/.agents/pm/features/pm-cli-website-5o9j.toon . The original pi comment used the legacy pm-cli-website repository name; the owner item id remains pm-cli-website-5o9j."
"2026-10-12T11:39:35.124Z",codex-sol,"Final linked regression run: pm test pm-github-fmrf --run --progress --timeout 600 passed the linked npm run build && node --test test/blockers.test.ts command, 30/30 tests, zero failures/skips/cancellations/todos. The earlier default 120-second linked run timed out on the shared host; the expanded run completed in about 136 seconds. Test-result tracking is disabled by existing project policy, so this comment records the completed evidence without altering tracker settings."
"2026-10-12T11:55:13.486Z",codex-sol,"Frozen-source npm release certification passed with CI identity isolation: env HOME=$(mktemp -d) GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1 npm run release:check. Result: 551/551 tests, zero failures/skips/cancellations/todos; exact 100/100/100/100 coverage across all 12 authored modules at unchanged thresholds. Typecheck, build, 150 documented declarations, lint, zero duplication, privacy, production audit, pack dry-run, changelog check, and publish-attestation checks passed. Source checksums stayed unchanged throughout the run."
"2026-10-12T12:06:27.255Z",codex-sol,"Packed live consumer acceptance passed 2/2 scenarios with the same npm archive installed into a scratch tracker: Node first read two distinct closed/merged references deduplicated from all requested forms, returned exit 4 and appended one grouped comment. An actual native Bun CLI run returned exit 4, skipped the existing comment, and appended zero duplicates. The scratch item retained status blocked. All GitHub calls were observational; no --comment was used on fleet or companion trackers."
"2026-10-12T12:07:13.194Z",codex-sol,"Bun release certification passed on unchanged source with CI identity isolation: env HOME=$(mktemp -d) GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_NOSYSTEM=1 bun run release:check. Result: 551/551 tests, zero failures/skips/cancellations/todos; all 12 authored modules at exact 100/100/100/100 coverage with unchanged thresholds. All release checks passed, including privacy, zero duplication, audit, packing, changelog, and attestation. Both Node/npm and Bun runner gates execute the package coverage suite under Node; native Bun behavior was separately accepted through the installed packed CLI. Item remains in_progress for orchestrator verification; no release, tag, publication, merge, or fleet/companion item mutation was performed."
"2026-10-12T12:14:48.658Z",codex-sol,"Review PR opened: https://github.com/unbraind/pm-github/pull/115 on feat/blocker-revalidation. Implementation and regression sources match the frozen source certified by both release gates; all tracked work and receipts are committed as SteveBot. CI and reviews are pending on the final PR head and are not claimed as approval. Item remains in_progress, unclaimed, for orchestrator verification. CLI UX encountered: installed project extensions shadowed the candidate and emitted a generic unknown-option error; isolated candidate identity was used for live acceptance. Unrelated installed global extension SDK/host skew contaminated scratch health until the fixtures isolated their global extension root. No CLI/SDK issue was filed."
"2026-10-12T12:23:45.555Z",codex-sol,"Final-head CodeQL reported a genuine polynomial regular expression risk in blocker comment marker extraction (alert 5): the broad repository capture could consume repeated marker openers before failing on a missing number. Reclaimed the item to fix this before handoff. Replacing that capture with the same GitHub owner/repo grammar used by reference resolution, and preventing timestamp captures from crossing HTML delimiters; adding a bounded subprocess regression against the reported repeated-prefix payload. Earlier gate receipts remain valid for their frozen source, but both gates will be rerun for the correction."
"2026-10-12T12:44:03.202Z",codex-sol,"Marker remediation verified: focused marker/idempotency cases passed 4/4; restoring only the old regex made the bounded repeated-prefix regression fail at its 10-second deadline (0/1 pass, exit 1). The corrected parser/marker protocol also preserves valid .github-style repo names and HTTP/case variants. Provenance hints now pass the same repository grammar before entering GraphQL; unresolved GH-N/#N mentions deduplicate consistently. Focused related regressions passed 11/11. Freezing this correction and rerunning both complete release gates with independent coverage directories."
"2026-10-12T12:51:37.633Z",codex-sol,"Corrected-source live acceptance repeated: pm-rl 78 items/zero candidates/exit 0; companion 937 items/six candidates/two cleared/four unresolvable/exit 4. Item/history/settings bytes remained unchanged. The newly packed corrected artifact also passed Node and native Bun acceptance 2/2: two resolved references, one grouped scratch comment on Node, zero duplicate comments on Bun, status still blocked. No --comment was used outside scratch trackers."
"2026-10-12T12:58:08.241Z",codex-sol,"Corrected pm-linked blocker suite passed 32/32, zero failures/skips/cancellations/todos, using pm test pm-github-fmrf --run --only-index 1 --progress --timeout 600. The marker performance test and repository/provenance regressions are included. Both complete release runs have passed their adversarial workflow fixtures; final receipts remain pending."
"2026-10-12T13:03:23.942Z",codex-sol,"Corrected-source final certification supersedes the earlier source receipts: npm run release:check and bun run release:check both passed with required HOME/Git identity isolation, 553/553 tests each and zero failure/skip/cancel/todo. Bun ran in an identical isolated source copy with independent coverage output. Both coverage receipts matched: 12 authored modules, 9486/9486 lines and statements, 232/232 functions, 2484/2484 branches, exact 100/100/100/100 at unchanged thresholds. All remaining release checks passed. Linked suite 32/32, scheduled acceptance 1/1, packed Node/native Bun 2/2, parser/verdict revert proofs 0/2 each, old-marker-regex revert 0/1 with bounded timeout. Implementation/test checksums stayed unchanged across these runs. Pushing the correction to PR 115 for final-head CodeQL verification."
"2026-10-12T13:12:30.216Z",codex-sol,"Final correction 50c41c6166d9333e2259e8dc9b3ead68a3ade4da reached PR 115 after transient commit_refs push rejections. CodeQL results check 114825479059 succeeded with No new alerts and zero annotations; the codeql workflow and Semgrep also succeeded. The previous polynomial marker alert is remediated. Node 22/26 CI is still running; neutral/skipped/unavailable reviewers are not approval. All implementation/test bytes remain identical to the npm/Bun 553-test, exact-coverage receipts. Claim remains released and item in_progress for orchestrator verification. No merges, tags, releases or publications were made."
files[7]{path,scope}:
index.ts,project
manifest.json,project
package-lock.json,project
package.json,project
test/blockers.test.ts,project
test/compatibility-floor.test.ts,project
test/import-gate.test.ts,project
tests[2]{command,scope,provenance{author,created_at,source_kind,source_ref}}:
npm run build && node --test test/blockers.test.ts,project,codex-sol,"2026-10-12T11:26:22.651Z",local_mutation,feat/blocker-revalidation
"node --test --test-name-pattern=\"scheduled blocker report\" test/import-gate.test.ts",project,codex-sol,"2026-10-12T11:44:17.430Z",local_mutation,feat/blocker-revalidation
docs[3]{path,scope}:
.github/workflows/pm-github-sync.yml,project
README.md,project
test/fixtures/blockers/README.md,project
body: ""
Loading
Loading