Skip to content

refactor(ai): remove the unreachable partial status of the harness #3852

Closed

Description

@dan-petty

Problem or Motivation

Found while working on #3764 (child E of #1330).

_evaluate_tiered_status in src/devops_cli/ai/harness/slots.py returns partial when some sub-agent searches succeed and some fail. _summarize_search then writes "Some searches failed; found ...". No public input reaches this branch.

Evidence, from origin/main 235a807:

  • AgentHarness.execute_tiered runs up to two searches on one repo_path. Both test root.is_dir() with the same root, so they fail together.
  • parse_file_symbols catches every read and parse error and returns None. is_ignored_by_git fails open. Path.rglob skips a directory it cannot read.
  • A probe on a directory with an unreadable file, a directory named d.py, a broken symbolic link, a symbolic link loop, a directory with no access and a file with bytes that are not UTF-8 gave completed for both searches.

The only test of the branch built two SubAgentResult objects by hand and called the private helpers. #3764 deletes that test.

Expected

The partial status and the "Some searches failed; found" text leave slots.py. The status is completed when every search succeeds and failed otherwise.

Acceptance criteria

  • ! git grep -n -e partial -e "Some searches failed" -- src/devops_cli/ai/harness/slots.py returns no line.
  • A test of AgentHarness.execute_tiered still checks the failed summary.
  • uv run devops ci passes.

Existing tool considered

None needed. The change deletes code.

Related

Related: #3764, #1330

Alternatives check of 2026-11-08: not-applicable.
Class: refactor, no search.
Tool: none found.

Proposed design

Problem statement

The function _evaluate_tiered_status in src/devops_cli/ai/harness/slots.py returns partial when some searches succeed and some fail. No public input reaches this branch, because both searches of AgentHarness.execute_tiered use the same repo_path and fail together. The partial status and the text "Some searches failed; found" are dead code. The change deletes them. The status is then completed when every search succeeds and failed otherwise.

Acceptance criteria

Requirement: No partial status in slots.py

The file src/devops_cli/ai/harness/slots.py SHALL contain neither the word partial nor the text "Some searches failed".

Scenario: Search the file for the removed words

  • WHEN the command git grep -n -e partial -e "Some searches failed" -- src/devops_cli/ai/harness/slots.py runs
  • THEN the command returns no line

Requirement: Two-state tiered status

The function AgentHarness.execute_tiered SHALL report the status completed when every search succeeds and the status failed otherwise.

Scenario: Searches run on a directory that exists

  • WHEN execute_tiered runs a symbol search and a file search on an existing directory
  • THEN the result status is completed and the summary starts with "Found"

Requirement: Failed summary kept

The function AgentHarness.execute_tiered MUST still report the status failed and a summary that lists the errors of the failed searches.

Scenario: Searches run on a missing directory

  • WHEN execute_tiered runs two searches on a directory that does not exist
  • THEN the result status is failed and the summary lists both errors

Requirement: CI passes

The change SHALL pass the full project check uv run devops ci.

Scenario: Run the project check after the change

  • WHEN uv run devops ci runs on the branch of the change
  • THEN the command exits with code 0

Existing Tool Considered

None needed. The change deletes unreachable code, so no tool or library applies. The alternatives check gave not-applicable for the class refactor. The cost of the change is a few lines of deletion and one run of the existing tests.

Key questions

  • Does any public input reach the partial status of _evaluate_tiered_status?: No. execute_tiered runs its searches on one repo_path, and both test root.is_dir() with the same root, so they fail together. The read and parse helpers swallow their own errors, so a single search does not fail alone. The test(ai): harness slot tests patch no internals #3764 change records the probe and deletes the only test of the branch. [sources: src/devops_cli/ai/harness/slots.py, openspec/changes/archive/2026-11-06-3764-harness-slot-tests-public-interface/proposal.md, openspec/changes/archive/2026-11-06-3764-harness-slot-tests-public-interface/tasks.md]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/refactor
    scope/ai
    status/new
    value/low
    effort/low
    on Nov 6, 2026
  2. dan-petty commented on Nov 6, 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/refactor. The refactor prefix of the title gives the type.
    • Scope: scope/ai. The (ai) scope of the title gives the scope.
    • Priority: P3-Low. Removing unreachable code has no user-facing impact and no urgency.
    • Value: Low. No user-visible behaviour changes; it only reduces dead code.
    • Effort: Low. The change deletes a status branch and its summary text, then adjusts one test.
    • Related: test(ai): harness slot tests patch no internals #3764, which asks for a different change. Both work on the harness slots area; #3764 fixes tests that patch internals, while this candidate deletes unreachable production code in slots.py.
  3. added
    priority/p3-low
    on Nov 6, 2026
  4. devops-cli-service commented on Nov 8, 2026

    @devops-cli-service
    Contributor

    Alternatives check: not-applicable

    Class: refactor. The check makes no search and no model call for an item of this class.

    Tool: none found

    Checked on 2026-11-08. A person decides what this means for the item. The check changes no label and closes no issue.

  5. added
    status/ready
    and removed
    status/new
    on Nov 9, 2026
  6. devops-cli-service commented on Nov 9, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 1b37dbc (see proposed design in issue body).

  7. added
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 9, 2026
  8. removed
    status/in-review
    on Nov 9, 2026
  9. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-09 23:58 UTC

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/p3-lowscope/aisource/agenttype/refactorvalue/low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions