Repository navigation
refactor: dedup diff walking, typed tool inputs, TUI case extraction, lock drift check - #319
Merged
Merged
Conversation
… lock drift check - engine/diff: delete byte-identical splitLinesStaging/computeLCSStaging in favor of the shared splitLines/computeLCS; fold local editEntry into the shared edit type. Add tested ParseUnifiedAddedLines/ParseHunkNewStart and route cmd/pr.go analyzeDiff through it (added-line numbers now follow hunk headers exactly; old loop was off by one after context lines). - tool: add generic DecodeInput[T] for consistent input errors; migrate SleepTool and AskUserQuestionTool to typed Execute + Schema-backed Parameters with parity tests. - cmd: extract 11 terminal Update cases (no shared-tail dependency) into cmd/chat_update_system.go as methods; dispatch stays one line per case. KeyMsg/WindowSize/spinner.Tick fall through to the shared tail and stay. - plugin: add SkillsLock.Verify/VerifyInstalledSkills (missing file, hash mismatch, unpinned entry); surface capped warnings in rho doctor. No signature scheme: manifests have no signature fields and installs already gate on folder trust + manifest presence + threat scan.
Patel230
added a commit
that referenced
this pull request
Oct 2, 2026
… lock drift check (#319) - engine/diff: delete byte-identical splitLinesStaging/computeLCSStaging in favor of the shared splitLines/computeLCS; fold local editEntry into the shared edit type. Add tested ParseUnifiedAddedLines/ParseHunkNewStart and route cmd/pr.go analyzeDiff through it (added-line numbers now follow hunk headers exactly; old loop was off by one after context lines). - tool: add generic DecodeInput[T] for consistent input errors; migrate SleepTool and AskUserQuestionTool to typed Execute + Schema-backed Parameters with parity tests. - cmd: extract 11 terminal Update cases (no shared-tail dependency) into cmd/chat_update_system.go as methods; dispatch stays one line per case. KeyMsg/WindowSize/spinner.Tick fall through to the shared tail and stay. - plugin: add SkillsLock.Verify/VerifyInstalledSkills (missing file, hash mismatch, unpinned entry); surface capped warnings in rho doctor. No signature scheme: manifests have no signature fields and installs already gate on folder trust + manifest presence + threat scan.
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.
Bounded slice of the remaining review items. Each is behavior-preserving except one documented line-number fix.
splitLinesStaging/computeLCSStagingwere byte-identical copies ofsplitLines/computeLCS— deleted, staging uses the shared versions; localeditEntryfolded into sharededit. Added testedParseUnifiedAddedLines/ParseHunkNewStartand routedcmd/pr.go analyzeDiffthrough them. Behavior note: added-line numbers now follow hunk headers exactly; the old inline walker was off by one after context lines (pinned by new tests in both packages).DecodeInput[T]for consistent input errors; migratedSleepToolandAskUserQuestionToolto typedExecute+Schema()-backedParameters()with schema-parity tests. TheToolinterface itself is unchanged (142 tools still hand-write schemas — full migration is follow-up work, now with a proven pattern).cmd/chat_update_system.goas methods; dispatch is one line each.KeyMsg/WindowSizeMsg/spinner.TickMsg/MouseMsgfall through to the shared tail and stay put — extracting them needs a redesign, not a move.SkillsLock.Verify/VerifyInstalledSkillsdetect missing/tampered/unpinned skills;rho doctorsurfaces capped warnings. No signature scheme added: manifests carry no signature fields and installs already gate on folder trust + manifest presence + threat scan; true signing needs a key-management design (noted as follow-up).Verified:
go vet ./...,golangci-linton touched packages (0 issues),go testoncmd,internal/tool,internal/plugin,internal/engine/diff,internal/testaudit, pluscheck-internal-layer-imports(frontend may import engine/diff as a shared utility).