Skip to content

test: remove wording-pinning tests of model-facing prose across both suites - #3031

Merged
7Sageer merged 2 commits into
mainfrom
chore/system-prompt-test-cleanup
Aug 18, 2026
Merged

7Sageer merged 2 commits into
mainfrom
chore/system-prompt-test-cleanup

Conversation

@7Sageer

@7Sageer 7Sageer commented Aug 18, 2026 •

Copy link
Copy Markdown
Collaborator

Related Issue

Follow-up to #3028 and #3030.

Problem

A class of tests pins the exact English wording of model-facing product prose — system-prompt sentences, reminder/injection .md text, tool descriptions, shipped profile/skill bodies. These break on any intentional rewording (one already broke main after #3028, fixed in #3030) while only catching regressions that reuse the same words — they teach everyone to distrust the suite. An inventory sweep found the class is widespread: ~60 test cases across 35 files in both engine test suites.

What changed

Applied one rule set everywhere: delete assertions whose pinned string is verbatim wording from a product model-facing file; keep identifiers (tool names, XML tags, section markers), structural properties (wrapping/escaping/gating/cadence/placeholder substitution), fixture data, tool outputs, and error messages.

  • default-agent-profiles.test.ts: removed the two prose-pin tests; added a structural sharing check — the shared # General Guidelines for Coding section (including the git/blast-radius safety paragraphs) is sliced out of the rendered root prompt and asserted byte-identical in coder/explore/plan, regardless of wording.
  • Tool-description wording tests removed or trimmed across v1 (edit/write/grep/bash/goal/enter-plan-mode/exit-plan-mode/read-media-desc/ask-user/skill-tool) and v2 (os bash/grep/glob/read/write, edit, todo-list, skill, task-tools, ask-user, Agent/AgentSwarm/swarm descriptions).
  • Reminder content pins removed or trimmed: goal reminders (v1 injection suite, v2 goalInjection), plan-mode, todo-list, date-change, permission-mode, skill-activation notices.
  • builtinTower.test.ts: 8 tests pinning tower.md skill-body prose deleted; the tool-name identifier loops stay.
  • goal-outcome.test.ts deleted — the whole file was wording pins; the behavioral substance stays covered by output assertions in goal.test.ts.
  • A few gating tests re-anchored from prose literals to exported constants (WINDOWS_PATH_HINT, DEFAULT_REPLY_STYLE_GUIDE) where a stable anchor was trivially available.

Deliberately kept: tool output / error-message assertions, fixture-defined strings, llm.tools_snapshot wire baselines, snapshot machinery, and all cadence/gating/escaping/wrapping structural coverage.

Deferred for a follow-up decision (~15 tests): cases where the prose pin is the only discriminator of which reminder or budget band fired — plan-mode sparse-vs-full, goal budget bands, permission-mode exit reminder, Windows-notes gating (WINDOWS_NOTES is not exported). Removing those needs either a product-side variant marker or an explicit decision to drop that coverage.

Verification

  • Full local suites: agent-core 4184 passed; agent-core-v2 5236 passed. (11 local failures in plugin-install tests are environmental — no zip binary on this machine; the same tests are green in CI on this PR.)
  • tsc --noEmit clean in both packages; check-no-comments OK; oxlint clean on all touched files.
  • No changeset: test-only change.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

…ring check

The two removed tests pinned exact sentences of the default system prompt
('reversibility and blast radius', 'premature abstraction', optional-tool
phrasings that must not appear, ...). They broke on any intentional
wording change while only catching regressions that reused the same words.

The one real contract underneath — shared, ungated sections must render
byte-identically in the root agent and every subagent profile — is now
checked structurally by slicing the section out of the root prompt and
asserting the other profiles contain it, regardless of its wording.
@changeset-bot

changeset-bot Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 88c4a07

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@88c4a07
npx https://pkg.pr.new/@moonshot-ai/kimi-code@88c4a07

commit: 88c4a07

…suites

Sweep of the class identified in #3030: assertions pinning the exact
English wording of product model-facing text (system prompt, reminder
and injection .md files, tool descriptions, shipped profile/skill
bodies). They break on any intentional rewording yet only catch
regressions that reuse the same words.

Across 35 files (~60 test cases, net -1131 lines):
- deleted dedicated wording tests: 'exposes current metadata and
  schema' description pins, goal/plan/todo reminder content tests,
  tower skill-body prose pins, goal-outcome.test.ts;
- trimmed wording assertions from behavioral tests that otherwise
  stand alone; kept identifiers (tool names, XML tags, section
  markers), structural properties (wrapping/escaping/gating/cadence),
  fixture data, tool outputs and error messages;
- re-anchored a few gating tests on exported constants
  (WINDOWS_PATH_HINT, DEFAULT_REPLY_STYLE_GUIDE) instead of prose
  literals.

Deferred for a follow-up decision: ~15 tests whose prose pin is the
only discriminator of which reminder/budget-band fired (constants not
exported). Wire baselines and snapshot machinery untouched.
@7Sageer 7Sageer changed the title test: replace prose-pinning system-prompt tests with a structural sharing check test: remove wording-pinning tests of model-facing prose across both suites Aug 18, 2026
@7Sageer
7Sageer merged commit 86674ac into main Aug 18, 2026
26 of 27 checks passed
@7Sageer
7Sageer deleted the chore/system-prompt-test-cleanup branch August 18, 2026 08:37
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.

1 participant