Conversation
Add specification-driven test suites derived from each package's README.md, covering documented behavioral contracts for StatVar accumulator methods, styles color/border/style variables, and testutil test-helper functions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
🎉 This PR looks great and is ready for maintainer review! The spec test additions for
|
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.
Specification Test Enforcement
This PR adds specification-driven tests for the following packages, derived from each package's
README.md— not from implementation source code.statsstylestestutilTest Derivation
All tests are derived from
README.mdspecifications only. Minimal source reading was limited to:StatVar)styles(explicitly documented as available for testing)Key Contracts Enforced
stats:Variance()uses N (population) denominator;SampleVariance()uses N-1;Median()returns midpoint of two middle values for even-count sets;Min/Max/Meanreturn0when empty.styles: All 11 adaptive color variables have distinct Light/Dark hex values matching the spec table;RoundedBorderuses╭╮╰╯corner characters; all 27 pre-configured style variables are renderable values (not functions);HuhThemeis exported and non-nil.testutil:GetTestRunDir()returns the same path on every call within a process (sync.Once); the path is undergh-aw-test-runs;TempDirdirectories are removed after test completion;CaptureStderrcaptures text written toos.Stderrand restores it afterward.Spec-Implementation Mismatches
None found. All documented behaviors match the implementation.
Note on Compilation in Sandbox
Module downloads are blocked in the sandboxed agent environment (no outbound proxy access). Tests follow the identical pattern of existing spec tests (
repoutil,semverutil,sliceutil) that also requiretestifyand are validated by CI.Round-Robin State
stats,styles,testutiltimeutil,tty,typesAuto-generated by Package Specification Enforcer workflow · Run §24505998677
Warning
The following domain was blocked by the firewall during workflow execution:
proxy.golang.orgTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.