feat(drift-issues): reconcile with apply when the capability-map PR merges - #174
Merged
juemerson-at-purestorage merged 5 commits intoSep 27, 2026
Conversation
…map merge Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…erges Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…l helper Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The tools README CI section ended at 'opens a PR'; add that the merge runs Drift Issues with -Apply. Widen the library SYNOPSIS to name the merge gate. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
juemerson-at-purestorage
marked this pull request as ready for review
September 27, 2026 12:44
juemerson-at-purestorage
deleted the
feat/drift-issues-on-capability-map-merge
branch
September 27, 2026 12:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Merging the weekly capability-map PR now starts the drift-issue reconciler automatically, with
-Apply. Until now,drift-issues.ymlran only when dispatched by hand, so a new REST spec release reached the drift reports but never reached the issue tracker unless someone remembered to run it.The weekly
update-api-capability-map.ymlrebuild stays the detector; nothing polls. The event is that PR's merge.Behaviour
Trigger.
drift-issues.ymladds apushtrigger onmain, scoped toReports/PfbApiDriftReport.jsonandReports/PfbDeadKeyReport.json.workflow_dispatchis unchanged (apply still defaults to false).Gate. A new step runs
tools/Test-PfbCapabilityMapMerge.ps1. It asks GitHub which merged PR introduced the pushed commit (GET repos/{repo}/commits/{sha}/pulls) and passes only if that PR:automated/update-api-capability-map,dmann000/fb-powershell(a fork branch with the same name does not pass),main.Any other merge that touches the reports skips the reconcile step cleanly and logs why (for example
PR #173 head branch 'feat/backlog-scorer' is not 'automated/update-api-capability-map'). An empty association is retried 3 times, 15s apart. A failed API call fails the job instead of answering "no".Reconcile. On a gated push,
New-PfbDriftIssue.ps1runs with-Applyand its existing-MaxCreate 10cap and mass-vanish guard.-AcceptMassVanishis never passed automatically.Chain. Backlog already re-ranks after Drift Issues completes, so a merge now flows through to a re-ranked backlog.
Hardening. Permissions are
contents: read,issues: write,pull-requests: read. Values reachrun:only throughenv:(no${{ }}in anyrun:block). The job is guarded todmann000/fb-powershellfor push events. Concurrency groupdrift-issues, never cancelled.The decision is a pure function (
Get-PfbCapabilityMapMergeVerdictintools/lib/PfbDriftIssueTools.ps1). The script only does the API call, retry and output.Files
tools/lib/PfbDriftIssueTools.ps1:Get-PfbCapabilityMapMergeVerdictand a null-safe field helper.tools/Test-PfbCapabilityMapMerge.ps1: new gate script. Writesis_capability_map_mergetoGITHUB_OUTPUT..github/workflows/drift-issues.yml: push trigger, gate step, conditional apply.tools/README.md: reconciler CI paragraph rewritten; "## CI" now says what merging the capability-map PR starts.Tests/PfbDriftIssueTools.Tests.ps1(+11), newTests/Test-PfbCapabilityMapMerge.Tests.ps1(7, fakegh,GITHUB_OUTPUTisolated),Tests/New-PfbDriftIssue.Tests.ps1workflow block replaced (8).Tested
Build-PfbBacklog's existing declared skips). The new test file runs on both editions, socoverage-baseline.psd1does not move.TestModuleImportGuard,CiCoverageGate,PfbApprovedVerbSuppressions): 39 / 0 / 0 on both editions.drift-issues.ymlparses as YAML (js-yaml); triggers, permissions and bothif:conditions as intended.scripts/Assert-PfbDerivedArtifacts.ps1: all 11 artifacts up to date.b9670ff(merge of the capability-map integration branch): true.233b7c8(merge of Backlog scorer: rank open issues into lanes (read-only) #173): false, wrong head branch.302f9e4(a squash merge from a fork): false, wrong head repository.Can't be tested before merge
pushtrigger fires only from the workflow file on the default branch. The first real capability-map PR merge is the true-path test: look for a Drift Issues run with eventpushwhose gate step printsPR #N merged from dmann000/fb-powershell:automated/update-api-capability-map into main.no associated pull requestand skip, not write anything wrong.Precondition (unchanged)
The repository's Actions setting "Allow GitHub Actions to create and approve pull requests" must stay on for the weekly PR to open at all. This is already stated in
tools/README.md"## CI"; nothing here adds to it.Live-verification exemption
Wire-exempt per
Test-PfbWireExemption.ps1(VERDICT: EXEMPT). Basis: the diff leaves the module source and the manifest entirely untouched, so nothing here can alter a request the module sends or a response it parses.No version or CHANGELOG change.
🤖 Generated with Claude Code