Skip to content

test: delete tests that guard removed features, unreleased schemas and test harnesses - #524

Merged
lg2m merged 18 commits into
ci/test-structurefrom
test/delete-low-value
Nov 1, 2026
Merged

lg2m merged 18 commits into
ci/test-structurefrom
test/delete-low-value

Conversation

@lg2m

@lg2m lg2m commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #523.

Change

This deletes tests that guard removed features, unreleased store schemas, or test harnesses (findings C1–C15). It also removes the production code that only those tests used:

  • Store migrations below schema 25 (owner decision 1). v0.0.1 shipped schema 25. Steps 1–24 are gone, including five add_* helpers that no remaining path calls. A new store now runs the creation steps directly and stamps schema 25. Opening a store older than 25 now fails with SessionRuntimeError::UnsupportedStoreSchema { found, oldest }: "session store schema 12 predates the oldest supported schema 25 (qq v0.0.1); move the store aside to start a new one". The store is left untouched.
  • Legacy plan descriptor encodings v13–v15 (C2). AgentPlanDescriptor::canonical_bytes encodes only DESCRIPTOR_VERSION (16). The only production reader, process-evidence validation, already rejected every other version. The projection test that faked a v14 descriptor now edits the stored JSON instead of encoding v14.
  • Protocol fixtures v17–v40 (C3). Only v41 (N−1) and v42 remain, for wire, headless and headless-goals. retained_versions still asserts that N−1 exists. QQ_UPDATE_FIXTURES=1 still regenerates v42 with no diff. historical_fixtures_still_decode no longer needs its removed-feature skip list, because no v41 fixture uses those features. It now decodes every fixture strictly. The qq-client replay test reads the identical v42 copies of its v17 inputs.
  • grant_authority → policy_authority (C10, cheap: 40 mechanical sites). It now matches WorkspacePolicyAuthority.
  • Docs updated where they were now wrong: docs/design/architecture.md (oldest migrated schema), docs/design/protocol.md (retained fixtures, descriptor encodings) and docs/runbooks/perf-recording.md (the deleted ignored soak modes).

Deleted tests

Released schemas per tag (from git show <tag>:crates/qq-core/src/sessions/store/schema.rs): v0.0.1=25, v0.0.2=26, v0.1.0=28, v0.1.1=32, v0.1.2=33, v0.1.3=34, v0.1.4=35, v0.1.5=39, v0.1.6=43, v0.1.7=50, v0.1.8=58, v0.1.9=64, v0.1.10=65. Goal tables first ship in schema 58.

Deleted test Reason Still covered by
tests::a_root_prompt_and_tools_change_only_by_the_brief_guidance (C1) Rebuilt prompt v14 from removed sandbox/classifier text and pinned its SHA plan::tests::the_root_prompt_matches_its_golden, tools::tests::built_in_tool_declarations_keep_their_order_and_schema_identity
plan::tests::historical_descriptor_15_digest_is_preserved, …_13_prompt_20_through_22_…, …_14_prompt_20_…, …_14_prompt_22_… (C2) Pinned digests for descriptor encodings that are now deleted plan::tests::canonical_encoding_and_digest_are_stable (v16 bytes and digest)
approval_delegate row in every_behavior_affecting_field_changes_the_digest (C2) The field is always None; approval delegation was removed n/a
12 approval::tests::ab1_* verdict tables (C4): configured_helpers_…, read_scan_bounds_…, shell_read_verdicts_preserve_progress_and_audit (92 rows), git_filters_…, git_help_…, trailing_separators_…, tree_recursive_…, joined_sed_…, output_only_sed_…, inherited_sort_…, workspace_sort_…, lazy_fetch_… read_only_shell_command now only feeds the undo-snapshot decision (may_change_files). Merged into one 20-row table plus the scan bounds approval::tests::shell_read_verdicts_decide_whether_a_command_may_change_files. ab1_sed_extended_regex_… (the read_only_argv process-verification cases), ab1_literal_exec_arguments_remain_reads and the Windows ab1_cmd_separators_… are kept
reviewer_model / supervised approval absence asserts in delegation_authority_guidance_matches_the_spawn_schema and spawn_agent_authority_guidance_matches_write_capability (C5) They assert that removed text is absent The positive asserts in the same tests
soak scripted_soak_completes_across_context_windows, forty_in_run_compactions_…, forty_mib_of_streamed_text_… (C6) #[ignore]d, so never run; 2–8 s each soak::goal_enabled_soak_measures_real_notices_across_compaction, compaction::one_run_spanning_several_windows_…
soak streamed_text_hard_guard_rejects_a_single_oversized_turn, process_kill_preserves_the_side_effect_without_reexecution (C6) Not deleted: un-ignored. They are cheap (0.02 s and 0.16 s) and pass —
tools::tests::ab3_six_default_read_results_characterize_turn_budget_pressure (C7) An eprintln characterization with loose bounds read_file_stops_at_its_byte_budget_…
sessions::tests::shared_session_harnesses_accept_an_aliased_temporary_base (C8) It tests the test harness n/a
ignored migrations::r4_append_only_chunk_scaling_diagnostic and its sampler/child runner (C9) A release-mode timing diagnostic that never ran cargo bench -p qq-core --bench store_output_batch
qq-tui bench_support::tests::every_scene_builds_at_every_golden_size_and_paints_every_row (C11) Duplicate goldens::every_golden_frame_fits_the_terminal (stricter: per-row message)
docs_truth::tests::root_stall_reports_are_in_architecture_and_report_queries (C12) Pins literal design prose n/a. Two other C12 parts were wrong and are kept: the match blocks in glossary_defines… are not tautologies (they make the test fail to compile when an ApprovalMode/DelegationRole variant is added), and ### Trust is still a shipping concept (qq trust)
tools::tests::a_command_that_leaves_its_group_still_stops_on_timeout (C13) Duplicate cancel_and_timeout_kill_descendants_that_left_the_group (timeout + setsid tree)
tests::progress::ab1_cd_prefixed_failing_cargo_test_restarts_the_stall_count (C13) Duplicate; 2.4 s Merged as a second row of a_failing_command_before_the_threshold_means_no_report
tests::loop_guard::ac4_runtime_1500_novel_reads_complete_and_keep_reporting (C13) Shrunk, not removed: 1500 → 200 reads (3 report periods + 8). Renamed ac4_runtime_novel_reads_complete_and_keep_reporting Unit test runtime::loop_guard::tests::fifteen_hundred_novel_reads_… keeps N=1500
2 of 3 commands × 2 modes in approvals::shell_prefix_denial_precedes_auto_and_full_and_allows_continuation (C13) The extra exec and wrapped sh -c cases run the same shell_prefix_denied gate approval::classify::tests::shell_prefix_denies_match_literal_commands… (wrappers), 2 modes kept end to end
goal-field verbatim asserts in compaction::maximum_goal_is_verbatim_immediately_after_three_in_run_summaries (C13) Already covered at the notice level goals::maximum_goal_notice_keeps_verbatim_fields_and_reserves_the_check_tail
22 migrations::version_{one,five,six,seven,ten,eleven,twelve,thirteen,fourteen×2,fifteen,seventeen,eighteen,nineteen,twenty,twenty_two,twenty_five}_migration_…, version_fourteen_store_missing_audit_columns_is_rejected, partially_applied_version_{fourteen,seventeen,eighteen}_…, failed_version_{fourteen,seventeen,eighteen}_… (C14) Seed a store below schema 25; those steps are deleted New migrations::a_store_older_than_the_first_release_fails_to_open_naming_its_schema (schemas 1 and 24 → typed error, store left unmigrated). version_twenty_five… seeded 24
settlement::version_sixteen_active_auto_compaction_backfills_exact_attempt_ownership (C14) Seeds schema 16 n/a
goal_upgrade::goal_upgrade_preserves_owned_helper_prefix_and_dispatch_uncertainty (51/54, 4.3 s), goal_upgrade::goal_check_schema56_upgrade_… (C15) Goal rows at schema 51–56 never existed in a release (goals ship at 58), so no rebase keeps real coverage n/a (the repair steps still run on every pre-58 open)
goal_admission::legacy_pending_model_work_restores_chargeable_proof_before_recovery (51/53), legacy_no_turn_dispatch_stays_unknown_… (51/54), legacy_dispatch_repair_distinguishes_… (54), legacy_dispatch_repair_invalid_required_event_… (54) (C15) Same: goal-run state at an unreleased pre-58 schema n/a
goals::goal_parent51_upgrade_retains_notices_and_process_receipts, goals::paid_owner_upgrade_reconstructs_pending_child_through_settled_ancestor (C15) Same n/a
goals::goal_policy_migration_retains_legacy_unknown_and_rolls_back_bad_shapes (57) (C15) The upgrade half seeds goals at 57. The bad-shape half is kept at the current schema goals::goal_policy_schema_rejects_bad_shapes_without_advancing_the_version
progress::ab5_experimental_schema48_root_notice_survives_projection_upgrade (C15) Schema 48 was an experimental, unreleased notice build n/a
migrations::ab5_schema_forty_five_migrates_once_to_fifty (C15) Rebased to 43 it duplicates the renamed test below migrations::migrating_a_v0_1_6_store_keeps_its_structure_and_store_identity (was ab5_schema_forty_nine_…, now seeded at 43)

C15: tests rebased onto the nearest released schema. Each one still passes and still crosses the step it names.

  • migrations::version_twenty_eight… 27→26, version_thirty… 29→28, version_thirty_one… 30→28, version_thirty_two… 31→28, version_forty…/forty_one…/forty_two… 40/41/42→39.
  • tests::owned_compaction_index_* 45/46→43; execution_context::ab1_historical_context… 45→43.
  • projection::ab2_projection_migration… 47/48/49→43/50: the 48 branch is dropped, and the "missing projection column" refusal now runs at 50.
  • projection::checkpoint_without_exact_projection… 60→58; feeds::* 60/61/62→58.
  • goals::goal_upgrade_preserves_deployed_notice_and_projection_bytes [47,48,49,50]→[43,50].
  • goals::goal_claim_storage_upgrades… 46→43; goals::goal_request_migration_refuses_bad_shapes… and paid_owner_schema_upgrades… 51/52→50 (no goal rows, shape only).
  • goal_admission::legacy_model_work_repair_rolls_back_on_invalid_turn 53→50 (model_goal_claim only creates a run).
  • goal_upgrade::goal_check_migration_rejects_incompatible_acknowledgment_storage… 56/57→50, with the rollback asserted at 56.
  • migrations::a_store_with_retired_supervised_mode… 61/63→58.

Verification

  • cargo xtask check --full: passed on d198e3e4 (.config/ changed).
  • Real binary: I wrote a metadata table with schema_version=12 into an isolated home and ran qq run --model openai/gpt-5 hi. Output: Error: session store schema 12 predates the oldest supported schema 25 (qq v0.0.1); move the store aside to start a new one, exit 4. schema_version was still 12 afterwards.
  • QQ_UPDATE_FIXTURES=1 cargo nextest run -p qq-protocol -p qq-client: no fixture diff.
  • Named test lists: I checked every deleted name with grep -rn against .config and .github. I removed goal_upgrade_preserves_owned_helper_prefix_and_dispatch_uncertainty from the .config/nextest.toml priority filter. The platform lists, the real-process filter and quarantine.toml name none of the deleted tests. xtask/src/legacy-sleeps.txt line numbers moved (count unchanged, 11/11).
Measure Before After
Tests (cargo nextest list --workspace --all-features) 3034 2980 (−61 deleted, +7 new, renamed, or un-ignored)
Test-seconds of the deleted tests, from /tmp/opencode/test-times.tsv (CI) 20.7 s 0
Test-seconds, full workspace, --profile ci, same 32-core host, 2 runs each 248.2 / 248.8 s 237.5 / 238.9 s
maximum_goal_is_verbatim_… (local) 7.0 s (CI tsv) 6.3 s
shell_prefix_denial_precedes_… 1.0 s (CI tsv) 0.11 s
ac4_runtime_*novel_reads* 0.65 s (CI tsv) 0.04 s
Net lines −37,244 total (+474 / −37,718); −5,211 outside crates/qq-protocol/tests/fixtures/

Known impact

  • Compatibility: a store at schema 1–24 (pre-v0.0.1 development builds only) no longer opens. It fails with the typed error above instead of migrating. Every released store (≥25) opens as before.
  • SessionRuntimeError gains the UnsupportedStoreSchema variant. qq-host maps it to ServerHandlerError::Internal, like StoreBusy.
  • Process evidence recorded under plan descriptor 13–15 already resolved as UnresolvedPlan; nothing changes.
  • I left docs/adr/0061 alone. It still mentions descriptor 13/14 domains, and ADRs are records of past decisions.

lg2m added 18 commits November 1, 2026 05:11
…stead of migrating them

Schema 25 shipped in v0.0.1. Steps 1-24 only served unreleased builds, so
they go together with their tests, and opening an older store now fails with
SessionRuntimeError::UnsupportedStoreSchema.
Seeds at unreleased schemas (27, 29-31, 40-42, 45-49, 51-57, 60-63) move to
the nearest released schema below them (26, 28, 39, 43, 50, 58). Tests whose
seeded state never existed in a released store (goal rows before 58, the
experimental 48 notice build) are deleted.
@lg2m lg2m added the ci:full label Nov 1, 2026
@lg2m

lg2m commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T14:29:49.308881Z d198e3e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: d198e3e4ed

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lg2m
lg2m added this pull request to stack #526 November 1, 2026 20:03
@lg2m
lg2m merged commit ae8eba2 into main Nov 1, 2026
34 of 40 checks passed
@lg2m
lg2m deleted the test/delete-low-value branch November 1, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant