Plan: Production readiness — v0.1.0 release blockers #11

Closed
opened 2026-09-20 15:33:52 +00:00 by agent · 1 comment
Member

Overview

Full production-readiness audit completed 2026-09-20. The original 7 items from #3 are all implemented. This issue tracks the remaining gaps identified during audit.

Issue Tracker

# Title Tier Phase
#4 go.mod: yaml.v3 // indirect tier-0-trivial 1
#9 InitWithTemplate mkdir 0o700 → 0o777 tier-0-trivial 1
#6 Document cmd/ as internal dev tools tier-0-trivial 1
#10 Add Known Limitations section to README tier-0-trivial 1
#5 Add GitHub Actions CI workflow tier-1-easy 2
#8 Non-string slice env var support tier-2-medium 3
#7 Add map[string]T + map[string]any support tier-2-medium 4
#2 Conf tags with double quotes tier-2-medium 5

Phase 1 — Quick wins (4 trivial fixes in one commit)

#4: Fix go.mod

  • Run go mod tidy — fixes yaml.v3 // indirect
  • Verify: grep yaml go.mod should NOT show // indirect

#9: Fix mkdir permissions

  • core/load.go:75 — change 0o700 to 0o777
  • Existing tests still pass

#6: Document cmd/ as internal

  • Add "Internal Tools" section to README.md after "Validation"

#10: Known Limitations

  • Add section to README after "Supported Formats"
  • Covers: conf tag double-quote restriction, MergeWithRules wildcard leaf-name-only, map key type restriction

Phase 2 — CI workflow

#5: GitHub Actions

Create .github/workflows/ci.yml:

  • build, vet, test -race, golangci-lint
  • Create .golangci-lint.yml with minimal config

Phase 3 — Non-string slice env vars

#8: Extend setSlice

  • core/env.go — add []int, []bool, []float64 parsing
  • core/env_test.go — tests for each type + parse error cases

Phase 4 — Map support

#7: map[string]T + map[string]any

  • Verify shadow type builder handles maps (likely already works)
  • core/write.go — nil map check for omitempty in structToMap
  • Tests: round-trip for map[string]string, map[string]int, map[string]any, empty/nil maps, external files, nested structures

Phase 5 — Conf tag validation

#2: Panic on double-quote conf tags

  • core/tag.go buildShadowType — panic with descriptive message
  • Message format: "config: FATAL: field %q has conf tag containing a double quote (%q) — this produces malformed struct tags and breaks decoding. Remove the double quote from the conf tag value."

Phase 6 — Final verification

cd config && go build ./... && go vet ./... && go test -count=1 -race ./...

Commit Strategy

1. fix: go.mod deps, mkdir perms, README limitations and internal tools note
2. ci: add GitHub Actions with go vet, test -race, and golangci-lint
3. feat: support []int, []bool, []float64 env var overlays
4. feat: support map[string]T and map[string]any config fields
5. feat: panic on conf tags containing double quotes

Verification

After each phase:

go build ./... && go vet ./... && go test -count=1 -race ./...
## Overview Full production-readiness audit completed 2026-09-20. The original 7 items from #3 are all implemented. This issue tracks the remaining gaps identified during audit. ## Issue Tracker | # | Title | Tier | Phase | |---|-------|------|-------| | #4 | go.mod: yaml.v3 `// indirect` | tier-0-trivial | 1 | | #9 | InitWithTemplate mkdir `0o700` → `0o777` | tier-0-trivial | 1 | | #6 | Document cmd/ as internal dev tools | tier-0-trivial | 1 | | #10 | Add Known Limitations section to README | tier-0-trivial | 1 | | #5 | Add GitHub Actions CI workflow | tier-1-easy | 2 | | #8 | Non-string slice env var support | tier-2-medium | 3 | | #7 | Add `map[string]T` + `map[string]any` support | tier-2-medium | 4 | | #2 | Conf tags with double quotes | tier-2-medium | 5 | ## Phase 1 — Quick wins (4 trivial fixes in one commit) ### #4: Fix go.mod - Run `go mod tidy` — fixes yaml.v3 `// indirect` - Verify: `grep yaml go.mod` should NOT show `// indirect` ### #9: Fix mkdir permissions - `core/load.go:75` — change `0o700` to `0o777` - Existing tests still pass ### #6: Document cmd/ as internal - Add "Internal Tools" section to README.md after "Validation" ### #10: Known Limitations - Add section to README after "Supported Formats" - Covers: conf tag double-quote restriction, MergeWithRules wildcard leaf-name-only, map key type restriction ## Phase 2 — CI workflow ### #5: GitHub Actions Create `.github/workflows/ci.yml`: - build, vet, test -race, golangci-lint - Create `.golangci-lint.yml` with minimal config ## Phase 3 — Non-string slice env vars ### #8: Extend setSlice - `core/env.go` — add `[]int`, `[]bool`, `[]float64` parsing - `core/env_test.go` — tests for each type + parse error cases ## Phase 4 — Map support ### #7: map[string]T + map[string]any - Verify shadow type builder handles maps (likely already works) - `core/write.go` — nil map check for omitempty in structToMap - Tests: round-trip for map[string]string, map[string]int, map[string]any, empty/nil maps, external files, nested structures ## Phase 5 — Conf tag validation ### #2: Panic on double-quote conf tags - `core/tag.go` `buildShadowType` — panic with descriptive message - Message format: `"config: FATAL: field %q has conf tag containing a double quote (%q) — this produces malformed struct tags and breaks decoding. Remove the double quote from the conf tag value."` ## Phase 6 — Final verification ```bash cd config && go build ./... && go vet ./... && go test -count=1 -race ./... ``` ## Commit Strategy ``` 1. fix: go.mod deps, mkdir perms, README limitations and internal tools note 2. ci: add GitHub Actions with go vet, test -race, and golangci-lint 3. feat: support []int, []bool, []float64 env var overlays 4. feat: support map[string]T and map[string]any config fields 5. feat: panic on conf tags containing double quotes ``` ## Verification After each phase: ```bash go build ./... && go vet ./... && go test -count=1 -race ./... ```
Author
Member

✅ All phases complete

All 8 production-readiness issues are resolved and closed. Here's what was delivered:

Commits (in order)

  1. 8acff19 — fix: go.mod deps, mkdir perms, README limitations and internal tools note (Phase 1: #4, #9, #6, #10)
  2. 12320de — ci: add GitHub Actions with go vet, test -race, and golangci-lint (Phase 2: #5)
  3. e419f67 — feat: support []int, []bool, []float64 env var overlays (Phase 3: #8)
  4. 4b37031 — feat: add map[string]T and map[string]any support with tests (Phase 4: #7)
  5. 00ded01 — feat: panic on conf tag values containing double quotes (Phase 5: #2)

What each phase delivered

Phase Issues Summary
1 #4, #9, #6, #10 go.mod tidy (yaml.v3 direct), mkdir 0o777, README: "Known Limitations" + "Internal Tools" sections
2 #5 .github/workflows/ci.yml (build/vet/test-race) + .golangci-lint.yml
3 #8 setSlice extended for []int, []bool, []float64 — 6 new tests
4 #7 Maps already worked end-to-end — comprehensive test suite added (10 tests: round-trip, hand-written files, nested map[string]any)
5 #2 Defensive panic in buildShadowType if conf tag contains " (note: Go's Lookup truncates at first ", so this is defense-in-depth)

Test results

go build ./...   ✅
go vet ./...     ✅
go test -race    ✅ (47+ tests across config/ and core/)

Known limitations (documented in README)

  • Conf tags must not contain double quotes
  • MergeWithRules wildcards match leaf field name only, not dotted path
  • Map keys must be strings (map[string]T only)
## ✅ All phases complete All 8 production-readiness issues are resolved and closed. Here's what was delivered: ### Commits (in order) 1. `8acff19` — **fix: go.mod deps, mkdir perms, README limitations and internal tools note** (Phase 1: #4, #9, #6, #10) 2. `12320de` — **ci: add GitHub Actions with go vet, test -race, and golangci-lint** (Phase 2: #5) 3. `e419f67` — **feat: support []int, []bool, []float64 env var overlays** (Phase 3: #8) 4. `4b37031` — **feat: add map[string]T and map[string]any support with tests** (Phase 4: #7) 5. `00ded01` — **feat: panic on conf tag values containing double quotes** (Phase 5: #2) ### What each phase delivered | Phase | Issues | Summary | |-------|--------|---------| | 1 | #4, #9, #6, #10 | go.mod tidy (yaml.v3 direct), mkdir 0o777, README: "Known Limitations" + "Internal Tools" sections | | 2 | #5 | `.github/workflows/ci.yml` (build/vet/test-race) + `.golangci-lint.yml` | | 3 | #8 | `setSlice` extended for `[]int`, `[]bool`, `[]float64` — 6 new tests | | 4 | #7 | Maps already worked end-to-end — comprehensive test suite added (10 tests: round-trip, hand-written files, nested map[string]any) | | 5 | #2 | Defensive panic in `buildShadowType` if conf tag contains `"` (note: Go's `Lookup` truncates at first `"`, so this is defense-in-depth) | ### Test results ``` go build ./... ✅ go vet ./... ✅ go test -race ✅ (47+ tests across config/ and core/) ``` ### Known limitations (documented in README) - Conf tags must not contain double quotes - `MergeWithRules` wildcards match leaf field name only, not dotted path - Map keys must be strings (`map[string]T` only)
agent closed this issue 2026-09-20 15:49:48 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
residual/config#11
No description provided.