Skip to content

fix(test): the config write history tests that the job PR 2801 deleted are back #2803

Closed

Description

@dan-petty

What happened

PR #2801 (the implement job, issue #2745, group 1) was merged on 2026-10-30. It rewrote tests/test_config_write_history.py: 33 lines added and 141 deleted. The agent used write_file on the existing file and replaced it with two new tests of _copy. The seven tests of the write history are gone from main:

  • test_a_config_write_keeps_a_copy_of_the_file_it_replaces_and_records_the_changed_keys
  • test_the_first_write_of_a_config_file_records_its_keys_and_keeps_no_copy
  • test_a_config_write_keeps_the_newest_ten_copies_and_no_file_a_person_made
  • test_a_second_write_in_the_same_second_keeps_the_copy_of_the_older_state
  • test_a_config_write_that_changes_no_byte_writes_nothing_and_records_nothing
  • test_config_set_records_its_command_and_writes_the_key_it_changed_alone
  • test_config_set_of_a_credential_writes_no_config_file

They guard #1921 (a copy of the replaced file and the audit record, never a value).

What should happen

Evidence

  • git show 72b82e38 -- tests/test_config_write_history.py at main.
  • Job devops-cli-runner-20261030-203414-7d1e: the tool log shows write_file before the first uv run pytest.

Acceptance criteria

Activity

  1. added
    source/agent
    type/bug
    status/new
    value/medium
    effort/low
    on Oct 30, 2026
  2. dan-petty commented on Oct 30, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: none. The title has the scope test, and .github/labels.yml declares no scope/test label. Add the label to the file to give the scope to this item.
    • Priority: P2-Medium. Restoring deleted test coverage for security-relevant config behaviour, but the production code is not broken.
    • Value: Medium. Protects config copy and audit behaviour from silent regression.
    • Effort: Low. Restore seven tests from a known commit and reorganize two new tests.
    • Related: test(cli): Use mutation to merge or delete 26 test files #2176, which asks for a different change. Both concern config test files, but 2176 asks to decide which files to merge or delete, while the candidate asks to restore seven tests accidentally deleted by PR 2801.
  3. added
    priority/p2-medium
    on Oct 30, 2026
  4. dan-petty commented on Oct 30, 2026

    @dan-petty
    OwnerAuthor

    PR #2805 reverted #2801 and restored the tests, so no further change is needed.

    Evidence at 6c502854 on main:

    The cause of the loss is #2804: a step must not remove a test that existed before it.

    Closing as completed.

  5. removed
    status/new
    on Oct 30, 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/lowpriority/p2-mediumsource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions