Skip to content

fix(herdr): send an empty env and args instead of null - #26

Merged
cornedor merged 1 commit into
mainfrom
herdr-null-params
Nov 17, 2026
Merged

cornedor merged 1 commit into
mainfrom
herdr-null-params

Conversation

@cornedor

Copy link
Copy Markdown
Owner

herdr refuses a request whose env or args is null ("invalid type: null, expected a map" / "expected a sequence"). Go marshals a nil map or slice as null, so starting an agent without extra arguments, or opening a tab without env, failed.

  • NewTab sends {} for a nil env, StartAgent sends [] for nil args.
  • The three agent tests in internal/web checked "no arguments" as args == nil; they now check for an empty list.

Tests: TestStartAgentWithoutArgs and TestNewTabWithoutEnv fail on main and pass here (their fake herdr refuses null as the real one does). go vet, gofmt and go test ./internal/herdr ./internal/web pass.

@cornedor
cornedor merged commit 205d352 into main Nov 17, 2026
6 of 7 checks passed
@cornedor
cornedor deleted the herdr-null-params branch November 17, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant