Repository navigation
docs(tests): encode the test module marker rule (tm006) - #4303
Merged
Daniel Meppiel (danielmeppiel) merged 1 commit intoNov 20, 2026
Merged
Conversation
…instructions Adds a short "Test module markers (tm006)" section: the pytestmark template, how to choose the behavioral marker and the promise ids, the local check, and the merge-conflict rule for modify/delete on tests. The apm-lifecycle-tests skill and the test-coverage-expert agent point to it. Generated copies and their lockfile hashes are updated to match. Part of #4113 Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 20, 2026 12:12
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The test-instruction template fails collection because it requires an unregistered promise marker under strict-marker enforcement and references a missing promise catalog.
1 open issue
What changed in this PR
This documentation-only PR centralizes the test module marker guidance in APM’s contributor instructions and points the lifecycle skill and coverage-review agent to it. It does not change runtime or test behavior.
Changes:
- Adds a
pytestmarktemplate, marker-selection guidance, a local taxonomy check, and a merge-conflict rule. - Replaces repeated guidance with references to the canonical section.
- Updates generated copies and their lockfile content hashes.
| File | Description |
|---|---|
apm.lock.yaml |
Updates hashes for the three changed generated files. |
.github/instructions/tests.instructions.md |
Mirrors the new test module marker guidance. |
.github/agents/test-coverage-expert.agent.md |
Adds the canonical marker-guidance reference. |
.apm/skills/apm-lifecycle-tests/SKILL.md |
Replaces inline marker guidance with a canonical reference. |
.apm/instructions/tests.instructions.md |
Defines the central marker instructions and local check. |
.apm/agents/test-coverage-expert.agent.md |
Directs coverage reviews to the central instructions. |
.agents/skills/apm-lifecycle-tests/SKILL.md |
Mirrors the lifecycle skill’s reference change. |
Review effort: Balanced
Daniel Meppiel (danielmeppiel)
deleted the
danielmeppiel-test-marker-rules
branch
November 20, 2026 12:27
3 of 9 tasks
Takeshi Masukawa (takeaship)
pushed a commit
to takeaship/apm
that referenced
this pull request
Nov 20, 2026
The tm006 template documented in microsoft#4303 uses pytest.mark.promise, which --strict-markers rejects on main until the marker is registered. Same wording and position as microsoft#4142, so the two merge cleanly. Refs microsoft#4113 Co-authored-by: copilot-swe-agent[bot] <[email protected]>
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.

Description
Writes the test module marker rule (tm006) into the tests instructions instead of broadcasting it. The new section "Test module markers (tm006)" in
.apm/instructions/tests.instructions.mdcovers:pytestmarktemplate with a behavioral marker andpytest.mark.promise(...);unit,componentore2e, chosen by the boundary the tests cross) and the promise ids (tests/quality/promise-catalog.json; spec modules usereq-*ids);uv run --extra dev pytest -p no:cacheprovider -q tests/quality/test_test_taxonomy.py;The
apm-lifecycle-testsskill and thetest-coverage-expertagent now point to this section in one line each, instead of restating the rule. The generated copies (.agents/skills/...,.github/instructions/...,.github/agents/...) and theirapm.lock.yamlcontent hashes are updated to match.python -m tests.quality.taxonomy --changedis deliberately not documented yet; it lands with that command in a later slice.Issue and approved scope
Issue: Refs #4113
Human scope-approval comment: assigned by the Stream T lead under the steward ruling on the maintainer's request to encode the test-marker rule (docs/instructions only).
Does this PR complete the issue, or what remains? Partial. The
--changedlocal check, and gate messages that suggest marker and promise values, land with that command in a later slice.Type of change
Testing
uv run apm audit --cipasses all 11 checks (no drift, content integrity clean).Note:
apm installrefuses to redeploy on current main because.agents/skills/apm-lifecycle-tests/*has no trustworthy local deployment baseline. That predates this PR. The three generated files were updated byte-for-byte from their sources (the agent copy keeps its rewritten link), and only their three lockfile hashes changed.Changelog
## [Unreleased]inCHANGELOG.mdSpec conformance (OpenAPM v0.1)
Not applicable: no behavior change.