Skip to content

test(security): cover nonce expiry and log stream properties - #475

Merged
scttbnsn merged 1 commit into
dev/v1.0from
test/mutation-fuzz-boundaries
Nov 7, 2026
Merged

scttbnsn merged 1 commit into
dev/v1.0from
test/mutation-fuzz-boundaries

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Check nonce retention at the exact wall-clock and elapsed-time expiry boundaries, including replay refusal and capacity reclamation. Strengthen the existing log-stream fuzzer to check payload bytes, stdout/stderr order, TTY passthrough and consumer-error propagation.

The previous tests passed four deliberate mutations: inclusive elapsed-time expiry, dropped payload bytes, swapped stream labels and swallowed consumer errors. The new assertions reject all four with test failures. Production source was restored after every probe.

Validation: go test -race ./..., a 30-second log-stream fuzz run (716,541 executions), fuzz-tier and ClusterFuzzLite configuration contracts. The target stays self-contained for the ClusterFuzzLite shim. Normal pre-push checks run before publication of this branch.

✨ Added

  • Add TestNonceLRU_ExpiryBoundary to check nonce retention at the two-minute TTL boundary and eviction when both wall-clock and elapsed time exceed the TTL.
  • Extend FuzzDecodeContainerLogStream to check payload integrity, stdout/stderr ordering, TTY passthrough, and consumer-error propagation.

Concerns

  • Completed CI, build, and test results: not available.
  • Current review finding counts: not available.

@coderabbitai

coderabbitai Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The PR adds table-driven tests for nonce expiration at the two-minute TTL boundary. It also extends the container log decoder fuzz test to check framed stdout and stderr, raw TTY input, and consumer-error propagation.

Possibly related issues

  • CodesWhat/portwing#428 — The issue concerns a failed run of FuzzDecodeContainerLogStream, which this PR expands; the failure cause is not stated, so whether these changes address it is unknown.

Possibly related PRs

  • CodesWhat/portwing#459 — Changes NonceLRU expiry to use the wall clock; this PR adds tests for nonce expiry boundaries.
  • CodesWhat/portwing#462 — Changes NonceLRU to require both clocks to exceed the TTL; this PR tests that expiry contract.

Suggested labels: second-opinion

Change: Other

Merge Risk: Minimal · up to 345c2

The added test coverage presents no identified merge-blocking risk; merge after normal checks.

Pre-merge checks: Passed 2

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 559dbd4 and 345c299.

Files selected for processing: 2

  • internal/auth/nonce_test.go
  • internal/docker/logs_fuzz_test.go

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@coderabbitai coderabbitai Bot added the second-opinion Summon Greptile for a second-opinion review label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

@greptileai Review exact head 345c29917ff1de9d198a039770b5d24dfed01d38. Review for correctness, security issues, and cross-file regressions.

@biggest-littlest biggest-littlest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the nonce retention/capacity assertions and the self-contained log-stream fuzz properties on 345c299. Four bounded mutation probes distinguish the strengthened assertions from the old tests. Full local hooks passed, and CodeRabbit completed its review on this head with no actionable comments. Hosted checks must finish before merge.

@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttbnsn
scttbnsn merged commit 0d0f211 into dev/v1.0 Nov 7, 2026
40 checks passed
@scttbnsn
scttbnsn deleted the test/mutation-fuzz-boundaries branch November 7, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

second-opinion Summon Greptile for a second-opinion review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants