Conversation
Add scope property for persistent terminal sessions and waitUntil property for condition-based waiting on stdout/stderr output. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add scope property for persistent code execution sessions and waitUntil property for condition-based waiting on stdout/stderr. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add scope property to allow typing into scoped terminal or code sessions for interactive command support. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add new action to terminate named scopes and their processes. Supports both simple string and detailed object formats. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add terminateScope to the list of available step actions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update generated schemas with scope, waitUntil, and terminateScope. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
WalkthroughThis PR introduces session and scope management across the schema definitions by adding a Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI Agents
In @.claude/settings.local.json:
- Around line 1-18: The file .claude/settings.local.json is developer-specific
and should not be tracked; add ".claude/settings.local.json" to .gitignore, run
git rm --cached .claude/settings.local.json to stop tracking it, add a template
.claude/settings.local.json.example (or update docs) that shows the expected
permissions format for local overrides, and ensure any shared configuration
remains in .claude/settings.json.
In @src/schemas/output_schemas/test_v3.schema.json:
- Around line 6667-6799: The terminateScope schema's "scope" description lacks a
defined SIGTERM→SIGKILL grace period; update the "scope" property description
inside the terminateScope anyOf object (and its counterpart in the
components.schemas.object) to state the exact behavior: either document the
fixed duration (e.g., "process will receive SIGTERM, followed by SIGKILL after X
seconds"), or indicate it's configurable and name the config key (e.g.,
"controlled by <configName>"), or add an optional property (e.g., "gracePeriod"
with type integer and seconds) to the terminateScope object variant; ensure both
the inline object (properties.scope) and the components.schemas.object.scope
description are updated and examples adjusted if you add a new property.
🧹 Nitpick comments (11)
src/schemas/src_schemas/step_v3.schema.json (1)
294-309: Add an example for the newterminateScopeaction type.The schema properly integrates the new
terminateScopeaction into the step definition (lines 294-309). However, the examples array lacks a demonstration of how to use this new action type, which is inconsistent with the pattern for other action types likefind,click, andhttpRequest.Consider adding an example in the examples array to demonstrate
terminateScopeusage:🔎 Suggested example for terminateScope
{ "dragAndDrop": { "source": { "selector": "#sourceElement" }, "target": { "selector": "#targetElement" } } } + ], + "terminateScope": "session_name" +}Or, if your
terminateScope_v3.schema.jsonhas multiple examples, you can use$reflike the other complex actions:{ "dragAndDrop": { "source": { "selector": "#sourceElement" }, "target": { "selector": "#targetElement" } } + }, + { + "terminateScope": { + "$ref": "terminateScope_v3.schema.json#/examples/0" + } } ]src/schemas/output_schemas/runCode_v3.schema.json (1)
117-120: Consider addingadditionalProperties: falsefor stricter validation.The
runShell_v3.schema.jsonschema includes"additionalProperties": falseon the detailed object (line 19 and 136), butrunCode_v3.schema.jsonlacks this constraint. For consistency and to prevent typos from silently passing validation, consider adding this restriction.🔎 Proposed fix
} }, + "additionalProperties": false, "title": "Run code (detailed)" } ],src/schemas/output_schemas/config_v3.schema.json (2)
4605-4626: Consider requiring at least one condition inwaitUntil.stdio.The
waitUntil.stdioobject allows bothstdoutandstderrto be omitted, makingwaitUntil: { stdio: {} }valid but meaningless. Consider adding aminProperties: 1constraint tostdioor documenting that at least one pattern should be specified.This would need to be addressed in the source schema (likely
runShell_v3.schema.json).🔎 Suggested schema refinement
"stdio": { "type": "object", "description": "Standard I/O stream conditions to wait for.", "additionalProperties": false, + "minProperties": 1, "properties": { "stdout": {
6936-6942: Consider adding a configurablegracePeriodproperty.The description mentions "SIGTERM, followed by SIGKILL after a grace period" but there's no way to configure this duration. For processes that need more time to shut down gracefully (e.g., database connections, file flushes), a configurable grace period would be useful.
🔎 Example enhancement for detailed form
"properties": { "scope": { "type": "string", "description": "Name of the scope to terminate. The associated process will receive SIGTERM, followed by SIGKILL after a grace period if still running.", "pattern": "^[a-zA-Z0-9_-]{1,64}$" + }, + "gracePeriod": { + "type": "integer", + "description": "Time in milliseconds to wait after SIGTERM before sending SIGKILL. Defaults to 5000ms.", + "default": 5000, + "minimum": 0 } },src/schemas/output_schemas/step_v3.schema.json (3)
1213-1218: Scope support for type/typeKeys is consistent; just watch browser vs terminal semanticsThe new
scopefields on the detailedtypeKeysobjects (forfind.typeand thetypestep) are wired consistently and reuse the same validation pattern and description as the shell/code scopes. That looks solid and keeps the schema shapes aligned.One subtle point: the schema allows combining
scopewith element‑targeting fields (selector,elementText, etc.), even though those are browser concepts whilescoperoutes input to a terminal/code session. If the runtime treatsscopeas taking precedence and ignores DOM targeting in that case, it might be worth tightening behavior or at least documenting that precedence to avoid confusion, but this isn’t a blocker from a schema perspective.Also applies to: 1324-1330, 1876-1881, 1988-1993, 4582-4587, 4694-4699, 4731-4735
3811-3841: runShell/runCodescopeandwaitUntilwiring looks good; consider validating non‑empty conditionsThe additions of
scopeandwaitUntil.stdio.{stdout,stderr}to both runShell and runCode are internally consistent (main andcomponents.schemas.objectbranches match, examples exercise the new behavior, and the scope pattern is uniform).Right now
waitUntilcan be an empty object, orwaitUntil: { stdio: {} }, which effectively does nothing but still “looks” configured. If you want to catch misconfigurations early, you could add a small constraint (e.g., ananyOfrequiring at least one ofstdout/stderrwhenstdiois present, or at least one known key underwaitUntil). That would tighten feedback for users without changing the core design.Also applies to: 3927-3958, 4013-4039, 4199-4229, 4317-4347, 4386-4406
6068-6200: New terminateScope step is well‑shaped; ensure it stays in sync with terminateScope_v3The
terminateScopestep block follows the existing pattern (Common + action object), supports both simple string and detailed object forms, and uses the same scope name pattern and description as the other scoped actions. Including$schemahere also matches the self‑describing schema convention for linting. Based on learnings, this is aligned with how other v3 action schemas are structured.To avoid future drift, it would be helpful to double‑check that
src/schemas/output_schemas/terminateScope_v3.schema.json(and any generator templates) define the exact sameanyOf/pattern/description, or to have them generated from a single source of truth.src/schemas/output_schemas/spec_v3.schema.json (2)
5020-5041: Consider requiring at least one condition whenwaitUntilis specified.The
waitUntilstructure allows empty objects (e.g.,waitUntil: {}orwaitUntil: { stdio: {} }), which would be valid but semantically meaningless. If the intent is that specifyingwaitUntilshould always include at least one condition, consider adding validation.For example, you could require at least one of
stdoutorstderrwhenstdiois present, or requirestdiowhenwaitUntilis present.
7361-7385: Consider removing redundantcomponents.schemasduplication.The
components.schemassection (lines 7361-7385) duplicates the schema definitions already present in theanyOfarray above. This duplication could lead to maintenance issues if the schemas diverge.If this is auto-generated for OpenAPI compatibility or tooling purposes, you may safely ignore this observation. Otherwise, consider whether this duplication serves a necessary purpose.
src/schemas/output_schemas/report_v3.schema.json (2)
5038-5059: Consider requiring at least one stdio condition inwaitUntil.The
waitUntil.stdioobject allows bothstdoutandstderrto be optional, meaningwaitUntil: { stdio: {} }is schema-valid but functionally meaningless. Consider adding aminProperties: 1constraint to thestdioobject or using aoneOf/anyOfto require at least one pattern.This is a minor edge case and may be acceptable if validation is handled at runtime.
Suggested schema constraint
"stdio": { "type": "object", "description": "Standard I/O stream conditions to wait for.", "additionalProperties": false, + "minProperties": 1, "properties": {
7379-7402:components.schemassection duplicates theanyOfdefinitions.The
terminateScopeschema contains acomponents.schemassection (lines 7379-7402) that duplicates the type definitions already present in theanyOfarray. This OpenAPI-style embedding is unusual for pure JSON Schema.If this duplication is intentional for documentation tooling or external consumers, it's fine. Otherwise, consider removing it to reduce maintenance burden and file size.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (11)
dist/schemas/config_v3.schema.jsonis excluded by!**/dist/**dist/schemas/find_v3.schema.jsonis excluded by!**/dist/**dist/schemas/report_v3.schema.jsonis excluded by!**/dist/**dist/schemas/resolvedTests_v3.schema.jsonis excluded by!**/dist/**dist/schemas/runCode_v3.schema.jsonis excluded by!**/dist/**dist/schemas/runShell_v3.schema.jsonis excluded by!**/dist/**dist/schemas/spec_v3.schema.jsonis excluded by!**/dist/**dist/schemas/step_v3.schema.jsonis excluded by!**/dist/**dist/schemas/terminateScope_v3.schema.jsonis excluded by!**/dist/**dist/schemas/test_v3.schema.jsonis excluded by!**/dist/**dist/schemas/type_v3.schema.jsonis excluded by!**/dist/**
📒 Files selected for processing (21)
.claude/settings.json.claude/settings.local.jsonsrc/schemas/dereferenceSchemas.jssrc/schemas/output_schemas/config_v3.schema.jsonsrc/schemas/output_schemas/endRecord_v3.schema.jsonsrc/schemas/output_schemas/find_v3.schema.jsonsrc/schemas/output_schemas/report_v3.schema.jsonsrc/schemas/output_schemas/resolvedTests_v3.schema.jsonsrc/schemas/output_schemas/runCode_v3.schema.jsonsrc/schemas/output_schemas/runShell_v3.schema.jsonsrc/schemas/output_schemas/spec_v3.schema.jsonsrc/schemas/output_schemas/step_v3.schema.jsonsrc/schemas/output_schemas/terminateScope_v3.schema.jsonsrc/schemas/output_schemas/test_v3.schema.jsonsrc/schemas/output_schemas/type_v3.schema.jsonsrc/schemas/schemas.jsonsrc/schemas/src_schemas/runCode_v3.schema.jsonsrc/schemas/src_schemas/runShell_v3.schema.jsonsrc/schemas/src_schemas/step_v3.schema.jsonsrc/schemas/src_schemas/terminateScope_v3.schema.jsonsrc/schemas/src_schemas/type_v3.schema.json
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{js,ts}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{js,ts}: Always clone objects using JSON.parse(JSON.stringify(object)) before validation to avoid mutations
validate() returns { valid, errors, object } and never throws; handle errors via return object
transformToSchemaKey() throws on incompatible schemas or invalid results; catch exceptions when calling this function
readFile() returns null on errors and logs warnings to console; do not assume errors throw exceptions
resolvePaths() throws on invalid object types or missing nested object types; validate inputs before calling
Do not assume validation mutates objects; always handle the returned validated object
Files:
src/schemas/dereferenceSchemas.js
src/**/*.js
📄 CodeRabbit inference engine (AGENTS.md)
Use escapeRegExp() helper when converting user strings to regex patterns in transformToSchemaKey()
Files:
src/schemas/dereferenceSchemas.js
src/schemas/src_schemas/*.json
📄 CodeRabbit inference engine (AGENTS.md)
src/schemas/src_schemas/*.json: Always include examples array in all schemas (required for test generation)
In source schemas, use relative $ref paths like "$ref": "context_v3.schema.json#/properties/example"
Files:
src/schemas/src_schemas/type_v3.schema.jsonsrc/schemas/src_schemas/step_v3.schema.jsonsrc/schemas/src_schemas/runShell_v3.schema.jsonsrc/schemas/src_schemas/terminateScope_v3.schema.jsonsrc/schemas/src_schemas/runCode_v3.schema.json
🧠 Learnings (12)
📚 Learning: 2025-08-22T20:01:21.087Z
Learnt from: hawkeyexl
Repo: doc-detective/common PR: 134
File: src/schemas/output_schemas/report_v3.schema.json:5695-5921
Timestamp: 2025-08-22T20:01:21.087Z
Learning: The report_v3.schema.json includes dragAndDrop via inclusion in the spec schema, which includes the test and step schemas, creating a chain of schema inclusions.
Applied to files:
src/schemas/output_schemas/report_v3.schema.jsonsrc/schemas/dereferenceSchemas.jssrc/schemas/src_schemas/step_v3.schema.jsonsrc/schemas/output_schemas/spec_v3.schema.jsonsrc/schemas/output_schemas/test_v3.schema.json
📚 Learning: 2025-05-29T16:54:47.192Z
Learnt from: hawkeyexl
Repo: doc-detective/common PR: 117
File: src/schemas/output_schemas/resolvedTests_v3.schema.json:24-30
Timestamp: 2025-05-29T16:54:47.192Z
Learning: In doc-detective/common schemas, `$schema` properties within object definitions are intentionally added to allow described JSON objects to be self-describing for linting purposes. This enables JSON linters and validators to automatically validate objects against the referenced schema. The version information is embedded in the filename using the pattern `<schema>_v3.schema.json`.
Applied to files:
src/schemas/output_schemas/report_v3.schema.jsonsrc/schemas/dereferenceSchemas.jssrc/schemas/src_schemas/type_v3.schema.jsonsrc/schemas/src_schemas/step_v3.schema.jsonsrc/schemas/output_schemas/type_v3.schema.jsonsrc/schemas/src_schemas/runShell_v3.schema.jsonsrc/schemas/src_schemas/terminateScope_v3.schema.jsonsrc/schemas/output_schemas/config_v3.schema.jsonsrc/schemas/output_schemas/endRecord_v3.schema.jsonsrc/schemas/output_schemas/terminateScope_v3.schema.jsonsrc/schemas/output_schemas/spec_v3.schema.jsonsrc/schemas/output_schemas/test_v3.schema.jsonsrc/schemas/output_schemas/runShell_v3.schema.jsonsrc/schemas/output_schemas/runCode_v3.schema.jsonsrc/schemas/output_schemas/step_v3.schema.jsonsrc/schemas/src_schemas/runCode_v3.schema.jsonsrc/schemas/output_schemas/find_v3.schema.json
📚 Learning: 2025-08-22T20:01:21.087Z
Learnt from: hawkeyexl
Repo: doc-detective/common PR: 134
File: src/schemas/output_schemas/report_v3.schema.json:5695-5921
Timestamp: 2025-08-22T20:01:21.087Z
Learning: In the doc-detective/common project, dragAndDrop schema doesn't need to be explicitly added to report_v3.schema.json because all schemas in schema.json are dynamically loaded and dragAndDrop is included through that mechanism.
Applied to files:
src/schemas/output_schemas/report_v3.schema.json
📚 Learning: 2025-11-25T23:59:43.235Z
Learnt from: CR
Repo: doc-detective/common PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T23:59:43.235Z
Learning: Applies to src/validate.js : All step_v3 schemas must accept 12 different v2 action schemas (checkLink_v2, find_v2, etc.) via compatibleSchemas map
Applied to files:
src/schemas/output_schemas/report_v3.schema.jsonsrc/schemas/src_schemas/step_v3.schema.jsonsrc/schemas/output_schemas/config_v3.schema.jsonsrc/schemas/output_schemas/spec_v3.schema.jsonsrc/schemas/output_schemas/test_v3.schema.jsonsrc/schemas/output_schemas/step_v3.schema.json
📚 Learning: 2025-11-25T23:59:43.235Z
Learnt from: CR
Repo: doc-detective/common PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T23:59:43.235Z
Learning: When adding new schemas, update the files array in dereferenceSchemas.js and add to published list if creating v3 schema
Applied to files:
src/schemas/dereferenceSchemas.js
📚 Learning: 2025-11-25T23:59:43.235Z
Learnt from: CR
Repo: doc-detective/common PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T23:59:43.235Z
Learning: Do not add schemas without updating the files array in dereferenceSchemas.js
Applied to files:
src/schemas/dereferenceSchemas.js
📚 Learning: 2025-11-25T23:59:43.235Z
Learnt from: CR
Repo: doc-detective/common PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T23:59:43.235Z
Learning: Applies to src/schemas/src_schemas/*.json : In source schemas, use relative $ref paths like "$ref": "context_v3.schema.json#/properties/example"
Applied to files:
src/schemas/dereferenceSchemas.jssrc/schemas/src_schemas/step_v3.schema.jsonsrc/schemas/output_schemas/test_v3.schema.json
📚 Learning: 2025-11-25T23:59:43.235Z
Learnt from: CR
Repo: doc-detective/common PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T23:59:43.235Z
Learning: Applies to src/validate.js : When creating new schema version (e.g., v4), update compatibleSchemas map and add transformation logic in transformToSchemaKey()
Applied to files:
src/schemas/dereferenceSchemas.jssrc/schemas/src_schemas/step_v3.schema.json
📚 Learning: 2025-11-25T23:59:43.235Z
Learnt from: CR
Repo: doc-detective/common PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T23:59:43.235Z
Learning: Do not edit generated files directly: build/, output_schemas/, or schemas.json (regenerated on npm run build)
Applied to files:
src/schemas/dereferenceSchemas.js
📚 Learning: 2025-11-25T23:59:43.235Z
Learnt from: CR
Repo: doc-detective/common PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T23:59:43.235Z
Learning: Applies to src/validate.js : Handle schema property transformations: typeKeys.delay → type.inputDelay, maxVariation (0-100) → (0-1), and app → browsers structure changes
Applied to files:
src/schemas/src_schemas/type_v3.schema.jsonsrc/schemas/output_schemas/type_v3.schema.jsonsrc/schemas/output_schemas/find_v3.schema.json
📚 Learning: 2025-11-25T23:59:43.235Z
Learnt from: CR
Repo: doc-detective/common PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T23:59:43.235Z
Learning: Applies to src/schemas/src_schemas/*.json : Always include examples array in all schemas (required for test generation)
Applied to files:
src/schemas/output_schemas/test_v3.schema.json
📚 Learning: 2025-11-25T23:59:43.235Z
Learnt from: CR
Repo: doc-detective/common PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T23:59:43.235Z
Learning: Applies to test/*.test.js : Test structure uses Mocha + Chai; validate schema examples in test/schema.test.js (auto-generated from schemas)
Applied to files:
src/schemas/output_schemas/test_v3.schema.json
🔇 Additional comments (47)
src/schemas/output_schemas/endRecord_v3.schema.json (1)
1-14: Formatting-only change; no semantic impact.This file remains semantically identical to the original—the schema structure and properties are unchanged. The modifications appear to be whitespace/formatting adjustments (e.g., newline handling). Since the broader PR focuses on scope-based enhancements (which this file doesn't participate in), ensure this reformatting was intentional, perhaps as part of an automated formatting pass, and verify it's consistent with other schema files in the PR.
Based on learnings, the
$schemaproperty on Line 2 aligns with project practices of enabling self-describing JSON objects for linter validation.src/schemas/src_schemas/step_v3.schema.json (2)
380-648: Examples array is comprehensive and properly structured.The examples array (lines 380-648) is present and includes diverse examples for most action types. References to external schema examples follow the guideline pattern (e.g.,
"$ref": "find_v3.schema.json#/examples/0") and the array meets the requirement for test generation.
1-87: Schema structure and $ref paths are correct.The schema is well-formed with consistent composition patterns. All $ref paths are relative and properly formatted (e.g., line 100:
"$ref": "checkLink_v3.schema.json#"), adhering to the guideline for source schemas..claude/settings.json (1)
1-5: This configuration file is required for the PR's stated objectives.The
.claude/settings.jsonfile directly enables Claude agent functionality (superpowers plugin) that is essential to this PR's goal of setting up Claude AI configuration for development automation. It works in conjunction with.claude/settings.local.jsonto grant necessary permissions for npm operations, git commands, and development tasks. This is not extraneous tooling configuration—it's core infrastructure for the agent setup described in AGENTS.md.Likely an incorrect or invalid review comment.
src/schemas/dereferenceSchemas.js (1)
51-51: LGTM!The
terminateScope_v3.schema.jsonis correctly added to the files array and will be automatically included in the publishing pipeline via the filter at line 149. Based on learnings, this is the proper way to add a new v3 schema.src/schemas/src_schemas/runShell_v3.schema.json (3)
99-103: LGTM!The
scopeproperty is well-defined with a clear pattern that enforces alphanumeric characters, hyphens, and underscores with a length of 1-64 characters. The description accurately reflects the validation constraints.
104-125: LGTM!The
waitUntilproperty is well-structured with clear nested objects for stdio conditions. The use ofadditionalProperties: falseensures strict validation. The regex pattern documentation is helpful.Note: Ensure that the
timeoutproperty (lines 94-98) interacts correctly withwaitUntilin the runtime implementation—i.e., that the timeout applies to the entire step including the wait conditions.
181-200: LGTM!The new examples effectively demonstrate the
scopeandwaitUntilfeatures with realistic use cases:
- Dev server waiting for startup message
- Log monitoring with regex pattern matching
These examples provide clear guidance for users implementing scoped sessions and conditional waiting.
src/schemas/src_schemas/runCode_v3.schema.json (3)
97-101: LGTM!The
scopeproperty maintains consistency withrunShell_v3.schema.jsonusing the same validation pattern. The description is appropriately adapted for code execution contexts.
102-123: LGTM!The
waitUntilproperty maintains perfect structural consistency withrunShell_v3.schema.json, ensuring a uniform user experience across different execution types.
163-182: LGTM!The examples effectively demonstrate
scopeandwaitUntilfor code execution scenarios:
- Background Python process with stdout monitoring
- JavaScript HTTP server with regex-based startup detection
These examples complement the runShell examples and showcase language-specific use cases.
src/schemas/src_schemas/terminateScope_v3.schema.json (4)
1-12: LGTM!The root schema follows the established pattern used in other action schemas (runShell, runCode) with an
anyOfstructure allowing both simple string and detailed object forms.
15-20: LGTM!The simple string form maintains pattern consistency with the
scopeproperties inrunShellandrunCodeschemas, ensuring only valid scope names can be referenced.
21-36: LGTM!The detailed object form provides clear operational semantics (SIGTERM followed by SIGKILL) in the description. The use of
additionalProperties: falseensures strict validation and prevents configuration errors.
38-46: LGTM!The examples align with the scope names used in
runShellandrunCodeexamples (dev-server, background-process, log-monitor), creating a cohesive narrative that helps users understand the complete lifecycle of scoped sessions.src/schemas/output_schemas/terminateScope_v3.schema.json (1)
1-62: LGTM!The generated output schema correctly dereferences the source schema while maintaining:
- Pattern consistency across all scope definitions
- Self-describing structure via the components.schemas section
- Complete examples array
- Proper removal of $id properties
As per coding guidelines, this file is generated and should not be manually edited. The dereferencing process has been executed correctly.
src/schemas/output_schemas/type_v3.schema.json (2)
103-108: LGTM! Scope property correctly added with consistent pattern validation.The
scopeproperty is properly defined with the required pattern^[a-zA-Z0-9_-]{1,64}$in both the main schema andcomponents.schemas.object. The description clearly explains the purpose and constraints.Also applies to: 215-220
252-256: LGTM! Good example demonstrating scoped terminal input.The example clearly shows how to send input to a named terminal scope with the newline character for command execution.
src/schemas/src_schemas/type_v3.schema.json (3)
97-101: LGTM! Scope property correctly defined with consistent pattern.The
scopeproperty matches the output schema definition with the same pattern and description.
5-12: LGTM! Proper use of internal$reffor schema composition.The schema correctly uses internal JSON pointer references (
#/components/schemas/...) to avoid duplication of thekeysandobjectdefinitions.
108-126: LGTM! Comprehensive examples array including scoped usage.Examples cover all schema variants (simple string, array, detailed object) and include the new scope functionality. As per coding guidelines, examples array is present as required for test generation.
src/schemas/output_schemas/runShell_v3.schema.json (3)
89-116: LGTM! Well-structured scope and waitUntil properties.The
scopeproperty enables persistent terminal sessions with consistent pattern validation. ThewaitUntilobject provides a clean interface for condition-based waiting on stdout/stderr patterns, with properadditionalProperties: falseconstraints.
95-116: Verify: Doestimeoutapply when usingwaitUntil?The existing
timeoutproperty (default 60000ms) should govern the maximum wait time when usingwaitUntil. Ensure the implementation respects this timeout during pattern matching to prevent indefinite hangs if the expected pattern never appears.
288-314: LGTM! Excellent examples demonstrating scope and waitUntil usage.The examples cover practical scenarios:
- Dev server startup with string pattern matching
- Log monitoring with regex pattern matching
Both demonstrate the intended use case of persistent terminal sessions with condition-based completion.
src/schemas/output_schemas/runCode_v3.schema.json (2)
90-117: LGTM! Scope and waitUntil properties consistent with runShell schema.The structure mirrors
runShell_v3.schema.jsonappropriately, with the description adjusted for "code execution session" context. Pattern validation is consistent across all scope-enabled schemas.
274-294: LGTM! Well-crafted examples for scoped code execution.The examples effectively demonstrate:
- Python long-running process with infinite loop and waitUntil
- JavaScript HTTP server startup with regex pattern matching
Both show practical use cases for the new scope-based session management.
src/schemas/output_schemas/config_v3.schema.json (4)
1998-2003: LGTM! Scope property for type action is well-defined.The
scopeproperty consistently uses the pattern^[a-zA-Z0-9_-]{1,64}$across all type action variants, enabling input to be directed to named terminal/code sessions. The pattern validation is appropriately restrictive.
4798-4824: Examples demonstrate scope lifecycle well.The examples effectively illustrate:
- Starting a dev server with
waitUntilfor the "Server listening on" message- Monitoring logs with regex pattern matching (
/ERROR.*critical/)- Scoped process naming that can later be referenced by
terminateScopeGood documentation for users learning the new scope-based session management.
6853-6985: NewterminateScopeaction properly integrated into step schema.The action correctly:
- Includes common step properties (stepId, description, unsafe, outputs, variables, breakpoint)
- Supports both simple string and detailed object forms via
anyOf- Maintains consistent scope pattern validation
- Includes the embedded
$schemafor self-describing objects (aligned with project conventions per learnings)
5171-5191: runCode examples provide good coverage of scope usage patterns.The examples demonstrate:
- Python infinite loop with scope for background processing
- JavaScript HTTP server with scope and regex-based waitUntil
These complement the runShell examples and show language-agnostic scope support.
src/schemas/output_schemas/find_v3.schema.json (3)
491-496: LGTM! Scope property correctly added with consistent pattern validation.The
scopeproperty is well-defined with appropriate type, description, and regex pattern. The pattern^[a-zA-Z0-9_-]{1,64}$properly enforces the naming constraints described in the PR objectives.
603-608: Consistent scope property replication across schema structures.The
scopeproperty is correctly replicated in all "Type keys (detailed)" object definitions throughout the file, maintaining consistency across the duplicated schema structures. Based on learnings, this duplication is intentional to allow JSON objects to be self-describing for linting purposes.Also applies to: 1154-1159, 1266-1271
640-644: Good example demonstrating scoped terminal input.The added example clearly shows the intended use case: typing a shell command (
ls -la\n) into a named terminal session (dev-server). The scope name adheres to the pattern validation, and the newline character demonstrates command execution.Also applies to: 1303-1307
src/schemas/output_schemas/spec_v3.schema.json (5)
2414-2418: Consistent scope property implementation across type action definitions.The scope property is correctly defined with consistent description, type, and pattern validation across all type action variants in the schema. The pattern
^[a-zA-Z0-9_-]{1,64}$appropriately constrains scope names.
5214-5239: Good examples demonstrating scope and waitUntil usage.The examples effectively illustrate both plain string matching (
"Server listening on") and regex pattern matching ("/ERROR.*critical/"), providing clear guidance for users.
5587-5606: Well-designed examples for runCode with persistent sessions.The examples demonstrate practical use cases for long-running background processes in both Python and JavaScript, with appropriate
waitUntilconditions to ensure processes are ready before proceeding.
7268-7400: Well-structured terminateScope action.The
terminateScopeaction follows the established pattern of combining common step properties viaallOf, and theanyOfstructure for simple vs. detailed forms provides good ergonomics. The consistent scope pattern validation and clear description of SIGTERM/SIGKILL behavior are helpful.
15174-15306: Consistent terminateScope definition in nested context.This duplicated terminateScope definition maintains consistency with the earlier definition at lines 7268-7400, using identical pattern validation, structure, and examples.
src/schemas/output_schemas/test_v3.schema.json (6)
1813-1816: LGTM: Scope property for type actions.The
scopeproperty addition to type actions is well-structured with consistent pattern validation (^[a-zA-Z0-9_-]{1,64}$) and clear descriptions across all occurrences. This enables typing into persistent terminal or code sessions instead of the browser.Also applies to: 1925-1928, 2476-2479, 2588-2591, 5182-5185, 5294-5297, 9719-9722, 9831-9834, 10382-10385, 10494-10497, 13088-13091, 13200-13203
1962-1964: LGTM: Scope usage examples for type actions.The examples demonstrate typing into a scoped session effectively. Note that these examples assume the "dev-server" scope already exists (created via a prior
runShellorrunCodestep with the same scope name).Also applies to: 2625-2627, 5331-5333, 9868-9870, 10531-10533, 13237-13239
4613-4638: LGTM: Excellent runShell examples.The examples demonstrate practical use cases effectively:
- Starting a dev server in persistent scope and waiting for startup confirmation
- Monitoring logs in background scope and waiting for error patterns
These illustrate both plain string and regex pattern matching capabilities.
Also applies to: 12519-12544
4802-4828: LGTM: Consistent scope and waitUntil for runCode.The
scopeandwaitUntilproperties for runCode mirror the runShell implementation, adapted appropriately for code execution contexts. The consistency across action types improves usability.Also applies to: 4920-4946, 12708-12734, 12826-12852
4986-5005: LGTM: Practical runCode examples with multi-language support.The examples demonstrate scope and waitUntil across different languages (Python and JavaScript), showing background processes and HTTP servers. This effectively illustrates the cross-language applicability of the scope management feature.
Also applies to: 12892-12911
4414-4440: ThescopeandwaitUntiladditions to the runShell schema are well-structured and correctly documented. The regex pattern syntax format (/pattern/flags) is clearly documented in the schema descriptions for both stdout and stderr properties.Note: Runtime implementation of the pattern matching logic resides in the executor repository (doc-detective/runner), not in this schema validation library. This repository handles schema definition and validation only. The schema itself is correct and complete.
src/schemas/output_schemas/report_v3.schema.json (3)
2432-2436: Scope property additions to type action are consistent.The
scopeproperty is correctly added across multiple type action definitions (hunks 1-6, 13-15, 17-22, 29-31) with consistent pattern validation^[a-zA-Z0-9_-]{1,64}$. The description clearly explains the behavior of sending input to scoped processes.
5420-5447: runCode scope and waitUntil additions are consistent with runShell.The schema additions for
scopeandwaitUntilin the runCode action mirror the runShell implementation, maintaining consistency. The same pattern validation and structure are used.
5231-5257: Examples effectively demonstrate scope and waitUntil usage.The added examples cover realistic scenarios:
- Starting a dev server and waiting for "Server listening on"
- Tailing logs with regex pattern matching
/ERROR.*critical/- Background processes with scope naming
These provide good documentation for users of the schema.
|
📝 Documentation updates detected! New suggestion: Document scope-based session management features |
Summary
scopeproperty to runShell, runCode, and type actions for persistent terminal/code sessionswaitUntilproperty to runShell and runCode for condition-based waiting on stdout/stderr patternsterminateScopeaction for process lifecycle management with SIGTERM/SIGKILL handling^[a-zA-Z0-9_-]{1,64}$Test Plan
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.