V8 Engine Rewite and V8 Modules Enhancements - #35
Merged
Merged
Conversation
Add packages/v8 v8-engine with ToolLoopGuard, soft mutation nudge, truncation≠reasoning rails, shaped discovery, mutation critic, and INDEX stub parity. Flip host default to v8 with legacy selectable; wire curated-40 goldens, nightly eval, and policy-admin/VS Code v8LoopPolicy knobs. Co-authored-by: Cursor <cursoragent@cursor.com>
…ToPlanningEvidence actions - Implemented collectPlanningImpactReports to gather planning impact reports based on repository graphs and seed paths. - Introduced mapUnderstandingToPlanningEvidence to map understanding results into a format suitable for planning evidence. - Updated planning index to export new actions. feat(prompt-construction): add context mapping and instruction merging actions - Created mapContextToPromptSlice to transform repository context into a prompt-facing format. - Developed mergePromptInstructions to combine host instructions with selected skills and memory. - Updated prompt-construction index to export new actions. feat(skills): enhance skill evidence mapping and formatting - Added deriveSkillRepoEvidence to derive language and project kind tags from projects and paths. - Implemented formatSkillPromptContent to format skill prompt content with available resources. - Introduced mapUnderstandingToSkillEvidence to map understanding results into skills evidence. - Updated skills index to export new actions. fix(window-budget): improve window policy derivation and effort scaling - Enhanced deriveWindowPolicy to scale model and tool call budgets based on context window size. - Added scaleEffortCallBudget function to adjust effort call budgets for different window sizes. - Updated tests to reflect new budget calculations. chore(policy-admin): expand V8 engine knobs with additional recovery settings - Added new configuration options for maxReasoningAbortRecoveries, maxRejectedMutationRecoveries, and maxMustReadNudges to improve control over reasoning and mutation behaviors.
…execution - Added `extractMutationPaths` to handle path extraction for mutation tools. - Introduced `preflightToolCall` to validate tool invocation parameters and permissions. - Created `normalizeAndValidateArgs` for argument normalization and validation against schemas. - Implemented `resolveRegistration` to check tool registration status. - Added `validateGrantStage` to validate tool grants and shadow authorizations. - Introduced `runShadowAuthorize` to manage shadow authorization checks. - Created types for preflight outcomes and validation results. - Added tests for new functionality, ensuring proper behavior of preflight checks and tool execution. - Updated decision policy constants to align with tool runtime definitions.
…provements - Introduced chain collection and scoring mechanisms in ChangeImpactPipeline. - Added support for direct neighbor counting and improved evidence reporting. - Implemented seed expansion logic to prioritize exported symbols. - Enhanced impact scoring with importance factors and evidence weighting. - Updated CHANGE_IMPACT_POLICY to include maximum paths and related configurations. - Added tests for new features including chain handling, soft resolution, and scoring boosts. - Refactored existing tests to ensure coverage for new functionalities.
- Introduced `markTaskListUpdated` function to track changes in task lists. - Added `shouldRemindTodoUpdate` to determine when to prompt for updates. - Updated task list policies to enforce single active items and validate status transitions. - Implemented clipping for task titles to maintain brevity while preserving context. - Enhanced error handling for invalid status transitions and multiple active items. - Expanded test coverage for task list updates and derived task items from plans. - Added new reason codes for empty working sets and status transition warnings. - Improved serialization of task lists to exclude completed tasks from active loops.
…nd related enhancements
- Introduced `find_type_definition` operation in the code navigation pipeline. - Implemented `executeFindTypeDefinition` function to handle type definition requests. - Added `findTypeDefinitionTool` for tool registry and execution. - Updated `CodeNavigationPort` interface to include `typeDefinition` method. - Enhanced `GraphCodeNavigationAdapter` and `FallbackCodeNavigationAdapter` to support type definition resolution. - Modified `CodeNavigationPipeline` to handle type definition requests and prepare documents. - Added request limiter for concurrent language service calls with timeout handling. - Updated tests to cover new type definition functionality and request limiting behavior.
- Implemented `discoverStdioLspServers` to probe PATH for known stdio language servers. - Added tests for server discovery functionality. - Created `resolveLspSpawnInvocation` to handle command resolution for LSP servers across platforms. - Added tests for command resolution, including handling of Windows .cmd shims. - Enhanced code navigation actions to support abort signals for long-running operations. - Updated `CodeNavigationPort` and related adapters to accept optional call options, including abort signals. - Added abort handling in `CodeNavigationPipeline` to manage operation cancellations. - Introduced tests for abort scenarios in both `CodeNavigationPipeline` and request limiter.
- Introduced assertNoTempScriptWriteHelper to block temporary script write helpers in executeRunCommand. - Updated applyPatchTool description to include rejection for destructive empty-oldText operations. - Added patch_too_destructive reason code to constants for better error handling. - Implemented safety checks in applyStructuredPatch to prevent catastrophic file size reductions. - Enhanced editFormatRepairHints to provide guidance on handling patch_too_destructive errors. - Normalized arguments in discovery.ts for read_git_log and read_git_show to improve command handling. - Added tests to validate rejection of destructive empty-oldText wipes in MutationTransaction.spec.ts. - Updated decision-policy actions to recognize pasted test failure dumps for better agent handling. - Improved tool-loop-guard to treat same-path read windows as identical for path-scoped operations.
- Introduced `packDiagnosticsForModel` to prioritize and cap diagnostics per file. - Updated `normalizeDiagnostics` to utilize the new packing function. - Enhanced `selectProportionalChecks` to omit unrelated package tests based on changed files. - Added support for localized Python discovery to use fatal-only ruff rules. - Improved test coverage for new functionality in `SelectProportionalChecks` and diagnostics normalization. - Updated README and documentation to reflect changes in verification behavior and diagnostics handling.
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
V8 Engine Rewite and V8 Modules Enhancements