Skip to content

test_serve_allows_non_exempt_when_scan_artifact_present relies on readme tool existing in package #60

Closed

Description

@derek-palmer

This was generated by AI during triage.

Agent Brief

Category: enhancement
Summary: test_serve_allows_non_exempt_when_scan_artifact_present calls the readme tool against the package-bundled PROMPTS root. If readme.md is ever removed or renamed in the package, serve() returns a -32602 (unknown tool) instead of succeeding, making the test a false negative — it would still pass (no "error" check) while silently not testing re-hydration at all.

Current behavior:
The test passes prompts_root=PROMPTS (package-bundled) and requests name="readme". The test asserts "error" not in resp and resp["result"]["isError"] is False. If readme.md is absent, serve() returns an error and the assertion fails — but the test was meant to verify scan-first bypass, not tool existence.

Desired behavior:
The test should either:

  1. Seed its own minimal prompts_root in tmp_path with a known task file, so it has no dependency on the package contents, or
  2. Use a tool name guaranteed to exist (e.g. arch-review) and assert its presence at the top of the test.

Option 1 is preferred — it makes the test fully self-contained.

Key interfaces:

  • serve() accepts prompts_root: Path — the test can pass a seeded tmp dir
  • The companion test test_serve_blocks_non_exempt_when_scan_artifact_absent has the same dependency and should be updated consistently

Acceptance criteria:

  • Both re-hydration tests (_present and _absent) use a seeded prompts_root in tmp_path rather than the package-bundled PROMPTS
  • The seeded prompts root contains at least one system base file and one non-exempt task file
  • Tests remain green when the package's readme.md is hypothetically absent
  • All existing tests pass

Out of scope:

  • Changing any other test that uses PROMPTS
  • Changing the serve() function itself

Activity

  1. coderabbitai commented on May 29, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #19 - fix: re-verify security findings + doctor API-key logic in skill mode [merged]
    #21 - chore: 100% docstring and test coverage [merged]
    #22 - fix: inline code review findings [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  2. derek-palmer commented on May 29, 2026

    @derek-palmer
    OwnerAuthor

    This was generated by AI during triage.

    Closed by commit 6f12c1a in PR #56 (feat(scan-first): persist scan gate across restarts via .forerunner/scan.md).

    The second commit in that PR (fix(scan-first): resolve repo_root path and harden gate tests) addressed this issue. All acceptance criteria are met and tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions