Skip to content

fix(tdd): cut ecosystem-specific examples from the coverage, integration-testing and four-pillars pages - #17781

Merged
kyle-sexton merged 2 commits into
mainfrom
work-resolve-issue/issue-17769-44856157092-1
Nov 21, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
work-resolve-issue/issue-17769-44856157092-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Closes #17769

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Part 5 of 6 of #16758. This part cuts 5 rows, all R11 and all CUT; none is GONE and none is R8, so no row is pending an eval case. Rows: F0406 (R11, K7: C#/xUnit.net coverage listings in code-coverage-khorikov.md) CUT; the four csharp listings are deleted, and the prose that only made sense beside them is restated without code. F0407 (R11, K7: editorial note naming PIT "test strength" and Infection "Covered Code MSI") CUT; the parenthetical is deleted. F0408 (R11, K7: C#, Moq, xUnit.net mocking and spy listings in integration-testing-khorikov.md, including the object-mother listing near the end) CUT; the five csharp listings, the Moq Times.Once/VerifyNoOtherCalls() names, the LogManager.GetLogger() call and the "in C#" phrase are removed, and the spy paragraph now states in prose that asserting the exact count plus each expected message's content covers both checks. F0409 (R11, K7: EF Core/NHibernate/SQLite unit-of-work and DbContext text in integration-testing-khorikov.md) CUT; the Entity Framework, EF Core, CrmContext/DbContext, SaveChanges(), Commit()/Dispose(), NHibernate, SQLite and EF InMemory names are gone, and the unit-of-work rule (the ORM is the mapper) is kept in neutral words. F0410 (R11, K7: "Verifying SQL string literal" in four-pillars-khorikov.md) CUT; that table cell now reads "Checking which internal methods the SUT calls, in what order" so the table keeps a brittle-test example (a neutral example, not a routing site). Whole page or part: every file loses only part of its text and no page is deleted (code-coverage-khorikov.md part, integration-testing-khorikov.md part, four-pillars-khorikov.md part: one table cell). Script readers: search rg 'code-coverage-khorikov|integration-testing-khorikov|four-pillars-khorikov' over the repository (excluding .lane/) matched only .performance/ratchets.json:190-191 (the skill-stack-fences ceilings), the tdd CHANGELOG, plugins/knowledge/skills/distill/SKILL.md:100 (a naming example), and markdown links in tdd:principles SKILL.md, test-design.md, test-doubles.md and property-based-testing.md. No script reads any of the three files by name; scripts/skill-stack-fences.py only counts fences across every tracked plugin skill file. So no row was kept for a script reader, and the Script readers list is empty. Eval cases for tdd:principles: no existing case under plugins/tdd/evals/ quotes or grades the cut text (the search for IsStringLong, int.Parse, BusSpy, DomainLogger, CrmContext, SaveChanges, Times.Once, SQL string, test strength and Covered Code MSI found no match in an eval). Three cases route to tdd:principles on topics of the changed integration-testing page and may load it: pr-mock-managed-db (managed vs unmanaged; the in-memory-database example names are cut), pr-interface-in-process (interfaces; the UserController listing is cut) and pr-reads-vs-writes (reads vs writes; the ORM names are cut). Their expected outcomes rest on rules this change keeps. Ratchet: the…

Not verified

  • tidy: not run because the change spans 2 areas (plugins/tdd with .changes/tdd, plus .performance), above the tidy cutoff of 1 area
  • check-affected sub-checks it skipped: typos (not installed), comment-hygiene (fetching the ci-workflows action was blocked by the sandbox network allowlist), size-check (audit-size.sh missing from the checks bundle), three validate-plugins sub-checks and changed-skills (they run code from the…
  • Running the skill-stack-fences ratchet (python3 scripts/skill-stack-fences.py with ratchet.py) is left to the PR's CI because this lane cannot run an interpreter. The zero count was checked by reading the fence rules in skill-stack-fences.py and searching the files for tagged fences
  • verify: no build or test suite covers these markdown reference pages; the before-and-after eval on tdd:principles is the host session's step after the PR opens, not this lane's
  • Out of scope and left as is: plugins/tdd/skills/principles/reference/test-doubles.md:122 still names Times.Once and VerifyNoOtherCalls(), and integration-testing-khorikov.md still says "separate assembly/namespace" outside the cited row ranges. Neither is in this part's row table

Fix

  • plugins/tdd/skills/principles/reference/code-coverage-khorikov.md: F0406 removes the four C# listings and restates the code-compaction, side-effect, assertion-free and library-branch examples in prose. F0407 removes the PIT and Infection metric names from the editorial note.
  • plugins/tdd/skills/principles/reference/integration-testing-khorikov.md: F0408 removes the five C# listings (UserController, DomainLogger, Moq Verify, BusSpy, CreateUser), the Moq call names, the LogManager.GetLogger() call and the "in C#" phrase, restating the spy and object-mother points in…
  • plugins/tdd/skills/principles/reference/four-pillars-khorikov.md: F0410 replaces the "Verifying SQL string literal" example with "Checking which internal methods the SUT calls, in what order".
  • .performance/ratchets.json: removes the skill-stack-fences ceilings for code-coverage-khorikov.md (4) and integration-testing-khorikov.md (5); both files now have 0 counted fences.
  • .changes/tdd/work-resolve-issue-issue-17769-44856157092-1-66a68e15.md: new patch changelog fragment for tdd describing the cut.

Verification

The runner ran each check from the base copy against 56c9dd2:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • rg for the three file names across the repository (excluding .lane/): no script reads them; the only non-markdown hit is .performance/ratchets.json:190-191
  • rg for ^\s*```\w|csharp|EF Core|DbContext|NHibernate|SQLite|Moq|xUnit in the three changed pages: no match, so no language-tagged fence or named ecosystem library is left
  • rg for the cut symbols (IsStringLong, int.Parse, BusSpy, DomainLogger, CrmContext, SaveChanges, Times.Once, SQL string, test strength, Covered Code MSI) across plugins/tdd outside the changed pages: no hit in an eval case
  • Read plugins/performance/scripts/ratchet.py tighten_per_file: it keeps only ceilings above 0, so removing the two entries matches what the tighten step writes
  • check-changelog-fragments: All 3 changelog fragment(s) under .changes/ are valid (run before and after the review fixes)
  • check-changed-skills: CHECK-SKILL principles PASS, 0 errors, 2 warnings that existed before this change (no Gotchas surface; description length 621 is above the 419 warn setting)
  • check-affected: 14 passed, 9 skipped over 5 changed files (run before and after the review fixes)
  • Fresh-context review subagent over the full diff and the fragment: one medium finding (the spy sentence implied a count assertion alone proves the expected message exists) and low findings (the 80% figure stated in general, the assertion-free wording, an ambiguous "one", a four-pillars example that…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44856157092

Left out: the items under Not verified.

Main merged at 0f46f28; in the measured paths, main changed nothing (two unopened tdd reference pages arrived; SKILL.md identical).

Related

#17769

Lane-Activity: work-resolve-issue/resolve-issue
@melodic-automation-lanes melodic-automation-lanes Bot added the do-not-merge Hard merge gate: do not merge while applied. label Nov 21, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Held for the before-and-after eval that cut item #17769 needs. The pr-merge release step lifts this hold when an eval-pair record exists for the current head.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 0f46f2838f1a9b518f63cefbe2d2c2a3c5fb3c63: read 5 of 5 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #17781, no security issues found

This lane already reviewed an earlier head, so this review was blocking only: it reports CRITICAL and IMPORTANT findings and drops SUGGESTION findings. I read every hunk of all 5 changed files in the full diff. None of the files matches a trusted-path glob.

What the change does

  • It removes C#, Moq, xUnit, Entity Framework, NHibernate, SQLite, PIT and Infection example listings and names from three tdd:principles reference pages: code-coverage-khorikov.md, integration-testing-khorikov.md and four-pillars-khorikov.md. Prose now states the examples instead.
  • It removes the skill-stack-fences ceilings for two files from .performance/ratchets.json.
  • It adds a patch changelog fragment for tdd.

What I checked

  • Instruction surface: I checked the edits to these skill reference pages as possible guardrail removals. What was removed is example code and library names, not rules. The rules the pages teach are kept or reworded with the same meaning, for example "mock only unmanaged dependencies", "inject loggers explicitly", "use the same DBMS in tests" and "verify existence and absence of calls". No rule on destructive actions, secrets, trust or publishing is removed or softened. Because no guardrail is deleted, I did not read the instruction-exception register.
  • Trust controls and holds: The diff does not touch the trusted-trigger check, the token broker or a lane-token request, the kill switch, a merge hold, an action, a workflow or a plugin manifest.
  • Ratchet file: Removing the two fence-count ceilings changes a quality budget only. It has no security effect.
  • Embedded instructions: The PR context contains no text telling the lane to pass the PR, skip a check, drop a finding or post elsewhere.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 0f46f2838f1a9b518f63cefbe2d2c2a3c5fb3c63: read 5 of 5 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no blocking findings. This was a blocking-only review: the lane already reviewed the earlier head 56c9dd2d, so this pass reports only blocking findings.

The new head 0f46f283 is a merge of main into the branch. I read all 5 changed files in the full diff:

  • the tdd changelog fragment
  • .performance/ratchets.json
  • the three tdd:principles reference pages: code-coverage, four-pillars and integration-testing.

The cuts are the same as at the earlier head.

Closing issue #17769.

  • Every row is cut. All five rows (F0406 to F0410) are cut. Where the surrounding text needed an example, it is restated in prose.
  • No leftovers. I searched the three pages for these leftovers and found none: IsStringLong, BusSpy, CreateUser, CrmContext, SaveChanges, Times.Once and "Listing 10".
  • Fences. The only code fences left are untagged formula and diagram blocks.
  • Ratchet. The two skill-stack-fences per-file entries are deleted. A missing entry reads as a ceiling of 0, so this tightens the check rather than loosening it, which meets the ratchet item.
  • PR-body items. The row list, the script-reader search, the eval-case statement and the whole-page-or-part statement are all in the PR body. These are the author's claims; I did not check them myself.
  • No test. No test in the repository could fail if the cut text came back. Coverage of these model-read pages rests on the host session's before-and-after eval, which the issue schedules for after the PR opens.

Loosened checks. The prompt gave no loosened-check settings lines, so I used verdict fail with no consumer patterns. The citation requirement was not checked. No loosening was found.
Loosened checks would be marked: fail (bundled default); patterns: 0

Plugin manifests. No plugin manifest changed. The fragment's bump: patch fits a documentation-only edit.

Verifier dropped 0 of 0 candidates.

@kyle-sexton

Copy link
Copy Markdown
Member

Targeted eval result: PASS

One targeted case per changed skill, run on the old text (before) and the new text (after), on sonnet at 3 runs a side, Claude Code 2.1.330 (Claude Code).

What this gate checks: that the new text does no worse than the old on these cases. By the owner's decision of 2026-11-17 the gate is this no-loss compare alone. There is no wrong-text side, so this case set has not been shown to detect wrong text: a PASS says the cases did not get worse, not that they would have noticed a bad edit.

Scope: pure cut (five R11 rows, no R8 row): listings and tool names replaced by prose stating the same rules. Measured by p17781-tp-coverage-integration (prompt names the three pages, R121): F0406 (coverage listings; high-coverage-nothing, trouble-below-60), F0407 (PIT and Infection names in the editorial note; covered-code-score), F0408 (mock and spy listings; mock-raw-transport), F0409 (EF Core/NHibernate/SQLite unit-of-work listings; no-in-memory-db, three-contexts, clean-at-start), F0410 (four-pillars brittle example 'Verifying SQL string literal' replaced; sql-string-resistance, whose prompt asks about exactly that test).

  • New case p17781-tp-coverage-integration: no tdd:principles case grades these rules deterministically, so a rules-only case was written: eight regex graders on fixed KEY lines, each anchored positive (no negative lookahead), no Skill grader (slash prompt, R105); the prompt names the code-coverage, integration-testing and four-pillars pages.

  • Loss-capable graders: sql-string-resistance (F0410 example replaced), covered-code-score (F0407 names cut), mock-raw-transport (F0408 IBus/IMessageBus listing cut), three-contexts and no-in-memory-db (F0409 listings cut). The rest read kept prose.

  • Control result (the issue's acceptance item): not run: the owner's decision of 2026-11-17 gates cut pull requests on the no-loss compare alone.

  • Before: 2a79a8517973efcadc5330fe2f9635d1ce11ab1c (merge base with main)

  • After: 56c9dd2d37aeb372b1b51bb19ece880c03e15a88 (pull request head; live head when this was written: 56c9dd2d37aeb372b1b51bb19ece880c03e15a88)

  • Loss: the mean case score falls by 0.15 or more, or any one grader passes in 2 or more fewer after runs than before runs.

Passing runs per grader, per side:

Case Grader Before After
p17781-tp-coverage-integration high-coverage-nothing 3/3 3/3
p17781-tp-coverage-integration trouble-below-60 3/3 3/3
p17781-tp-coverage-integration covered-code-score 3/3 3/3
p17781-tp-coverage-integration no-in-memory-db 3/3 3/3
p17781-tp-coverage-integration three-contexts 3/3 3/3
p17781-tp-coverage-integration clean-at-start 3/3 3/3
p17781-tp-coverage-integration mock-raw-transport 3/3 3/3
p17781-tp-coverage-integration sql-string-resistance 3/3 3/3
p17781-tp-coverage-integration mean case score 1.000 1.000

Graders that cannot show a loss, because they failed on the old text in every run:

  • none: every grader passed in at least one run on the old text

Changed files the compare runs opened, per case and side:

  • p17781-tp-coverage-integration before: opened skills/principles/reference/code-coverage-khorikov.md in 3 of 3 runs; opened skills/principles/reference/four-pillars-khorikov.md in 3 of 3 runs; opened skills/principles/reference/integration-testing-khorikov.md in 3 of 3 runs
  • p17781-tp-coverage-integration after: opened skills/principles/reference/code-coverage-khorikov.md in 3 of 3 runs; opened skills/principles/reference/four-pillars-khorikov.md in 3 of 3 runs; opened skills/principles/reference/integration-testing-khorikov.md in 3 of 3 runs

Rows these runs measured (the row's file opened in at least 2 of 3 runs on each side, or loaded with the skill or agent):

  • F0406 (skills/principles/reference/code-coverage-khorikov.md, case p17781-tp-coverage-integration): opened in 3 of 3 before, 3 of 3 after runs
  • F0407 (skills/principles/reference/code-coverage-khorikov.md, case p17781-tp-coverage-integration): opened in 3 of 3 before, 3 of 3 after runs
  • F0408 (skills/principles/reference/integration-testing-khorikov.md, case p17781-tp-coverage-integration): opened in 3 of 3 before, 3 of 3 after runs
  • F0409 (skills/principles/reference/integration-testing-khorikov.md, case p17781-tp-coverage-integration): opened in 3 of 3 before, 3 of 3 after runs
  • F0410 (skills/principles/reference/four-pillars-khorikov.md, case p17781-tp-coverage-integration): opened in 3 of 3 before, 3 of 3 after runs

Rows these runs did not measure:

  • none

Verdicts:

  • verdict p17781-tp-coverage-integration (principles): PASS (no loss: after 1.000, before 1.000)

Cost: 0.86 USD (smoke and compare, the runs' costUsd).

The cases live outside the repository; their full text:

The 1 cases: prompt.md and case.yaml

p17781-tp-coverage-integration

prompt.md:

---
description: "Written for PR 17781 (rows F0406-F0410, R11 cuts of C#/xUnit/Moq listings, EF Core/NHibernate/SQLite units of work, PIT and Infection names and a SQL-literal example in tdd:principles' coverage, integration-testing and four-pillars pages). Asked about coverage targets, the mutation score to read, database and message-bus testing and a SQL-string assertion, the reply says high coverage means nothing and low is trouble, reads the covered-code score, uses the real database (no in-memory one) with separate contexts per test section cleaned at the start, mocks the bus at the raw transport, and names resistance to refactoring as the pillar a SQL-string assertion sacrifices"
tags: [principles, routine]
max_turns: 20
timeout_seconds: 600
allowed_tools: [Skill, Read, Glob, Grep]
expected_outcome: "Nothing is run. The reply says 95% coverage proves nothing, below about 60% is a sure sign of trouble, the covered-code mutation score is the one to read, the real database is used with no in-memory substitute, at least three contexts (arrange, act, assert), data cleaned at the start, the bus mocked at the raw transport, and a SQL-string assertion sacrifices resistance to refactoring. It ends with the eight fixed lines."
---

/tdd:principles

Our team keeps arguing about tests for our order service, so settle these:

1. Our coverage is 95%. What does that tell us? And below roughly what percentage is coverage a sure sign of trouble?
2. We also run mutation testing. Which mutation score should we read?
3. For integration tests against our app-only Postgres database, can we swap in an in-memory database to go faster?
4. In one integration test, how many separate database contexts should arrange, act and assert use at minimum, and when do we clear leftover data: at the start or the end of each test?
5. We wrap our message bus in an `OrderMessages` class. Do we mock `OrderMessages` or the raw bus transport underneath it?
6. One repository test asserts the exact SQL string the repository builds. Which of the four pillars does that test give up?

Answer from your Khorikov guidance, and check your answers against its code-coverage, integration-testing and four-pillars reference pages; don't research online or run anything.

End with exactly these eight lines:

HIGH_COVERAGE_MEANS: <what 95% tells us>
TROUBLE_BELOW: <percent>
MUTATION_SCORE: <which score>
IN_MEMORY_DB: <yes or no>
MIN_CONTEXTS: <number>
CLEAN_DATA_AT: <start or end>
MOCK_BUS_AT: <OrderMessages or the raw transport>
SQL_STRING_SACRIFICES: <the pillar>

case.yaml:

schema_version: "1.1"
name: p17781-tp-coverage-integration
plugins: ["../.."]
graders:
  - name: 'high-coverage-nothing'
    type: 'regex'
    pattern: '^[\W_]*HIGH_COVERAGE_MEANS[*_]*:[^\n]*(?:nothing|little|not much|doesn''t mean|does not mean|no guarantee|only that)'
    flags: 'im'
    target: 'last_message'
  - name: 'trouble-below-60'
    type: 'regex'
    pattern: '^[\W_]*TROUBLE_BELOW[*_]*:[^\n]*\b60\b'
    flags: 'im'
    target: 'last_message'
  - name: 'covered-code-score'
    type: 'regex'
    pattern: '^[\W_]*MUTATION_SCORE[*_]*:[^\n]*covered[- ]code'
    flags: 'im'
    target: 'last_message'
  - name: 'no-in-memory-db'
    type: 'regex'
    pattern: '^[\W_]*IN_MEMORY_DB[*_]*:[\s*`]*no\b'
    flags: 'im'
    target: 'last_message'
  - name: 'three-contexts'
    type: 'regex'
    pattern: '^[\W_]*MIN_CONTEXTS[*_]*:[\s*`]*(?:3|three)\b'
    flags: 'im'
    target: 'last_message'
  - name: 'clean-at-start'
    type: 'regex'
    pattern: '^[\W_]*CLEAN_DATA_AT[*_]*:[\s*`]*(?:the\s+)?start'
    flags: 'im'
    target: 'last_message'
  - name: 'mock-raw-transport'
    type: 'regex'
    pattern: '^[\W_]*MOCK_BUS_AT[*_]*:[\s*`]*(?:the\s+)?raw'
    flags: 'im'
    target: 'last_message'
  - name: 'sql-string-resistance'
    type: 'regex'
    pattern: '^[\W_]*SQL_STRING_SACRIFICES[*_]*:[^\n]*resistance to refactoring'
    flags: 'im'
    target: 'last_message'

Posted by an agent session.

@kyle-sexton

Copy link
Copy Markdown
Member

eval-Q1 (worker session of the 3811aa46 orchestrator line) is taking main into this branch by merge, at the orchestrator's request, because the branch is DIRTY against main after its eval record. After the push, the measured plugins/tdd files will be diffed against the recorded head 56c9dd2 and the result noted here.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The do-not-merge hold waited only on eval evidence (reason=eval), and a listed human posted a VALID no-loss eval-pair record for 56c9dd2d37aeb372b1b51bb19ece880c03e15a88: #17781 (comment). pr-merge removed do-not-merge. To hold again, add the label back with a new pr-hold reason line.

@melodic-automation-lanes melodic-automation-lanes Bot removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/resolve-conflicts

Run 44878932845, attempt 1

Field Value
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44878932845

Failed GitHub API calls

No failed call recorded by the run job's scripts.

Lane-Activity: pr-unblock/resolve-conflicts
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-conflict-patch

Run 44878932845, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed 0f46f28
Run 44878932845

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@kyle-sexton

Copy link
Copy Markdown
Member

Eval head check (R126): the head moved from 56c9dd2 (the eval-pr-17781 record) to 0f46f28 by a merge of main. git diff --name-only 56c9dd2d 0f46f283 -- plugins/tdd lists skills/principles/reference/observable-behavior-khorikov.md and skills/principles/reference/testing-styles-khorikov.md (PR 17776's cut arriving from main). Neither is a measured file of this eval: across all eight eval-pr-17781 runs (smoke and compare, both sides) no trace names either file, so no run opened them. plugins/tdd/skills/principles/SKILL.md is byte-identical between the two heads, and the three measured pages (code-coverage, integration-testing, four-pillars) are unchanged. The record stands; no re-run.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 7c4a38b Nov 21, 2026
45 checks passed
@kyle-sexton
kyle-sexton deleted the work-resolve-issue/issue-17769-44856157092-1 branch November 21, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cut the model-read ecosystem specifics from tdd: code-coverage, integration-testing and four-pillars

1 participant