fix: harden planner, conflict path parsing, and post-merge fixer wiring#85
Merged
Conversation
Three robustness fixes, each TDD'd (failing test first): - planner: reject empty story lists and stories with empty id/title before emitting REQ_PLANNED/STORY_CREATED, so a requirement can't be stranded with nothing to dispatch. - git: ConflictedFiles uses `git status --porcelain -z` and parses NUL-delimited records, returning raw paths instead of octal-escaped quotepath form. Fixes conflict handling for filenames with spaces or non-ASCII characters. - cli/resume: wire the post-merge integration-build fixer (NewTechLeadFixer + WithMonTechLeadFixer). The feature and monitor logic existed but the option was never passed, so the stage never ran. Green gate: go build, go vet, go test ./... (all pass), golangci-lint 0 issues.
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.
Summary
Three robustness fixes ported from internal audit findings, each developed test-first (failing test first, then implementation).
internal/engine/planner.goplanner_validation_test.goConflictedFilesusesgit status --porcelain -z+ NUL-delimited parsing (raw paths, not octal-escaped quotepath)internal/git/conflict.goconflict_quotepath_test.goNewTechLeadFixer+WithMonTechLeadFixer) intorunResumeinternal/cli/resume.goresume_wiring_test.goWhy these matter
REQ_PLANNEDwith zero stories, stranding the requirement forever. A blank{}story got an auto-assigned ID and dispatched an agent against nothing.--porcelainoctal-escapes paths with spaces / non-ASCII (e.g.résumé draft.txt), so the escaped string flowed into SniffBinary/StageFiles and the conflict resolver silently failed.runResumenever attached the fixer, so the stage never ran in production. The new source-scan test guards the wire.Test plan
go build -o /tmp/nxd ./cmd/nxdgo vet ./...go test ./... -count=1— all packages passgolangci-lint run ./...— 0 issues