Repository navigation
Widen the sidecar's pure-logic tests and refresh CLAUDE.md - #15
Merged
Merged
Conversation
Adds tests for audit, engine, compose, and helm, taking the sidecar from 7 test files to 11. The picks are the same as the first pass: pure logic that is security-relevant or easy to get subtly wrong — audit log permissions and tail behaviour, engine mode coercion and persistence, compose path/arg resolution and discovery bounds, helm values-file handling. To test the CLI-output parsing without a docker or helm binary on PATH, the three parsers are split out of the methods that shell out — parseComposeLs, parseComposePs, parseReleaseList — with no change in behaviour. One fix falls out of the helm tests: List mapped Revision with fmt.Sprint(item["revision"]), so a release whose JSON omits revision reached the UI as the literal string "<nil>". str() renders numbers identically and maps an absent field to "". CLAUDE.md claimed there were no tests and no TypeScript linter. Both stopped being true in 14fd7c4 and 3f26f9d respectively, so the file now describes the real gates, documents bun run lint / lint:fix, and records the split-parser convention. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ud4Wz8LSXsSuxRyRaJsb3X
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.
Follows on from 14fd7c4, taking the sidecar from 7 test files to 11.
Tests
auditTail(n)windowing and clamping, a missing log isn't an error, truncated lines are skipped, the log is created 0600, a nil*Loggeris a no-opengineSetModecoercing unknown modes to attach, embed recorded without claiming availability, persistence across stores, corruptengine.jsonfalling back to defaultscomposesplitConfigFiles,existingFiles,composeArgs,resolveCompose/resolveComposeOptionalFile(including the inline-YAML temp tree and its cleanup),Discover(skip lists, depth bound, depth clamp, one project per directory), and both output parsershelmparseReleaseListfield mapping,maybeValuesFile(0600,-fwiring, cleanup),strThe picks are the same as the first pass: pure logic that is security-relevant or easy to get subtly wrong.
Parser extraction
To exercise the CLI-output parsing without a
dockerorhelmbinary on PATH, three parsers are split out of the methods that shell out —parseComposeLs,parseComposePs,parseReleaseList. No behaviour change.One fix
helm.ListmappedRevisionwithfmt.Sprint(item["revision"]), so a release whose JSON omitsrevisionreached the UI as the literal string<nil>.str()renders numbers identically and maps an absent field to"".CLAUDE.md
It claimed there were no tests and no TypeScript linter — both stopped being true in 14fd7c4 and 3f26f9d. It now describes the real gates, documents
bun run lint/lint:fix, and records the split-parser convention.Verification
gofmt -l .clean,go build ./...,go vet ./...,go test ./...— all pass. UI is untouched.🤖 Generated with Claude Code
https://claude.ai/code/session_01Ud4Wz8LSXsSuxRyRaJsb3X