Work Packages: Regression-slice test cleanup

Inputs: kitty-specs/regression-slice-cleanup-01M42WCF/ (spec.md, plan.md, research.md, data-model.md, quickstart.md) Prerequisites: plan.md, spec.md

Organization: subtasks (Txxx) roll up into work packages (WPxx), one or two per issue / code domain. Subtask rows are reference rows; record completion with spec-kitty agent tasks mark-status <Txxx> --status done.

Subtask Index

IDDescriptionWPParallel
T001Add the _load_charter_scope_config unit test (priority, red-first)WP01[P]
T002Retire or unmark the #4600 CLI replayWP01[P]
T003RETIRE the #5513 coord-only dirty status-log fileWP01[P]
T004FIX + unmark the #5440 coord status placement fileWP01[P]
T005Validate and record evidenceWP01[P]
T006Add dispatch-mode unit tests for meta corruptionWP02[P]
T007Trim test_next_meta_corruption.py to one CLI smokeWP02[P]
T008SPLIT-BY-KIND tests/integration/test_single_branch_write_checkout_e2e.pyWP02[P]
T009Unmark TestIsReviewRejectionEdge in the trio characterization fileWP02[P]
T010Validate and record evidenceWP02[P]
T011SPLIT-BY-KIND the four ledger filesWP03[P]
T012MARKER-ONLY two filesWP03[P]
T013SHIFT-LEFT #4962: port case 3, then retire the subprocess fileWP03[P]
T014RETIRE T030 in the status-event row-shape testWP03[P]
T015Validate and record evidenceWP03[P]
T016MARKER-ONLY batchWP04[P]
T017Fix wrong tier co-marks on KEEP filesWP04[P]
T018SPLIT-BY-KIND test_auth_saas_target_cleanup.pyWP04[P]
T019SPLIT-BY-KIND test_tasks_move_task_seam.pyWP04[P]
T020SPLIT-BY-KIND charter/test_recompile_preserves_mission_4908.pyWP04[P]
T021Validate and record evidenceWP04[P]
T022Seam units for _partition_paths_by_primary_kindWP05[P]
T023Trim test_issue_4905_coord_staging.py to 1–2 e2eWP05[P]
T024Seam units for _slugify_feature_inputWP05[P]
T025Trim test_specify_json_nonascii.py to one --json e2eWP05[P]
T026FIX the #2745 oracleWP05[P]
T027Validate and record evidenceWP05[P]
T028MARKER-ONLY batchWP06[P]
T029SPLIT-BY-KIND test_traces_driver_section_union_4894.pyWP06[P]
T030#5569 units: deleted-branch REFUSE and approved-dependency PASSWP06[P]
T031Attestation units moved from the mixed-lane fail/attestation e2eWP06[P]
T032Validate and record evidenceWP06[P]
T033Rollback/abort family: B1–B5WP07[P]
T034Claim-refusal ordering: B6WP07[P]
T035Canceled-content verdict families: B7, B8WP07[P]
T036Lanes families: B9WP07[P]
T037Validate, time and record evidenceWP07[P]
T038Reproduce as rootWP08[P]
T039Fix test_preparation_refuses_broken_required_inputs[unreadable]WP08[P]
T040Fix test_resolve_charter_path_raises_when_directory_not_readableWP08[P]
T041Sweep the two files for other chmod-unreadable tests and validateWP08[P]
T042Reproduce the 16 root failuresWP09[P]
T043Inject the failure at the I/O seam (preferred)WP09[P]
T044Skip under root only where no single seam existsWP09[P]
T045Planted breaks and validationWP09[P]

Work Package WP01: Charter scope-config guard and status/coordination pins (#5620 part 1) (Priority: P1)

Goal: Guard the #4600 fix at its seam (the only unguarded fix in the slice), then retire or unmark the CLI replay that cannot guard it, retire the folded #5513 file, and FIX+unmark the #5440 file. Independent Test: Planting return None in place of raise CharterPackConfigError in src/charter/activation/scope.py::_load_charter_scope_config turns the new unit test file red. Prompt: tasks/WP01-charter-scope-guard-and-status-pins.md Requirement Refs: FR-001, FR-002, FR-003, FR-008, C-001, C-005

Included Subtasks

T001 Add the _load_charter_scope_config unit test (priority, red-first) (WP01) T002 Retire or unmark the #4600 CLI replay (WP01) T003 RETIRE the #5513 coord-only dirty status-log file (WP01) T004 FIX + unmark the #5440 coord status placement file (WP01) T005 Validate and record evidence (WP01)

Implementation Notes

  • Seam tests first (own commit), planted break proven RED, revert, then marker edits / trims.

Parallel Opportunities

  • Owns disjoint files from every other WP; runs in its own lane.

Dependencies

  • None.

Risks & Mitigations

  • Covering guard stays green → keep the test (KEEP), record it.

Estimated prompt size: ~270 lines


Work Package WP02: next meta-corruption shift-left, single-branch e2e split, trio unmark (#5620 part 2) (Priority: P2)

Goal: Move the #4642 meta-corruption pins to stub-level units at the next_cmd dispatch seams, split the single-branch write-checkout e2e to its non-redundant core, and unmark a pure truth table. Independent Test: Removing both except MissionMetaReadError arms in src/specify_cli/cli/commands/next_cmd.py turns the new unit file red. Prompt: tasks/WP02-next-meta-shift-left-and-single-branch-split.md Requirement Refs: FR-003, FR-008, NFR-001, NFR-002, C-001, C-005

Included Subtasks

T006 Add dispatch-mode unit tests for meta corruption (WP02) T007 Trim test_next_meta_corruption.py to one CLI smoke (WP02) T008 SPLIT-BY-KIND tests/integration/test_single_branch_write_checkout_e2e.py (WP02) T009 Unmark TestIsReviewRejectionEdge in the trio characterization file (WP02) T010 Validate and record evidence (WP02)

Implementation Notes

  • Seam tests first (own commit), planted break proven RED, revert, then marker edits / trims.

Parallel Opportunities

  • Owns disjoint files from every other WP; runs in its own lane.

Dependencies

  • None.

Risks & Mitigations

  • Covering guard stays green → keep the test (KEEP), record it.

Estimated prompt size: ~270 lines


Work Package WP03: Migration/upgrade/charter marker splits, #4962 port, T030 retire (#5621) (Priority: P2)

Goal: Stop the stale module-level regression marker (the dead '#2957 main-push collection' reason) from spreading onto non-pins; port the one non-redundant #4962 subprocess case to the migration unit file and retire the subprocess file; retire T030. Independent Test: pytest <the 9 files> -m regression --collect-only drops from 66 to only the ledger-named pins; the #4962 tie-break planted break reds the migration unit file. Prompt: tasks/WP03-migration-upgrade-charter-markers.md Requirement Refs: FR-004, FR-008, C-001, C-004, C-005

Included Subtasks

T011 SPLIT-BY-KIND the four ledger files (WP03) T012 MARKER-ONLY two files (WP03) T013 SHIFT-LEFT #4962: port case 3, then retire the subprocess file (WP03) T014 RETIRE T030 in the status-event row-shape test (WP03) T015 Validate and record evidence (WP03)

Implementation Notes

  • Seam tests first (own commit), planted break proven RED, revert, then marker edits / trims.

Parallel Opportunities

  • Owns disjoint files from every other WP; runs in its own lane.

Dependencies

  • None.

Risks & Mitigations

  • Covering guard stays green → keep the test (KEEP), record it.

Estimated prompt size: ~270 lines


Work Package WP04: CLI marker-only batch and SPLIT-BY-KIND files (#5619 part 1) (Priority: P2)

Goal: Remove the regression mislabel from CLI unit/component/contract tests and split mixed files, per the #5619 ledger. Independent Test: --collect-only -m regression over the owned files selects only the ledger KEEP pins; the 4 AST pins of test_auth_saas_target_cleanup.py are retired with planted break B re-proved. Prompt: tasks/WP04-cli-marker-only-and-splits.md Requirement Refs: FR-005, FR-008, C-001, C-004

Included Subtasks

T016 MARKER-ONLY batch (WP04) T017 Fix wrong tier co-marks on KEEP files (WP04) T018 SPLIT-BY-KIND test_auth_saas_target_cleanup.py (WP04) T019 SPLIT-BY-KIND test_tasks_move_task_seam.py (WP04) T020 SPLIT-BY-KIND charter/test_recompile_preserves_mission_4908.py (WP04) T021 Validate and record evidence (WP04)

Implementation Notes

  • Seam tests first (own commit), planted break proven RED, revert, then marker edits / trims.

Parallel Opportunities

  • Owns disjoint files from every other WP; runs in its own lane.

Dependencies

  • None.

Risks & Mitigations

  • Covering guard stays green → keep the test (KEEP), record it.

Estimated prompt size: ~300 lines


Work Package WP05: CLI seam units, 4905/non-ASCII shift-left, 2745 oracle fix (#5619 part 2) (Priority: P2)

Goal: Add the missing seam unit tests for workflow._partition_paths_by_primary_kind and lifecycle._slugify_feature_input, then trim the 210 s #4905 file and the non-ASCII e2e to their smokes, and tighten the #2745 disjunctive oracle. Independent Test: Planted break D (skip the partition) reds the new partition unit file; a slug break reds the new slug unit file; the tightened #2745 oracle goes red when the MissingLanes refusal is replaced by any other error mentioning 'required'. Prompt: tasks/WP05-cli-seam-units-4905-nonascii-2745.md Requirement Refs: FR-005, FR-008, NFR-001, NFR-002, C-001, C-005

Included Subtasks

T022 Seam units for _partition_paths_by_primary_kind (WP05) T023 Trim test_issue_4905_coord_staging.py to 1–2 e2e (WP05) T024 Seam units for _slugify_feature_input (WP05) T025 Trim test_specify_json_nonascii.py to one --json e2e (WP05) T026 FIX the #2745 oracle (WP05) T027 Validate and record evidence (WP05)

Implementation Notes

  • Seam tests first (own commit), planted break proven RED, revert, then marker edits / trims.

Parallel Opportunities

  • Owns disjoint files from every other WP; runs in its own lane.

Dependencies

  • None.

Risks & Mitigations

  • Covering guard stays green → keep the test (KEEP), record it.

Estimated prompt size: ~300 lines


Work Package WP06: Consolidation/lanes marker fixes and #5569 seam units (#5618 part 1) (Priority: P2)

Goal: Drop the mislabel from the 8 MARKER-ONLY files, split the #4894 file, add the #5569 deleted-branch REFUSE and approved-dependency PASS units, and move the 3 attestation-level tests of the mixed-lane fail/attestation e2e into test_canceled_attestation.py. Independent Test: Planted break B8 (never_exempt no longer subtracted) reds ≥2 tests in tests/consolidation/test_canceled_dependency_lane.py instead of 1. Prompt: tasks/WP06-consolidation-markers-and-5569-units.md Requirement Refs: FR-006, FR-008, C-001, C-004, C-005

Included Subtasks

T028 MARKER-ONLY batch (WP06) T029 SPLIT-BY-KIND test_traces_driver_section_union_4894.py (WP06) T030 #5569 units: deleted-branch REFUSE and approved-dependency PASS (WP06) T031 Attestation units moved from the mixed-lane fail/attestation e2e (WP06) T032 Validate and record evidence (WP06)

Implementation Notes

  • Seam tests first (own commit), planted break proven RED, revert, then marker edits / trims.

Parallel Opportunities

  • Owns disjoint files from every other WP; runs in its own lane.

Dependencies

  • None.

Risks & Mitigations

  • Covering guard stays green → keep the test (KEEP), record it.

Estimated prompt size: ~270 lines


Work Package WP07: Terminus/lanes SHIFT-LEFT trims to one smoke per family (#5618 part 2) (Priority: P2)

Goal: Cut ≈820 s of summed per-PR runtime by trimming the slow consolidate/abort replays to one smoke per behaviour family, after re-proving each covering seam guard with the ledger's planted breaks B1–B9. Independent Test: For each trimmed family the named seam guard goes RED on the matching planted break (B1–B9) and the kept smoke passes on the clean tree. Prompt: tasks/WP07-terminus-lanes-shift-left-trims.md Requirement Refs: FR-006, FR-008, NFR-001, C-001, C-002, C-005

Included Subtasks

T033 Rollback/abort family: B1–B5 (WP07) T034 Claim-refusal ordering: B6 (WP07) T035 Canceled-content verdict families: B7, B8 (WP07) T036 Lanes families: B9 (WP07) T037 Validate, time and record evidence (WP07)

Implementation Notes

  • Seam tests first (own commit), planted break proven RED, revert, then marker edits / trims.

Parallel Opportunities

  • Owns disjoint files from every other WP; runs in its own lane.

Dependencies

  • Depends on WP06 (its seam units must exist before the trims).

Risks & Mitigations

  • Covering guard stays green → keep the test (KEEP), record it.

Estimated prompt size: ~270 lines


Work Package WP08: Root-independent unreadable-path tests (#5622) (Priority: P3)

Goal: Make the chmod-based unreadable-path tests give the same verdict as root and non-root, and apply the same guard to any other chmod-unreadable test in these files. Independent Test: Run as root (this container is uid 0): tests/charter/test_pack_manager.py::test_preparation_refuses_broken_required_inputs[unreadable] and tests/cli/commands/test_charter_io.py::test_resolve_charter_path_raises_when_directory_not_readable fail before and do not fail after. Prompt: tasks/WP08-root-independent-permission-tests.md Requirement Refs: FR-007, C-001

Included Subtasks

T038 Reproduce as root (WP08) T039 Fix test_preparation_refuses_broken_required_inputs[unreadable] (WP08) T040 Fix test_resolve_charter_path_raises_when_directory_not_readable (WP08) T041 Sweep the two files for other chmod-unreadable tests and validate (WP08)

Implementation Notes

  • Seam tests first (own commit), planted break proven RED, revert, then marker edits / trims.

Parallel Opportunities

  • Owns disjoint files from every other WP; runs in its own lane.

Dependencies

  • None.

Risks & Mitigations

  • Covering guard stays green → keep the test (KEEP), record it.

Estimated prompt size: ~240 lines


Work Package WP09: Root-independent sweep of the other chmod-unreadable tests (#5622) (Priority: P3)

Goal: #5622 asks to add the same guard to any other chmod-based unreadable-path test. A root run on the base found 16 such tests in 8 files failing under uid 0; make them root-independent. Added after first finalization when WP08's sweep surfaced the list. Independent Test: the 8 files run as uid 0 with 0 failures (base: 16 failed). Prompt: tasks/WP09-root-independent-chmod-sweep.md Requirement Refs: FR-007, NFR-003, C-001, SC-004

Included Subtasks

T042 Reproduce the 16 root failures (WP09) T043 Inject the failure at the I/O seam (preferred) (WP09) T044 Skip under root only where no single seam exists (WP09) T045 Planted breaks and validation (WP09)

Implementation Notes

  • Same seam-injection pattern as WP08.

Parallel Opportunities

  • Owns disjoint files from every other WP; runs in its own lane.

Dependencies

  • None.

Risks & Mitigations

  • A global Path monkeypatch leaking to other paths: delegate to the original for non-target paths.

Estimated prompt size: ~240 lines