Skip to content

Fix JSON tag casing, error handling, and documentation inconsistencies from PR #73 review#74

Merged
kellrott merged 4 commits intorefactor/output-sectionfrom
copilot/sub-pr-73
Feb 19, 2026
Merged

Fix JSON tag casing, error handling, and documentation inconsistencies from PR #73 review#74
kellrott merged 4 commits intorefactor/output-sectionfrom
copilot/sub-pr-73

Conversation

Copy link
Contributor

Copilot AI commented Feb 19, 2026

Addresses code review comments from PR #73 on the playbook refactoring work. Fixes struct tag mismatches that would break YAML unmarshaling, improves file I/O error handling, and corrects documentation to match the new params-based format.

Changes

Extractor struct tags - Changed json:"Path" to json:"path" in:

  • extractors/tabular_load.go
  • extractors/sqldump_step.go

Previously capitalized tags would fail to unmarshal playbooks using lowercase path: keys.

ReadAt error handling - Fixed extractors/transpose_load.go:

// Before: dropped last row on EOF, processed garbage beyond actual bytes
_, err := table.ReadAt(buf, row*stepSize)
tmp := bytes.Split(buf, []byte{0})
if err == nil { ... }

// After: handles EOF correctly, only processes valid bytes
n, err := table.ReadAt(buf, row*stepSize)
if err != nil && err != io.EOF {
    continue
}
if n > 0 {
    tmp := bytes.Split(buf[:n], []byte{0})
    ...
}

IsDir() type checking - Updated config/config.go to recognize both "dir" and "path" types:

func (in *Param) IsDir() bool {
    t := strings.ToLower(in.Type)
    return t == "path" || t == "dir"
}

Documentation corrections:

  • Fixed spelling: "Paramaters" → "Parameters" in docs/docs/config.md
  • Changed value: to default: in example yaml in docs/docs/inputs/index.md
  • Updated transpose schema: inputpath in docs/docs/schema.md

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 19, 2026 05:21
…sDir method, and doc typos

Co-authored-by: kellrott <113868+kellrott@users.noreply.github.com>
Co-authored-by: kellrott <113868+kellrott@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor playbook file format to use common output section Fix JSON tag casing, error handling, and documentation inconsistencies from PR #73 review Feb 19, 2026
Copilot AI requested a review from kellrott February 19, 2026 05:23
@kellrott kellrott marked this pull request as ready for review February 19, 2026 17:53
@kellrott kellrott merged commit 9d30c66 into refactor/output-section Feb 19, 2026
1 of 2 checks passed
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.

2 participants

Comments