Repository navigation
refactor(tests): drop empty-valued env entries from snapshot headers - #3063
Merged
Merged
Conversation
…shots show true ANSI Remove four snapshot-filter hacks that rewrote captured bytes for claimed cross-platform consistency, so committed snapshots now show the bytes the binary actually emits: - The line-final ANSI reset filters in setup_snapshot_settings (#125 claimed "Windows terminal strips trailing resets that Unix includes"). Snapshot tests capture pipes, and anstream's AutoStream::always() only takes the wincon path when the stream is a terminal — piped bytes are ANSI pass-through on every platform, and that was already true of anstream 0.6.21 in use when #125 landed. These filters meant committed snapshots could never show the closing reset, which misled PR #3056 into chasing a dim-bleed that existed only in filtered snapshot bytes. - readme_sync's ensure_line_resets, which re-added the stripped resets before ANSI→HTML conversion. With snapshots carrying their real resets it is a no-op: all 13 readme_sync tests pass against the committed docs without it. ensure_line_resets_with_carry stays — it compensates for clap resetting styles at wrap points in live --help-md output, which is unrelated to snapshot filtering. - The tree-sitter green-path normalization filters. They no longer match anything: removing them changes zero bytes in regenerated snapshots on macOS (the gutter grammar they were anchored on predates #3056's end-lines-at-content change). - The leading-reset strips in add_pty_filters and statusline's claude_code_snapshot_settings. The leading \x1b[0m is the binary's own deterministic write (reset before streaming child output / statusline prefix), not PTY-generated variance. Windows and Linux CI on this PR are the arbiters for the cross-platform claims; if a platform genuinely diverges, the specific filter comes back narrowed to that case with the CI evidence cited. Snapshot churn is mechanical: ANSI-stripped bodies verified byte-identical pre/post; raw diffs confined to SGR sequences at line boundaries plus known env-header drift. Co-Authored-By: Claude Fable 5 <[email protected]>
insta-cmd records env_remove calls as VAR: "" (get_envs() yields None for
removals, rendered via unwrap_or("")), so a removal is indistinguishable
from a deliberate set-to-empty in the recorded env: block. Worse, the
isolation scrub removes whatever GIT_*/WORKTRUNK_* keys exist in the host
environment, so recording removals leaks host state into committed
snapshots — the GIT_EDITOR: "" line in the old headers was the
regenerating machine's exported GIT_EDITOR.
Add a dynamic redaction on .env that drops empty-valued entries, and
regenerate headers with --force-update-snapshots. Bodies verified
byte-identical; the diff also refreshes stale expression: metadata in
snapshots whose test source changed since their last rewrite.
Co-Authored-By: Claude Fable 5 <[email protected]>
…et-filters # Conflicts: # tests/CLAUDE.md # tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap # tests/snapshots/integration__integration_tests__approval_ui__yes_does_not_save_approvals_first_run.snap # tests/snapshots/integration__integration_tests__config_show__config_show_claude_available_plugin_not_installed.snap # tests/snapshots/integration__integration_tests__config_show__config_show_clis_detected_via_path.snap # tests/snapshots/integration__integration_tests__config_show__config_show_codex_available.snap # tests/snapshots/integration__integration_tests__config_show__config_show_empty_project_config.snap # tests/snapshots/integration__integration_tests__config_show__config_show_full_command_not_found.snap # tests/snapshots/integration__integration_tests__config_show__config_show_full_gitea_remote.snap # tests/snapshots/integration__integration_tests__config_show__config_show_full_not_configured.snap # tests/snapshots/integration__integration_tests__config_show__config_show_full_update_available.snap # tests/snapshots/integration__integration_tests__config_show__config_show_full_version_check_unavailable.snap # tests/snapshots/integration__integration_tests__config_show__config_show_gemini_available_extension_not_installed.snap # tests/snapshots/integration__integration_tests__config_show__config_show_gemini_extension_installed.snap # tests/snapshots/integration__integration_tests__config_show__config_show_gemini_extension_invalid_manifest.snap # tests/snapshots/integration__integration_tests__config_show__config_show_github_remote.snap # tests/snapshots/integration__integration_tests__config_show__config_show_gitlab_remote.snap # tests/snapshots/integration__integration_tests__config_show__config_show_invalid_project_toml.snap # tests/snapshots/integration__integration_tests__config_show__config_show_invalid_system_config.snap # tests/snapshots/integration__integration_tests__config_show__config_show_invalid_user_toml.snap # tests/snapshots/integration__integration_tests__config_show__config_show_no_project_config.snap # tests/snapshots/integration__integration_tests__config_show__config_show_opencode_available_plugin_not_installed.snap # tests/snapshots/integration__integration_tests__config_show__config_show_opencode_plugin_installed.snap # tests/snapshots/integration__integration_tests__config_show__config_show_opencode_plugin_outdated.snap # tests/snapshots/integration__integration_tests__config_show__config_show_outside_git_repo.snap # tests/snapshots/integration__integration_tests__config_show__config_show_plugin_installed.snap # tests/snapshots/integration__integration_tests__config_show__config_show_shell_active_but_not_in_config_file.snap # tests/snapshots/integration__integration_tests__config_show__config_show_shell_integration_active.snap # tests/snapshots/integration__integration_tests__config_show__config_show_statusline_configured.snap # tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snap # tests/snapshots/integration__integration_tests__config_show__config_show_warns_unknown_project_keys.snap # tests/snapshots/integration__integration_tests__config_show__config_show_warns_unknown_user_keys.snap # tests/snapshots/integration__integration_tests__config_show__config_show_whitespace_only_project_config.snap # tests/snapshots/integration__integration_tests__config_show__config_show_with_project_config.snap # tests/snapshots/integration__integration_tests__config_show__config_show_with_system_config.snap # tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_project_level_shows_warning.snap # tests/snapshots/integration__integration_tests__config_show__deprecated_commit_generation_section_shows_warning.snap # tests/snapshots/integration__integration_tests__config_show__deprecated_template_variables_show_warning.snap # tests/snapshots/integration__integration_tests__config_show__explicit_config_path_not_found_shows_warning.snap # tests/snapshots/integration__integration_tests__configure_shell__uninstall_shell_dry_run.snap # tests/snapshots/integration__integration_tests__configure_shell__uninstall_shell_dry_run_fish.snap # tests/snapshots/integration__integration_tests__configure_shell__uninstall_shell_dry_run_fish_canonical.snap # tests/snapshots/integration__integration_tests__configure_shell__uninstall_shell_dry_run_multiple.snap # tests/snapshots/integration__integration_tests__directives__merge_directive_file.snap # tests/snapshots/integration__integration_tests__directives__merge_directive_no_remove.snap # tests/snapshots/integration__integration_tests__directives__merge_directive_remove.snap # tests/snapshots/integration__integration_tests__directives__remove_directive_file.snap # tests/snapshots/integration__integration_tests__directives__switch_directive_file.snap # tests/snapshots/integration__integration_tests__directives__switch_exec_scrubbed_warns.snap # tests/snapshots/integration__integration_tests__directives__switch_legacy_directive_file.snap # tests/snapshots/integration__integration_tests__directives__switch_legacy_directive_file_fish.snap # tests/snapshots/integration__integration_tests__directives__switch_legacy_directive_file_powershell.snap # tests/snapshots/integration__integration_tests__directives__switch_legacy_directive_file_with_execute.snap # tests/snapshots/integration__integration_tests__directives__switch_no_cd_config_suppresses_directive.snap # tests/snapshots/integration__integration_tests__directives__switch_no_cd_create_suppresses_directive.snap # tests/snapshots/integration__integration_tests__directives__switch_no_cd_hooks_show_path_annotation.snap # tests/snapshots/integration__integration_tests__directives__switch_no_cd_suppresses_directive.snap # tests/snapshots/integration__integration_tests__for_each__for_each_no_args_error.snap # tests/snapshots/integration__integration_tests__hook_show__hook_show_approval_status.snap # tests/snapshots/integration__integration_tests__hook_show__hook_show_expanded_valid_template.snap # tests/snapshots/integration__integration_tests__hook_show__hook_show_filter_by_type.snap # tests/snapshots/integration__integration_tests__hook_show__hook_show_filter_post_remove.snap # tests/snapshots/integration__integration_tests__hook_show__hook_show_filter_pre_remove.snap # tests/snapshots/integration__integration_tests__hook_show__hook_show_merges_user_project_hooks.snap # tests/snapshots/integration__integration_tests__hook_show__hook_show_with_both_configs.snap # tests/snapshots/integration__integration_tests__list__commit_conflicts_without_full.snap # tests/snapshots/integration__integration_tests__list__list_branch_only_with_status.snap # tests/snapshots/integration__integration_tests__list__list_branches_with_nonexistent_default_branch.snap # tests/snapshots/integration__integration_tests__list__list_detached_head.snap # tests/snapshots/integration__integration_tests__list__list_detached_head_in_worktree.snap # tests/snapshots/integration__integration_tests__list__list_handles_orphan_branch.snap # tests/snapshots/integration__integration_tests__list__list_large_diffs_alignment.snap # tests/snapshots/integration__integration_tests__list__list_locked_no_reason.snap # tests/snapshots/integration__integration_tests__list__list_locked_worktree.snap # tests/snapshots/integration__integration_tests__list__list_long_commit_message.snap # tests/snapshots/integration__integration_tests__list__list_many_worktrees_with_varied_stats.snap # tests/snapshots/integration__integration_tests__list__list_maximum_working_tree_symbols.snap # tests/snapshots/integration__integration_tests__list__list_multiple_worktrees.snap # tests/snapshots/integration__integration_tests__list__list_nested_worktree_current_indicator.snap # tests/snapshots/integration__integration_tests__list__list_no_progressive_flag.snap # tests/snapshots/integration__integration_tests__list__list_ordering_rules.snap # tests/snapshots/integration__integration_tests__list__list_previous_worktree_gutter.snap # tests/snapshots/integration__integration_tests__list__list_primary_on_different_branch.snap # tests/snapshots/integration__integration_tests__list__list_progressive_flag.snap # tests/snapshots/integration__integration_tests__list__list_progressive_with_branches.snap # tests/snapshots/integration__integration_tests__list__list_single_worktree.snap # tests/snapshots/integration__integration_tests__list__list_skips_operations_for_prunable_worktrees.snap # tests/snapshots/integration__integration_tests__list__list_status_column_padding_with_emoji.snap # tests/snapshots/integration__integration_tests__list__list_task_dag_detached_head.snap # tests/snapshots/integration__integration_tests__list__list_task_dag_many_worktrees.snap # tests/snapshots/integration__integration_tests__list__list_task_dag_multiple_worktrees.snap # tests/snapshots/integration__integration_tests__list__list_task_dag_single_worktree.snap # tests/snapshots/integration__integration_tests__list__list_task_dag_with_locked_worktree.snap # tests/snapshots/integration__integration_tests__list__list_unicode_commit_message.snap # tests/snapshots/integration__integration_tests__list__list_user_marker_with_special_characters.snap # tests/snapshots/integration__integration_tests__list__list_warns_when_commit_details_batch_fails.snap # tests/snapshots/integration__integration_tests__list__list_warns_when_default_branch_missing_worktree.snap # tests/snapshots/integration__integration_tests__list__list_with_branches_flag.snap # tests/snapshots/integration__integration_tests__list__list_with_branches_flag_no_available.snap # tests/snapshots/integration__integration_tests__list__list_with_branches_flag_only_branches.snap # tests/snapshots/integration__integration_tests__list__list_with_nonexistent_default_branch.snap # tests/snapshots/integration__integration_tests__list__list_with_remotes_and_branches.snap # tests/snapshots/integration__integration_tests__list__list_with_remotes_filters_tracked_branches.snap # tests/snapshots/integration__integration_tests__list__list_with_remotes_filters_tracked_worktrees.snap # tests/snapshots/integration__integration_tests__list__list_with_remotes_flag.snap # tests/snapshots/integration__integration_tests__list__list_with_user_marker.snap # tests/snapshots/integration__integration_tests__list__quickstart_list.snap # tests/snapshots/integration__integration_tests__list__quickstart_switch.snap # tests/snapshots/integration__integration_tests__list__readme_example_list.snap # tests/snapshots/integration__integration_tests__list__readme_example_list_marker.snap # tests/snapshots/integration__integration_tests__list__task_dag_ordering_stability.snap # tests/snapshots/integration__integration_tests__list__tips_dev_server_workflow.snap # tests/snapshots/integration__integration_tests__list__working_tree_conflicts_without_full.snap # tests/snapshots/integration__integration_tests__list_column_alignment__status_column_alignment_with_header.snap # tests/snapshots/integration__integration_tests__list_column_alignment__status_column_width_consistency.snap # tests/snapshots/integration__integration_tests__list_config__list_config_branches_enabled.snap # tests/snapshots/integration__integration_tests__list_config__list_config_cli_override.snap # tests/snapshots/integration__integration_tests__list_config__list_config_env_override_bad_value_preserves_file_config.snap # tests/snapshots/integration__integration_tests__list_config__list_config_env_override_bad_value_warns_on_stderr.snap # tests/snapshots/integration__integration_tests__list_config__list_config_env_override_preserves_file_fields.snap # tests/snapshots/integration__integration_tests__list_config__list_config_env_override_validation_failure.snap # tests/snapshots/integration__integration_tests__list_config__list_config_malformed_config_warns_on_stderr.snap # tests/snapshots/integration__integration_tests__list_config__list_config_malformed_non_section_field_warns_on_stderr.snap # tests/snapshots/integration__integration_tests__list_config__list_config_malformed_system_config_non_section_field.snap # tests/snapshots/integration__integration_tests__list_config__list_config_malformed_system_config_warns_on_stderr.snap # tests/snapshots/integration__integration_tests__list_config__list_config_validation_error_warns_on_stderr.snap # tests/snapshots/integration__integration_tests__list_config__list_no_config.snap # tests/snapshots/integration__integration_tests__list_config__list_project_url_column.snap # tests/snapshots/integration__integration_tests__merge__docs_merge_pre_merge_hook.snap # tests/snapshots/integration__integration_tests__merge__docs_merge_squash_llm.snap # tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap # tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap # tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap # tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap # tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_failure.snap # tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap # tests/snapshots/integration__integration_tests__post_start_commands__both_pre_and_post_start.snap # tests/snapshots/integration__integration_tests__post_start_commands__execute_with_post_start.snap # tests/snapshots/integration__integration_tests__post_start_commands__post_start_default_branch_template.snap # tests/snapshots/integration__integration_tests__post_start_commands__post_start_failing_command.snap # tests/snapshots/integration__integration_tests__post_start_commands__post_start_upstream_conditional.snap # tests/snapshots/integration__integration_tests__remove__docs_remove_pre_remove_hook.snap # tests/snapshots/integration__integration_tests__remove__pre_remove_hook_failure_aborts.snap # tests/snapshots/integration__integration_tests__remove__pre_remove_hook_runs_for_detached_head.snap # tests/snapshots/integration__integration_tests__remove__pre_remove_hook_runs_for_detached_head_background.snap # tests/snapshots/integration__integration_tests__remove__remove_internal_mode.snap # tests/snapshots/integration__integration_tests__security__branch_name_with_cd_directive_not_executed.snap # tests/snapshots/integration__integration_tests__security__commit_message_with_directive_not_executed.snap # tests/snapshots/integration__integration_tests__security__error_message_with_directive_not_executed.snap # tests/snapshots/integration__integration_tests__security__git_ignores_malformed_refs_with_ansi.snap # tests/snapshots/integration__integration_tests__security__literal_escape_like_branch_names_displayed_safely.snap # tests/snapshots/integration__integration_tests__security__path_with_directive_not_executed.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_empty_diffs.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_extreme_diffs.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__alignment_varying_diffs.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__long_branch_names.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__mixed_length_branch_names.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__short_branch_names.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__unicode_branch_names.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_100.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_120.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_30.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_40.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_50.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_60.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_long_80.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_100.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_120.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_160.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_60.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_picker_right_80.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_100.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_120.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_30.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_40.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_50.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_60.snap # tests/snapshots/integration__integration_tests__spacing_edge_cases__width_survey_typical_80.snap # tests/snapshots/integration__integration_tests__step_alias__alias_append_executes_both.snap # tests/snapshots/integration__integration_tests__step_alias__alias_approval_already_approved.snap # tests/snapshots/integration__integration_tests__step_alias__alias_approval_user_and_project_both_need_approval.snap # tests/snapshots/integration__integration_tests__step_alias__alias_approval_user_config_skips.snap # tests/snapshots/integration__integration_tests__step_alias__alias_approval_yes_first_run.snap # tests/snapshots/integration__integration_tests__step_alias__alias_approval_yes_second_run_prompts.snap # tests/snapshots/integration__integration_tests__step_alias__config_alias_dry_run.snap # tests/snapshots/integration__integration_tests__step_alias__config_alias_dry_run_unknown_suggests.snap # tests/snapshots/integration__integration_tests__step_alias__config_alias_dry_run_warns_on_shadowed_name.snap # tests/snapshots/integration__integration_tests__step_alias__config_alias_show_user_and_project.snap # tests/snapshots/integration__integration_tests__step_alias__config_alias_show_warns_on_shadowed_name.snap # tests/snapshots/integration__integration_tests__step_alias__project_alias.snap # tests/snapshots/integration__integration_tests__step_alias__step_alias_args_sequence_access.snap # tests/snapshots/integration__integration_tests__step_alias__step_alias_double_dash_escape.snap # tests/snapshots/integration__integration_tests__step_alias__step_alias_empty_args_renders_empty.snap # tests/snapshots/integration__integration_tests__step_alias__step_alias_exit_code.snap # tests/snapshots/integration__integration_tests__step_alias__step_alias_forwards_positional_args.snap # tests/snapshots/integration__integration_tests__step_alias__step_alias_from_project_config.snap # tests/snapshots/integration__integration_tests__step_alias__step_alias_from_user_config.snap # tests/snapshots/integration__integration_tests__step_alias__step_alias_multi_step_binds_across_pipeline.snap # tests/snapshots/integration__integration_tests__step_alias__step_alias_unreferenced_key_forwards_to_args.snap # tests/snapshots/integration__integration_tests__step_alias__step_alias_user_var_overshadows_builtin.snap # tests/snapshots/integration__integration_tests__step_alias__top_level_alias_did_you_mean.snap # tests/snapshots/integration__integration_tests__step_alias__top_level_alias_dispatch.snap # tests/snapshots/integration__integration_tests__step_alias__top_level_alias_with_step_builtin_name.snap # tests/snapshots/integration__integration_tests__step_alias__user_alias.snap # tests/snapshots/integration__integration_tests__step_alias__user_and_project_append.snap # tests/snapshots/integration__integration_tests__step_promote__promote_shows_mismatch_in_list.snap # tests/snapshots/integration__integration_tests__switch__list_with_relative_paths.snap # tests/snapshots/integration__integration_tests__switch__switch_branch_worktree_mismatch_shows_hint.snap # tests/snapshots/integration__integration_tests__switch__switch_detached_worktree_by_relative_path.snap # tests/snapshots/integration__integration_tests__switch__switch_dwim_ambiguous_remotes.snap # tests/snapshots/integration__integration_tests__switch__switch_error_path_occupied_detached.snap # tests/snapshots/integration__integration_tests__switch__switch_error_path_occupied_different_branch.snap # tests/snapshots/integration__integration_tests__switch__switch_execute_creates_file.snap # tests/snapshots/integration__integration_tests__switch__switch_execute_deprecation_fish_wrapper.snap # tests/snapshots/integration__integration_tests__switch__switch_execute_deprecation_trailing_args.snap # tests/snapshots/integration__integration_tests__switch__switch_execute_existing.snap # tests/snapshots/integration__integration_tests__switch__switch_execute_failure.snap # tests/snapshots/integration__integration_tests__switch__switch_execute_template_in_args.snap # tests/snapshots/integration__integration_tests__switch__switch_existing_internal.snap # tests/snapshots/integration__integration_tests__switch__switch_internal_execute_exit_code.snap # tests/snapshots/integration__integration_tests__switch__switch_internal_mode.snap # tests/snapshots/integration__integration_tests__switch__switch_main_worktree_on_different_branch.snap # tests/snapshots/integration__integration_tests__switch__switch_no_warning_when_branch_matches.snap # tests/snapshots/integration__integration_tests__switch__switch_post_hook_no_path_with_shell_integration.snap # tests/snapshots/integration__integration_tests__switch__switch_with_execute_trailing_args_metachars_fish_stderr.snap # tests/snapshots/integration__integration_tests__user_hooks__background_hook_env_var_visible.snap # tests/snapshots/integration__integration_tests__user_hooks__docs_hook_pre_merge.snap # tests/snapshots/integration__integration_tests__user_hooks__hook_dry_run_shows_expanded_command.snap # tests/snapshots/integration__integration_tests__user_hooks__hook_multiple_name_filters.snap # tests/snapshots/integration__integration_tests__user_hooks__user_hook_template_vars.snap # tests/snapshots/integration__integration_tests__user_hooks__user_hooks_before_project.snap # tests/snapshots/integration__integration_tests__user_hooks__user_hooks_no_approval.snap # tests/snapshots/integration__integration_tests__user_hooks__user_pre_commit_executes.snap # tests/snapshots/integration__integration_tests__user_hooks__user_pre_commit_failure.snap # tests/snapshots/integration__integration_tests__user_hooks__user_pre_merge_executes.snap # tests/snapshots/integration__integration_tests__user_hooks__user_pre_merge_failure.snap # tests/snapshots/integration__integration_tests__user_hooks__user_pre_remove_executes.snap # tests/snapshots/integration__integration_tests__user_hooks__user_pre_remove_failure.snap # tests/snapshots/integration__integration_tests__user_hooks__user_pre_start_executes.snap # tests/snapshots/integration__integration_tests__user_hooks__user_pre_start_failure.snap # tests/snapshots/integration__integration_tests__user_hooks__user_pre_switch_branch_destination.snap # tests/snapshots/integration__integration_tests__user_hooks__user_pre_switch_executes.snap # tests/snapshots/integration__integration_tests__user_hooks__user_pre_switch_failure.snap # tests/snapshots/integration__integration_tests__user_hooks__user_pre_switch_manual.snap
Co-Authored-By: Claude Fable 5 <[email protected]>
worktrunk-bot
approved these changes
Jun 12, 2026
max-sixty
added a commit
that referenced
this pull request
Jun 14, 2026
The two wide colored-table snapshots were captured before merging main and missed two cosmetic changes the merge introduced: the per-row trailing ANSI reset (#3056/#3061) and dropped empty-valued env-header entries (#3037/#3063). Table content is unchanged; only the line-final `\x1b[0m` and the snapshot env block differ, matching every other wide list snapshot. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #3061 (and a unification with #3037, which landed mid-flight). Drops every empty-valued entry from the
env:block insta-cmd records in snapshot headers, and regenerates all ~1,000 headers with--force-update-snapshotsso the tree is uniform now rather than lazily on each snapshot's next body change.Why
insta-cmd records
Command::env_removeasKEY: ""—get_envs()yieldsNonefor removals and insta-cmd renders it viaunwrap_or(""). Two consequences:GIT_DIR: ""claims the child ran with an emptyGIT_DIR; it actually ran with noGIT_DIRat all — a behaviorally different state, and indistinguishable in the header from a deliberate set-to-empty.isolate_subprocess_envscrubs whicheverGIT_*/WORKTRUNK_*keys exist in the parent environment, so regenerating on a box withGIT_EDITORexported stampsGIT_EDITOR: ""into every header while CI produces a different set (this bit feat(list): add structured repo metadata to JSON output #3021, and is what test: make snapshot env blocks robust to the contributor's environment #3037 fixed for theGIT_*/WORKTRUNK_*prefixes).Relation to #3037
#3037 added
strip_host_scrubbed_env_markers, scoped to emptyGIT_*/WORKTRUNK_*entries, deliberately keeping the deterministicNO_COLOR: ""/SHELL: ""/PSModulePath: ""markers and deferring the bulk regen. This PR generalizes it to the total rule (drop_empty_env_entries): since the recorded YAML cannot distinguish a removal from a set-to-empty, an empty entry carries no trustworthy signal regardless of which key it's on — so the three "deterministic" markers go too, along with the prefix list. The unit test is adapted accordingly, and the bulk regen #3037 offered as a follow-up is materialized here (bodies verified byte-identical; the diff also refreshes staleexpression:metadata in snapshots whose test source changed since their last rewrite).If keeping the
NO_COLOR/SHELL/PSModulePathmarkers as documentation of the unconditional scrub is preferred, that's a defensible alternative — say so and I'll narrow the predicate back to #3037's.Verification
drop_empty_env_entries_normalizes_env_blockcovers drop/keep/passthrough.: ""entries remain in any committed.snap.wt hook pre-merge --yes) green: 3,932 tests passed.🤖 Generated with Claude Code