Skip to content

docs(tdd): cut C and Moq listings from observable-behavior and testing-styles - #17776

Merged
melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-17765-44855349322-1
Nov 21, 2026
Merged

melodic-automation-lanes[bot] merged 2 commits into
mainfrom
work-resolve-issue/issue-17765-44855349322-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #17765

Summary

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

Part 3 of 6 of #16758: this cuts the model-read C#, Moq, xUnit.net and Fluent Assertions text from two tdd:principles reference pages. Neither page is a routing site, so under R11 each listing is deleted with no generic replacement, and prose that only pointed at a removed listing is trimmed or folded into the surrounding sentence.

Row count: 2 (both R11).

  • F0402 (R11, K7), observable-behavior-khorikov.md, C# and Moq Mock<T> listings: CUT. All 6 csharp fences are deleted. The 'Mock (the Tool) vs Mock (the Test Double)' subsection is deleted because it existed only to explain Moq's Mock<T> and listing 5.2. The Moq method names Setup and Verify are dropped from the both-roles paragraph. The leaking-API and mock-or-not examples are kept as one prose sentence each. Nothing in the cited span was already GONE.
  • F0403 (R11, K7), testing-styles-khorikov.md, output, state and communication listings: CUT. All 9 csharp fences are deleted, plus the C# and .NET names outside fences: DateTime.Now (now 'the current time'), Directory.GetFiles()/File.WriteAllText(), Fluent Assertions' BeEquivalentTo, struct and the C# tuple return signature. Listings already GONE: none. Every cited listing was still present at HEAD 2a79a85. The issue's spot grep found one xUnit/Moq/Fluent hit only because it matched names, not csharp fences.

Script readers: I searched the whole checkout for observable-behavior-khorikov|testing-styles-khorikov with Grep. The only hits are .performance/ratchets.json:192 and :196 (the ceilings changed here), plugins/tdd/skills/principles/SKILL.md:26-27 (the routing table links) and plugins/tdd/skills/principles/reference/test-doubles.md:156 (a prose link). No script reads either file, so neither row is held back.

Eval cases for tdd:principles that read the cut text: none reads a cut listing. Two cases exercise concepts these pages teach in prose that is kept: plugins/tdd/evals/pr-verify-in-process-call (output-based assertion and inter-system communication scope) and plugins/tdd/evals/pr-mock-managed-db (managed database kept real, message bus mocked).

Partial or whole page: both files are PARTIAL cuts, and neither page is deleted, so no whole-page outcome prediction applies. Pending its targeted eval case (host session).

Ratchet: the files now count 0 skill-stack-fences fences (only the untagged taxonomy and decision-tree diagrams are left, and untagged fences are not counted). I removed both entries from the per-file ceilings in .performance/ratchets.json, which is what ratchet.py's propose-tighten does at 0 (it keeps only ceilings above 0). AC10: no enforcement-placing skill is added.

Not verified

  • Tidy not run: the change spans 2 areas (plugins/tdd with .changes/tdd, and .performance), over the 1-area tidy cutoff
  • check-affected skipped typos (not installed), comment-hygiene (network fetch of ci-workflows blocked), size-check (audit-size.sh missing from the lane checks tree) and the validate-plugins steps that run checked-tree code; left to the PR's CI
  • markdownlint and the skill-stack-fences / ratchet check scripts were not run directly (the lane runs no interpreter); the fence count of 0 comes from reading the counter's rules and grepping the pages. Left to the PR's CI ratchet and lint jobs
  • Review judgment call: the 'Mock (the Tool) vs Mock (the Test Double)' subsection's language-neutral point (a mocking library's object can create either a mock or a stub) is removed along with its Moq framing, per R11; the host session's no-loss eval decides whether anything comes back
  • Targeted before-and-after eval for tdd:principles, the do-not-merge hold and the eval-pair record are the host session's, not this lane's
  • The working tree shows untracked .bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile and .zshrc at the checkout root that this run did not create (they are unreadable sandbox mount points); they are not part of this change

Fix

  • plugins/tdd/skills/principles/reference/observable-behavior-khorikov.md: deleted the 6 csharp/Moq fences and the Moq-framed 'Mock (the Tool) vs Mock (the Test Double)' subsection; trimmed listing-dependent prose (stub-overspecification paragraph, Setup/Verify names); restated the leaking-API and…
  • plugins/tdd/skills/principles/reference/testing-styles-khorikov.md: deleted the 9 csharp/xUnit/Moq fences and the C#/.NET names outside fences (DateTime.Now, Directory.GetFiles/File.WriteAllText, Fluent Assertions BeEquivalentTo, struct, tuple signature); trimmed sentences that pointed at removed…
  • .performance/ratchets.json: removed the skill-stack-fences ceilings for both files (6 and 9), which now count 0 fences
  • .changes/tdd/work-resolve-issue-issue-17765-44855349322-1-6e15a107.md: patch changelog fragment for the tdd plugin

Verification

The runner ran each check from the base copy against 7674083:

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

The run reports:

  • Grep for tagged fence openers, Moq, Mock<, xUnit, Fluent, [Fact] and DateTime in both pages: no matches; only the untagged diagram fences remain, which scripts/skill-stack-fences.py does not count
  • Grep 'observable-behavior-khorikov|testing-styles-khorikov' over the checkout (script-reader search): hits only in .performance/ratchets.json, plugins/tdd/skills/principles/SKILL.md:26-27 and plugins/tdd/skills/principles/reference/test-doubles.md:156; no script reader
  • Read plugins/performance/scripts/ratchet.py judge_files/tighten_per_file: a missing ceiling is treated as 0 and tightening drops zero ceilings, so removing the entries matches a count of 0
  • check-changelog-fragments: all 3 fragments valid
  • check-changed-skills: plugins/tdd/skills/principles PASS, 0 errors, 2 warnings (description length and no Gotchas surface, both on unchanged SKILL.md)
  • check-affected: 14 passed, 9 skipped over 4 changed files
  • Fresh-context review subagent over the full diff: no high findings. Fixed: an unclear subject in the SMTP sentence, a dangling 'The test' in the audit Stage 3, and an overstated changelog fragment. Not taken, because R11 forbids replacement text outside a routing site: restoring a generic…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44855349322

Left out: the items under Not verified.

Related

#17765

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 #17765 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 411c507a18cff2a8f113b57894ab25ed7d833593: read 4 of 4 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

This review is blocking only: the lane already reviewed an earlier head (767408336c), so only CRITICAL and IMPORTANT findings would be posted here. None were found.

I read every hunk of all 4 changed files in .claude-lane/pr.diff:

  • plugins/tdd/skills/principles/reference/observable-behavior-khorikov.md and testing-styles-khorikov.md: the change deletes C#, Moq, xUnit.net and Fluent Assertions teaching listings and rewrites the surrounding sentences as prose. I treated this as deleted skill-body content and checked it under the instruction-surface lens. The removed text is only example material about test doubles and functional architecture. It did not gate any action, tool use, permission, external write or trust decision, so no protected-class rule is removed. I did not consult the instruction exception register; this was judged by consequence.
  • .performance/ratchets.json: the change drops two per-file skill-stack-fences ceilings, for pages that now hold no counted fences. This is a lint ratchet with no security effect.
  • .changes/tdd/…md: a new patch changelog fragment with no executable content.
  • Trust controls and trusted paths: none of the changed files matches a listed trusted path. No workflow, action, token scope, trusted-actor list, kill switch, merge hold or plugin manifest is touched.
  • PR context: it contains no embedded instructions aimed at the review lane.

The only earlier lane post has no line anchor and reported 0 findings, so nothing is repeated here.

Spend: none beyond this review run.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

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

No blocking findings. This review covered blocking findings only, because this lane already reviewed an earlier head (767408336c) and posted no findings then. The new head merges main into the branch. The PR's own diff is still the same 4 files:

  • It deletes the C#, Moq, xUnit.net and Fluent Assertions listings from observable-behavior-khorikov.md and testing-styles-khorikov.md.
  • It removes the two skill-stack-fences ceilings from .performance/ratchets.json. A missing ceiling counts as 0, which matches the 0 tagged fences left on each page.
  • It adds a bump: patch changelog fragment for tdd.

I read every hunk of all 4 files in the diff.

Closing issue #17765: both rows (F0402, F0403) are cut, and neither page has a tagged fence left. The ratchet ceilings are lowered to the fence count left, and no skill is added (AC10). The row count, row ids, script-reader search, eval-case statement and whole-page/partial statement are all in the PR body. The author claims the script-reader search, eval-case search and verification commands; I did not run them. The prose left behind still reads correctly. For example, "The original User" at observable-behavior-khorikov.md#L80 refers to the User class described in prose at L74.

No plugin manifest changed.

Advisory and manifest lines (1)
  • Loosened checks would be marked: fail (the default, since the prompt had no loosened_check_verdict: or loosened_check_patterns: line); patterns: 0. The prompt also had no loosened_check_decision_record: line, so I did not check the citation requirement. Nothing is loosened: removing the per-file ceilings drops the effective ceiling from 6 and 9 to 0, which makes the check stricter.

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 of code listings (two R11 rows, no R8 row), with prose summaries kept or added in their place; no whole page deleted. Measured by p17776-tp-checkout-doubles: F0402 (observable-behavior page: the C#/Moq listings of the SMTP receipt mock, the Inventory removal, the stub-assert anti-pattern and the User.NormalizeName leak; graders mock-smtp-yes, mock-inventory-no, mock-app-db-no, no-stub-assert, normalize-leaking), F0403 (testing-styles page: output, state and communication listings and the audit-system code; graders prefer-output, brittle-communication, price-for-not-pure). Each grader's answer is stated in prose kept on both sides; the cut listings illustrated it.

  • New case p17776-tp-checkout-doubles: no tdd:principles case grades the mock-or-real decisions, the leaking-API rule or the style ranking with deterministic graders, so a rules-only case was written: a Python-style checkout service with an SMTP relay, an internal Inventory class, an app-only database, a stub catalog and a clock-reading price function; eight regex graders, no llm grader, no Skill grader (slash prompt, R105).

  • Loss-capable graders (a listing beside their rule was cut): every grader; the kept prose states each answer on both sides.

  • Re-registered as eval-pr-17776b with one prompt clause added (check the answers against the skill's observable-behavior and testing-styles reference pages): eval-pr-17776's BEFORE smoke opened no changed file (answered from SKILL.md), so it could measure neither row (R121). Its smoke spend counts in the total; its compare was never launched.

  • 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: 767408336c651cae9cdc24f5472f53f97f048389 (pull request head; live head when this was written: 767408336c651cae9cdc24f5472f53f97f048389)

  • 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
p17776-tp-checkout-doubles mock-smtp-yes 3/3 3/3
p17776-tp-checkout-doubles mock-inventory-no 3/3 3/3
p17776-tp-checkout-doubles mock-app-db-no 3/3 3/3
p17776-tp-checkout-doubles no-stub-assert 3/3 3/3
p17776-tp-checkout-doubles normalize-leaking 3/3 3/3
p17776-tp-checkout-doubles prefer-output 3/3 3/3
p17776-tp-checkout-doubles brittle-communication 3/3 3/3
p17776-tp-checkout-doubles price-for-not-pure 3/3 3/3
p17776-tp-checkout-doubles 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:

  • p17776-tp-checkout-doubles before: opened skills/principles/reference/observable-behavior-khorikov.md in 3 of 3 runs; opened skills/principles/reference/testing-styles-khorikov.md in 3 of 3 runs
  • p17776-tp-checkout-doubles after: opened skills/principles/reference/observable-behavior-khorikov.md in 3 of 3 runs; opened skills/principles/reference/testing-styles-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):

  • F0402 (skills/principles/reference/observable-behavior-khorikov.md, case p17776-tp-checkout-doubles): opened in 3 of 3 before, 3 of 3 after runs
  • F0403 (skills/principles/reference/testing-styles-khorikov.md, case p17776-tp-checkout-doubles): opened in 3 of 3 before, 3 of 3 after runs

Rows these runs did not measure:

  • none

Verdicts:

  • verdict p17776-tp-checkout-doubles (principles): PASS (no loss: after 1.000, before 1.000)

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

The cases live outside the repository; their full text:

The 1 cases: prompt.md and case.yaml

p17776-tp-checkout-doubles

prompt.md:

---
description: "Written for PR 17776 (rows F0402 and F0403, R11 cuts of the C#, xUnit.net, Moq and Fluent Assertions listings in tdd:principles' observable-behavior and testing-styles pages). Asked how to test a checkout service's collaborators and a pricing function, the reply mocks only the SMTP receipt, keeps the inventory call and the app-only database real, does not assert a stub call, calls a must-call-first normalizer a leaking API, prefers output-based tests, names communication-based as the most brittle, and calls a clock-reading function not a mathematical function"
tags: [principles, routine]
max_turns: 20
timeout_seconds: 600
allowed_tools: [Skill, Read, Glob, Grep]
expected_outcome: "Nothing is run. The reply mocks the SMTP receipt only, keeps Inventory.remove and the app-only database real, does not assert the price-lookup stub's calls, calls normalize_email a leaking implementation detail, prefers output-based testing, names communication-based as the most brittle style, and says price_for is not a mathematical function because it reads the clock. It ends with the eight fixed lines."
---

/tdd:principles

Help me decide how to test our checkout service. When `place_order` runs it: asks a `PriceCatalog` collaborator for prices, calls `Inventory.remove(sku, qty)` on another class inside our app, writes the order to our Postgres database (only this app uses it), and sends a receipt email through our company SMTP relay. The `Customer` class also has a public `normalize_email()` that callers must run before `set_email()`. And our `price_for(sku)` function reads the current time internally to apply happy-hour discounts.

1. Which of those collaborators should the unit tests replace with a mock, and which stay real?
2. Should a test assert that `PriceCatalog` was called with the right SKU?
3. Is `normalize_email()` observable behavior or a leaking implementation detail?
4. Which testing style should we prefer where we can, and which is the most brittle?
5. Is `price_for` a mathematical function as written?

Answer from your Khorikov guidance, and check your answers against its observable-behavior and testing-styles reference pages; don't research online or run anything.

End with exactly these eight lines:

MOCK_SMTP: <yes or no>
MOCK_INVENTORY: <yes or no>
MOCK_APP_DB: <yes or no>
ASSERT_STUB_CALL: <yes or no>
NORMALIZE_EMAIL: <observable behavior or leaking implementation detail>
PREFERRED_STYLE: <output-based, state-based or communication-based>
MOST_BRITTLE: <output-based, state-based or communication-based>
PRICE_FOR_PURE: <yes or no>

case.yaml:

schema_version: "1.1"
name: p17776-tp-checkout-doubles
plugins: ["../.."]
graders:
  - name: 'mock-smtp-yes'
    type: 'regex'
    pattern: '^[\W_]*MOCK_SMTP[*_]*:[\s*`]*yes\b'
    flags: 'im'
    target: 'last_message'
  - name: 'mock-inventory-no'
    type: 'regex'
    pattern: '^[\W_]*MOCK_INVENTORY[*_]*:[\s*`]*no\b'
    flags: 'im'
    target: 'last_message'
  - name: 'mock-app-db-no'
    type: 'regex'
    pattern: '^[\W_]*MOCK_APP_DB[*_]*:[\s*`]*no\b'
    flags: 'im'
    target: 'last_message'
  - name: 'no-stub-assert'
    type: 'regex'
    pattern: '^[\W_]*ASSERT_STUB_CALL[*_]*:[\s*`]*no\b'
    flags: 'im'
    target: 'last_message'
  - name: 'normalize-leaking'
    type: 'regex'
    pattern: '^[\W_]*NORMALIZE_EMAIL[*_]*:[^\n]*leak'
    flags: 'im'
    target: 'last_message'
  - name: 'prefer-output'
    type: 'regex'
    pattern: '^[\W_]*PREFERRED_STYLE[*_]*:[\s*`]*output'
    flags: 'im'
    target: 'last_message'
  - name: 'brittle-communication'
    type: 'regex'
    pattern: '^[\W_]*MOST_BRITTLE[*_]*:[\s*`]*communication'
    flags: 'im'
    target: 'last_message'
  - name: 'price-for-not-pure'
    type: 'regex'
    pattern: '^[\W_]*PRICE_FOR_PURE[*_]*:[\s*`]*no\b'
    flags: 'im'
    target: 'last_message'

Posted by an agent session.

@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 767408336c651cae9cdc24f5472f53f97f048389: #17776 (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 44873298199, attempt 1

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

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 44873298199, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed 411c507
Run 44873298199

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 7674083 (the eval-pr-17776b record) to 411c507 by a lanes-bot merge of main. git diff --name-only 767408336c 411c507a18 -- plugins/tdd is empty, so the measured files (observable-behavior-khorikov.md, testing-styles-khorikov.md) and the loaded tdd:principles skill are unchanged; the record stands and no re-run is needed.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path is about to arm native auto-merge at head 411c507a18cff2a8f113b57894ab25ed7d833593, the head its arming checks judged. The arm fails if the head moves first.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=MEDIUM demote=false head=411c507a18cff2a8f113b57894ab25ed7d833593 rubric=10.4.3 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit a3dee07 Nov 21, 2026
45 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-17765-44855349322-1 branch November 21, 2026 06:38
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: observable-behavior and testing-styles

1 participant