[DOCS] Document Mode B waiver formatting/merge-queue requirements and post-approval issue edits

Open Beginner friendly
#4,719 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
bash, github-actions, markdown, node.js
Domain
documentation

Research direction

Two documentation edits only. In docs/src/content/docs/contributing/development-guide.md under Mode B, add the column-0 apm-spec-waiver: rule and the merge-queue note, checking them against tests/spec_conformance/mode_b_detector.sh and .github/workflows/spec-conformance.yml; in CONTRIBUTING.md under Scope record format, add the note that editing the issue body after approval triggers needs-evidence, per scripts/governance/run.cjs and authority.cjs. Done means both sections match those files and npm --prefix docs run build passes. Do not modify the scripts or workflow.

Written by the indexing model from the issue text.

Description

status/triage-pending type/docs

Is your feature request related to a problem? Please describe.

Contributors following the current contributing documentation can hit two undocumented governance/CI pitfalls:

  1. Mode B apm-spec-waiver: formatting and merge-queue behavior (docs/src/content/docs/contributing/development-guide.md)

    • The Development Guide currently states only: "add apm-spec-waiver: <one-line rationale> to the PR body or a commit message."
    • In tests/spec_conformance/mode_b_detector.sh, waivers are matched with grep -E '^apm-spec-waiver:'. The line must start at column 0 — wrapping the waiver in backticks or prefixing it with bullets/text silently fails to match.
    • In .github/workflows/spec-conformance.yml, the workflow runs on both pull_request and merge_group, passing GH_PR_BODY: ${{ github.event.pull_request.body }}. On merge_group, github.event.pull_request.body is empty, so a waiver placed only in the PR body passes PR checks but ejects the PR from the merge queue unless it is also in a commit message.
  2. Editing the issue body after scope approval (CONTRIBUTING.md)

    • The Scope record format section states "Do not edit or delete decisions to change their meaning", which reads as applying only to the approval comment.
    • In scripts/governance/run.cjs, changedIssue is set whenever issues or issue_comment fires with edited or deleted, causing scripts/governance/authority.cjs (evaluateIssue) to report needs-evidence ("A decision or its context was edited/deleted; obtain fresh human confirmation."). Contributors who tidy up the issue description after approval unexpectedly invalidate the advisory eligibility check.

Both pitfalls surfaced while working on PR #2764 (for issue #3084).

Describe the solution you'd like

Document the existing behavior in the contributor docs (documentation-only clarification; no policy or script changes):

  • In docs/src/content/docs/contributing/development-guide.md (under Mode B (silent extension)):
    • State that apm-spec-waiver: <one-line rationale> must appear at the start of a line (no backticks or leading punctuation).
    • State that because merge_group does not receive the PR body, the waiver must be included in a commit message (not only the PR body) to pass the merge queue.
  • In CONTRIBUTING.md (under Scope record format):
    • Note that editing the issue body after approval also triggers needs-evidence in the eligibility check, so avoid editing the issue description once scope is approved.

How we'll know it works:

  • Both sections match the current behavior of tests/spec_conformance/mode_b_detector.sh, .github/workflows/spec-conformance.yml, and scripts/governance/{run,authority}.cjs, and the docs build (npm --prefix docs run build) passes cleanly.

Out of scope:

  • Changing governance policy or modifying tests/spec_conformance/mode_b_detector.sh, .github/workflows/spec-conformance.yml, or scripts/governance/*.cjs.

Expected benefit:

  • Fewer surprise CI / merge-queue ejections on valid Mode B waivers and fewer accidental eligibility invalidations after scope approval.

Describe alternatives you've considered

  • Changing the CI/governance scripts instead: Relaxing mode_b_detector.sh (e.g., stripping formatting or looking up PR bodies on merge_group) or narrowing changedIssue in scripts/governance/run.cjs would require workflow/governance-script changes and security review. Documenting the current contract is minimal, accurate, and immediately helpful; script changes can still be considered separately if maintainers prefer.

Additional context

  • Related references where these pitfalls surfaced: PR #2764, issue #3084.
  • I am happy to open the docs PR once scope is approved.
Dominant language
Python
Stars
4.4k
Forks
430
Avg merge
19h 38m
Merged PRs (30d)
637

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/apm

All issues in microsoft/apm

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.