Skip to content

test(tests): remove tests that hold a sentence of a document #7243

Done

Description

@dan-petty

Problem or Motivation

Many tests read a real document, instruction file, prompt, template or skill of the repository and assert that it holds a specific sentence, heading, phrase or count. Such a test fails on each edit of that text, although no code changed. Example: PR #7218 changed one sentence of AGENTS.md and of its template, and two tests had to change with it.

Owner direction of 2026-11-25, after #7229: remove these sentence tests as well. #7229 (PR #7234) removed the tests that held a value of a manifest, a config file, a default or a constant, and it left this class for the owner.

A census of 2026-11-25 found 192 test functions to remove and 10 to edit, in 50 files. The largest groups are tests/invariants/test_agents_md.py, tests/invariants/test_roadmap_workflow_doc.py, tests/roadmap/stage/test_roadmap_stage_prompt_rules.py and tests/roadmap/implement/test_roadmap_implement_prompt.py.

Proposed Solution

Disposition: remove tests. No source behavior changes.

Remove each test whose assertion fails when the text of a real file changes with no change of code:

  1. It asserts that a real document, prompt, template or skill holds, or does not hold, a specific sentence, phrase, heading or list of words.
  2. It compares the text of two real files, or of a real file and a constant.
  3. It holds an exact count that follows the content of a real text file.
  4. A snapshot that holds text of a real prompt.

A test stays when it applies one generic rule with no literal text of a real file (each link resolves, each named path and command exists, a size cap, a generated stub equals the generator output), or when it checks code logic with text that the test writes.

The list of the tests comes as a comment on this item.

Proof: uv run devops ci test tests passes, and uv run devops ci --check --only lint,format,typecheck,test-tree,docs,openspec passes.

Existing Tool Considered

devops docs check resolves the commands and the links that documents name, and Vale checks the style. No new code.

Activity

  1. added
    type/test
    source/agent
    status/new
    value/medium
    effort/medium
    scope/tests
    priority/p2-medium
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 25, 2026
  2. dan-petty commented on Nov 25, 2026

    @dan-petty
    OwnerAuthor

    Removal list of 2026-11-25 (pull request to follow). Rule: a test goes when it holds a sentence, a phrase, a heading, a word list or a count of a real document, prompt, template or skill.

    Removed: 195 test functions

    • tests/ai/personas/test_personas.py: test_the_review_prompt_still_carries_every_rule
    • tests/ai/review/test_executable_criteria.py: test_criteria_rule_in_the_prompts_offers_no_pytest_command
    • tests/ai/review/test_review_project_conventions.py: test_no_shared_review_prompt_carries_a_project_rule
    • tests/ai/test_ai_client_style_request.py: test_the_style_request_asks_for_the_bottom_line_in_the_first_line
    • tests/ai/test_kb.py: test_get_knowledge_base_stats, test_harness_manual_names_the_maintained_repository, test_list_knowledge_base_articles_all, test_list_knowledge_base_articles_by_category, test_list_knowledge_base_articles_by_division, test_load_kb_article_success, test_no_manual_names_the_archived_harness_repository
    • tests/commands/test_dependency_audit.py: test_guidance_names_osv_scanner_and_omits_deleted_ignore_files
    • tests/commands/test_instruction_generator.py: test_devops_cli_renders_the_check_line_of_its_pre_push_hooks, test_generate_agents_md_enforces_pr_monitor_and_ready, test_generate_agents_md_opens_every_pull_request_as_a_draft, test_generate_agents_md_root_cause_and_premise_rules, test_generated_agents_md_leaves_the_writing_standard_to_the_project, test_generated_agents_md_targets_the_default_branch_and_names_no_deleted_process
    • tests/docs/test_docs.py: test_committed_command_pages_show_the_defaults_and_switches_they_hid, test_devcontainer_usage_driver_names_docker_driver_and_podman_socket, test_devcontainer_usage_minikube_issue_link_resolves_to_6466, test_group_callback_options_rendered_for_ci_and_review, test_the_readme_links_the_cli_reference_and_holds_no_command_matrix
    • tests/docs/test_docs_inventory.py: test_contributing_documents_generated_file_rebase_conflict_step
    • tests/github/test_gh_api_agent_guard.py: test_docs_and_security_policy_name_protected_classes_and_refusal
    • tests/infra/test_apply.py: test_the_apply_module_text_names_the_nodrain_class
    • tests/invariants/test_agents_md.py: 18 tests
    • tests/invariants/test_change_folders.py: test_sdlc_plan_pull_request_allows_a_changed_file
    • tests/invariants/test_configmap_rollout_rule.py: the whole file
    • tests/invariants/test_guidelines.py: test_guidelines_link_dedicated_resources_and_sandboxes_policy
    • tests/invariants/test_k8s_manifests.py: test_readme_lists_the_table
    • tests/invariants/test_pull_request_template.py: test_pr_template_asks_for_the_issue_and_its_change_and_nothing_a_check_decides
    • tests/invariants/test_roadmap_stage_measure_doc.py: the whole file
    • tests/invariants/test_roadmap_workflow_doc.py: 13 tests
    • tests/invariants/test_skills.py: test_roadmap_skill_forbids_returning_trackers_and_routes_to_sub_issues, test_the_scaffold_skill_of_each_root_names_both_commands
    • tests/invariants/test_source_tree.py: test_invariant_files_are_listed_in_testing_doc, test_unlisted_invariant_file_fails_ban
    • tests/invariants/test_workflow_contracts.py: test_sdlc_names_only_the_supply_chain_controls_the_repository_runs
    • tests/k8s/test_cluster_secret_key_refs.py: test_cluster_secrets_section_names_the_plan_check
    • tests/k8s/test_k8s_retain_migration_docs.py: the whole file
    • tests/openspec/test_openspec_new.py: test_skill_points_to_command
    • tests/openspec/test_qdrant_retry_spec.py: the whole file
    • tests/prometheus/test_k8s_monitoring_alerting.py: test_github_requests_high_action_does_not_lower_budget
    • tests/roadmap/implement/test_roadmap_implement_deadline_settings.py: test_the_cluster_document_states_the_default_deadline_values
    • tests/roadmap/implement/test_roadmap_implement_prompt.py: 21 tests
    • tests/roadmap/implement/test_roadmap_implement_record_readers.py: test_the_document_names_the_result_key_and_the_hand_off_of_the_stop
    • tests/roadmap/implement/test_roadmap_implement_step.py: test_the_instructions_say_that_a_reply_has_a_cap_and_a_long_file_is_written_in_parts, test_the_instructions_say_that_the_job_ticks_every_task_of_a_passing_group
    • tests/roadmap/implement/test_roadmap_implement_step_format.py: test_the_instructions_say_that_the_job_formats_the_changed_python_files
    • tests/roadmap/implement/test_roadmap_implement_step_own_text.py: test_the_instructions_say_not_to_edit_the_text_of_a_task_and_how_to_ask_for_an_amendment, test_the_instructions_say_that_the_job_writes_the_whole_file_back
    • tests/roadmap/implement/test_roadmap_implement_step_repair.py: test_the_instructions_say_that_a_failed_static_check_gets_one_turn
    • tests/roadmap/implement/test_roadmap_implement_step_ticks.py: test_the_instructions_say_to_tick_only_the_tasks_of_the_group_and_give_the_reason
    • tests/roadmap/implement/test_roadmap_implement_typed_result.py: test_handoff_the_prompt_of_the_step_describes_the_section
    • tests/roadmap/implement/test_roadmap_implement_verification_reason.py: test_step_5_of_the_prompt_gives_both_parts_of_the_sentence_about_a_bang_command
    • tests/roadmap/intake/test_roadmap_intake_duplicates.py: test_the_intake_prompt_defines_a_duplicate_as_the_same_change
    • tests/roadmap/project_review/test_readiness.py: test_guideline_readiness_record_section_mentions_ref_for_launch
    • tests/roadmap/project_review/test_review_dispatch.py: test_safe_list_rule_is_documented_in_dispatch_catalog_and_workflow_doc
    • tests/roadmap/refine/test_roadmap_refine_covers_check.py: test_the_prompts_tell_the_model_what_the_alternatives_key_holds
    • tests/roadmap/refine/test_roadmap_refine_cycle.py: test_refine_guide_names_cycle_step
    • tests/roadmap/refine/test_roadmap_refine_proposal.py: test_the_reply_prompt_asks_a_config_criterion_for_a_command_proof_as_the_stage_does, test_the_reply_prompt_limits_person_questions_to_owner_only_decisions
    • tests/roadmap/stage/test_roadmap_stage_kind.py: test_the_implement_prompt_writes_the_test_first_only_for_a_group_with_a_test_task, test_the_stage_prompt_asks_feasibility_to_quote_the_probes_and_has_no_premise_failed_key, test_the_stage_prompt_says_that_a_text_is_one_line_and_starts_with_a_word, test_the_stage_prompt_states_the_rules_that_the_validator_checks
    • tests/roadmap/stage/test_roadmap_stage_plan.py: test_the_prompts_say_that_the_job_checks_each_path_against_the_staged_commit, test_the_prompts_say_what_a_group_names, test_the_prompts_say_what_the_criteria_list_holds
    • tests/roadmap/stage/test_roadmap_stage_prompt_rules.py: 57 tests
    • tests/roadmap/stage/test_roadmap_stage_security.py: test_the_stage_prompt_names_the_security_rule
    • tests/roadmap/stage/test_roadmap_stage_toolbox.py: test_the_prompts_name_the_budgets_of_the_settings
    • tests/roadmap/stage/test_roadmap_stage_verify.py: test_the_dropped_criterion_type_names_a_test_only_group_and_one_that_delivers, test_the_missing_path_type_names_a_needed_file_that_the_plan_does_not_change, test_the_prompt_names_the_pull_request_files, test_the_spec_delta_type_names_a_scenario_where_no_test_can_assert_any_part, test_the_tool_rules_are_only_in_the_instructions_of_an_agent_run
    • tests/roadmap/test_pr_verdict.py: test_adr_0021_and_kb_name_all_six_verdict_labels
    • tests/roadmap/test_roadmap_command_help.py: test_the_help_and_the_page_of_stage_plan_say_one_local_file_and_no_github_write
    • tests/roadmap/test_roadmap_consolidate_apply.py: test_generated_command_docs_name_the_apply_option
    • tests/roadmap/test_roadmap_pull_form.py: test_the_document_and_the_docstring_state_the_plan_order
    • tests/roadmap/test_roadmap_step_rules.py: test_the_testing_sections_hold_the_text_of_the_document
    • tests/server/test_server_service.py: test_the_event_set_and_step_8_name_the_same_events
    • tests/tf/test_access.py: test_security_md_documents_github_settings_controls

    Kept: 21 contract tests between code and prompt

    Their expected values come from the source code (fields of a reply model, values of an enum, a limit, tool names), and the prompt or the document must name each of them.

    • tests/roadmap/implement/test_roadmap_implement_negative_search.py: test_the_stage_prompt_gives_the_options_and_the_signs_that_the_step_reads
    • tests/roadmap/implement/test_roadmap_implement_prompt.py: test_the_prompt_names_the_section_that_holds_the_rules
    • tests/roadmap/project_review/test_readiness.py: test_map_covers_every_guideline_row_level_and_scope, test_map_matches_measured_by_checks_and_commands
    • tests/roadmap/refine/test_roadmap_refine_proposal.py: test_refines_prompts_load_and_the_reply_prompt_names_every_field
    • tests/roadmap/stage/test_roadmap_stage_kind.py: test_a_stage_prompt_names_each_kind_and_each_field_of_a_group
    • tests/roadmap/stage/test_roadmap_stage_prompt_rules.py: test_each_list_of_keys_of_the_reply_is_the_fields_of_a_model, test_the_body_of_the_plan_fits_the_body_limit_of_the_contributing_guide, test_the_keys_of_a_group_in_the_prompts_are_the_fields_of_a_group, test_the_prompt_gives_the_form_of_the_title_that_the_job_writes, test_the_prompt_lists_the_paths_that_the_check_takes_for_unobserved, test_the_prompt_names_the_value_of_a_criterion_that_only_a_person_delivers, test_the_prompts_name_the_kinds_of_a_group_as_the_enum_does, test_the_purpose_limit_of_the_prompt_is_the_one_of_the_check_and_of_the_config, test_the_summary_limit_of_the_prompt_is_the_limit_of_the_schema_and_fits_the_title, test_the_top_level_keys_of_the_reply_are_the_fields_of_the_proposal
    • tests/roadmap/stage/test_roadmap_stage_toolbox.py: test_the_tools_prompt_names_exactly_the_tools_of_the_toolbox
    • tests/roadmap/stage/test_roadmap_stage_verify.py: test_the_prompt_names_the_five_parts_of_a_place, test_the_prompt_names_the_four_severities_and_the_two_that_return_the_plan, test_the_prompt_names_the_nine_types_and_no_other
    • tests/roadmap/test_roadmap_step_rules.py: test_each_route_names_a_row_of_the_where_to_look_table_that_links_its_document

    Also kept

    • Generic rules with no literal text of a real file: link checks, path and command checks, the size cap of AGENTS.md, a pointer stub equal to the generator output, a skill equal in each root.
    • Tests of generator logic in tests/commands/test_instruction_generator.py (detected toolchain and checks of a sample project).
    • 12 tests of code that also hold one sentence line, most of them a safety sentence such as "never an instruction".

    Changed: 7 tests

    tests/invariants/test_skills.py (one generic rule), tests/roadmap/stage/test_roadmap_stage_plan.py (2), tests/roadmap/stage/test_roadmap_stage_verify.py, tests/ai/test_ai_client_style_request.py, tests/review/test_review_group_analysis.py, tests/ci/test_fail_to_pass.py.

    Not in this item

  3. added
    status/in-review
    and removed
    status/in-progress
    on Nov 25, 2026
  4. removed
    status/in-review
    owner/agent
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/testssource/agenttype/testvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions