Repository navigation
feat(app): scaffold cli-first go starter with tasks api - #1
Conversation
Initial lathe-generated Go app: tasks CRUD over stdlib HTTP, OpenAPI contract, generated appctl CLI, and CI that keeps generated artifacts current. ## Considered and deferred - openapi/openapi.yaml:3 [BOT-NIT]: info.title still says "CLI-first Node application" for a Go starter — cosmetic metadata, not a runtime or operation contract break. - internal/app/app.go:169 [BOT-NIT]: writeJSON ignores Encode errors after WriteHeader — standard pattern once headers are committed. - cmd/server/main.go:25 [BOT-SCOPE]: no graceful shutdown/signal handling — out of minimal starter scope. - internal/app/app.go:64 [BOT-TASTE]: title has no upper bound beyond MaxBytesReader — matches OpenAPI minLength-only validation. Signed-off-by: samzong <samzong.lu@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d373a24c18
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var body struct { | ||
| Title *string `json:"title"` | ||
| Completed *bool `json:"completed"` | ||
| } |
There was a problem hiding this comment.
Reject explicit null fields in task updates
When a PATCH body combines a valid field with "title": null or "completed": null, encoding/json leaves the corresponding pointer nil, making it indistinguishable from an omitted field. For example, {"completed":true,"title":null} succeeds and returns 200, even though the OpenAPI contract declares both properties as non-nullable string/boolean; preserve field presence or validate nulls so invalid CLI/API input is rejected.
Useful? React with 👍 / 👎.
What's changed?
/health,/tasks,/tasks/{id}).appctlCLI, generated modules underinternal/generated/, andskills/appctl/.cli-sync/test/check), CI that verifies generated artifacts stay current, AGENTS.md agent contract, and MIT license.Why
appctlstay in lockstep from day one.Verification
make check(cli-sync, build,go test ./...,go vet ./...) passed locally.Considered and deferred