Skip to content

Pre-existing test failures discovered during #1007 verification #1012

Closed

Description

@Sinity

Context

Three test failures were observed on master while verifying PR #1011 (#1005) and the #1007 envelope-rename branch. They are unrelated to either change but predate them — verified by running on a clean master clone.

Failures

1. `tests/unit/cli/test_query_exec_laws.py::test_apply_modifiers_contract`

Hypothesis test: `apply_modifiers` calls `env.polylogue.add_tag(conv_id, tag)` against a conversation summary built by the strategy that was never persisted to the archive. `add_tag` raises `ConversationNotFoundError(conv-000000)`. Likely fix: seed the strategy's summaries into the test polylogue env before invoking modifiers, or change the strategy to use existing conv ids.

2. `tests/unit/cli/test_command_aux_runtime.py::test_tags_command_plain_paths_cover_empty_hint_and_tabular_counts`

Two implementation gaps:

  • empty hint: implementation prints `"No tags found."` but test expects `"No tags found for provider 'chatgpt'."` plus `"Hint: use --add-tag"`. The provider-aware message was lost in a refactor.
  • tabular path: test asserts `env.ui.print` is called with a `Table` titled `"Tags (all providers, 1 total)"` with cells `["alpha"]` / `["5"]`. Implementation uses bare `click.echo`. The Rich/tabular renderer was never wired.

3. `tests/unit/core/test_content_projection.py::test_prose_only_drops_claude_code_protocol_artifacts`

`prose_only` projection currently passes through 4 protocol artifact types it should drop: `command-wrapper`, `local-command-caveat`, `task-notification`, `skill-body`. This is exactly the work tracked at #839 (semantic storage of protocol artifacts) — the test was written for the post-#839 invariant and should remain xfail until that issue lands.

Acceptance criteria

Source

Activity

  1. Sinity commented on May 11, 2026

    @Sinity
    OwnerAuthor

    Strengthening pass — classify pre-existing test failures as reproducible bugs

    This issue should be treated as a small bug bundle, not generic “test failures.” Each failure needs a repro command, root-cause classification, and a narrow acceptance test that fails before the fix.

    Suggested structure:

    • Keep the three failures as separate checklist rows with: test node, clean-master reproduction command, observed exception/assertion, suspected owning layer, and intended fix shape.
    • If a failure is caused by test data that violates the public contract, fix the strategy/fixture and add a guard so future generated summaries are persisted before mutation APIs are exercised.
    • If a failure reveals product behavior ambiguity, split it into its own issue rather than burying behavior changes inside a test cleanup.

    Acceptance:

    • Each listed test node passes on a clean branch after the fix.
    • A focused command is recorded first, then devtools verify or the relevant quick/full gate is run before closure.
    • If any failure is no longer reproducible, close that row with the exact commit or PR that fixed it, not “cannot reproduce.”
  2. Sinity commented on May 15, 2026

    @Sinity
    OwnerAuthor

    Focused repro update from the 2026-05-15 open-issue audit: two rows now XPASS, but the issue is not closable yet. Command run: pytest -q tests/unit/cli/test_query_exec_laws.py::test_apply_modifiers_contract tests/unit/cli/test_command_aux_runtime.py::test_tags_command_plain_paths_cover_empty_hint_and_tabular_counts tests/unit/core/test_content_projection.py::test_prose_only_drops_claude_code_protocol_artifacts -q. Result: test_apply_modifiers_contract XPASS, test_prose_only_drops_claude_code_protocol_artifacts XPASS, test_tags_command_plain_paths_cover_empty_hint_and_tabular_counts remains XFAIL for provider-aware empty hint and Rich table renderer. Remaining #1012 closeout should either implement the tags behavior or intentionally revise that expectation, then remove stale xfails for the XPASS rows.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions