Skip to content

feat(testmanagement): filter listTestCases by id; add read-only capability registry mode - #604

Merged
Dave3130 merged 3 commits into
browserstack:mainfrom
SavioBS629:feat/testcase-id-filter-and-read-only-registry
Nov 25, 2026
Merged

Dave3130 merged 3 commits into
browserstack:mainfrom
SavioBS629:feat/testcase-id-filter-and-read-only-registry

Conversation

@SavioBS629

Copy link
Copy Markdown
Collaborator
  • listTestCases accepts an optional id (e.g. TC-12 or TC-12,TC-34) to fetch specific test cases in one call without paging.
  • CAPABILITY_REGISTRY_READ_ONLY=true loads only read capabilities and registers invokeCapability as read-only, without the write-consent fields. The default behaviour is unchanged.

🤖 Generated with Claude Code

…ility registry mode

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto (fallback from Default branch)
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML (base), Organization UI (inherited), Workspace UI (inherited); Enforced overrides: Organization
  • Review profile: ASSERTIVE
  • Plan: Enterprise
  • Run ID: e927e137-6563-4e93-9db9-6f3f584dacff

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@sarve-shreyas sarve-shreyas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the full PR at 92ac385. npm run build passes, and all 2518 tests in 167 files pass locally.

Read-only mode looks right. Putting writes and deletes in the existing withheld set at load time means search, describe, entity docs and invoke all drop them in one place. Fallbacks can't reach a write either, because checkFallbacks already stops a read from falling back to anything above read. readOnlyHint and the dropped user_permission/change_summary fields are worked out when the tool is registered, so they match the registry. No blocking issues.

Non-blocking (outside the diff):

  1. The listTestCases tool description doesn't mention the new id filter (src/tools/testmanagement.ts:789: "Filters: case_type, priority, paging."). PMAA-458 depends on the agent knowing it can fetch cases by id. A client that defers schemas only sees the description, so it will keep paging. Suggest: "Filters: id (TC-…, comma-separated), case_type, priority, paging."

  2. The shared-registry cache key ignores the read-only flag (src/tools/capability-registry/shared-registry.ts:44). The key includes remote= because local_only changes what is loaded, and CAPABILITY_REGISTRY_READ_ONLY now changes it too. Env is fixed for a process, so prod is fine today. But if the flag changes within one process (tests through addCapabilityRegistryToolsFromConfig, a future per-request source), the cached registry and the tool's schema and annotations disagree. Adding readonly=${isReadOnly()} to the key is a one-line fix. The new tests inject registry directly, so they don't go through this path.

  3. The startup log reports withheld writes as disabled (register.ts:108-116): "withholding disabled capabilities: tm N". In read-only mode N also counts every write, so an operator can't tell the flag is on. Logging a separate capability registry read-only: writes withheld line when isReadOnly() is true would fix that.

SavioBS629 and others added 2 commits November 24, 2026 22:56
…read-only mode

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…m fields

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Dave3130
Dave3130 merged commit ba3cb8b into browserstack:main Nov 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants