Research: /tmp-literal offender census (#1842 burn-down) — baseline @ upstream/main 6b348206e

99 grandfathered files in tmp_ratchet_baseline.txt. Category heuristic: A = write-ish op (mkdir/open/write_text/makedirs/touch) near a /tmp literal (genuine leak → tmp_path); B = path-literal only (mock/test-data/assertion → non-/tmp sentinel). Confirm per-file at conversion.

Post-spec-squad corrections (folded into spec): 1. Stale entrytests/specify_cli/cli/commands/test_review.py no longer contains /tmp/ (disk-verified). So 98 live offenders + 1 stale; remove it from the baseline, no conversion (drop it from the specify_cli WP work-list). 2. Self-referential gatetests/architectural/test_no_tmp_paths_in_tests.py IS baseline entry #10 and has 14 literal /tmp/ lines (needle + self-test). Emptying the baseline makes it flag itself. Fix per FR-004: fragment-construct the needle + __file__ self-exclude (precedent: test_no_legacy_terminology.py:9,56,74). 3. Fakeability — the ratchet is a pure /tmp/ substring check; /dev/shm, /scratch, uncleaned mkdtemp all evade it. Cat-A fixes must adopt real tmp_path/fixture isolation (FR-007), verified across the set, not just substring-absence.

By directory (WP grouping) — count, category mix

  • tests/adversarial/ — 2 files (~2 cat-A / ~0 cat-B)
  • tests/agent/ — 6 files (~6 cat-A / ~0 cat-B)
  • tests/architectural/ — 3 files (~2 cat-A / ~1 cat-B)
  • tests/audit/ — 1 files (~1 cat-A / ~0 cat-B)
  • tests/auth/ — 2 files (~0 cat-A / ~2 cat-B)
  • tests/charter/ — 7 files (~3 cat-A / ~4 cat-B)
  • tests/cli/ — 3 files (~2 cat-A / ~1 cat-B)
  • tests/contract/ — 1 files (~1 cat-A / ~0 cat-B)
  • tests/core/ — 1 files (~1 cat-A / ~0 cat-B)
  • tests/doctrine/ — 6 files (~6 cat-A / ~0 cat-B)
  • tests/dossier/ — 3 files (~2 cat-A / ~1 cat-B)
  • tests/git_ops/ — 1 files (~1 cat-A / ~0 cat-B)
  • tests/glossary/ — 2 files (~0 cat-A / ~2 cat-B)
  • tests/integration/ — 3 files (~2 cat-A / ~1 cat-B)
  • tests/kernel/ — 1 files (~1 cat-A / ~0 cat-B)
  • tests/next/ — 3 files (~3 cat-A / ~0 cat-B)
  • tests/paths/ — 2 files (~0 cat-A / ~2 cat-B)
  • tests/runtime/ — 2 files (~2 cat-A / ~0 cat-B)
  • tests/specify_cli/ — 30 files (~20 cat-A / ~10 cat-B)
  • tests/status/ — 4 files (~3 cat-A / ~1 cat-B)
  • tests/sync/ — 13 files (~8 cat-A / ~5 cat-B)
  • tests/unit/ — 3 files (~3 cat-A / ~0 cat-B)

Full file list (per dir)

tests/adversarial/

  • tests/adversarial/conftest.py
  • tests/adversarial/test_path_validation.py

tests/agent/

  • tests/agent/cli/commands/test_sync.py
  • tests/agent/test_agent_feature.py
  • tests/agent/test_agent_utils_status.py
  • tests/agent/test_doc_generators.py
  • tests/agent/test_review_feedback_pointer_2x_unit.py
  • tests/agent/test_workflow_feedback_pointer_2x_unit.py

tests/architectural/

  • tests/architectural/test_builtin_override_policy.py
  • tests/architectural/test_no_tmp_paths_in_tests.py
  • tests/architectural/test_real_home_isolation_guard.py

tests/audit/

  • tests/audit/test_audit_classifiers.py

tests/auth/

  • tests/auth/integration/test_refresh_through_transport.py
  • tests/auth/test_auth_doctor_report.py

tests/charter/

  • tests/charter/test_activation_filtered_drg.py
  • tests/charter/test_charter_scope.py
  • tests/charter/test_context.py
  • tests/charter/test_org_drg_cannot_override_shipped_invariants.py
  • tests/charter/test_org_drg_edge_source_urn_preserved.py
  • tests/charter/test_org_drg_loader.py
  • tests/charter/test_project_layer_override_emits_warning.py

tests/cli/

  • tests/cli/commands/test_charter_bundle_coverage.py
  • tests/cli/commands/test_retrospect.py
  • tests/cli/commands/test_sync_routes.py

tests/contract/

  • tests/contract/test_machine_facing_canonical_fields.py

tests/core/

  • tests/core/test_paths_coverage_supplements.py

tests/doctrine/

  • tests/doctrine/drg/test_org_pack_auto_emit.py
  • tests/doctrine/test_drg_merge.py
  • tests/doctrine/test_inline_ref_rejection.py
  • tests/doctrine/test_org_pack_augmentation.py
  • tests/doctrine/test_resolver.py
  • tests/doctrine/test_template_discovery.py

tests/dossier/

  • tests/dossier/test_api.py
  • tests/dossier/test_indexer.py
  • tests/dossier/test_snapshot.py

tests/git_ops/

  • tests/git_ops/test_git_preflight.py

tests/glossary/

  • tests/glossary/bench_chokepoint.py
  • tests/glossary/test_chokepoint.py

tests/integration/

  • tests/integration/retrospective/test_silent_auto_run_blocked.py
  • tests/integration/retrospective/test_silent_skip_blocked.py
  • tests/integration/test_lane_db_isolation.py

tests/kernel/

  • tests/kernel/test_paths.py

tests/next/

  • tests/next/test_decision_unit.py
  • tests/next/test_mission_run_back_reference.py
  • tests/next/test_runtime_bridge_unit.py

tests/paths/

  • tests/paths/test_render_runtime_path.py
  • tests/paths/test_windows_paths.py

tests/runtime/

  • tests/runtime/test_bootstrap_unit.py
  • tests/runtime/test_paths_unit.py

tests/specify_cli/

  • tests/specify_cli/cli/commands/agent/test_mission_planning_entry.py
  • tests/specify_cli/cli/commands/agent/test_wrapper_delegation.py
  • tests/specify_cli/cli/commands/test_accept_warnings_render.py
  • tests/specify_cli/cli/commands/test_command_surface_doctor.py
  • tests/specify_cli/cli/commands/test_daemon_doctor.py
  • tests/specify_cli/cli/commands/test_decision_single_authority.py
  • tests/specify_cli/cli/commands/test_merge.py
  • tests/specify_cli/cli/commands/test_mission_state_doctor.py
  • tests/specify_cli/cli/commands/test_mission_type_rendering.py
  • tests/specify_cli/cli/commands/test_review.py
  • tests/specify_cli/cli/commands/test_sparse_checkout_doctor.py
  • tests/specify_cli/cli/commands/test_specify_scaffold_state.py
  • tests/specify_cli/compat/test_install_method.py
  • tests/specify_cli/compat/test_messages.py
  • tests/specify_cli/compat/test_planner.py
  • tests/specify_cli/compat/test_upgrade_hint.py
  • tests/specify_cli/context/test_middleware.py
  • tests/specify_cli/context/test_models.py
  • tests/specify_cli/context/test_store.py
  • tests/specify_cli/coordination/test_worktree_topology.py
  • tests/specify_cli/core/test_worktree.py
  • tests/specify_cli/doctrine/test_sources_security.py
  • tests/specify_cli/git/test_commit_helpers.py
  • tests/specify_cli/skills/test_verifier.py
  • tests/specify_cli/sync/test_local_commit_wiring.py
  • tests/specify_cli/test_brief_pair_atomicity.py
  • tests/specify_cli/test_mission_brief_missing_vs_corrupt.py
  • tests/specify_cli/tool_surface/integration/test_migration_compat.py
  • tests/specify_cli/tool_surface/test_findings.py
  • tests/specify_cli/widen/test_flow.py

tests/status/

  • tests/status/test_derived_view_slug_traversal.py
  • tests/status/test_emit.py
  • tests/status/test_transitions.py
  • tests/status/test_work_package_lifecycle.py

tests/sync/

  • tests/sync/conftest.py
  • tests/sync/test_daemon_owner_record.py
  • tests/sync/test_daemon_singleton_reaper_consolidation.py
  • tests/sync/test_dossier_pipeline.py
  • tests/sync/test_dossier_timezone_defaults_unit.py
  • tests/sync/test_events.py
  • tests/sync/test_git_metadata.py
  • tests/sync/test_lifecycle_readiness.py
  • tests/sync/test_sync_boundary_preflight.py
  • tests/sync/test_sync_doctor.py
  • tests/sync/test_sync_logged_out_recovery.py
  • tests/sync/test_sync_status_boundary_check.py
  • tests/sync/tracker/test_origin_models.py

tests/unit/

  • tests/unit/git/test_sparse_checkout_detection.py
  • tests/unit/mission_loader/test_command.py
  • tests/unit/mission_loader/test_validator_errors.py