Repository navigation
feat(testmanagement): filter listTestCases by id; add read-only capability registry mode - #604
Conversation
…ility registry mode Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
sarve-shreyas
left a comment
There was a problem hiding this comment.
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):
-
The
listTestCasestool description doesn't mention the newidfilter (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." -
The shared-registry cache key ignores the read-only flag (
src/tools/capability-registry/shared-registry.ts:44). The key includesremote=becauselocal_onlychanges what is loaded, andCAPABILITY_REGISTRY_READ_ONLYnow changes it too. Env is fixed for a process, so prod is fine today. But if the flag changes within one process (tests throughaddCapabilityRegistryToolsFromConfig, a future per-request source), the cached registry and the tool's schema and annotations disagree. Addingreadonly=${isReadOnly()}to the key is a one-line fix. The new tests injectregistrydirectly, so they don't go through this path. -
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 separatecapability registry read-only: writes withheldline whenisReadOnly()is true would fix that.
…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>
listTestCasesaccepts an optionalid(e.g.TC-12orTC-12,TC-34) to fetch specific test cases in one call without paging.CAPABILITY_REGISTRY_READ_ONLY=trueloads only read capabilities and registersinvokeCapabilityas read-only, without the write-consent fields. The default behaviour is unchanged.🤖 Generated with Claude Code